efficient-storefront-blocks 0.61.0 → 0.62.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 +63 -1
- package/dist/chunks/{EditorPreviewCheckout-55ERZEPV.js → EditorPreviewCheckout-BQFPYYBS.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-XF374NLZ.js → SiteEditorProvider-3E6XWZIS.js} +1 -1
- package/dist/chunks/chunk-4BQ44OLC.js +250 -0
- package/dist/chunks/chunk-MT5KWSYX.js +1 -0
- package/dist/chunks/chunk-OJ4OD3N6.js +1 -0
- package/dist/chunks/{fitment-data-RORHKBID.js → fitment-data-PWZAAUFK.js} +1 -1
- package/dist/editor/components/EditorPreviewChat.js +4 -4
- package/dist/editor/components/PreviewHeader.d.ts +1 -1
- package/dist/editor/components/PreviewHeader.js +4 -4
- package/dist/editor/lib/efficient-backend.d.ts +1 -0
- package/dist/editor/lib/efficient-backend.js +1 -1
- package/dist/editor/lib/efficient-block-sources.d.ts +2 -0
- package/dist/editor/lib/efficient-block-sources.js +1 -0
- package/dist/editor/lib/puck/blocks/commerce/EuTyreLabelBlock/fields.d.ts +2 -0
- package/dist/editor/lib/puck/blocks/commerce/EuTyreLabelBlock/fields.js +1 -0
- package/dist/editor/lib/puck/blocks/commerce/ProductGallery/fields.d.ts +6 -0
- package/dist/editor/lib/puck/blocks/commerce/ProductGallery/fields.js +1 -0
- package/dist/editor/lib/puck/blocks/commerce/ProductHero/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/commerce/index.d.ts +1 -1
- package/dist/editor/lib/puck/blocks/commerce/index.js +1 -1
- package/dist/editor/lib/puck/blocks/service/RatingBlock/fields.d.ts +2 -0
- package/dist/editor/lib/puck/blocks/service/RatingBlock/fields.js +1 -0
- package/dist/editor/lib/puck/blocks/service/index.d.ts +1 -1
- package/dist/editor/lib/puck/blocks/service/index.js +1 -1
- package/dist/editor/lib/puck/config.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +1 -0
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +101 -81
- package/dist/render/app/globals.css +70 -14
- package/dist/render/built-with.json +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 +0 -8
- package/dist/render/components/CartDrawer.js +2 -2
- package/dist/render/components/ChatWidget.js +1 -1
- package/dist/render/components/EuTyreLabels.d.ts +3 -0
- package/dist/render/components/EuTyreLabels.js +1 -1
- package/dist/render/components/FooterMenu.js +1 -1
- package/dist/render/components/FormBlock.js +1 -1
- package/dist/render/components/GalleryItem.js +1 -1
- package/dist/render/components/Header.js +1 -1
- package/dist/render/components/LegalLine.js +1 -1
- package/dist/render/components/PopupFrame.d.ts +2 -1
- package/dist/render/components/PopupFrame.js +1 -1
- package/dist/render/components/PopupHost.d.ts +17 -0
- package/dist/render/components/PopupHost.js +1 -0
- package/dist/render/components/ProductCard.js +1 -1
- package/dist/render/components/ProductGallery.d.ts +15 -0
- package/dist/render/components/ProductGallery.js +1 -0
- package/dist/render/components/ProductHeroPanel.js +1 -1
- package/dist/render/components/RatingStars.d.ts +4 -0
- package/dist/render/components/RatingStars.js +1 -0
- package/dist/render/components/Reviews.js +1 -1
- package/dist/render/components/StorefrontProviders.d.ts +1 -3
- package/dist/render/components/StorefrontProviders.js +1 -1
- package/dist/render/components/SubscribePopupContext.d.ts +3 -15
- package/dist/render/components/SubscribePopupContext.js +1 -1
- package/dist/render/components/TyrePlpCard.js +1 -1
- package/dist/render/components/WheelCardFrame.d.ts +3 -27
- package/dist/render/components/WheelCardFrame.js +1 -1
- package/dist/render/components/card-pieces/CardBuyButton.d.ts +7 -0
- package/dist/render/components/card-pieces/CardBuyButton.js +1 -0
- package/dist/render/components/card-pieces/CardFinishSwatches.d.ts +5 -0
- package/dist/render/components/card-pieces/CardFinishSwatches.js +1 -0
- package/dist/render/components/card-pieces/CardPrice.d.ts +7 -0
- package/dist/render/components/card-pieces/CardPrice.js +1 -0
- package/dist/render/components/card-pieces/CardProductBadge.d.ts +7 -0
- package/dist/render/components/card-pieces/CardProductBadge.js +1 -0
- package/dist/render/components/card-pieces/CardSizes.d.ts +9 -0
- package/dist/render/components/card-pieces/CardSizes.js +1 -0
- package/dist/render/components/card-pieces/ProductCardState.d.ts +53 -0
- package/dist/render/components/card-pieces/ProductCardState.js +1 -0
- package/dist/render/components/card-pieces/card-row.d.ts +20 -0
- package/dist/render/components/card-pieces/card-row.js +1 -0
- package/dist/render/components/cart/drawer-parts.d.ts +28 -0
- package/dist/render/components/cart/drawer-parts.js +1 -0
- package/dist/render/components/pdp-dynamic/DynamicEuTyreLabel.d.ts +3 -0
- package/dist/render/components/pdp-dynamic/DynamicEuTyreLabel.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicProductGallery.d.ts +9 -0
- package/dist/render/components/pdp-dynamic/DynamicProductGallery.js +1 -0
- package/dist/render/components/useHeaderBar.js +1 -1
- package/dist/render/components/useIsLightTheme.d.ts +1 -0
- package/dist/render/components/useIsLightTheme.js +1 -0
- package/dist/render/components/wheels-plp/PlpCard.d.ts +3 -2
- package/dist/render/components/wheels-plp/PlpCard.js +1 -1
- package/dist/render/components/wheels-plp/usePlpCardSelection.d.ts +1 -1
- package/dist/render/components/wheels-plp/usePlpCardSelection.js +1 -1
- package/dist/render/lib/api/index.d.ts +4 -2
- package/dist/render/lib/api/index.js +1 -1
- package/dist/render/lib/api/types.d.ts +48 -1
- package/dist/render/lib/chrome-load.d.ts +1 -1
- package/dist/render/lib/chrome-load.js +1 -1
- package/dist/render/lib/content/product-hero.d.ts +1 -0
- package/dist/render/lib/content/product-hero.js +1 -1
- package/dist/render/lib/header-fit.d.ts +2 -0
- package/dist/render/lib/header-fit.js +1 -0
- package/dist/render/lib/popup/popup-stores.d.ts +2 -0
- package/dist/render/lib/popup/popup-stores.js +1 -0
- package/dist/render/lib/puck/blocks/commerce/EuTyreLabelBlock/meta.d.ts +2 -0
- package/dist/render/lib/puck/blocks/commerce/EuTyreLabelBlock/meta.js +1 -0
- package/dist/render/lib/puck/blocks/commerce/EuTyreLabelBlock/render.d.ts +2 -0
- package/dist/render/lib/puck/blocks/commerce/EuTyreLabelBlock/render.js +1 -0
- package/dist/render/lib/puck/blocks/commerce/ProductGallery/meta.d.ts +2 -0
- package/dist/render/lib/puck/blocks/commerce/ProductGallery/meta.js +1 -0
- package/dist/render/lib/puck/blocks/commerce/ProductGallery/render.d.ts +2 -0
- package/dist/render/lib/puck/blocks/commerce/ProductGallery/render.js +1 -0
- package/dist/render/lib/puck/blocks/commerce/metas.d.ts +2 -0
- package/dist/render/lib/puck/blocks/commerce/metas.js +1 -1
- package/dist/render/lib/puck/blocks/commerce/renders.d.ts +2 -0
- package/dist/render/lib/puck/blocks/commerce/renders.js +1 -1
- package/dist/render/lib/puck/blocks/service/RatingBlock/meta.d.ts +3 -0
- package/dist/render/lib/puck/blocks/service/RatingBlock/meta.js +1 -0
- package/dist/render/lib/puck/blocks/service/RatingBlock/render.d.ts +2 -0
- package/dist/render/lib/puck/blocks/service/RatingBlock/render.js +1 -0
- package/dist/render/lib/puck/blocks/service/metas.d.ts +1 -0
- package/dist/render/lib/puck/blocks/service/metas.js +1 -1
- package/dist/render/lib/puck/blocks/service/renders.d.ts +1 -0
- package/dist/render/lib/puck/blocks/service/renders.js +1 -1
- package/dist/render/lib/puck/lazy-draws.js +1 -1
- package/dist/render/lib/storefront-page-groups.js +1 -1
- package/dist/render/lib/wheels/plp-fitment-match.d.ts +4 -0
- package/dist/render/lib/wheels/plp-fitment-match.js +1 -1
- package/dist/render/lib/wheels/spec-sheet.js +1 -1
- package/dist/words.d.ts +2 -2
- package/dist/words.js +3 -3
- package/package.json +4 -4
- package/dist/chunks/chunk-FCCEAXMM.js +0 -1
- package/dist/chunks/chunk-VVQ7KFQO.js +0 -1
- package/dist/chunks/chunk-YNI65Q6Z.js +0 -250
- package/dist/render/components/wheels-plp/useWheelCardBottom.d.ts +0 -20
- package/dist/render/components/wheels-plp/useWheelCardBottom.js +0 -1
- package/dist/render/lib/popup/popup-rules.d.ts +0 -25
- package/dist/render/lib/popup/popup-rules.js +0 -1
- /package/dist/chunks/{chunk-YNI65Q6Z.js.LEGAL.txt → chunk-4BQ44OLC.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-VT346MLP.js → chunk-FZFBLN7K.js} +0 -0
- /package/dist/chunks/{chunk-I6VNNXUI.js → chunk-TRUOK5AD.js} +0 -0
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
import{$ as Ps,A as $o,Aa as pu,B as Ut,C as $t,Ca as Kr,Da as mu,E as Qd,Ea as xu,H as Da,J as Jd,Ja as Iu,K as ks,L as eu,N as ou,O as tu,Q as au,R as Ts,T as ru,U as Ue,V as ct,W as nu,X as Io,Y as qr,_ as lu,a as Ud,c as $d,ca as su,d as Xe,da as Fs,e as zt,f as Oo,fa as Es,g as Cs,h as Kd,ja as iu,l as Ba,n as ws,pa as dt,ra as fu,s as Vd,t as Yd,ta as cu,u as vs,v as He,va as du,w as Xd,x as Zd,y as Gt,z as xo,za as V}from"./chunk-I6VNNXUI.js";import{d as qd,e as Aa,f as jd,g as uu,j as jr,n as Os}from"./chunk-VT346MLP.js";var Vr=null,gu="en",yu=null;function yH(e,o,t){Vr=e??null,gu=o||"en",yu=t??null}function X(){return yu}function Ls(){return gu}function bu(){return Vr}function hu(e,o){return o?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,a)=>Object.prototype.hasOwnProperty.call(o,a)?String(o[a]):t):e}function l(e,o){let t=Vr?Vr[e]:void 0;if(typeof t=="function"){try{let a=t(o??{});if(typeof a=="string"&&a)return a}catch{}return hu(e,o)}return hu(typeof t=="string"&&t?t:e,o)}function $e(e,o,t,a){return l(t===1?e:o,{...a,n:t})}function Ce(e,o){if(typeof e=="string")return e||o;if(e&&typeof e=="object"&&"text"in e){let t=e.text;return typeof t=="string"&&t?t:o}return o}function Su(e,o){return typeof e=="number"&&Number.isFinite(e)?e:o}function ut(e,o){return typeof e=="boolean"?e:o}function Yr(e,o){if(!Array.isArray(e))return o;let t=e.map(a=>typeof a=="string"?a:Ce(a?.text,"")).map(a=>a.trim()).filter(Boolean);return t.length?t:o}var Cu="cart-drawer",wH="cart-drawer";var aw={kickerBadge:"",kickerText:"Your order",titleLead:"Your",titleAccent:"cart.",subtitleEmpty:"Empty for now.",subtitleOne:"One set in your cart.",subtitleMany:"{count} sets in your cart.",leadTimeValue:"",shipsToFallback:"",promises:[],emptyKicker:"No wheels yet",emptyBody:"Your cart is empty. Pick a wheel to get started."};function vH(e,o){return o===0?e.subtitleEmpty:o===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(o))}function kH(e){let o=e??{},t=aw;return{kickerBadge:Ce(o.kickerBadge,t.kickerBadge),kickerText:Ce(o.kickerText,t.kickerText),titleLead:Ce(o.titleLead,t.titleLead),titleAccent:Ce(o.titleAccent,t.titleAccent),subtitleEmpty:Ce(o.subtitleEmpty,t.subtitleEmpty),subtitleOne:Ce(o.subtitleOne,t.subtitleOne),subtitleMany:Ce(o.subtitleMany,t.subtitleMany),leadTimeValue:Ce(o.leadTimeValue,t.leadTimeValue),shipsToFallback:Ce(o.shipsToFallback,t.shipsToFallback),promises:Yr(o.promises,t.promises),emptyKicker:Ce(o.emptyKicker,t.emptyKicker),emptyBody:Ce(o.emptyBody,t.emptyBody)}}var vu="consent-banner",FH="consent-banner";var rw=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],EH="Layout",wu={layout:"bar"},nw=e=>rw.some(o=>o.value===e);function OH(e){let o=Ce((e??{}).layout,wu.layout);return{layout:nw(o)?o:wu.layout}}var lw=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],AH={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"},sw={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"},BH={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 iw(e){return typeof e=="string"&&Oo.includes(e)?e:null}function ku(e){let o={};for(let t of lw){let a=iw(e[sw[t]]);a&&(o[t]=a)}return o}var Pu=["delay","scroll","exit"],Fu=["all","chosen","except"],Eu=["visit","days","never","once"],fw=["all","desktop","phone"],cw=["stop","continue"],Ou={min:0,max:60},Lu={min:10,max:90},Ru={min:1,max:90},Qe={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function Ze(e,o,t){return typeof o=="string"&&e.includes(o)?o:t}function qt(e,o,t){let a=Su(e,t);return Math.min(o.max,Math.max(o.min,Math.round(a)))}function dw(e){return typeof e.hideAfter=="string"?Ze(Eu,e.hideAfter,Qe.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Qe.hideAfter}function uw(e){return Array.isArray(e)?e.map(o=>typeof o=="string"?o.trim():"").filter(Boolean).map(o=>o.startsWith("/")?o:`/${o}`):[]}function Tu(e){if(typeof e!="string")return null;let o=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(o)?o:null}function Au(e){let o=e??{},t=Qe;return{autoOpen:ut(o.autoOpen,t.autoOpen),trigger:Ze(Pu,o.trigger,t.trigger),autoOpenDelaySec:qt(o.autoOpenDelaySec,Ou,t.autoOpenDelaySec),scrollPercent:qt(o.scrollPercent,Lu,t.scrollPercent),showOn:Ze(Fu,o.showOn,t.showOn),showOnPages:uw(o.showOnPages),devices:Ze(fw,o.devices,t.devices),hideAfter:dw(o),hideDays:qt(o.hideDays,Ru,t.hideDays),afterSubmit:Ze(cw,o.afterSubmit,t.afterSubmit),startDate:Tu(o.startDate),endDate:Tu(o.endDate)}}var jt="site-footer";var MH=jt,HH={desktop:!0,tablet:!0,mobile:!0},WH={desktop:!1,tablet:!1,mobile:!1},Rs=1,Bu=6,zH=Array.from({length:Bu-Rs+1},(e,o)=>Rs+o),Xr={desktop:6,tablet:3,mobile:2},pw={2:{desktop:2,tablet:2,mobile:1},3:{desktop:3,tablet:3,mobile:1},4:{desktop:4,tablet:2,mobile:2},5:{desktop:5,tablet:3,mobile:2},6:{desktop:6,tablet:3,mobile:2}},pt=e=>Math.min(Math.max(Math.round(e),Rs),Bu);function GH(e){if(typeof e=="number")return pw[pt(e)]??{desktop:pt(e),tablet:pt(e),mobile:pt(e)};if(e&&typeof e=="object"){let o=e;return{desktop:pt(o.desktop??Xr.desktop),tablet:pt(o.tablet??Xr.tablet),mobile:pt(o.mobile??Xr.mobile)}}return{...Xr}}var As="subscribe-popup",XH="subscribe-popup";var mw=[As,jt,Cu,vu];function _u(e){return mw.includes(e)}var xw=["right","left"],Iw={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
|
|
2
|
-
*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:Qe.autoOpen,autoOpenDelaySec:Qe.autoOpenDelaySec,formSlug:"",trigger:Qe.trigger,scrollPercent:Qe.scrollPercent,showOn:Qe.showOn,showOnPages:[],hideAfter:Qe.hideAfter,hideDays:Qe.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},ce=Ce,hw=ut,Nu=Yr;function Du(e,o){if(e==null)return o;let t=a=>a.trim()?a:"";if(typeof e=="string")return t(e);if(typeof e=="object"&&"text"in e){let a=e.text;return typeof a=="string"?t(a):""}return o}function gw(e,o){return Array.isArray(e)?Nu(e,[]):o}function yw(e,o){return Array.isArray(e)?e.map(t=>{let a=t??{};return{label:ce(a.label,""),value:ce(a.value,"")}}).filter(t=>t.label||t.value):o}function QH(e){let o=e??{},t=Iw,a=Au(o);return{metaLabel:ce(o.metaLabel,t.metaLabel),issueLabel:Du(o.issueLabel,t.issueLabel),issueNumber:Du(o.issueNumber,t.issueNumber),kicker:ce(o.kicker,t.kicker),heading:ce(o.heading,t.heading),deck:ce(o.deck,t.deck),stats:yw(o.stats,t.stats),formLabel:ce(o.formLabel,t.formLabel),formHeading:ce(o.formHeading,t.formHeading),formIntro:ce(o.formIntro,t.formIntro),firstNameLabel:ce(o.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:ce(o.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:ce(o.emailLabel,t.emailLabel),emailPlaceholder:ce(o.emailPlaceholder,t.emailPlaceholder),interestsLabel:ce(o.interestsLabel,t.interestsLabel),interests:Nu(o.interests,t.interests),frequencyLabel:ce(o.frequencyLabel,t.frequencyLabel),frequencies:gw(o.frequencies,t.frequencies),submitText:ce(o.submitText,t.submitText),finePrint:ce(o.finePrint,t.finePrint),dismissText:ce(o.dismissText,t.dismissText),emailInvalidText:ce(o.emailInvalidText,t.emailInvalidText),submitErrorText:ce(o.submitErrorText,t.submitErrorText),successHeading:ce(o.successHeading,t.successHeading),successBody:ce(o.successBody,t.successBody),keepBrowsingText:ce(o.keepBrowsingText,t.keepBrowsingText),formSlug:typeof o.formSlug=="string"?o.formSlug.trim():t.formSlug,autoOpen:a.autoOpen,autoOpenDelaySec:a.autoOpenDelaySec,trigger:a.trigger,scrollPercent:a.scrollPercent,showOn:a.showOn,showOnPages:a.showOnPages,hideAfter:a.hideAfter,hideDays:a.hideDays,formSide:Ze(xw,o.formSide,t.formSide),valuePanelOnPhone:hw(o.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:o.sectionAccent,sectionCorners:o.sectionCorners,sectionCornerSides:o.sectionCornerSides,textStyles:ku(o)}}import{jsx as Bs,Fragment as bw,jsxs as Sw}from"react/jsx-runtime";import{createContext as Cw,useContext as ww}from"react";var vw={mirrorHostStyles:!0,css:null,fontHrefs:[]},Mu=Cw(vw);function t5({value:e,children:o}){return Bs(Mu.Provider,{value:e,children:o})}function Ds(){return ww(Mu)}function Hu(){let{css:e,fontHrefs:o}=Ds();return Sw(bw,{children:[o.map(t=>Bs("link",{rel:"stylesheet",href:t},t)),e?Bs("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as kw}from"react/jsx-runtime";import{createContext as Tw,useContext as Pw}from"react";var Wu=Tw(void 0);function l5({metadata:e,children:o}){return kw(Wu.Provider,{value:e,children:o})}var zu=()=>Pw(Wu);import{jsx as me,Fragment as GC,jsxs as zr}from"react/jsx-runtime";import{useCallback as Gr,useEffect as Ke,useRef as q2,useState as j2}from"react";import{Button as K2,Tooltip as V2}from"efficient-shell/ui";import{SettingsSwitch as Y2}from"efficient-easel/panel";import{PagesIcon as X2,StylesIcon as Z2}from"efficient-easel/rail";import{PaletteIcon as Q2}from"efficient-shell/icons/efficient";import{TemplateIcon as J2}from"efficient-easel/icons";import{Subtree as eH,TreeRow as UC}from"efficient-easel/tree";import{useEasel as $C}from"efficient-easel/easel";import{useEaselStrings as qC}from"efficient-easel/strings";import{createContext as Fw,useContext as Ew}from"react";var _s=Fw(!1),f5=()=>Ew(_s);import{jsx as oe,Fragment as Nh,jsxs as ir}from"react/jsx-runtime";import{Fragment as OL,useEffect as LL,useId as RL,useMemo as Mh,useRef as AL,useState as nt}from"react";import{useScreenDocument as BL}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as wl}from"efficient-easel/draw/client";import DL from"efficient-easel/screen/components/SidePanelHead";import{jsx as Q,jsxs as rt,Fragment as Et}from"react/jsx-runtime";import{useEasel as Ch}from"efficient-easel/easel";import{useState as Wf}from"react";import{jsx as aa,jsxs as cI,Fragment as y1}from"react/jsx-runtime";import{useState as dI}from"react";import{SettingsDefaultReset as b1,SettingsField as S1}from"efficient-easel/panel";import{useEaselStrings as C1}from"efficient-easel/strings";import{AddIcon as w1}from"efficient-easel/icons";import{jsx as h,jsxs as Do,Fragment as Co}from"react/jsx-runtime";import{cloneElement as Tx,useId as cP,useRef as Yi,useState as An}from"react";import{useEasel as Xa,useSelectedFields as Xi}from"efficient-easel/easel";import{readHidable as et,hidableText as dP}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Zi,LINK_FIELD_MARKER as uP,MEDIA_FIELD_MARKER as pP,SCAFFOLD_FIELD_MARKER as mP,TEXT_FIELD_MARKER as _o,foldMetaOf as No,textFieldIdentifier as lG}from"efficient-easel/draw";import{jsx as Vu}from"react/jsx-runtime";import{useCallback as Bw,useEffect as Dw,useRef as _w,useState as Nw}from"react";import{useEasel as Mw}from"efficient-easel/easel";import{SettingsAction as Hw}from"efficient-easel/panel";function Ns(e){return typeof e=="number"&&Number.isFinite(e)}function u5(e,o){if(!Ns(e))return;let t=qr(Io(e));if(Object.keys(t).length===0)return;let a=t[Zr];if(typeof a!="string")return t;let r=_a(o)?Na(a,Lo(o)??[]):a;return{...t,[Ow]:r}}var Ow="--sf-section-radius",Zr="--sf-card-radius",mt=["tl","tr","br","bl"];function Lo(e){if(!Array.isArray(e))return null;let o=e.filter(t=>mt.includes(t));return mt.filter(t=>o.includes(t))}function _a(e){let o=Lo(e);return o!==null&&o.length<mt.length}function Na(e,o){return mt.map(t=>o.includes(t)?e:"0").join(" ")}var Gu=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var Lw="--sf-card-box-radius",Rw="--sf-site-card-radius",I5="sf-section-bleeds";function Ms(e){return typeof e=="number"&&Number.isFinite(e)}function h5(e,o){if(!Ms(e))return;let t=qr(Io(e))[Zr];if(typeof t!="string")return;let a=_a(o)?Na(t,Lo(o)??[]):t;return{[Lw]:a}}function g5(e){let o=e[Zr];return typeof o=="string"?{[Rw]:o}:{}}function Uu(e,o){let t=e.find(n=>n?.props?.id===o);if(!t)return[...e];let a=t.props?.cardCorners,r=t.props?.cardCornerSides;return e.map(n=>n?.props?.id===o?n:{...n,props:{...n.props,cardCorners:a,cardCornerSides:r}})}import{locateNode as Aw}from"efficient-easel/draw";function Ma(e){if(!e)return null;let o=e.lastIndexOf(":");return o>0?{ownerId:e.slice(0,o),slot:e.slice(o+1)}:null}function Qr(e,o,t){let a=Ma(t?.zone),r=a?Aw(e,o,a.ownerId):null;return r&&a?{...r,slot:a.slot}:null}function $u(e,o,t){let a=Qr(e,o,t),r=a?.slot??"",n=a&&Array.isArray(a.item.props[r])?a.item.props[r]:[],s=t?.index??-1,i=s>=0?n[s]:void 0,f=i?.props?.id?String(i.props.id):"",u=Math.max(n.length-1,0);return!a||!f?{can:!1,reason:"unreachable",others:0}:n.length<=1?{can:!1,reason:"alone",others:u}:Ms(i?.props?.cardCorners)?{can:!0,others:u,zone:a.zone,index:a.index,data:{...a.item,props:{...a.item.props,[r]:Uu(n,f)}}}:{can:!1,reason:"unset",others:u}}function qu(e){return e.can?$e("Gives the other card this card's Corners.","Gives the other {n} cards this card's Corners.",e.others):e.reason==="alone"?l("This is the only card in the section."):e.reason==="unset"?l("Set this card's corners first."):l("This card is not in a section that can share corners.")}function ju(e){return $e("Applied to {n} card","Applied to {n} cards",e)}function Ku(e,o){e.can&&o(e.zone,e.index,e.data)}import{useSectionOps as Ww}from"efficient-easel/screen/lib/puck/use-section-ops";var zw=2200,Gw="apply-corners-to-siblings",Uw="Apply to all cards";function $w({plan:e,doneCount:o,onPress:t}){return Vu(Hw,{id:Gw,label:l(Uw),note:qu(e),disabled:!e.can,done:o!==null,doneLabel:ju(o??0),onPress:t})}function Yu(){let{appState:e,config:o}=Mw(f=>f),t=Ww(),[a,r]=Nw(null),n=_w(null);Dw(()=>()=>{n.current&&clearTimeout(n.current)},[]);let s=$u(o,e.data.content??[],e.ui.itemSelector),i=Bw(()=>{Ku(s,t.replaceComponent),s.can&&(r(s.others),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>r(null),zw))},[s,t]);return Vu($w,{plan:s,doneCount:a,onPress:i})}var Xu=1;function qw(e){return Io(e)}function D5(e){let o=qw(e);return o===null?{}:{"--sf-card-image-radius":`${o}px`}}var Zu=1,Qu="Corners";function jw(e){return Io(e)}function H5(e,o){let t=jw(e);if(t===null)return null;let a=`${t}px`;return{borderRadius:_a(o)?Na(a,Lo(o)??[]):a}}var Ro={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]]}},Hs=Object.keys(Ro),ep=[2,3,4,6];function op(e){return typeof e!="string"||e===""?null:Ro[e]??null}function Ju(e,o){return o?6/e.acrossPhone:12/e.across}var Kw="sf-wall--";function Vw(e){return`${Kw}${e}`}function z5(e){let o=Ro[e],t=`.${Vw(e)}`,a=[],r=(n,s)=>{let i=[],f=n.length;n.forEach(([u,p],m)=>{i.push(`${t} > :nth-child(${f}n+${m+1}){grid-column:span ${u};grid-row:span ${p}}`)});for(let u=1;u<f;u+=1)i.push(`${t}:has(> :nth-child(${f}n+${u}):last-child) > :nth-last-child(-n+${u}){grid-column:span ${s};grid-row:span 1}`);return i};return a.push(`${t}{grid-template-columns:repeat(12,minmax(0,1fr))}`),a.push(...r(o.desktop,Ju(o,!1))),a.push("@media (max-width:800px){"),a.push(`${t}{grid-template-columns:repeat(6,minmax(0,1fr))}`),a.push(...r(o.phone,Ju(o,!0))),a.push("}"),a.join("")}var Jr=12,tp=1,Yw=3;var Xw=3;function Ws(e,o,t){let a=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(a)?Math.min(t,Math.max(o,Math.trunc(a))):null}function Zw(e){return Ws(e,1,Jr)??Xw}function $5(e,o){return Ws(e,tp,Yw)??(Zw(o)===4?2:tp)}function q5(e){return e==null||e===""?null:Ws(e,1,Jr)}var j5="data-sf-span";function K5(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if(op(e.props?.layout))return!1;let o=e.props?.columns;return o!=null&&o!==""}return!1}var qo=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],en="bottom-left";var zs={"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 Qw(e){let o=qo.indexOf(xt(e));return{band:Math.floor(o/3),column:["start","center","end"][o%3]}}function Jw(e){return 1+Qw(e).band*6}function Y5(e){return Jw(e)+1}function xt(e){return qo.includes(e)?e:en}function X5(e){let o=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-40,Math.min(40,Math.round(o)))}function Z5(e,o=60){let t=typeof e=="number"&&Number.isFinite(e)?e:o;return Math.max(30,Math.min(100,Math.round(t)))}function Gs(e,o){let t=xt(o);return e.filter(a=>xt(a?.props?.placement)===t).length}function ap(e){return`${zs[xt(e)]} already holds 4 boxes. Move one somewhere else first.`}function Us(e,o){let t=e.filter(a=>a?.props?.id!==o);return qo.map(a=>{let r=Gs(t,a)>=4,n=zs[a];return r?{value:a,label:n,disabled:!0,title:ap(a)}:{value:a,label:n}})}function on(e,o){let t=o===void 0?en:xt(o?.props?.placement);return Gs(e,t)>=4?ap(t):null}var tn="HeroGroup";function ev(e){return qo.map(o=>{let t=Gs(e,o);return{anchor:o,total:t,hidden:t-4}}).filter(o=>o.hidden>0)}function $s(e){let o=ev(e);return o.length===0?null:o.map(({anchor:t,total:a,hidden:r})=>{let n=zs[t],s=r===1?"1 is not shown":`${r} are not shown`;return`${n} holds ${a} boxes. The published page draws the first 4, so ${s}. ${r===1?"Move it":"Move them"} somewhere else.`}).join(" ")}function rp(e,o){let t=o;if(t?.type!==tn)return null;let a=t.props?.id===void 0?"":String(t.props.id);return a?on(qs(e,a),t):null}function qs(e,o){let t=lp(e,o);return t&&t.ownerType===tv?t.siblings:[]}function np(e,o){let t=lp(e,o);return t?t.ancestorTypes.filter(a=>a===tn).length:ov}var ov=1,tv="HeroSlide";function lp(e,o){let t=r=>Array.isArray(r)&&r.length>0&&r.every(n=>!!n&&typeof n=="object"&&typeof n.type=="string"),a=(r,n,s)=>{if(n>12||!r||typeof r!="object")return null;if(t(r)){if(r.some(i=>i?.props?.id===o))return{siblings:r,ownerType:s.at(-1)??null,ancestorTypes:s};for(let i of r){let f=i.type,u=a(i,n+1,[...s,String(f)]);if(u)return u}return null}for(let i of Object.values(r)){let f=a(i,n+1,s);if(f)return f}return null};return a(e,0,[])}import{jsx as av}from"react/jsx-runtime";var rv="sf-hint-keep";function sp({children:e}){return av("span",{className:rv,children:e})}import{jsx as jo,Fragment as lv,jsxs as xp}from"react/jsx-runtime";import{useContext as sv,useEffect as iv,useId as fv,useState as Ip}from"react";import{SettingsField as cv,SettingsSwitch as dv}from"efficient-easel/panel";import{AnchorIcon as uv}from"efficient-easel/icons";import{ScreenDocumentContext as pv}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as mv}from"efficient-shell/ui";var an="homepage";function It(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}var ip=[{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 fp(e){return e.offersCommerce&&e.offersService?ip:ip.filter(o=>!o.needs||(o.needs==="commerce"?e.offersCommerce:e.offersService))}var js="#popup:";function cp(e){return`${js}${e}`}function dp(e){return e.startsWith(js)&&e.slice(js.length).trim()||null}function Ha(e){return e===an?"/":`/${e}`}function up(e){return`/journal/${e}`}function n3(e){return`/wheels/${e}`}function rn(e,o){return`${Ha(e)}#${o}`}function Ks(e){return It(e)}function nv(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function pp(...e){let o=new Set,t=[];for(let a of e)for(let r of a?.content??[]){let n=nv(r?.props?.anchor);if(!n)continue;let s=Ks(n);!s||o.has(s)||(o.add(s),t.push({slug:s,name:n}))}return t}function l3(e){let o=e.indexOf("#"),t=o===-1?e:e.slice(0,o),a=t.indexOf("?");return a===-1?t:t.slice(0,a)}function mp(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as xv}from"efficient-easel/draw";function hp({value:e,onChange:o,nameBox:t}){let a=xv(e).text,[r,n]=Ip(!1),s=r||a.trim()!=="",i=fv();return xp(lv,{children:[jo(cv,{label:l("Add an anchor"),labelId:i,icon:jo(uv,{}),action:jo(dv,{checked:s,ariaLabelledBy:i,onChange:f=>{n(f),!f&&a!==""&&o("")}})}),s&&t(e,o),s&&jo(Iv,{name:a})]})}function Iv({name:e}){let o=sv(pv),t=o?.templateId?"":o?.currentSlug??"",[a,r]=Ip("");iv(()=>r(jr()||window.location.origin),[]);let n=Ks(e);if(!n||!t)return null;let s=`${a}${rn(t,n)}`,i=s.replace(/^https?:\/\//,""),f=i.lastIndexOf("#");return jo("div",{className:"sf-anchor-link",children:jo(mv,{value:s,label:l("link"),size:"sm",children:xp("span",{className:"sf-anchor-link-text",children:[jo("span",{className:"sf-anchor-link-path",children:i.slice(0,f)}),jo("span",{className:"sf-anchor-link-hash",children:i.slice(f)})]})})})}import{AdjustIcon as xP,AlignLeftIcon as IP,EyeIcon as hP,AlignSeparateIcon as gP,AnimationIcon as Px,BackgroundIcon as yP,BorderAllIcon as bP,BlockSectionIcon as SP,CartIcon as CP,ColumnWidthsIcon as Fx,ColumnsIcon as wP,CornerIcon as vP,DirectionDownIcon as kP,DirectionLeftIcon as TP,DirectionRightIcon as PP,DirectionUpIcon as FP,DollarIcon as EP,FinishIcon as OP,GapIcon as Ex,GridIcon as LP,GroundIcon as RP,HashIcon as Ox,HeightIcon as AP,ImageIcon as BP,ListIcon as DP,LocationIcon as Vi,NudgeIcon as _P,PaddingAllIcon as NP,PaddingBottomIcon as Lx,PaddingLeftIcon as Rx,PaddingRightIcon as Ax,PaddingTopIcon as Bx,PageIcon as Dx,PhoneIcon as MP,PlacementIcon as HP,ProductSizeIcon as WP,StickyIcon as zP,RotateIcon as GP,SquareIcon as UP,TypeIcon as $P,WidthIcon as qP,WrapIcon as jP}from"efficient-easel/icons";import{jsx as ee,Fragment as ho,jsxs as go}from"react/jsx-runtime";import{TitleIcon as hv,ButtonIcon as gv,DollarIcon as yv,HashIcon as bv,LinkIcon as Sv,NoteIcon as Cv,TagIcon as wv,TextLinesIcon as vv}from"efficient-easel/icons";var gp={body:vv,button:gv,link:Sv,label:wv,number:bv,price:yv,note:Cv,title:hv},yp={eyebrow:go(ho,{children:[ee("path",{d:"M5 6.5h5"}),ee("path",{d:"M5 12.5h14"}),ee("path",{d:"M5 18h11"})]}),heading:go(ho,{children:[ee("path",{d:"M6.5 5v14"}),ee("path",{d:"M17.5 5v14"}),ee("path",{d:"M6.5 12h11"})]}),intro:go(ho,{children:[ee("path",{d:"M4 5.5v13"}),ee("path",{d:"M8 7.5h12"}),ee("path",{d:"M8 12h12"}),ee("path",{d:"M8 16.5h8"})]}),value:go(ho,{children:[ee("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),ee("path",{d:"M6.5 12h7"})]}),name:go(ho,{children:[ee("path",{d:"M6 3.5v17"}),ee("path",{d:"M6 5h11.5l-2.6 3.6L17.5 12H6z"})]}),date:go(ho,{children:[ee("rect",{x:"4",y:"5.5",width:"16",height:"15",rx:"2"}),ee("path",{d:"M4 10.5h16"}),ee("path",{d:"M9 3.2v4.4"}),ee("path",{d:"M15 3.2v4.4"})]}),caption:go(ho,{children:[ee("rect",{x:"3.5",y:"4.5",width:"17",height:"11",rx:"2"}),ee("path",{d:"M3.5 12.8l4.2-3.2 3.6 2.8 3.4-2.4 5.8 4"}),ee("path",{d:"M6.5 19.5h11"})]}),quote:go(ho,{children:[ee("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),ee("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:go(ho,{children:[ee("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),ee("path",{d:"M8 9.5h8"}),ee("path",{d:"M12 9.5v5"})]}),meta:go(ho,{children:[ee("path",{d:"M4 7h16"}),ee("path",{d:"M4 14h3.5"}),ee("path",{d:"M10.5 14h3"}),ee("path",{d:"M17 14h3"})]})};function Vs({noun:e,size:o=14,strokeWidth:t=1.8,className:a,style:r}){let n=gp[e];return n?ee("span",{className:a,style:{display:"inline-flex",...r},"aria-hidden":"true",children:ee(n,{size:o})}):ee("svg",{className:a,style:r,width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:yp[e]})}var S3=Object.keys(gp);var C3=Object.keys(yp);var kv="#ffffff",Tv=/^#[0-9a-fA-F]{6}$/;function Ys(e){return Pv(e)?e:kv}function Pv(e){return typeof e=="string"&&Tv.test(e)}function v3(e){return{"--bg":Ys(e)}}var Xs=[{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}],Fv=Xs.filter(e=>e.ink);function Ev(e){let o={color:e.fg};for(let{role:t,token:a}of Fv)o[a]=e[t];return o}var Ov={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},bp=Object.freeze(Ev(Ov));var nn=-1,Lv="sf-section-accent",Sp="Color",Cp=new Set(["CategoryBar","DocTabs"]),F3=new Set(["Flex"]),Rv=0;function Zs(e){return e===nn?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:Rv}function E3(e){return e??nn}function Av(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:a}of Xs)t[`--sf-sec-${a}`]=`var(${o}-${a}, var(--theme-${a}))`;return t}function O3(e){let o=Zs(e.sectionAccent);return o===null?null:{className:Lv,style:Av(o)}}var Bv=["fade","rise","scale"],Qs="none",wp=[{label:"None",value:Qs},{label:"Fade",value:"fade"},{label:"Rise",value:"rise"},{label:"Scale",value:"scale"}];function A3(e){return Bv.includes(e)?e:null}var vp="data-sf-anim",Wa="data-sf-anim-state";function B3(e){let o=()=>{};if(typeof IntersectionObserver>"u"||!e.getAttribute(vp))return o;let t=window.innerHeight||document.documentElement.clientHeight;if(e.getBoundingClientRect().top<t)return o;e.setAttribute(Wa,"armed");let a=new IntersectionObserver(r=>{for(let n of r)if(n.isIntersecting){a.disconnect(),Dv(e);break}},{threshold:0});return a.observe(e),()=>{a.disconnect(),e.removeAttribute(Wa)}}function Dv(e){if(!e.getAttribute(vp))return;e.removeAttribute(Wa),e.offsetWidth,e.setAttribute(Wa,"play");let o=t=>{t.target===e&&(e.removeAttribute(Wa),e.removeEventListener("animationend",o))};e.addEventListener("animationend",o)}var D3=Cp;function ei(e,o){let t=e?.content;if(!Array.isArray(t))return null;for(let a of t){if(!a||typeof a!="object")continue;let r=a.props;if(r?.id===o)return null;if(Js(a,o,0))return r??{}}return null}function Js(e,o,t){if(t>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(r=>Js(r,o,t+1));let a=e.props;return a&&typeof a=="object"&&a.id===o?!0:Object.values(e).some(r=>Js(r,o,t+1))}import{SettingsDefaultReset as Ee,SettingsField as te,SettingsGroupHead as KP,SettingsGroupSub as VP,SettingsBorder as YP,SettingsSegmented as XP,SettingsSides as ZP,SettingsSidesEach as _x,sidesStartEach as QP,SettingsSwitch as Nx,borderSides as JP,borderStartEach as eF}from"efficient-easel/panel";import{FieldSelect as oF,ListField as tF}from"efficient-easel/fields";import{DisplayChips as aF}from"efficient-shell/ui";function Kt(e){if(!e||typeof e!="object"||Array.isArray(e))return{};let o={};for(let[t,a]of Object.entries(e))typeof a=="boolean"&&(o[t]=a);return o}function ln(e,o){return Kt(e)[o]!==!1}function oi(e,o,t){let a=Kt(o)[t];return typeof a=="boolean"?a:ln(e,t)}function kp(e){return Object.values(Kt(e)).some(o=>o===!1)}function Tp(e){return Object.keys(Kt(e)).length>0}function Pp(e,o,t){let a={...Kt(e)};return t?delete a[o]:a[o]=!1,Object.keys(a).length?a:void 0}function Fp(e,o,t){return{...Kt(e),[o]:t}}function M3(e,o,t){let a=ln(e,t),r=oi(e,o,t);return a&&r?"":!a&&!r?"hidden":a?"max-[720px]:hidden":"min-[720px]:hidden"}import{AlignmentGrid as rF,Checkbox as TG,CornersInput as nF,DateTimePicker as lF,FOCAL_DEFAULT as PG,PictureTiles as Mx,PositionInput as sF,Slider as iF,Tooltip as Hx}from"efficient-shell/ui";import{jsx as ht,jsxs as Nv}from"react/jsx-runtime";import{ColorPicker as Mv,HexInput as Hv}from"efficient-shell/ui";import{SettingsDefaultReset as Wv,SettingsField as zv}from"efficient-easel/panel";import{typedHex as ti}from"efficient-easel/pick";import{typedHex as _v}from"efficient-easel/pick";function Ep(e){let o=new Set,t=[];return He(e).themes.forEach((a,r)=>{let n=[[l("Theme {n} main color",{n:r+1}),a.accent],[l("Theme {n} text color",{n:r+1}),a.text],[l("Theme {n} background",{n:r+1}),a.background]];for(let[s,i]of n){let f=i?_v(i):null;!f||o.has(f)||(o.add(f),t.push({name:s,value:f}))}}),t}function qe({value:e,onChange:o,label:t,id:a,caption:r,inherited:n,after:s,ariaLabel:i}){return ht(Uv,{value:e,onChange:o,label:l(i??t),id:a,caption:r,inherited:n,after:s})}function Gv(){let{theme:e}=V();return Ep(e).map(o=>({value:o.value,label:o.name}))}function Uv({value:e,onChange:o,label:t,id:a,caption:r,inherited:n,after:s}){let i=Gv(),f=e?null:ti(n??""),u=r!==void 0&&(!e||ti(r)!==ti(e))?r:null,p=m=>{m!==e&&o(m)};return Nv("div",{className:"sf-colour",children:[ht(Mv,{id:a,value:e,onChange:p,label:t,presets:i,fallback:f??void 0,size:"sm",align:"end"}),u!==null?ht("span",{className:"sf-colour-caption",children:u}):ht("span",{className:"sf-colour-hexwrap",children:ht(Hv,{value:e||f||"",onChange:p,label:l("{label} hex code",{label:t}),placeholder:e||f?void 0:l("Not set"),className:f?"sf-colour-hex is-inherited":"sf-colour-hex",size:"sm"})}),s]})}function sn({label:e,icon:o,value:t,inherited:a,resetTo:r,onChange:n,onReset:s,hint:i}){let f=!!t;return ht(zv,{label:e,icon:o,changed:f,action:qe({value:t,inherited:f?void 0:a,onChange:n,label:e,after:ht(Wv,{words:X()?.panel,label:e,changed:f,detail:r,onReset:s})}),hint:i})}import{jsx as za}from"react/jsx-runtime";import{useEffect as pk,useState as mk}from"react";import{markSelection as xk,useCaretEdit as Ik}from"efficient-easel/copy";import{RevertIcon as hk}from"efficient-easel/icons";import{IconButton as gk,TextToolbar as yk,Tooltip as bk}from"efficient-shell/ui";import{applyMark as n4,markupTools as l4,MARKUP_TOOLS as s4,COPY_FIELD_TOOLS as i4,STOREFRONT_MARKUP as f4,tokenizeInline as c4,stripInline as d4,isSafeLinkHref as u4}from"efficient-shell/markup";import{applyMark as ok,markedAt as tk,markupTools as ak,MARKUP_TOOLS as rk,parseMarkup as nk,RETIRED_MARKS as lk,STOREFRONT_MARKUP as sk,tokenizeInline as m4}from"efficient-shell/markup";var gt=["highlight","strong","quiet"],yt={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},yo={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},J3=Object.fromEntries(gt.map(e=>[yo[e].kind,e])),e4="data-sf-ws",fn=["accent","text","labels"],Ap={accent:"Accent",text:"Text",labels:"Labels"},Vt={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},$v=80,qv=120,jv=100,Kv=900,Vv=.5,Yv=3,Xv=-.1,Zv=.5,Qv=3,ai={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},Jv={highlight:{...ai},strong:{...ai},quiet:{...ai}};function Op(e,o,t){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,o),t))}function Lp(e,o,t){if(typeof e!="number"||!Number.isFinite(e))return null;let a=10**Qv;return Math.round(Math.min(Math.max(e,o),t)*a)/a}function Rp(e){return typeof e=="boolean"?e:null}function ek(e){let o=typeof e?.font=="string"&&Xe.some(a=>a.key===e.font)?e.font:null,t=typeof e?.colour=="string"&&fn.includes(e.colour)?e.colour:null;return{font:o,size:Op(e?.size,$v,qv),weight:Op(e?.weight,jv,Kv),bold:Rp(e?.bold),italic:Rp(e?.italic),lineGap:Lp(e?.lineGap,Vv,Yv),textGap:Lp(e?.textGap,Xv,Zv),colour:t}}function Bp(e){let o={};for(let t of gt)o[t]=e&&t in e&&e[t]?ek(e[t]):{...Jv[t]};return o}function o4(e){let o=Bp(e),t={};for(let a of gt){let r=o[a],n=`--sf-ws-${a}`;if(r.font){let s=Xe.find(i=>i.key===r.font);s&&(t[`${n}-font`]=`var(${s.cssVar})`)}r.size!==null&&(t[`${n}-size`]=`${r.size/100}em`),r.weight!==null&&(t[`${n}-weight`]=String(r.weight)),r.bold!==null&&(t[`${n}-weight-bold`]=r.bold?"700":"400"),r.italic!==null&&(t[`${n}-style`]=r.italic?"italic":"normal"),r.lineGap!==null&&(t[`${n}-line`]=String(r.lineGap)),r.textGap!==null&&(t[`${n}-track`]=`${r.textGap}em`),r.colour!==null&&(t[`${n}-color`]=Vt[r.colour])}return t}function t4(e){let o=e?.word_styles??void 0,t={};for(let a of gt)o&&a in o&&(t[a]=o[a]??null);return Bp(t)}var ik=new Set(["strong"]),Dp=gt.map(e=>({open:yo[e].delimiter,close:yo[e].delimiter,kind:yo[e].kind,...ik.has(e)?{wordStart:!0}:{}})),I4=[{style:yo.highlight.kind,label:yt.highlight,title:`${yt.highlight} word style`},{style:yo.strong.kind,label:yt.strong,title:`${yt.strong} word style`},{style:yo.quiet.kind,label:yt.quiet,title:`${yt.quiet} word style`}],fk=new Set(Dp.map(e=>e.open)),Yt=[...sk.filter(e=>!fk.has(e.open)),...Dp];function ck(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function dk(e){return nk(typeof e=="string"?e:"",Yt)}var uk=rk.map(e=>e.style).filter(e=>!lk.includes(e)).filter(e=>Yt.some(o=>o.kind===e));function _p(){return ak(uk)}var Np=Object.fromEntries(gt.map(e=>[yo[e].kind,yo[e].delimiter]));function Mp(e,o,t,a){let r=Np[a];if(!r)return ok(e,o,t,a);let n=e.slice(o,t),s=e.slice(Math.max(0,o-r.length),o),i=e.slice(t,t+r.length);if(s===r&&i===r)return{text:e.slice(0,o-r.length)+n+e.slice(t+r.length),selectionStart:o-r.length,selectionEnd:o-r.length+n.length};let f=n||"styled text";return{text:e.slice(0,o)+r+f+r+e.slice(t),selectionStart:o+r.length,selectionEnd:o+r.length+f.length}}function Hp(e,o,t,a){let r=Np[a];return r?o>=r.length&&e.slice(o-r.length,o)===r&&e.slice(t,t+r.length)===r:tk(e,o,t,a)}function bt(e){return dk(e).map(o=>ck(o)+Wp(o.children)).join(`
|
|
3
|
-
`)}function Wp(e){return e.map(o=>o.kind==="text"?o.text:Wp(o.children)).join("")}var zp="Clear formatting";function Sk(e,o,t){return xk(e,o,t,Mp)}function Ck(e){let[o,t]=mk(null);return pk(()=>{let a=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!a)return;let r=()=>{let n=e.current;if(!n||a.activeElement!==n)return;let s=n.selectionStart??n.value.length,i=n.selectionEnd??s;t(f=>f&&f.start===s&&f.end===i?f:{start:s,end:i})};return a.addEventListener("selectionchange",r),()=>a.removeEventListener("selectionchange",r)},[e]),[o,t]}function wk({target:e,value:o,onChange:t,disabled:a=!1,label:r="Formatting"}){let n=Ik({target:e,onChange:t}),[s,i]=Ck(e),f=x=>n(I=>{let y=Sk(o,x,I);return i({start:y.selectionStart,end:y.selectionEnd}),y}),u=_p(),p={};if(s)for(let x of u)p[x.style]=Hp(o,s.start,s.end,x.style);let m=bt(o);return za(yk,{offered:new Set(u.map(x=>x.style)),onMark:x=>f(x),pressed:p,disabled:a,"aria-label":l(r),className:"sf-markup-bar",last:za("span",{className:"sf-markup-clear",children:za(bk,{content:l(zp),children:za(gk,{size:"sm",onMouseDown:x=>x.preventDefault(),onClick:()=>t(m),disabled:a||m===o,"aria-label":l(zp),children:za(hk,{size:14})})})})})}var ri=wk;import{deviceField as we}from"efficient-easel/screen/lib/puck/device-fields";import{NO_CONTROL_FIELD as fF,NoControlMark as Bn,noControlField as Za}from"efficient-easel/screen/lib/puck/panel-no-control-mark";var ni="__ownBox";function Gp(e){return!!e&&typeof e=="object"&&e[ni]===!0}function Ao(e){return`${e}Phone`}function cn(e,o,t){return typeof e=="number"?e:typeof o=="number"?o:t}var dn=void 0;import{jsx as si,Fragment as Tk}from"react/jsx-runtime";import{createContext as Pk,useContext as Fk}from"react";var un={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},pn={Events:["posts"],SubscribeBlogs:["posts"]};var vk=["anchor"],kk=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function Ga(e){return vk.includes(e)||kk.test(e)}var li={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"}}};li.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var O4=Object.fromEntries(Object.entries(un).map(([e,o])=>[e,Object.keys(o)])),L4=Object.fromEntries(Object.entries(pn).map(([e,o])=>[e,[...o]]));import{NoControlMark as Ek}from"efficient-easel/screen/lib/puck/panel-no-control-mark";var Up=Pk(!1);function $p({children:e}){return si(Up.Provider,{value:!0,children:e})}function Ok(){return Fk(Up)}function qp({name:e,children:o}){return!Ok()||!e||Ga(e)?si(Tk,{children:o}):si(Ek,{})}function Ko(e,o,t){return e.some(a=>(typeof a=="object"?a.value:a)===t)?t:o}var ii="off",fi="none",ci=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],di=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function W4(e){return Ko(ci,ii,e)}function z4(e){return Ko(di,fi,e)}var jp="sf-card-index",Ua="sf-card-index",G4="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",Lk={plain:`counter(${Ua})`,padded:`counter(${Ua}, decimal-leading-zero)`,numero:`"N\xB0" counter(${Ua}, decimal-leading-zero)`};function U4(e,o){return o==="off"?"":`.${e}{counter-reset:${Ua}}.${e} .${jp}{counter-increment:${Ua}}.${e} .${jp}::before{content:${Lk[o]}}`}function $4(e){return e==="hairline"?"border border-line hover:border-accent":""}var Kp=[{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 cF}from"efficient-easel/draw";import{jsx as bo}from"react/jsx-runtime";import{SettingsDefaultReset as Bk,SettingsField as Yp}from"efficient-easel/panel";import{useSelectedFields as Dk}from"efficient-easel/easel";import{FOCAL_DEFAULT as _k}from"efficient-shell/format";import{ImageIcon as Xp,PlayIcon as Zp}from"efficient-easel/icons";import{MediaUploadField as Nk}from"efficient-shell/ui";import{useContext as Mk}from"react";import{ScreenDocumentContext as Hk}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewDevice as Wk}from"efficient-easel/draw/client";import{requestMediaPick as zk}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as Gk}from"efficient-easel/screen/lib/host";function Rk(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function Vp(e){return typeof e=="string"?e:Rk(e)?e.src:""}function K4(e,o,t){return ui(e,o.split("."),t)}function ui(e,o,t){if(o.length===0)return t(e);let[a,...r]=o,n=a.endsWith("[]"),s=n?a.slice(0,-2):a;if(!e||typeof e!="object"||Array.isArray(e))return e;let i=e;if(!(s in i))return e;let f=i[s];if(n){if(!Array.isArray(f))return e;let p=!1,m=f.map(x=>{let I=ui(x,r,t);return I!==x&&(p=!0),I});return p?{...i,[s]:m}:e}let u=ui(f,r,t);return u===f?e:{...i,[s]:u}}import{backendOf as Ak}from"efficient-easel/screen/lib/session";var Se=Ak,mn=e=>e.blocks;import{useEaselSession as Uk}from"efficient-easel/screen/lib/session-context";function $k(e,o){let t=null;try{t=Dk()}catch{t=null}let a=Wk()==="mobile";if(!e||!t||o&&!o(t.values??{}))return null;let r=typeof t.values?.[e]=="string"&&t.values[e]?String(t.values[e]):_k,n=Ao(e),s=typeof t.values?.[n]=="string"&&t.values[n]?String(t.values[n]):void 0,i=t.onChange;return{phone:a,desktop:r,own:s,focus:a?s??r:r,set:f=>i(a?n:e,f),clear:()=>i(n,dn)}}function Qp({value:e,onChange:o,label:t,accept:a,placeholder:r,focusKey:n,focusWhen:s}){let i=Gk(),f=Uk(),u=l(t),p=a.startsWith("video"),m=$k(p?void 0:n,s),x=Mk(Hk),I=v=>zk(i,{accept:a,title:u,...v?{file:v}:{}}).then(T=>T?.url??null);if(x&&!x.capabilities.mediaEditing)return bo(Yp,{label:u,icon:p?bo(Zp,{}):bo(Xp,{}),children:bo("div",{className:"sf-image-slot-inert",children:p?l("Templates don\u2019t store videos \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."):l("Templates don\u2019t store images \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created.")})});let y=Vp(e),C=m?.phone&&y?bo(Bk,{words:X()?.panel,label:l("Image focus"),changed:!!m.own,detail:l("{value} on desktop",{value:m.desktop}),onReset:m.clear}):void 0;return bo(Yp,{label:u,icon:p?bo(Zp,{}):bo(Xp,{}),action:C,children:bo("div",{style:{flex:"1 1 auto",minWidth:0},children:bo(Nk,{value:y,onChange:o,onPick:I,accept:p?"video/*":"image/*",kind:p?"video":"image",placeholder:r===void 0?void 0:l(r),maxSizeBytes:Se(f).media.maxUploadBytes,...m?{focus:m.focus,onFocusChange:m.set}:{}})})})}import{jsx as Jp}from"react/jsx-runtime";import{useId as qk}from"react";import{FieldSelect as jk}from"efficient-easel/fields";import{SettingsField as Kk}from"efficient-easel/panel";function Vk(e){return e.map(({value:o,label:t,note:a})=>({value:o,label:t,...a?{meta:a}:{}}))}function em({label:e,options:o,value:t,onChange:a,emptyLabel:r,icon:n,hint:s}){let i=qk(),f=`${i}-label`,u=`${i}-button`,p=Array.isArray(t)?t:[];return Jp(Kk,{label:l(e),labelId:f,icon:n,hint:s,children:Jp(jk,{id:u,multiple:!0,value:p,options:Vk(o),onChange:a,placeholder:r===void 0?l("None"):l(r),ariaLabelledBy:`${f} ${u}`,inline:!0})})}import{jsx as ge,jsxs as Ct,Fragment as wT}from"react/jsx-runtime";import{useCallback as vT,useContext as kT,useEffect as TT,useId as xm,useRef as pm,useState as mm}from"react";import{ThemeIcon as PT}from"efficient-easel/icons";import{SettingsField as FT}from"efficient-easel/panel";import{ScreenDocumentContext as ET}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as U,jsxs as Yo,Fragment as tT}from"react/jsx-runtime";import{SettingsField as xi,SettingsGroupSub as aT}from"efficient-easel/panel";import{Button as mi,IconButton as rT,Tooltip as nT}from"efficient-shell/ui";import{jsx as Vo,jsxs as om}from"react/jsx-runtime";import{SettingsField as Yk}from"efficient-easel/panel";import{AccentIcon as Xk}from"efficient-easel/icons";import{Tooltip as Zk}from"efficient-shell/ui";function pi(e){return xo(e).background}function Qk(e){let o=$o(e.accent,pi(e));return o===null?null:{ratio:o,grade:$t(o)}}function Jk(e){let o=pi(e),t=$o(e.accent,o);return t===null?[]:Qd(e.accent).filter(a=>{let r=$o(a,o);return r!==null&&r>t&&$t(r)==="good"})}var eT={good:"Easy to read","large-only":Ut["large-only"],hard:Ut.hard};function tm({value:e,onChange:o}){let t=Qk(e),a=t?.grade,r=t&&t.grade!=="good"?Jk(e):[];return Vo(Yk,{label:l("Main color"),icon:Vo(Xk,{}),hint:t?l(eT[t.grade]):void 0,action:Vo(qe,{value:e.accent,onChange:n=>o({...e,accent:n}),label:l("Main color")}),children:r.length>0?Vo("div",{className:"w-full min-w-0",children:om("div",{className:"sf-readability",children:[Vo("p",{className:"sf-readability-advice",children:oT(a,!0)}),Vo("div",{className:"sf-readability-suggestions",children:r.map(n=>{let s=$o(n,pi(e));return Vo(Zk,{content:l("Use {colour}",{colour:n.toUpperCase()}),children:om("button",{type:"button",className:"sf-readability-suggestion",onClick:()=>o({...e,accent:n}),children:[Vo("span",{className:"sf-readability-chip",style:{background:n},"aria-hidden":!0}),s?`${s.toFixed(1)}:1`:n.toUpperCase()]})},n)})})]})}):null})}function oT(e,o){return e?e==="good"?l("This color reads clearly on your pages."):o?l("This color is hard to read on this theme's page. The buttons below are the same hue, darkened."):l("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."):l("Pick a color to see how it reads.")}import{ButtonIcon as lT,ChevronDownIcon as sT,ChevronUpIcon as iT,GroundIcon as fT,LayoutIcon as cT,SquareIcon as dT,TextSmallIcon as uT,TypeIcon as am}from"efficient-easel/icons";var $a=e=>l("Theme {n}",{n:e+1});function rm({colors:e}){let o=xo(e),t=Da(e)??o.accent;return Yo("span",{className:"sf-theme-page",style:{background:o.background,color:o.text},"aria-hidden":!0,children:[U("span",{className:"sf-theme-eyebrow",style:{color:o.muted},children:l("label")}),Yo("span",{className:"sf-theme-headline",children:[l("Heading")," ",U("span",{style:{color:o.accent},children:l("accent")})]}),U("span",{className:"sf-theme-body",children:l("body text")}),Yo("span",{className:"sf-theme-row",children:[U("span",{className:"sf-theme-btn",style:{background:t,color:ks(e,o.accent)},children:l("button")}),U("span",{className:"sf-theme-mini",style:{background:o.surface,borderColor:o.line},children:l("card")})]})]})}var Ii={"Text color":U(am,{}),"Label color":U(uT,{}),Background:U(fT,{}),"Panels & cards":U(cT,{}),Borders:U(dT,{}),"Button color":U(lT,{}),"Button text color":U(am,{})};function pT({label:e,colorKey:o,value:t,onChange:a,idPrefix:r="sf-theme-ink"}){let n=`${r}-${o}`;return U(xi,{label:l(e),icon:Ii[e],htmlFor:n,action:U(qe,{id:n,label:l(e),value:t,onChange:s=>a(o,s)})})}function mT({value:e,accent:o,onChange:t,idPrefix:a="sf-theme-ink"}){let r=`${a}-button`,n=/^#[0-9a-fA-F]{6}$/.test(e??""),s=n?e:o;return U(xi,{label:l("Button color"),icon:Ii["Button color"],htmlFor:r,action:U(qe,{id:r,label:l("Button color"),value:s,caption:n?s:l("Main"),onChange:t})})}function xT({colors:e,accent:o,onChange:t,idPrefix:a="sf-theme-ink"}){let r=`${a}-button-ink`,n=Jd(e),s=ks(e,o),i=Da(e)??o,f=$t($o(s,i)??0);return U(xi,{label:l("Button text color"),icon:Ii["Button text color"],hint:n&&f!=="good"?l("{grade} on the button",{grade:l(Ut[f])}):void 0,htmlFor:r,action:U(qe,{id:r,label:l("Button text color"),value:s,caption:n?s:l("Auto"),onChange:t})})}var IT=[{colour:!0},{label:"Text color",key:"text"},{label:"Label color",key:"muted"},{button:!0},{buttonInk:!0},{group:"Surfaces"},{label:"Background",key:"background"},{label:"Panels & cards",key:"surface"},{label:"Borders",key:"line"}];function hi({colors:e,onChange:o,idPrefix:t}){let a=xo(e);return U(tT,{children:IT.map(r=>"colour"in r?U(tm,{value:e,onChange:o},"colour"):"group"in r?U(aT,{title:l(r.group)},r.group):"button"in r?U(mT,{value:e.button,accent:a.accent,onChange:n=>o({...e,button:n}),idPrefix:t},"button"):"buttonInk"in r?U(xT,{colors:e,accent:a.accent,onChange:n=>o({...e,buttonInk:n}),idPrefix:t},"buttonInk"):U(pT,{label:r.label,colorKey:r.key,value:a[r.key],onChange:(n,s)=>o({...e,[n]:s}),idPrefix:t},r.key))})}function xn({index:e,colors:o,selected:t,role:a="radio",open:r,editable:n=!0,onPick:s,onEdit:i,onChangeColors:f}){let u=xo(o),p=$a(e),m=e<vs.length&&!o.brandInk?vs[e]:null,x=$t($o(u.text,u.background)??0),I=m?JSON.stringify(o)!==JSON.stringify(m):!1,y=r!==void 0;return Yo("div",{className:`sf-theme-card${t?" is-selected":""}`,children:[U("button",{type:"button",role:a,"aria-checked":a==="radio"?t:void 0,"aria-selected":a==="option"?t:void 0,"aria-label":p,className:"sf-theme-pick",onClick:s,children:U(rm,{colors:o})}),Yo("div",{className:"sf-theme-foot",children:[U("span",{className:"sf-theme-name",children:p}),x!=="good"&&U("span",{className:"sf-theme-warn",children:l(Ut[x])}),n&&i&&y&&U("span",{className:"sf-theme-edit",children:U(nT,{content:r?l("Collapse"):l("Edit colors"),children:U(rT,{size:"sm","aria-expanded":r,"aria-controls":`sf-theme-colours-${e}`,"aria-label":r?l("Collapse {name}",{name:p}):l("Edit colors for {name}",{name:p}),onClick:i,children:r?U(iT,{size:14}):U(sT,{size:14})})})}),n&&i&&!y&&U(mi,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":l("Edit {name}",{name:p}),onClick:i,children:l("Edit")})]}),r&&Yo("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[U(hi,{colors:o,onChange:C=>f?.(C)}),m&&U(mi,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!I,onClick:()=>f?.({...m}),children:I?l("Reset {name} to the preset",{name:p}):l("Not changed")})]})]})}function nm({colors:e,name:o,nameId:t,open:a,menuId:r,labelId:n,buttonRef:s,onClick:i,onKeyDown:f,onEdit:u}){return Yo("div",{className:"sf-secttheme-btn",children:[U("button",{ref:s,type:"button",className:"sf-theme-pick","aria-expanded":a,"aria-controls":r,"aria-labelledby":`${n} ${t}`,onClick:i,onKeyDown:f,children:e?U(rm,{colors:e}):U("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),Yo("div",{className:"sf-theme-foot",children:[U("span",{id:t,className:"sf-theme-name",children:o}),u&&U(mi,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":l("Edit {name}",{name:o}),onClick:u,children:l("Edit")}),U("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:i,children:U("span",{className:"sf-multi-caret",children:"\u25BE"})})]})]})}import{useCallback as wi,useEffect as cm,useRef as yn}from"react";import{currentEaselSession as yT}from"efficient-easel/screen/lib/session";import{useEaselSession as bT}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as hT}from"react";var sm,gi=null,St=null,In=0,yi=new Set;function bi(e){sm=e;for(let o of yi)o()}function Si(e){gi=e,In+=1,St&&clearTimeout(St),St=null,bi(void 0)}function im(e){In+=1,bi(e)}function hn(e=250){gi&&(St&&clearTimeout(St),St=setTimeout(()=>{St=null;let o=gi;if(!o)return;let t=++In;o().then(a=>{t===In&&bi(a)}).catch(()=>{})},e))}function lm(){return sm}function gT(e){return yi.add(e),()=>{yi.delete(e)}}function gn(){return hT(gT,lm,lm)}var Ci=new Set;function fm(e){return Ci.add(e),()=>{Ci.delete(e)}}async function H6(){let e=(await Promise.allSettled([...Ci].map(async o=>o()))).find(o=>o.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as ST}from"efficient-easel/screen/lib/backend-error";function dm(e=yT()){return(o,t,a)=>{let r=Se(e).theme;return r?r.update(o,a?{siteId:a}:void 0):Promise.reject(new ST("invalid","This backend stores no site theme."))}}function um(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function CT(e,o=dm()){let{themeFromDocument:t,token:a,siteId:r,patch:n}=e,s=um({themeFromDocument:t,token:a});if(s)return s;if(Object.keys(n).length===0)return{status:"skipped",reason:"empty"};try{return await o(n,a,r??void 0),{status:"saved"}}catch(i){return{status:"failed",error:i}}}function Xt({themeFromDocument:e,tokenRef:o,siteId:t,onResult:a}){let r=yn(null),n=yn({}),s=bT(),i=yn(a);i.current=a;let f=yn(null),u=wi(x=>{if(x.status==="skipped"){let I=`skipped:${x.reason}`;if(f.current===I)return;f.current=I}else f.current=null;i.current?.(x)},[]),p=wi(async()=>{r.current&&(clearTimeout(r.current),r.current=null);let x=n.current;n.current={};let I=await CT({themeFromDocument:e,token:o?.current,siteId:t,patch:x},dm(s));return u(I),I.status==="saved"&&hn(),I.status==="failed"&&(n.current={...x,...n.current}),I},[e,o,t,u,s]),m=wi((x,I=!1)=>{let y=um({themeFromDocument:e,token:o?.current});if(y){u(y);return}n.current={...n.current,...x},r.current&&clearTimeout(r.current),I?p():r.current=setTimeout(()=>{p()},500)},[e,o,p,u]);return cm(()=>()=>{p()},[p]),cm(()=>fm(async()=>{if(!r.current&&Object.keys(n.current).length===0)return;let x=await p();if(x.status==="failed")throw x.error}),[p]),{persist:m,flush:p}}var OT="Follow the page",lW="Follow the slideshow",LT=e=>l("Editing {name} changes it everywhere.",{name:e});function RT({colors:e}){if(!e)return ge("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let o=xo(e);return Ct("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[ge("i",{style:{background:o.background}}),ge("i",{className:"sf-secttheme-chip-accent",style:{background:o.accent}})]})}function AT({themes:e,value:o,onPick:t,onEdit:a,menuId:r,followLabel:n}){return Ct("div",{className:"sf-multi-menu sf-secttheme-menu",id:r,role:"listbox",children:[n!==void 0&&Ct(wT,{children:[Ct("button",{type:"button",role:"option","aria-selected":o===null,className:`sf-secttheme-item${o===null?" is-active":""}`,onClick:()=>t(nn),children:[ge(RT,{}),ge("span",{className:"sf-secttheme-name",children:l(n)})]}),ge("div",{className:"sf-secttheme-sep",role:"presentation"})]}),o!==null&&e[o]&&ge("p",{className:"sf-secttheme-oncard",role:"presentation",children:l("{name} is on this section",{name:$a(o)})}),e.map((s,i)=>i===o?null:ge(xn,{role:"option",index:i,colors:s,selected:!1,onPick:()=>t(i),onEdit:()=>a(i)},i))]})}function BT({index:e,colors:o,onChange:t,onDone:a}){let r=$a(e),n=xm();return Ct("div",{className:"sf-secttheme-sheet",children:[Ct("div",{className:"sf-secttheme-sheet-head",children:[ge("span",{children:r}),ge("button",{type:"button",className:"sf-secttheme-done",onClick:a,children:l("Done")})]}),ge("div",{className:"sf-secttheme-rows",children:ge(hi,{colors:o,onChange:t,idPrefix:n})}),ge("p",{className:"sf-secttheme-warn",children:LT(r)})]})}function Im({value:e,onChange:o,followLabel:t,hint:a}){let{theme:r,setTheme:n}=V(),s=He(r),i=kT(ET),f=i?.tokenRef,u=i?.siteId??null,p=!i?.capabilities?.hasSiteTheme,{persist:m,flush:x}=Xt({themeFromDocument:p,tokenRef:f,siteId:u}),I=He(s),y=I.themes,C=Zs(e),v=C!==null?y[C]:void 0,T=v??(y.length?Gt(I):void 0),[w,g]=mm(!1),[b,O]=mm(null),F=pm(null),L=pm(null),P=xm(),M=vT(()=>{g(!1),O(null)},[]);TT(()=>{if(!w&&b===null)return;let A=W=>{F.current&&!F.current.contains(W.target)&&(x(),M())};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[w,b,M,x]);let z=A=>{o(A),M()},B=A=>{if(b===null)return;let W=y.map((ae,ie)=>ie===b?A:ae),D={...I,themes:W};n(D),m({selected_preset:D.selected,theme_presets:D.themes})};return Ct("div",{className:"sf-secttheme",ref:F,children:[ge(FT,{label:l("Theme"),icon:ge(PT,{}),labelId:`${P}-label`,hint:a,children:ge(nm,{colors:T,onEdit:C!==null?()=>{O(C),g(!1)}:void 0,name:v?$a(C):l(t??OT),nameId:`${P}-value`,labelId:`${P}-label`,open:w,menuId:P,buttonRef:L,onClick:()=>{O(null),g(A=>!A)},onKeyDown:A=>{A.key==="Escape"&&(w||b!==null)&&(A.preventDefault(),M())}})}),w&&b===null&&ge("div",{onKeyDown:A=>{A.key==="Escape"&&(A.preventDefault(),M(),L.current?.focus())},children:ge(AT,{themes:y,value:C,onPick:z,onEdit:A=>{O(A),g(!1)},menuId:P,followLabel:t})}),b!==null&&y[b]&&ge(BT,{index:b,colors:y[b],onChange:B,onDone:()=>{x(),M(),L.current?.focus()}})]})}import{jsx as hm}from"react/jsx-runtime";import{useId as DT}from"react";import{FieldSelect as _T}from"efficient-easel/fields";import{SettingsField as NT}from"efficient-easel/panel";function MT(e){return e.map(({value:o,label:t,group:a,thumb:r,meta:n})=>({value:o,label:t,...a!==void 0?{group:a}:{},...r!==void 0?{thumb:r}:{},...n!==void 0?{meta:n}:{}}))}function pW({label:e,options:o,fallback:t,value:a,onChange:r,placeholder:n,bare:s=!1,icon:i}){let f=DT(),u=`${f}-label`,p=`${f}-button`,m=a??"",x=o.some(v=>v.value===m)?m:t,I=l(e),y=n===void 0?void 0:l(n),C=hm(_T,{id:p,value:x,options:MT(o),onChange:r,placeholder:y,searchPlaceholder:y,...s?{ariaLabel:I}:{ariaLabelledBy:`${u} ${p}`},searchable:!0,groupCount:!0,inline:!0});return s?C:hm(NT,{label:I,labelId:u,icon:i,children:C})}import{jsx as wt,jsxs as XT}from"react/jsx-runtime";import{SettingsField as Cm}from"efficient-easel/panel";import{LinkIcon as ZT}from"efficient-easel/icons";import{LinkPicker as QT,TextLinkField as JT}from"efficient-shell/ui";import{useEffect as Sm,useMemo as Sn,useRef as e0,useState as bn}from"react";import{currentEaselSession as HT}from"efficient-easel/screen/lib/session";function gm(){return HT().auth.token}import{currentEaselSession as o0}from"efficient-easel/screen/lib/session";import{useScreenDocument as t0}from"efficient-easel/screen/components/ScreenDocumentContext";var WT=()=>({choosePage:l("Choose a page"),chooseSection:l("Choose a section"),noSections:l("No section anchors yet"),sectionHint:l("Jumps to a section on that page."),choosePost:l("Choose a post"),chooseProduct:l("Choose a product"),choosePopup:l("Choose a popup")});function ym(e,o,t){if(!e)return"page";if(dp(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(mp(e))return"product";if(e.includes("#")){let a=e.slice(0,e.indexOf("#"));if(a===""||a==="/"||o.includes(a))return"anchor"}return e==="/"||o.includes(e)||t&&t.listingPaths.includes(t.targetOf(e))?"page":"custom"}function vi(e,o){let t=WT(),a=e.pages.map(p=>({value:Ha(p.slug),label:p.title})),r=o?.pageOptions?o.pageOptions(a):a,n=r.map(p=>p.value),s=e.pages.map(p=>({label:p.title,options:pp(...p.docs).map(m=>({value:rn(p.slug,m.slug),label:m.name}))})).filter(p=>p.options.length>0),i=p=>{switch(p){case"page":return{type:"select",options:r,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:up(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:cp(m.slug),label:m.title||m.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},f=fp(e.offers).map(p=>({value:p.value,label:l(p.label),target:i(p.value),...p.value==="anchor"?{hint:t.sectionHint}:{},...p.value==="blog"||p.value==="product"||p.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!o)return{kinds:f,rules:{kindOf:p=>ym(p,n),targetOf:p=>p,readFilter:()=>null,withFilter:p=>p}};let u=p=>{let m=o.withFilter(p,null);return o.listingPaths.includes(m)?m:p};return{kinds:f,rules:{kindOf:p=>ym(p,n,{listingPaths:o.listingPaths,targetOf:u}),targetOf:u,readFilter:o.readFilter,withFilter:o.withFilter},filtersFor:p=>o.listingPaths.includes(p)?o.filtersFor(p):null}}import{useEaselSession as a0}from"efficient-easel/screen/lib/session-context";var ki="popup",zT=qo,GT=["auto","full"],UT=["inside","outside","none"],$T={min:240,max:1440},qT={min:0,max:100},jT={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:"#000000",tintOpacity:60,outsideClick:!0,closeButton:"inside"};function KT(e,o){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/.test(e.trim())?e.trim():o}function wW(e){let o=e??{},t=jT;return{placement:Ze(zT,o.placement,t.placement),fullWidth:ut(o.fullWidth,t.fullWidth),width:qt(o.width,$T,t.width),height:Ze(GT,o.height,t.height),tintColor:KT(o.tintColor,t.tintColor),tintOpacity:qt(o.tintOpacity,qT,t.tintOpacity),outsideClick:ut(o.outsideClick,t.outsideClick),closeButton:Ze(UT,o.closeButton,t.closeButton)}}function VT(e,o=Math.random){for(;;){let t=`popup-${Math.floor(o()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(t))return t}}function YT(e){return{root:{props:{title:e,kind:ki}},content:[],zones:{}}}function bm(e,o,t){return{slug:VT(o,t),title:e,kind:"lightbox",layout:YT(e)}}function Ti(e){return e?.root?.props?.kind===ki}function wm(e){let o=new Map;return(t="")=>{let a=gm(),r=o.get(t);if(!r||r.token===null&&a!==null){let n=a||!o0().usesBridgedToken?e(a??"",t).catch(()=>[]):Promise.resolve([]);return o.set(t,{promise:n,token:a}),n}return r.promise}}var r0=wm(async(e,o)=>{let t=o?{siteId:o}:void 0,{pages:a}=Se();return a.linkTargets?a.linkTargets(t):(await a.list(t)).map(r=>({id:r.id,slug:r.slug,label:r.label,layout:null}))}),n0=wm(async(e,o)=>await Se().blog?.posts(o?{siteId:o}:void 0)??[]);function l0({value:e,onChange:o,label:t="Link",data:a,filters:r}){let n=Sn(()=>vi(a,r),[a,r]),s=l(t);return wt(Cm,{label:s,icon:wt(ZT,{}),children:wt(QT,{value:e,onChange:i=>o(i),kinds:n.kinds,rules:n.rules,filtersFor:n.filtersFor,label:s})})}function vm(){let{siteId:e,capabilities:o}=t0(),{offersCommerce:t,hasBlog:a}=o,[r,n]=bn([]),[s,i]=bn([]),[f,u]=bn([]),[p,m]=bn(null),x=a0().chrome,I=x?.products?.list,y=x?.linkFilters,C=y?void 0:x?.linkRow,v=e0(!0);Sm(()=>(v.current=!0,()=>{v.current=!1}),[]),Sm(()=>{let g=!0;return r0(e??void 0).then(b=>g&&v.current&&n(b)),a&&n0(e??void 0).then(b=>g&&v.current&&i(b)),t&&I?.().then(b=>g&&v.current&&u(b)),t&&y?y.load(e).catch(()=>null).then(b=>g&&v.current&&m(()=>b)):m(null),()=>{g=!1}},[e,t,a,I,y]);let T=Sn(()=>({pages:r.filter(g=>!_u(g.slug)&&!Ti(g.layout)).map(g=>({slug:g.slug,title:g.label,docs:[g.layout]})),popups:r.filter(g=>g.slug===As||Ti(g.layout)).map(g=>({slug:g.slug,title:g.label})),posts:a?s.map(g=>({slug:g.slug,title:g.title})):[],products:t?f.map(g=>({href:g.href,name:g.name})):[],offers:{offersCommerce:t,offersService:a}}),[r,s,f,t,a]),w=Sn(()=>p?p(T.pages):null,[p,T]);return{data:T,filters:w,pages:r,offersCommerce:t,HostLinkRow:C}}function GW({label:e,icon:o,text:t,onTextChange:a,link:r,onLinkChange:n}){let{data:s,filters:i}=vm(),f=Sn(()=>vi(s,i),[s,i]),u=l(e);return wt(Cm,{label:u,icon:o,children:wt(JT,{label:u,text:t,onTextChange:a,link:r,onLinkChange:p=>n(p),kinds:f.kinds,rules:f.rules,filtersFor:f.filtersFor})})}function km({value:e,onChange:o,label:t="Link"}){let a=typeof e=="string"?e:"",{data:r,filters:n,pages:s,offersCommerce:i,HostLinkRow:f}=vm(),u=r.pages.map(m=>Ha(m.slug)),p=i&&f&&(a==="/"||u.includes(a))?f:void 0;return XT("div",{children:[wt(l0,{value:a,onChange:o,label:t,data:r,filters:n}),p&&wt(p,{value:a,onChange:o,pages:s})]})}import{UiIcon as yx}from"efficient-easel/draw/client";var Je={min:10,max:200,step:10};function Tm(e,o){let t=typeof e=="number"?e:void 0,a=typeof o=="number"?o:void 0;if(!(t===void 0&&a===void 0))return{paddingTop:t,paddingBottom:a}}var s0="sf-pad-top-phone",i0="sf-pad-bottom-phone",f0="--sf-pad-t-phone",c0="--sf-pad-b-phone",d0="sf-pad-left-phone",u0="sf-pad-right-phone",p0="--sf-pad-l-phone",m0="--sf-pad-r-phone";function Em(e,o,t,a,r,n,s,i){let f=Tm(e,o)??{},u={},p=["sf-section-pad"];typeof t=="number"&&(p.push(s0),u[f0]=`${t}px`),typeof a=="number"&&(p.push(i0),u[c0]=`${a}px`);let m={};return typeof r=="number"&&(m.paddingLeft=r),typeof n=="number"&&(m.paddingRight=n),typeof s=="number"&&(p.push(d0),u[p0]=`${s}px`),typeof i=="number"&&(p.push(u0),u[m0]=`${i}px`),p.length===1&&Tm(e,o)===void 0&&!Object.keys(m).length?null:{className:p.join(" "),style:{...f,...m,...u}}}var Pm=e=>typeof e=="number"?e:void 0;function Fm(e,o,t){let a=Pm(e)??t,r=Pm(o);return a===void 0?r:r===void 0?a:a+r}function $W(e,o={}){return{top:Fm(e.padTop,e.sectionPaddingTop,o.top),bottom:Fm(e.padBottom,e.sectionPaddingBottom,o.bottom)}}function qW(e){return{top:e.sectionPaddingTop,bottom:e.sectionPaddingBottom,topPhone:e.sectionPaddingTopPhone,bottomPhone:e.sectionPaddingBottomPhone,left:e.sectionPaddingLeft,right:e.sectionPaddingRight,leftPhone:e.sectionPaddingLeftPhone,rightPhone:e.sectionPaddingRightPhone}}function jW(e){return Em(e.top,e.bottom,e.topPhone,e.bottomPhone,e.left,e.right,e.leftPhone,e.rightPhone)}function KW(e,o){let t=a=>typeof a=="number"?a+o:void 0;return Em(t(e.top),t(e.bottom),t(e.topPhone),t(e.bottomPhone),e.left,e.right,e.leftPhone,e.rightPhone)}var x0=["auto","fixed","screen"],I0=["px","%"];var h0="var(--sf-header-h, 88px)",Pi={min:40,max:2e3,step:10,fallback:600},Fi={min:10,max:200,step:5,fallback:100},g0="sf-section-minh",Om={base:"--sf-section-minh",small:"--sf-section-minh-s"},Rm=e=>typeof e=="string"&&x0.includes(e),y0=e=>typeof e=="string"&&I0.includes(e);function Cn(e){let o=Rm(e.sectionHeightMode)?e.sectionHeightMode:"auto",t=o==="screen"?"%":y0(e.sectionHeightUnit)?e.sectionHeightUnit:"px",a=o==="screen"?Fi.fallback:Pi.fallback,r=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:a;return{mode:o,value:r,unit:t}}function Am(e){let{mode:o,value:t,unit:a}=Cn(e);if(o==="auto")return;if(o==="fixed"&&a==="px")return[`${t}px`,null];let r=t/100,n=s=>o==="screen"?`(100${s} - ${h0})`:`100${s}`;return[`calc(${n("vh")} * ${r})`,`calc(${n("svh")} * ${r})`]}function b0(e){let o=Am(e);if(!o)return;let[t,a]=o;return{display:"grid",[Om.base]:t,...a?{[Om.small]:a}:{}}}var YW=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),Zt="Height",S0="sf-section-minh-phone",Lm={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function Ei(e){return Rm(e.sectionHeightModePhone)}function XW(e){return Cn({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function C0(e){let o=b0(e),t=Ei(e)?Am({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone}):void 0;if(!o&&!t)return null;let a=[g0],r={...o??{}};return t&&(a.push(S0),r[Lm.base]=t[0],t[1]&&(r[Lm.small]=t[1])),{className:a.join(" "),style:r}}function ZW(e){return C0(e)!==null}var wn="Stick to top",Xo={min:0,max:200,step:4,fallback:0},w0="sf-section-stick",v0="sf-section-stick-phone-on",k0="sf-section-stick-phone-off",Bm={desktop:"--sf-stick-distance",phone:"--sf-stick-distance-phone"},JW=new Set(["CategoryBar","DocTabs","IntroBleed"]);function Dm(e){let o=typeof e=="number"&&Number.isFinite(e)?e:Xo.fallback;return Math.min(Xo.max,Math.max(Xo.min,Math.round(o)))}function Oi(e){return typeof e.stickTopPhone=="boolean"}function Li(e){let o=e.stickTop===!0,t=Dm(e.stickTopDistance),a=Oi(e),r=a?e.stickTopPhone===!0:o,n=a?Dm(e.stickTopDistancePhone):t;return{desktop:o,desktopDistance:t,phone:r,phoneDistance:n,ownPhone:a}}function ez(e){let o=Li(e);if(!o.desktop&&!o.phone)return null;let t=[w0],a={};return o.desktop&&(a[Bm.desktop]=`${o.desktopDistance}px`),(o.ownPhone||o.phone!==o.desktop)&&(t.push(o.phone?v0:k0),o.phone&&(a[Bm.phone]=`${o.phoneDistance}px`)),o.desktop||t.push("sf-section-stick-desktop-off"),{className:t.join(" "),style:a}}var T0=["column","row","tabs"],_m="Direction",P0={column:"Stacked",row:"One row",tabs:"Tabs"},Nm={Flex:T0,HeroGroup:["column","row"]},F0={Flex:"row",HeroGroup:"column"},E0={column:"flex-col",row:"flex-row",tabs:"flex-col"};function vn(e,o){return Nm[e].includes(o)?o:F0[e]}function tz(e,o){return E0[vn(e,o)]}function Mm(e){return Nm[e].map(o=>({label:P0[o],value:o}))}var Ri=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],zm=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"},{label:"Stretch",value:"stretch"}],Gm="Wrap",Ai=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],Hm={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},Wm={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function rz(e,o){let t=typeof e=="string"&&e in Hm?Hm[e]:"",a=typeof o=="string"&&o in Wm?Wm[o]:"";return[t,a].filter(Boolean).join(" ")}function nz(e){return e===!0||e==="wrap"?"flex-wrap":""}var Bi="Block widths",kn=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]}],qa="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",O0={equal:qa,bigLeft:`${qa} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${qa} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${qa} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${qa} [&>*:last-child]:min-[800px]:grow-[3]`};function lz(e){return typeof e=="string"?O0[e]??"":""}var Um="Columns on phone",Di=1,$m=3,L0={2:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]",3:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]"};function sz(e){let o=Number(e);return L0[o]??"max-[800px]:flex-col"}var qm="Block spacing",_i=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],R0="sf-box-gap-only";function iz(e){return e==="gap"?R0:""}var A0=["solid","dashed","dotted"],B0=["top","right","bottom","left"],cz="sf-section-border",dz="sf-section-border-self",D0=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,jm=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(20,Math.max(0,Math.round(e)))}px`:void 0;function Km(e,{phone:o=!1}={}){if(!e||typeof e!="object")return;let t=o?"-phone":"",a={};for(let r of B0){let n=jm(e[r])??jm(e.width);n!==void 0&&(a[`--sf-border-${r}-width${t}`]=n)}return typeof e.style=="string"&&A0.includes(e.style)&&(a[`--sf-border-style${t}`]=e.style),typeof e.color=="string"&&D0.test(e.color)&&(a[`--sf-border-color${t}`]=e.color.toLowerCase()),Object.keys(a).length?a:void 0}function uz(e,o){let t=Km(e),a=Km(o,{phone:!0});return t||a?{...t,...a}:void 0}var Xm="sf.gapContainer",Zo={min:-32,max:64,step:2},Zm={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},Qt={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},_0=new Set(["Events","GalleryB"]);function ja(e,o,t){if(typeof o=="number"&&Number.isFinite(o)&&o>=Zo.min)return o;if(typeof o=="string"){let a=Zm[e]?.[o];if(typeof a=="number")return a}return typeof t=="number"&&Number.isFinite(t)?t:Qt[e]}var N0="sf-gap-overlap",M0="--sf-gap-overlap",Qm="--sf-block-gap",H0="--sf-block-gap-rem",vt={min:0,max:Zo.max,step:Zo.step};function W0(e){if(typeof e!="number"||!Number.isFinite(e))return null;let o=Math.min(Math.max(Math.round(e),vt.min),vt.max);return o-o%vt.step}function mz(e){let o=W0(e);return o===null?{}:{[Qm]:`${o}px`,[H0]:`${o/16}rem`}}var Vm="sf-gap-zone",Ym="--sf-gap-len";function Ni(e,o){return typeof o=="number"&&Number.isFinite(o)&&o>=Zo.min?!0:typeof o=="string"&&typeof Zm[e]?.[o]=="number"}var z0={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function xz(e,o,t){if(!Ni(e,o)){let r=`${Qt[e]}px`,n=_0.has(e)?`var(--sf-card-gap, ${r})`:r;return{className:` ${Vm}`,style:{[Ym]:`var(${Qm}, ${n})`}}}let a=ja(e,o);return a>=0?{className:` ${Vm}`,style:{[Ym]:`${a}px`}}:{className:` ${N0} ${z0[t]}`,style:{gap:"0px",[M0]:`${-a/2}px`}}}var Jm=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],ex={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Tn="var(--section-bg)",Pn="inherit";function hz(e,o){return e===Pn?Tn:e===void 0?o:Fn(e)}var G0=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function Fn(e){return e.replace(G0,"var(--site-$1")}function ox(e,o){return e===Pn?!0:e===void 0&&o===Tn}var tx=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],ax={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Jt="var(--wheel-stage)",En="transparent",Ka="inherit";function bz(e,o){return Fn(Mi(e,o))}function Mi(e,o){return e===Ka?Jt:e==null?o:e===!0?Jt:e===!1?En:e}function Sz(e){return typeof e=="string"&&e!==Ka?Fn(e):Jt}function Cz(e){return e!==En&&e!=="none"&&e!==""}function rx(e,o){return e===Ka||e===!0?!0:e==null?o===Jt:!1}var nx="inherit",On="fixed",lx=e=>typeof e!="number"&&e!==On,U0="var(--sf-heading-max, 9999px)";function vz(e,o,t,a){if(typeof e=="number")return`${e}px`;if(e===On)return o;let r=a?`var(--size-${a}, ${o})`:o;return t==="heading"?`min(${r}, ${U0})`:r}var pe={min:1e3,max:2e3,step:50,default:1600};function $0(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var sx="--sf-site-width",Hi=`var(${sx},${pe.default}px)`,Tz=`max-w-[${Hi}]`,Pz=`max-w-[${pe.default}px]`;function q0(e){return typeof e!="number"||!Number.isFinite(e)?pe.default:Math.round(Math.min(Math.max(e,pe.min),pe.max))}function Fz(e){let o=q0(e);return o===pe.default?{}:{[sx]:`${o}px`}}var So={min:0,max:80,step:4,default:40},ix="--sf-site-gutter",eo=`var(${ix},${So.default}px)`,j0=`px-[${eo}]`;var Qo={md:`min(24px,${eo})`,sm:`min(20px,${eo})`,frame:`min(24px,${eo})`,tabs:`min(16px,${eo})`},Ez=[[`max-[1100px]:px-[${Qo.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${Qo.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${Qo.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${Qo.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${Qo.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${Qo.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${Qo.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${Qo.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${eo}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${eo})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${eo})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${eo})]`,"max-[720px]:-mx-5"],[`-mx-[${eo}]`,"-mx-10"],[j0,"px-10"]];var Oz="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",Lz="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]";function K0(e){return typeof e!="number"||!Number.isFinite(e)?So.default:Math.round(Math.min(Math.max(e,So.min),So.max))}function Rz(e){let o=K0(e);return o===So.default?{}:{[ix]:`${o}px`}}var fx=Hi,Az=`max-w-[${fx}]`,Bz=`max-w-[min(var(--sf-page-cap,${pe.default}px),${pe.default}px)]`,cx="--sf-hero-cap",V0=`var(${cx},none)`,Dz=`max-w-[${V0}]`,Wi="--sf-hero-bleed-m",zi="--sf-hero-bleed-w",_z=`var(${Wi},calc(50% - 50vw))`,Nz=`var(${zi},100vw)`,Mz=`mx-[var(${Wi},calc(50%_-_50vw))]`,Hz=`w-[var(${zi},100vw)]`,Y0="--sf-hero-chrome-x",X0="--sf-hero-chrome-cap";function Wz(e){return e===!0?{[cx]:fx,[Wi]:"auto",[zi]:"100%",[Y0]:"24px",[X0]:"none"}:{}}var Gi=`calc(${Hi} - ${eo}*2)`,zz=`max-w-[${Gi.replace(/ /g,"_")}]`;var Z0="--sf-chrome-cap",Q0=`var(${Z0},${Gi})`,Gz="data-page-width";function Uz(e){return e==="full"?"full":null}function $z(e){return e==="full"?null:$0(e==="content"?Gi:Q0)}function qz(e){if(e==="full")return"full";if(e==="content")return"content"}var J0=["contained","page","full"],ux=["full","page"],ea={full:"Full width",page:"Content width"},$i="inherit",eP=e=>typeof e=="string"&&J0.includes(e),px=e=>e===$i;function Bo(e,o){let t=typeof e.pageWidth=="number"?e.pageWidth:pe.default;return px(e.widthMode)?{mode:"full",pageWidth:t,inherited:!0}:e.widthMode==="contained"?{mode:"page",pageWidth:t,inherited:!1}:eP(e.widthMode)?{mode:e.widthMode,pageWidth:t,inherited:!1}:e.contained===!0?{mode:"page",pageWidth:t,inherited:!1}:typeof e.fullWidth=="boolean"?{mode:e.fullWidth?"full":"page",pageWidth:t,inherited:!1}:e.contained===!1?{mode:"full",pageWidth:t,inherited:!1}:{mode:o,pageWidth:t,inherited:o==="full"}}function qi(e){return Bo(e,"page").mode==="full"}var Va="site",mx={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",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 oP(e){return Object.prototype.hasOwnProperty.call(mx,e)}var Ui=e=>e==="full"||e==="content",tP=e=>typeof e=="number"&&Number.isFinite(e)&&e>0,dx=({widthMode:e,fullWidth:o,pageWidth:t})=>({widthMode:e,fullWidth:o,pageWidth:t});function aP(e,o){let t={background:null,content:null,contentMax:null};switch(e){case"hero":return px(o.widthMode)||o.widthMode!=="full"?t:{...t,background:"full"};case"scrollOver":return o.fullWidth===!1?t:{...t,content:"full"};case"background":return Bo(o,"full").mode==="full"?t:{...t,background:"content"};case"both":return Bo(o,"full").mode==="full"?{...t,content:"full"}:{...t,background:"content"};case"contained":return Bo(o,"page").mode==="full"?{...t,content:"full"}:{...t,background:"content"};case"contentColumn":return Bo(dx(o),"page").mode==="full"?{...t,content:"full"}:t;case"contentFull":return Bo(dx(o),"full").mode==="full"?{...t,content:"full"}:t;case"productGrid":{let a=Bo(o,"full");return a.mode==="full"?{...t,content:"full"}:{background:"content",content:"content",contentMax:a.pageWidth}}case"capped":return{...t,background:"content"}}}function ji(e,o){if(!oP(e))return{background:null,content:null,contentMax:null};let t=mx[e],a=o,r=aP(t,a),n=a.backgroundWidth===Va?null:Ui(a.backgroundWidth)?a.backgroundWidth:r.background;return a.contentWidth===Va?{background:n,content:null,contentMax:null}:Ui(a.contentWidth)?{background:n,content:a.contentWidth,contentMax:a.contentWidth==="content"&&tP(a.contentMax)?a.contentMax:null}:{background:n,content:r.content,contentMax:r.contentMax}}var xx="siteWidths";function Ln(e){return Ui(e)?e:null}function Ix(e,o){return{[xx]:{background:Ln(e),content:Ln(o)}}}function Vz(e){let o=e.puck?.metadata?.[xx];return{background:Ln(o?.background),content:Ln(o?.content)}}import{jsx as rP}from"react/jsx-runtime";import{createContext as nP,useContext as lP}from"react";var sP=2,iP=sP+1,hx=nP(2);function gx({tier:e,children:o}){return rP(hx.Provider,{value:e,children:o})}function Ki(e){let o=lP(hx);return iP+Math.max(0,e-o)}import{withStyleKind as dF}from"efficient-easel/style-clipboard";import{useEaselSession as uF}from"efficient-easel/screen/lib/session-context";import{TEXT_CONTROL_KINDS as uU,SCALAR_TEXT_CONTROLS as pU}from"efficient-easel/draw";function ot(e){for(let[o,t]of Object.entries(e))t&&typeof t=="object"&&!No(t)&&dF(t,`section:${o}`);return e}function Wx(){return null}function Qi(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return h(Wx,{},e)}function pF(e){return e.type===Wx}function wo(e){return pF(e)?void 0:e}function Tt(e,o){return l("{value} from {from}",{value:e,from:o})}function mF(){let{appState:e}=Xa(r=>r),o=e.data.root?.props??{},{mode:t,pageWidth:a}=Bo(o,"full");return t==="page"?Tt(`${a}px`,l("the page")):t==="contained"?Tt(l("Contained"),l("the page")):Tt(l("Full"),l("the page"))}function xF(){let{blockGap:e}=V();return e===null?l("this container's own spacing"):Tt(`${e}px`,l("Styles"))}function IF({inherited:e,onReset:o,label:t}){return h(Ee,{words:X()?.panel,label:l(t),changed:!e,detail:xF(),onReset:o})}function hF({inherited:e,onReset:o,label:t}){return h(Ee,{words:X()?.panel,label:l(t),changed:!e,detail:mF(),onReset:o})}function Pt({value:e,onChange:o,label:t,placeholder:a,hint:r,multiline:n,hideable:s=!0,markup:i=!0}){let{text:f,hidden:u}=et(e),p=Yi(null),m=Yi(null),x=w=>o(s?{text:w,hidden:u}:w),I=()=>o({text:f,hidden:!u}),y=s&&u,C=cP(),v=r?CF(r)?h("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):h(sp,{children:l(r)}):void 0,T=u?l("Show {label} on the slide",{label:l(t)}):l("Hide {label} on the slide",{label:l(t)});return h(te,{label:l(t),icon:h($P,{}),htmlFor:C,className:y?"is-hidden":void 0,hint:v,action:s?h(Hx,{content:T,children:h("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":T,onClick:I,children:u?h(yx,{name:"eye-off",size:14}):h(yx,{name:"eye",size:14})})}):void 0,children:Do("div",{className:"sf-copybox",children:[i&&h(ri,{target:n?m:p,value:f,onChange:x}),n?h("textarea",{id:C,ref:m,value:f,placeholder:a===void 0?void 0:l(a),onChange:w=>x(w.target.value)}):h("input",{id:C,ref:p,type:"text",value:f,placeholder:a===void 0?void 0:l(a),onChange:w=>x(w.target.value)})]})})}function sU(e,o){return{...e,[mP]:o}}function iU(e){let o=e[_o];if(!o)throw new Error("withOffPage: the field holds no authored text");return{...e,[_o]:{...o,offPage:!0}}}function Dn(e){return!e||typeof e!="object"?!1:e[_o]?.offPage===!0}var zx="sfPanelOnly";function fU(e){if(!e[_o])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[zx]:!0}}function Gx(e){return!!e&&typeof e=="object"&&e[zx]===!0}function cU(e){let o=e[_o];if(!o)throw new Error("withIdentifier: the field holds no authored text");return{...e,[_o]:{...o,identifier:!0}}}function mU(e,o){if(!e[_o])throw new Error("inOwnBox: the field holds no authored text");let{[fF]:t,...a}=e;return{...a,[ni]:!0,render:o}}var gF=new Set(cF),Ft=(e,o)=>{let t={...o,[_o]:e};if(!gF.has(e.control))return t;let a=o.render;return{...Za(t,"authored-copy"),render:r=>h(qp,{name:r.name,children:a(r)})}},xU="Everything else on this block comes from the linked post. Unlink it to edit by hand.",yF={field:"source.slug",set:!0},IU={not:yF},bF="Select a word, then press the highlighter.",SF=new Set([bF]),CF=e=>SF.has(e);function hU(e,o,t){return Ft({control:"text",label:e,placeholder:o,hint:t},{type:"custom",render:({value:a,onChange:r})=>h(Pt,{value:a,onChange:r,label:e,placeholder:o,hint:t})})}function gU(e,o,t){return Ft({control:"textarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:a,onChange:r})=>h(Pt,{value:a,onChange:r,label:e,placeholder:o,hint:t,multiline:!0})})}function yU(e,o,t){return Ft({control:"plainText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:a,onChange:r})=>h(Pt,{value:a,onChange:r,label:e,placeholder:o,hint:t,hideable:!1,markup:!1})})}function bU(e,o,t){return Ft({control:"copyText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:a,onChange:r})=>h(Pt,{value:a,onChange:r,label:e,placeholder:o,hint:t,hideable:!1})})}function SU(e){return{type:"custom",[uP]:{label:e},render:({value:o,onChange:t})=>h(km,{value:dP(o),onChange:t,label:e})}}function CU(e,o,t){return Ft({control:"plainTextarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:a,onChange:r})=>h(Pt,{value:a,onChange:r,label:e,placeholder:o,hint:t,multiline:!0,hideable:!1})})}var Ux={Design:xP,Animation:Px};function $x(e,o){return e.includes("Design")?o!=="Design":null}function wF({label:e}){return h(KP,{title:l(e),level:Ki(1)})}function vF({level:e,label:o}){return e===1?h(wF,{label:o}):h(ta,{label:o})}function qx(e,o){return{type:"custom",[Zi]:{label:e,level:o},render:()=>h(vF,{level:o,label:e})}}function ve(e){return qx(e,2)}function wU(e){return{type:"custom",render:()=>h(kF,{text:e})}}function kF({text:e}){return h("p",{className:"sf-note",children:l(e)})}function vU(e){return qx(e,1)}function kU(e){return No(e)!==null&&e?.tabs!==void 0}var bx=new Map;function _n(e,o){let t=`${e}\0${o?o.join(""):""}`,a=bx.get(t)??{type:"custom",tabs:o,[Zi]:{label:e,level:1},bucket:e,marker:!0,render:()=>h(Co,{})};return bx.set(t,a),a}var Sx=new Map;function Ji(e){let o=Sx.get(e)??{type:"custom",[Zi]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>h(Co,{})};return Sx.set(e,o),o}function TF(e){let o=e;return o?.marker===!0&&typeof o.fold=="string"?o.fold:null}function jx(e,o){return TF(e)===o?e:{...e,marker:!0,fold:o,render:()=>h(Co,{})}}function Kx(e){let o=e;if(o.marker===!0&&o.fold===void 0)return e;let{fold:t,...a}=e;return{...a,marker:!0,render:()=>h(Co,{})}}function ta({label:e}){return h(VP,{title:l(e),level:Ki(2)})}function Vx({swatches:e,current:o,onPick:t,names:a}){let r=e.find(i=>i.toLowerCase()===o.toLowerCase()),n=r?a?.[r]:void 0,s=n?l(n):o;return Do("div",{className:"sf-swatches",children:[e.map(i=>{let f=a?.[i]?l(a[i]):i;return h(Hx,{content:f,children:h("button",{type:"button","aria-pressed":o.toLowerCase()===i.toLowerCase(),className:`sf-swatch ${o.toLowerCase()===i.toLowerCase()?"is-active":""}`,style:{background:i},onClick:()=>t(i),"aria-label":f})},i)}),h("span",{className:"sf-swatch-hex",children:s})]})}function TU(e,o){return{type:"custom",render:({value:t,onChange:a})=>{let r=ox(t,o);return h(te,{label:l(e),icon:h(yP,{}),changed:!r,action:h(Ee,{words:X()?.panel,label:l(e),changed:!r,detail:l("the theme's section background"),onReset:()=>a(Pn)}),children:Vx({swatches:Jm,current:r?Tn:t??o??"",onPick:a,names:ex})})}}}function PF(e,o){return{type:"custom",render:({value:t,onChange:a})=>{let r=t,n=rx(r,o);return h(te,{label:l(e),icon:h(RP,{}),changed:!n,action:h(Ee,{words:X()?.panel,label:l(e),changed:!n,detail:l("the theme's image stage"),onReset:()=>a(Ka)}),children:Vx({swatches:tx,current:n?Jt:Mi(r,o),onPick:a,names:ax})})}}}function Nn(e=t=>t,o){return ot({_gSectionTheme:ve(Sp),sectionAccent:{type:"custom",render:({value:t,onChange:a})=>h(Im,{value:e(t),onChange:a,followLabel:o})}})}function Ae({min:e,max:o,step:t,value:a,onChange:r,suffix:n="",readout:s=!0,notch:i,ariaLabel:f,disabled:u=!1}){let p=i!==void 0&&Number.isFinite(i)&&i>=e&&i<=o;return h("div",{className:p?"sf-slider has-notch":"sf-slider",style:p?{"--sf-notch":(i-e)/(o-e)}:void 0,children:h(iF,{min:e,max:o,step:t,value:a,suffix:n||void 0,showInput:s,label:f===void 0?void 0:l(f),disabled:u,size:"sm",className:"sf-slider-track",onChange:m=>{m!==null&&m!==a&&r(m)}})})}function oa(e,o,t,a,r,n,s="",i){return{type:"custom",render:f=>h(te,{label:l(e),icon:wo(o),action:i?i("storedValue"in f?f.storedValue:f.value,f.onChange):void 0,children:Ae({min:t,max:a,step:r,value:typeof f.value=="number"?f.value:n,suffix:s,ariaLabel:e,onChange:f.onChange})})}}function Yx(e,o){let{min:t,max:a,step:r=1,unsetLabel:n,hint:s,restTrack:i,unsetMark:f,icon:u}=o;return{type:"custom",render:({value:p,onChange:m})=>{let x=typeof p=="number"?p:null,I=x===null;return h(te,{label:l(e),icon:u?wo(u):void 0,value:I?f||n===void 0?void 0:l(n):`${x}px`,changed:!I,action:f?Tx(f,{changed:!I,onReset:()=>m(null)}):h(Ee,{words:X()?.panel,label:l(e),changed:!I,onReset:()=>m(null)}),hint:typeof s=="string"?l(s):s,children:i?i({min:t,max:a,step:r,px:x,label:e,onChange:m}):Ae({min:t,max:a,step:r,value:x??t,readout:!1,ariaLabel:e,onChange:m})})}}}function PU(e){let o=oa("Gap",h(Ex,{}),Zo.min,Zo.max,Zo.step,Qt[e],"px",(t,a)=>h(IF,{inherited:!Ni(e,t),onReset:()=>a(void 0),label:"Gap"}));return{type:"custom",[Xm]:e,render:t=>o.render({...t,value:ja(e,t.value,t.field?.siteGap),storedValue:t.value,onChange:a=>t.onChange(a)})}}var Mn="Corners";function ef(e){return{type:"custom",render:({value:o,onChange:t})=>{let a=typeof o=="number"&&Number.isFinite(o)?o:null,r=a!==null;return h(te,{label:l(Mn),icon:h(vP,{}),changed:r,action:Tx(e.mark,{changed:r,onReset:()=>t(null)}),hint:e.hint,children:h(FF,{tier:e,px:a,onRadius:t})})}}}function Hn(e){let o=null;try{o=Xi()}catch{o=null}return[o?.values?.[e],t=>o?.onChange(e,t)]}function FF({tier:e,px:o,onRadius:t}){let a=e.useFollowed(),r=e.useClosedReason?e.useClosedReason():null,[n,s]=Hn(e.sidesKey),i=Lo(n)??[...mt];return h(nF,{label:l(Mn),value:i,corners:Gu,onChange:f=>{let u=Lo(f)??[];s(u.length===mt.length?null:u)},radius:o,onRadiusChange:t,radiusMin:Ue,radiusMax:ct,radiusStep:e.step??1,radiusPlaceholder:String(a),disabled:r!==null,disabledReason:r??void 0})}function Xx(){return Za({type:"custom",render:()=>h(Bn,{})},"always")}function EF({label:e,changed:o=!1,onReset:t=()=>{}}){let{cornerRadiusPx:a}=V(),r=typeof a=="number"?`${a}px`:l("not set");return h(Ee,{words:X()?.panel,label:l(e),changed:o,detail:a==null?l("the built-in corners"):Tt(r,l("Styles")),onReset:t})}function OF(){let{cornerRadiusPx:e}=V();return typeof e=="number"?e:Ue}function LF(){return ef({sidesKey:"sectionCornerSides",useFollowed:OF,useClosedReason:()=>Qx()?l(Zx):null,mark:h(EF,{label:Mn}),hint:h(RF,{})})}var Zx="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function Qx(){return qi(vo())}function RF(){return h(Co,{children:Qx()?Zx:"Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here."})}function Wn(){return ot({_gShape:ve("Shape"),sectionCorners:LF(),sectionCornerSides:Xx(),sectionBorder:Cx("desktop"),sectionBorderPhone:Cx("mobile")})}var AF=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function BF(e){let o=Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""));return Object.keys(o).length?o:void 0}function DF(){let e;try{let o=He(V().theme);e=o.themes[o.selected]?.line}catch{e=void 0}return e||Yd.line}function _F({value:e,onChange:o,tier:t}){let[a]=Hn("sectionBorder"),r=DF(),n=e&&typeof e=="object"?e:{},s=t==="mobile"?a&&typeof a=="object"?a:{}:{},[i,f]=An(()=>eF(n,s)),u=AF();return h(te,{label:l("Border"),icon:h(bP,{}),action:h(_x,{each:i,label:l("Each side"),onChange:f}),children:h(YP,{label:l("Border"),value:n,each:i,onChange:p=>o(BF(p)),placeholder:{sides:JP(s),style:s.style??"solid",color:s.color||r},presets:[r],words:u,max:20})})}function Cx(e){return we(e,{type:"custom",render:({value:o,onChange:t})=>h(_F,{value:o,onChange:t,tier:e})})}function zn(){return{_gMotion:ve("Motion"),sectionAnimation:af("Entrance",h(Px,{}),[...wp],Qs)}}function of(){let e=null;try{let{appState:o,selectedItem:t}=Xa(r=>r),a=t?.props?.id?String(t.props.id):void 0;e=a?ei(o?.data,a):null}catch{e=null}return e!==null&&qi(e)}function Jx(e){let{cornerRadiusPx:o}=V(),t=of(),a=typeof o=="number"?o:e,r=null;try{let{appState:s,selectedItem:i}=Xa(u=>u),f=i?.props?.id?String(i.props.id):void 0;r=f?ei(s?.data,f):null}catch{r=null}if(t||!r)return a;let n=r.sectionCorners;return Ns(n)?n:a}function NF({label:e,changed:o=!1,onReset:t=()=>{}}){let a=of(),r=Jx(Ue),n=a?"Site":"Section";return h(Ee,{words:X()?.panel,label:l(e),changed:o,detail:Tt(`${r}px`,a?l("Styles"):l("the section")),onReset:t})}function MF(){return h(Co,{children:of()?l("The section is full width, so this card follows Styles \u25B8 Basics \u25B8 Corners."):l("Follows the section's Corners until you set a number here.")})}function HF(){return ef({sidesKey:"cardCornerSides",useFollowed:()=>Jx(Ue),mark:h(NF,{label:Mn}),hint:h(MF,{})})}function WF(){return{type:"custom",render:()=>h(Yu,{})}}function FU(){return{_gShape:ve("Shape"),cardCorners:HF(),cardCornerSides:Xx(),cardCornersApplyAll:WF()}}function EU(){return Jo("Justify",h(gP,{}),Ri,Ri[0].value)}function OU(){return Jo("Item alignment",h(IP,{}),zm,"stretch")}function LU(){return Jo(Gm,h(jP,{}),Ai,Ai[0].value)}function RU(){return{type:"custom",render:({value:e,onChange:o})=>{let t=kn.find(a=>a.value===e)??kn[0];return h(te,{label:l(Bi),icon:h(Fx,{}),value:l(t.label),children:h(Mx,{className:"sf-gallery-layouts",label:l(Bi),value:t.value,onChange:o,options:kn.map(a=>({value:a.value,label:l(a.label),picture:h("span",{className:"sf-gallery-pic",children:zF(a.weights).map((r,n)=>h("i",{style:{gridColumn:`span ${r}`}},n))})}))})})}}}function zF(e){if(!e)return[3,4];let o=e.reduce((t,a)=>t+a,0);return e.map(t=>Math.round(t/o*12))}function AU(){return Jo(qm,h(Ex,{}),_i,_i[0].value)}function BU(){return oa(Um,h(MP,{}),Di,$m,1,Di)}function DU(e){let o=af(_m,Qi("`Direction` names how a container's children run \u2014 a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),Mm(e),vn(e,void 0));return{type:"custom",render:t=>o.render({...t,value:vn(e,t.value),onChange:a=>t.onChange(a)})}}function _U(e,o,t,a,r,n){return{type:"custom",render:({value:s,onChange:i})=>h(te,{label:l(e),icon:h(Vs,{noun:n}),action:h(Ee,{words:X()?.panel,label:l(e),changed:!lx(s),detail:l("the Text style in Styles"),onReset:()=>i(nx),defaultAction:{onPress:()=>i(On),title:l("Keep this section's own built-in size"),icon:h(SP,{})}}),children:Ae({min:o,max:t,step:a,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:i})})}}function NU(){return{_gCellWidth:ve("Cell width"),gridSpan:Jo("Positions",h(Fx,{}),[{label:"Auto",value:""},...Array.from({length:Jr},(e,o)=>({label:o===0?"1 position":`${o+1} positions`,value:String(o+1)}))],"")}}function vo(){let e=null;try{e=Xa(o=>o).selectedItem}catch{e=null}return e?.props??{}}function GF({min:e,max:o,step:t,px:a,label:r,onChange:n,desktopKey:s,fallback:i}){let f=vo()[s],u=cn(void 0,f,i);return h(Co,{children:Ae({min:e,max:o,step:t,value:cn(a,f,i),readout:!1,ariaLabel:r,notch:u,onChange:n})})}function UF({label:e,desktopKey:o,fallback:t,changed:a=!1,onReset:r=()=>{}}){let n=vo()[o],s=cn(void 0,n,t);return h(Ee,{words:X()?.panel,label:l(e),changed:a,detail:l("{value} on desktop",{value:`${s}px`}),onReset:r})}function $F(e){return Yx(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:h(UF,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:o=>h(GF,{...o,desktopKey:e.desktopKey,fallback:e.fallback})})}function MU(e){return{type:"custom",render:({value:o,onChange:t})=>h(jF,{...e,value:o,onChange:t})}}function qF({label:e,icon:o,options:t,value:a,resolved:r,restWord:n,onChange:s}){let i=t.some(f=>f.value===a);return h(te,{label:l(e),icon:wo(o),action:h(Ee,{words:X()?.panel,label:l(e),changed:i,detail:l("{value} on desktop",{value:l(n)}),onReset:()=>s(void 0)}),children:jn({options:t,value:i?a:r,onChange:f=>s(f),ariaLabel:e})})}function jF({label:e,icon:o,options:t,desktopKey:a,resolve:r,value:n,onChange:s}){let i=vo()[a],f=r(void 0,i),u=t.find(p=>p.value===f)?.label??"";return h(qF,{label:e,icon:o,options:t,value:n,resolved:f,restWord:u,onChange:s})}var KF={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},VF={Top:Bx,Bottom:Lx,Left:Rx,Right:Ax},YF=e=>{let o=VF[e];return h(o,{})};function HU(e={}){let o=e.keys?.top??"sectionPaddingTop",t=e.keys?.bottom??"sectionPaddingBottom",a=e.group!==!1,r=v=>KF[v],n=v=>oa(r("Top"),h(Bx,{}),Je.min,Je.max,Je.step,v,"px"),s=(v,T,w,g=Je)=>we("mobile",$F({label:r(v),icon:YF(v),desktopKey:T,min:g.min,max:g.max,step:g.step,fallback:w})),i=e.top??Je.min,f=e.bottom??Je.min,u="sectionPaddingLeft",p="sectionPaddingRight",m=e.sideBounds??Je,x=e.side??m.min,I=e.sidePhone??x,y=e.phone===!0,C=v=>y?we("desktop",v):v;return ot({...a?{_gSpacing:ve("Padding")}:{},[o]:C(n(i)),...y?{[Ao(o)]:s("Top",o,i)}:{},...e.only==="top"?{}:{[t]:C(oa(r("Bottom"),h(Lx,{}),Je.min,Je.max,Je.step,f,"px")),...y?{[Ao(t)]:s("Bottom",t,f)}:{}},...e.sides?{[u]:C(oa(r("Left"),h(Rx,{}),m.min,m.max,m.step,x,"px")),...y?{[Ao(u)]:s("Left",u,I,m)}:{},[p]:C(oa(r("Right"),h(Ax,{}),m.min,m.max,m.step,x,"px")),...y?{[Ao(p)]:s("Right",p,I,m)}:{}}:{}})}var Ya=["top","right","bottom","left"],XF={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},wx=e=>typeof e=="number"?e:null;function ZF(e,o,t){let a={};for(let r of Ya)t[r]!==o[r]&&(a[e[r]]=t[r]??void 0);return a}function QF({tier:e,o}){let t=null;try{t=Xi()}catch{t=null}let a=t?.values??{},r=e==="mobile"?o.phoneKeys:o.keys,n=Object.fromEntries(Ya.map(u=>[u,wx(a[r[u]])])),s=Object.fromEntries(Ya.map(u=>[u,String(e==="mobile"?wx(a[o.keys[u]])??o.fallback[u]:o.fallback[u])])),[i,f]=An(()=>QP(n,s));return h(te,{label:l("Padding"),icon:h(NP,{}),action:h(_x,{each:i,label:l("Each side"),onChange:f}),children:h(ZP,{label:l("Padding"),each:i,value:n,placeholder:s,min:o.min,max:o.max,step:o.step,onChange:u=>{let p=ZF(r,n,u);Object.keys(p).length&&t?.onChangeMany(p)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Gn(e={}){let o={...XF,...e.keys},t={keys:o,phoneKeys:Object.fromEntries(Ya.map(i=>[i,Ao(o[i])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},a=e.phone!==!1,r=i=>{let f={type:"custom",render:()=>h(QF,{tier:i,o:t})};return a?we(i,f):f},n=()=>Za({type:"custom",render:()=>h(Bn,{})},"always"),s=Ya.filter(i=>i!=="top");return ot({...e.group===!1?{}:{_gSpacing:ve("Padding")},[t.keys.top]:r("desktop"),...a?{[t.phoneKeys.top]:r("mobile")}:{},...Object.fromEntries(s.map(i=>[t.keys[i],{...n(),reachedBy:t.keys.top}])),...a?Object.fromEntries(s.map(i=>[t.phoneKeys[i],we("mobile",n())])):{}})}var vx=e=>typeof e=="number"?e:null;function JF(e,o,t){let a={};for(let r of["x","y"])t[r]!==o[r]&&(a[e[r]]=t[r]??void 0);return a}function e1({o:e}){let o=null;try{o=Xi()}catch{o=null}let t=o?.values??{},a={x:vx(t[e.keys.x]),y:vx(t[e.keys.y])},r=l(e.label??"Position"),n=!!(a.x||a.y),s=u=>{let p=JF(e.keys,a,u);Object.keys(p).length&&o?.onChangeMany(p)},i=h(sF,{label:r,value:a,onChange:s,words:{x:l("Left and right"),y:l("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:e.min,max:e.max,step:e.step??1}),f=h(Ee,{words:X()?.panel,label:r,changed:n,detail:"0 px, 0 px",onReset:()=>s({x:null,y:null})});return e.label===null?Do("div",{className:"sf-position-line",children:[i,f]}):h(te,{label:r,icon:h(_P,{}),changed:n,action:f,children:i})}function WU(e){return{[e.keys.x]:{type:"custom",render:()=>h(e1,{o:e})},[e.keys.y]:{...Za({type:"custom",render:()=>h(Bn,{})},"always"),reachedBy:e.keys.x}}}var o1={contained:"Contained",page:"Page",full:"Full"},Rn="Width";function Un(e,o=ux,t=!0){let a=o.map(r=>({label:ea[r]??o1[r],value:r}));return ot({...t?{_gWidth:ve(Rn)}:{},widthMode:{type:"custom",render:({onChange:r,field:n})=>h(te,{label:l(Rn),icon:h(qP,{}),action:t?h(hF,{inherited:n?.inherited??!1,onReset:()=>r($i),label:Rn}):void 0,children:jn({options:a,value:n?.currentValue||e,onChange:r,ariaLabel:Rn})})}})}function $n(){let e=a=>({type:"custom",render:({value:r,onChange:n})=>h(te,{label:Zt,icon:wo(h(AP,{})),action:a?a(n):void 0,children:jn({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(r)?r:"auto",onChange:n,ariaLabel:Zt})})}),o=()=>({type:"custom",render:({value:a,onChange:r,field:n})=>{let s=n?.unit==="%"?"%":"px",i=s==="%"?Fi:Pi;return h("div",{className:"sf-field",children:Ae({min:i.min,max:i.max,step:i.step,value:typeof a=="number"?a:i.fallback,suffix:s,ariaLabel:Zt,onChange:r})})}}),t=()=>af("Unit",h(Ox,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return ot({_gHeight:ve(Zt),sectionHeightMode:we("desktop",e()),sectionHeightValue:we("desktop",o()),sectionHeightUnit:we("desktop",t()),sectionHeightModePhone:we("mobile",e(a=>h(t1,{onClear:()=>a(void 0)}))),sectionHeightValuePhone:we("mobile",o()),sectionHeightUnitPhone:we("mobile",t())})}function t1({onClear:e}){let o=vo(),t=Ei(o),a=Cn(o),r=l("{value} on desktop",{value:a.mode==="auto"?l("Auto"):`${a.value}${a.unit}`});return h(Ee,{words:X()?.panel,label:l(Zt),changed:t,detail:r,onReset:e})}function tf(){let e=t=>({type:"custom",render:({value:a,onChange:r,id:n,name:s})=>h(a1,{value:a,onChange:r,labelId:`${n??s??"stickTop"}-label`,phone:t})}),o=()=>({type:"custom",render:({value:t,onChange:a})=>h("div",{className:"sf-field",children:Ae({min:Xo.min,max:Xo.max,step:Xo.step,value:typeof t=="number"?t:Xo.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:a})})});return{_gStick:ve(wn),stickTop:we("desktop",e(!1)),stickTopDistance:we("desktop",o()),stickTopPhone:we("mobile",e(!0)),stickTopDistancePhone:we("mobile",o())}}function a1({value:e,onChange:o,labelId:t,phone:a}){let r=vo(),n=Li(r),s=a?n.phone:e===!0;return h(te,{label:l(wn),labelId:t,icon:wo(h(zP,{})),action:Do(Co,{children:[a?h(Ee,{words:X()?.panel,label:l(wn),changed:Oi(r),detail:l("{value} on desktop",{value:n.desktop?`${n.desktopDistance}px`:l("Off")}),onReset:()=>o(void 0)}):null,h(Nx,{checked:s,onChange:o,ariaLabelledBy:t})]})})}var kx="e.g. about";function qn(){return{_gAnchor:ve("Anchor"),anchor:Ft({control:"plainText",label:"Name",placeholder:kx},{type:"custom",render:({value:e,onChange:o})=>h(hp,{value:e,onChange:o,nameBox:(t,a)=>h(Pt,{value:t,onChange:a,label:"Name",placeholder:kx,hideable:!1,markup:!1})})})}}function zU(e,o,t){return{type:"custom",render:({value:a,onChange:r,id:n,name:s})=>{let i=`${n??s??e}-datetime`,f=Date.parse(typeof a=="string"?a:"");return h(te,{label:l(e),icon:o,htmlFor:i,hint:t===void 0?void 0:l(t),children:h(lF,{id:i,value:Number.isFinite(f)?new Date(f):null,onChange:u=>r(u?u.toISOString():"")})})}}}function kt(e,o,t){return{type:"custom",render:({value:a,onChange:r,id:n,name:s})=>{let i=typeof a=="boolean"?a:o,f=`${n??s??e}-label`;return h(te,{label:l(e),labelId:f,icon:t,action:h(Nx,{checked:i,onChange:r,ariaLabelledBy:f})})}}}function GU(){return{type:"custom",render:({value:e,onChange:o,id:t,name:a})=>{let r=`${String(t??a??"pageBackground")}-colour`;return h(te,{label:l("Background"),icon:h(Dx,{}),htmlFor:r,action:h(qe,{id:r,label:"Background",value:Ys(e),onChange:o})})}}}var UU={follows:"fill"},$U={follows:"ink"};function qU(e,o,t){if(typeof o!="string"){let a=o.follows;return{type:"custom",render:({value:r,onChange:n})=>h(r1,{label:e,part:a,icon:t,value:r,onChange:n})}}return{type:"custom",render:({value:a,onChange:r})=>h(te,{label:l(e),icon:t,action:qe({value:a||o,onChange:r,label:e})})}}function r1({label:e,part:o,icon:t,value:a,onChange:r}){let n=eu(V().theme),s=o==="fill"?n.fill:n.ink;return h(sn,{label:l(e),icon:t,value:a||"",inherited:s,resetTo:Tt(s.toUpperCase(),l("Styles")),onChange:r,onReset:()=>r("")})}var n1=[{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 eI({label:e,value:o,onChange:t,points:a=n1}){let r=a.map(n=>({...n,label:l(n.label),...n.title?{title:l(n.title)}:null}));return h(rF,{label:l(e),value:o,points:r,onChange:t})}function jU(){return Za({type:"custom",render:()=>h(Bn,{})},"always")}var l1=Us([]);function KU(e,{stacking:o,fallback:t=en}){return{type:"custom",render:({value:a,onChange:r})=>{let n=qo.includes(a)?a:t;return o?h(s1,{label:e,value:n,onChange:r}):oI({label:e,value:n,onChange:r,points:l1})}}}function s1({label:e,value:o,onChange:t}){let{appState:a,selectedItem:r}=Xa(i=>i),n=r?.props?.id?String(r.props.id):void 0,s=n?qs(a?.data,n):[];return oI({label:e,value:o,onChange:t,points:Us(s,n)})}function oI({label:e,value:o,onChange:t,points:a}){let r=a.find(n=>n.disabled);return h(te,{label:l(e),icon:h(HP,{}),hint:r?.title?l(r.title):void 0,children:eI({label:e,value:xt(o),onChange:t,points:a})})}var VU={top:h(FP,{}),right:h(PP,{}),bottom:h(kP,{}),left:h(TP,{})};function YU(e,o,t,a,r,n){let s=p=>o.find(m=>m.value===p),i=p=>({value:p,label:"",disabled:!0,title:a}),f=p=>{let m=o.find(I=>I.cell===p);if(!m)return i(`missing-${p}`);let x=n?.[p];return x?{value:m.value,label:m.label,icon:x}:{value:m.value,label:m.label}},u=[i("corner-top-left"),f("top"),i("corner-top-right"),f("left"),i("centre"),f("right"),i("corner-bottom-left"),f("bottom"),i("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:m})=>{let x=o.some(I=>I.value===p)?p:t;return h(te,{label:l(e),icon:r,value:s(x)?.label?l(s(x).label):"",children:eI({label:e,value:x,onChange:m,points:u})})}}}var i1="\0note";function Jo(e,o,t,a,r){return{type:"custom",options:t,fallback:a,...r?{note:r}:{},render:({value:n,onChange:s,field:i})=>{let f=i.options??t,u=i.fallback??a,p=f.some(m=>m.value===n)?n:u;return h(te,{label:l(e),icon:wo(o),children:h(oF,{value:p,ariaLabel:l(e),onChange:s,options:[...r?[{label:l(r),value:i1,disabled:!0}]:[],...f.map(m=>({label:l(m.label),value:m.value}))]})})}}}function XU(e,o,t){return{type:"custom",options:o,render:({value:a,onChange:r,field:n})=>h(em,{label:e,options:(n.options??o).map(s=>({...s,label:l(s.label)})),value:Array.isArray(a)?a:[],onChange:r,...t?{emptyLabel:l(t)}:{}})}}function ZU(e,o={}){return{type:"custom",render:({value:t,onChange:a})=>{let r={value:t,onChange:a,...o};return h(e,{...r})}}}function jn({options:e,value:o,onChange:t,ariaLabel:a,disabled:r=!1}){return h(XP,{options:e.map(n=>n.picture?{id:n.value,label:n.picture,title:l(n.title??n.label)}:{id:n.value,label:l(n.label),title:n.title===void 0?void 0:l(n.title)}),value:o,onChange:t,ariaLabel:l(a),disabled:r})}var QU=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function af(e,o,t,a){let r=t.map(n=>typeof n=="string"?{label:n,value:n}:n);return{type:"custom",render:({value:n,onChange:s,field:i})=>h(te,{label:l(e),icon:wo(o),children:jn({options:r,value:r.some(f=>f.value===n)?n:n||i?.currentValue||a,onChange:s,ariaLabel:e})})}}function JU(e,o,t,a={}){return{type:"custom",[pP]:!0,render:({value:r,onChange:n})=>h(Qp,{value:r||"",onChange:n,label:e,accept:o,placeholder:t,focusKey:a.focus,focusWhen:a.focusWhen})}}function e7({value:e,onChange:o,label:t}){let a=e||{},r=!!a.pending,n=r?"var(--fg-dim, #888)":a.ok?"#1d9e75":"#d85a30",s=!!Se(uF()).geocode,i=(f,u)=>o({...a,[f]:u===""?void 0:Number(u)});return Do(te,{label:l(t),icon:h(Vi,{}),children:[s&&Do(Co,{children:[h("button",{type:"button",disabled:r,onClick:()=>o({...a,pending:!0,ok:!1,status:"Finding\u2026"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:r?"default":"pointer",opacity:r?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:r?l("Finding\u2026"):l("Find coordinates")}),a.status&&h("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:n},children:l(a.status)}),h("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")})]}),h("button",{type:"button",onClick:()=>o({...a,manual:!a.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:a.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),a.manual&&Do("div",{style:{marginTop:8,display:"grid",gap:8},children:[h(te,{label:l("Latitude"),icon:h(Vi,{}),children:h("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof a.lat=="number"?a.lat:"",onChange:f=>i("lat",f.target.value)})}),h(te,{label:l("Longitude"),icon:h(Vi,{}),children:h("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof a.lng=="number"?a.lng:"",onChange:f=>i("lng",f.target.value)})})]})]})}function f1(e,o){return o===null||o<0||o>=e.length?"":e[o]?.text??""}function c1(e,o,t){let a=e.map(r=>({text:r?.text??""}));return o===null||o<0||o>=e.length?a:a.map((r,n)=>n===o?{text:t}:r)}function d1(e,o,t){if(t===null||t>=o.length)return null;for(let a=0;a<t;a+=1)if(e[a]!==o[a])return null;return e[t]!==o[t]&&o.includes(e[t])||e[t]!==o[t]&&o.length!==e.length?null:t}var rf={label:"Ticker items",icon:h(DP,{})};function o7(e,o,t,a){return{type:"custom",[_o]:{control:"textList",label:e,placeholder:t,itemKey:"text",rendering:a},render:({value:r,onChange:n})=>h(nf,{label:e,icon:wo(o),items:Array.isArray(r)?r:[],placeholder:t,onChange:n,markup:a==="markup"})}}function nf({label:e,icon:o,items:t,placeholder:a,onChange:r,markup:n=!1}){let s=Yi(null),[i,f]=An(null),u=m=>m.map(x=>({text:x?.text??""})),p=m=>{let x=d1(t,m,i);x===null&&(s.current=null),f(x),r(u(m))};return h(tF,{label:l(e),icon:o,noun:l("item"),items:t,onChange:p,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:n?h(ri,{target:s,value:f1(t,i),onChange:m=>r(c1(t,i??-1,m)),disabled:i===null,label:i===null?l("Formatting \u2014 click a row first"):l("Formatting \u2014 row {n}",{n:i+1})}):void 0,renderRow:(m,x,I)=>h("input",{type:"text",className:n&&i===x?"sf-list-marking":void 0,value:m?.text??"",placeholder:l(a),"aria-label":l("{label} {n}",{label:l(e),n:x+1}),onChange:y=>I({text:y.target.value}),onFocus:y=>{s.current=y.currentTarget,f(x)}})})}function tI(e,o){let t=`${e.label} \u2014 row ${o+1}`;return Ft({control:"plainText",label:t,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:a,onChange:r})=>h(Pt,{value:a,onChange:r,label:l("{label} \u2014 row {n}",{label:l(e.label),n:o+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function aI(e){return{_gCards:ve("Cards"),coverIndex:Jo("Cover image",h(BP,{}),Kp,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:PF("Image background",En),cardImage:p1(),spinOnHover:kt("Rotate on hover",e?.spinDefault??!0,h(GP,{}))}}function rI(){return{outline:Jo("Card outline",h(UP,{}),di,fi),indexBadge:Jo("Card number",h(Ox,{}),ci,ii),showBadge:kt("Product badge",!0,h(Vs,{noun:"tag"}))}}function nI(e){let o=e&&"bottomDefault"in e?e.bottomDefault:!0,t=e&&"defaults"in e?e.defaults:{showCardSizes:o,showCardBuy:o,showCardPage:o};return{_gShowOnCard:ve("Show on a card"),showCardPrice:kt("Price",!0,h(EP,{})),showCardFinishes:kt("Finish swatches",!0,h(OP,{})),showCardSizes:kt("Sizes",t.showCardSizes,h(WP,{})),showCardBuy:kt("Buy button",t.showCardBuy,h(CP,{})),showCardPage:kt("Page button",t.showCardPage,h(Dx,{}))}}function t7(e,o="display"){let t=Ao(o);return{[o]:we("desktop",{type:"custom",render:({value:a,onChange:r})=>h(lI,{parts:e,changed:kp(a),shown:n=>ln(a,n),onPress:(n,s)=>r(Pp(a,n,s)),onReset:()=>r(void 0)})}),[t]:we("mobile",{type:"custom",render:({value:a,onChange:r})=>h(u1,{parts:e,desktopKey:o,value:a,onChange:r})})}}function lI({parts:e,changed:o,shown:t,onPress:a,onReset:r,detail:n}){let s=l("Display");return h(te,{label:s,icon:h(hP,{}),changed:o,action:h(Ee,{words:X()?.panel,label:s,changed:o,detail:n,onReset:r}),children:h(aF,{label:s,items:e.map(i=>({id:i.id,label:l(i.label),shown:t(i.id)})),onChange:a})})}function u1({parts:e,desktopKey:o,value:t,onChange:a}){let r=vo()[o];return h(lI,{parts:e,changed:Tp(t),shown:n=>oi(r,t,n),onPress:(n,s)=>a(Fp(t,n,s)),onReset:()=>a(dn),detail:l("the same as Desktop")})}function p1(){return Yx("Card image",{min:Ue,max:ct,step:Xu,hint:"Rounds the picture. The card's own corner is in Styles."})}function a7(){return ef({sidesKey:"cornerSides",step:Zu,useFollowed:()=>Ue,mark:h(m1,{label:Qu}),hint:l("Rounds the picture. Left alone it stays square.")})}function m1({label:e,changed:o=!1,onReset:t=()=>{}}){return h(Ee,{words:X()?.panel,label:l(e),changed:o,onReset:t})}function r7(){return{type:"custom",render:({value:e,onChange:o})=>h(x1,{value:typeof e=="string"?e:"",onChange:o})}}function x1({value:e,onChange:o}){let[t,a]=An(null),r=Hs.filter(s=>t===null||Ro[s].across===t),n=e&&e in Ro?Ro[e]:null;return Do(Co,{children:[h(te,{label:l("Photos in a row"),icon:h(wP,{}),children:Do("div",{className:"sf-gallery-filter",children:[h("button",{type:"button","aria-pressed":t===null,onClick:()=>a(null),children:l("All")}),ep.map(s=>h("button",{type:"button","aria-pressed":t===s,onClick:()=>a(s),children:s},s))]})}),h(te,{label:l("Layout"),icon:h(LP,{}),value:n?l(n.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:r.length,total:Hs.length}),children:h(Mx,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:o,onClear:()=>o(""),options:r.map(s=>({value:s,label:l(Ro[s].label),picture:h("span",{className:"sf-gallery-pic",children:Ro[s].desktop.map(([i,f],u)=>h("i",{style:{gridColumn:`span ${i}`,gridRow:`span ${f}`}},u))})}))})})]})}import{jsx as Kn,Fragment as I1,jsxs as sI}from"react/jsx-runtime";import{Button as iI,Dialog as h1}from"efficient-shell/ui";function g1(e){return $e("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 fI({count:e,onCancel:o,onConfirm:t}){return sI(h1,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Clear this site\u2019s colors?"),footer:sI(I1,{children:[Kn(iI,{variant:"secondary",onClick:o,children:l("Cancel")}),Kn(iI,{variant:"danger",onClick:t,children:l("Clear colors")})]}),children:[Kn("p",{children:g1(e)}),Kn("p",{className:"mt-2 font-medium",children:l("This cannot be undone.")})]})}var v1=Qi("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"),k1="Reset color",T1={selected:0,themes:[]};function P1(e){e(T1)}function uI({value:e,onChange:o}){let t=e?.themes??[],a=t.length===0,r=He(e),[n,s]=dI(!1),i=C1(),[f,u]=dI(null),p=(T,w)=>{o({...r,themes:r.themes.map((g,b)=>b===T?w:g)})},m=Gt(r).accent,x=new Set(r.themes.map(T=>T.brandInk).filter(Boolean)),I=Xd.filter(T=>!x.has(T)).map(T=>Zd(m,T)),y=[...r.themes,...I],C=T=>{if(T<r.themes.length)return o({...r,selected:T});let w=[...r.themes,y[T]];o({...r,themes:w,selected:w.length-1})},v=()=>{let T=[...r.themes,{...xo(r.themes[r.selected])}];o({...r,themes:T,selected:T.length-1}),u(T.length-1)};return cI(y1,{children:[a?null:aa(S1,{label:l(k1),icon:wo(v1),labelId:"sf-theme-reset",action:aa(b1,{label:l("all theme colors"),words:i.panel,changed:!0,onReset:()=>s(!0)})}),n&&aa(fI,{count:t.length,onCancel:()=>s(!1),onConfirm:()=>{s(!1),P1(o)}}),aa("div",{className:"sf-theme-list",role:"radiogroup","aria-label":l("Theme"),children:y.map((T,w)=>aa(xn,{index:w,colors:T,selected:w===r.selected,open:f===w&&w<r.themes.length,editable:w<r.themes.length,onPick:()=>C(w),onEdit:()=>u(g=>g===w?null:w),onChangeColors:g=>p(w,g)},w))}),cI("button",{type:"button",onClick:v,className:"sf-theme-add",children:[aa(w1,{size:12}),l("Add new theme")]})]})}import{jsx as Vn}from"react/jsx-runtime";import{SettingsDefaultReset as F1,SettingsField as E1}from"efficient-easel/panel";import{SquareIcon as O1}from"efficient-easel/icons";var L1="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",lf="Corners";function pI({value:e,onChange:o,showHint:t=!0}){let a=e===null;return Vn(E1,{label:l(lf),icon:Vn(O1,{}),value:a?l("Default"):`${e}px`,changed:!a,action:Vn(F1,{words:X()?.panel,label:l(lf),changed:!a,detail:l("the built-in corners"),onReset:()=>o(null)}),hint:t?l(L1):void 0,children:Vn(Ae,{min:Ue,max:ct,step:1,value:e??Ue,readout:!1,ariaLabel:l(lf),onChange:o})})}import{jsx as Qa}from"react/jsx-runtime";import{SettingsDefaultReset as R1,SettingsField as A1,SettingsSegmented as B1}from"efficient-easel/panel";import{ShadowIcon as D1}from"efficient-easel/icons";var sf={none:"None",soft:"Soft",lifted:"Lifted"},_1="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.",N1={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)"},M1={labelsPx:90.25,widestLabelPx:34.6};function mI({value:e,onChange:o,showHint:t=!0}){let a=e===null,r=e??Ps;return Qa(A1,{label:l("Card shadow"),icon:Qa(D1,{}),value:l(sf[r]),changed:!a,action:Qa(R1,{words:X()?.panel,label:l("Card shadow"),changed:!a,detail:l(sf[Ps]),onReset:()=>o(null)}),hint:t?l(_1):void 0,children:Qa(B1,{options:lu.map(n=>({id:n,label:l(sf[n]),icon:Qa("span",{className:"sf-shadow-chip",style:{boxShadow:N1[n]}})})),value:r,ariaLabel:l("Card shadow"),fit:M1,onChange:o})})}import{jsx as xI}from"react/jsx-runtime";import{ShadowIcon as H1}from"efficient-easel/icons";var W1="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 II({value:e,onChange:o,showHint:t=!0}){let a=e===null;return xI(sn,{label:l("Shadow color"),icon:xI(H1,{}),value:e??"",inherited:Es,resetTo:Es,onChange:o,onReset:()=>o(null),hint:t?l(W1):void 0})}import{jsx as Yn}from"react/jsx-runtime";import{SettingsDefaultReset as z1,SettingsField as G1}from"efficient-easel/panel";import{AlignSeparateIcon as U1}from"efficient-easel/icons";var $1="The space between the blocks inside a row, a grid or a box. Default means each one keeps the spacing it already has.",ff="Block gap",q1=Qt.Grid;function hI({value:e,onChange:o,showHint:t=!0}){let a=e===null;return Yn(G1,{label:l(ff),labelId:"sf-block-gap",icon:Yn(U1,{}),value:a?l("Default"):`${e}px`,changed:!a,action:Yn(z1,{words:X()?.panel,label:l(ff),changed:!a,detail:l("each block's own spacing"),onReset:()=>o(null)}),hint:t?l($1):void 0,children:Yn(Ae,{min:vt.min,max:vt.max,step:vt.step,value:a?q1:e,readout:!1,ariaLabel:l(ff),onChange:o})})}import{jsx as Xn}from"react/jsx-runtime";import{SettingsDefaultReset as j1,SettingsField as K1,SettingsSegmented as V1}from"efficient-easel/panel";import{HoverIcon as Y1}from"efficient-easel/icons";var cf={none:"None",lift:"Lift",highlight:"Highlight"},X1="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 gI({value:e,onChange:o,showHint:t=!0}){let a=e===null,r=e??Fs;return Xn(K1,{label:l("Hover effect"),icon:Xn(Y1,{}),value:l(cf[r]),changed:!a,action:Xn(j1,{words:X()?.panel,label:l("Hover effect"),changed:!a,detail:l(cf[Fs]),onReset:()=>o(null)}),hint:t?l(X1):void 0,children:Xn(V1,{options:su.map(n=>({id:n,label:l(cf[n])})),value:r,ariaLabel:l("Hover effect"),onChange:o})})}import{jsx as Zn}from"react/jsx-runtime";import{SettingsDefaultReset as Z1,SettingsField as Q1,SettingsSegmented as J1}from"efficient-easel/panel";import{DropIcon as eE}from"efficient-easel/icons";var df="Photography",yI={shot:"As shot",mono:"Black and white"},uf=[{grayscale:!1,label:yI.shot},{grayscale:!0,label:yI.mono}],oE="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function bI({value:e,onChange:o,showHint:t=!0}){let a=e===null,r=e??!1;return Zn(Q1,{label:l(df),icon:Zn(eE,{}),value:l(uf.find(n=>n.grayscale===r).label),changed:!a,action:Zn(Z1,{words:X()?.panel,label:l(df),changed:!a,detail:l(uf.find(n=>!n.grayscale).label),onReset:()=>o(null)}),hint:t?l(oE):void 0,children:Zn(J1,{options:uf.map(n=>({id:n.grayscale,label:l(n.label)})),value:r,ariaLabel:l(df),onChange:o})})}import{jsx as pf}from"react/jsx-runtime";import{useId as tE}from"react";import{SettingsField as aE,SettingsSwitch as rE}from"efficient-easel/panel";import{ShareIcon as nE}from"efficient-easel/icons";var lE="Share button",sE="On every blog post.";function SI({value:e,onChange:o,showHint:t=!0}){let a=tE();return pf(aE,{label:l(lE),labelId:a,icon:pf(nE,{}),action:pf(rE,{checked:e===!0,onChange:o,ariaLabelledBy:a}),hint:t?l(sE):void 0})}import{jsx as Qn}from"react/jsx-runtime";import{SettingsDefaultReset as iE,SettingsField as fE}from"efficient-easel/panel";import{PaddingXIcon as cE}from"efficient-easel/icons";var mf="Side space",xf=So.default,dE="The room left at the left and right edge of every page.";function CI({value:e,onChange:o,showHint:t=!0}){let a=e===null;return Qn(fE,{label:l(mf),labelId:"sf-side-space",icon:Qn(cE,{}),value:`${e??xf}px`,changed:!a,action:Qn(iE,{words:X()?.panel,label:l(mf),changed:!a,detail:`${xf}px`,onReset:()=>o(null)}),hint:t?l(dE):void 0,children:Qn(Ae,{min:So.min,max:So.max,step:So.step,value:e??xf,readout:!1,ariaLabel:l(mf),onChange:o})})}import{jsx as Mo,jsxs as uE}from"react/jsx-runtime";import{SettingsDefaultReset as wI,SettingsField as vI,SettingsSegmented as kI}from"efficient-easel/panel";import{BackgroundIcon as pE,WidthIcon as mE}from"efficient-easel/icons";var Jn="Width",xE="Background",IE="Content",TI=["full","content"],PI=e=>l(ea[e==="content"?"page":"full"]),hE=400,FI="Content cannot be wider than the background.",EI="The width of every section's background, until the section sets its own.",OI="The width of every section's content, until the section sets its own.",LI="On phones, content always fills the screen.";function el({value:e,changed:o,detail:t,onChange:a,onReset:r,disabled:n=!1,hint:s,labelId:i}){let f=l(xE);return Mo(vI,{label:f,labelId:i,icon:Mo(pE,{}),changed:o,hint:s?l(s):void 0,action:Mo(wI,{words:X()?.panel,label:f,changed:o,detail:t,onReset:r}),children:Mo(kI,{options:TI.map(u=>({id:u,label:PI(u)})),value:e,onChange:a,ariaLabel:f,disabled:n})})}function ol({mode:e,px:o,max:t=pe.max,min:a=hE,changed:r,detail:n,onMode:s,onPx:i,onReset:f,fullClosed:u=!1,disabled:p=!1,hint:m,labelId:x}){let I=l(IE),y=e!=="full"?Mo(Ae,{min:a,max:t,step:pe.step,value:Math.min(Math.max(o,a),t),onChange:i,suffix:"px",ariaLabel:I,disabled:p}):null;return Mo(vI,{label:I,labelId:x,icon:Mo(mE,{}),changed:r,hint:m?l(m):void 0,action:Mo(wI,{words:X()?.panel,label:I,changed:r,detail:n,onReset:f}),children:e===void 0||!s?y:uE("div",{className:"flex w-full min-w-0 flex-col gap-2",children:[Mo(kI,{options:TI.map(C=>({id:C,label:PI(C),disabled:C==="full"&&u})),value:e,onChange:s,ariaLabel:I,disabled:p}),y]})})}import{jsx as gh}from"react/jsx-runtime";import{TextStyleItem as OO,TextStylesGroup as LO}from"efficient-easel/text-styles";import{jsx as vO}from"react/jsx-runtime";import{useState as kO}from"react";import{TextStylesList as TO}from"efficient-easel/text-styles";import{usePreviewDevice as PO}from"efficient-easel/draw/client";import{defaultTextStyles as gO,textStyleCaseCss as yO}from"efficient-easel/text-styles/model";import{textStyleCaseCss as FE,textStyleCaseOfCss as EE}from"efficient-easel/draw";function If(e,o){return o?`${e}[${o.index}].${o.rowKey}`:e}function oo(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}}import{decodePartId as nl,encodePartId as ll}from"efficient-easel/draw";import{LINK_FIELD_MARKER as zI,SCAFFOLD_FIELD_MARKER as HI,TEXT_FIELD_MARKER as sl}from"efficient-easel/draw";import{readHidable as GI}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as vE}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as wE}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as RI}from"efficient-easel/draw";import{readHidable as AI}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as gE}from"efficient-easel/draw";var yE=gE,bE=["text","textarea"],SE=["textarea","plainTextarea"];function CE(e){return!e||typeof e!="object"?null:e[RI]?.control??null}function ra(e){let o=CE(e);return o&&yE.includes(o)?o:null}function tl(e){return SE.includes(e)}function BI(e){return!e||typeof e!="object"?void 0:e[RI]?.placeholder}function al(e){return AI(e).text}function hf(e,o,t){return bE.includes(e)?{text:t,hidden:AI(o).hidden}:t}function DI(e,o,t,a){return al(e[o])===a?null:{...e,[o]:hf(t,e[o],a)}}function gf(e){if(!(!e||typeof e!="object"))return e[wE]}function yf(e){if(!e||typeof e!="object")return null;let o=e.arrayFields;return o&&typeof o=="object"?o:null}function _I(e,o){if(!Array.isArray(o))return[];let t=gf(e),a=[];if(t?.control==="textList"){let n=t.itemKey??"text";return o.forEach((s,i)=>{let f=s?.[n];typeof f=="string"&&f&&a.push({row:{index:i,rowKey:n},text:f})}),a}let r=yf(e);return r?(o.forEach((n,s)=>{for(let[i,f]of Object.entries(r)){if(!ra(f))continue;let u=al(n?.[i]);u&&a.push({row:{index:s,rowKey:i},text:u})}}),a):[]}function Ja(e,o){if(Array.isArray(e))return e[o.index]?.[o.rowKey]}function bf(e,o,t,a){let r=e[o];return!Array.isArray(r)||t.index<0||t.index>=r.length?null:{...e,[o]:r.map((n,s)=>s===t.index?{...n,[t.rowKey]:a}:n)}}function NI(e,o,t,a,r){let n=Ja(e[o],t);return al(n)===r?null:bf(e,o,t,hf(a,n,r))}function MI(e,o){return o?`${e} \xB7 row ${o.index+1}`:e}var to="data-sf-part",G8="data-sf-region-part",Be="data-sf-part-selected",U8="data-sf-part-kind",kE="data-sf-part-style-owner",TE="data-sf-part-style-kind";function $8(e){for(let o=e;o;o=o.parentElement){let t=o.getAttribute(kE),a=o.getAttribute(TE);if(t&&a)return{owner:t,kind:a};if(o.getAttribute("data-puck-component"))return null}return null}var WI=2;function UI(e,o){if(!e)return!1;let t=nl(e);return!!t?.propKey&&t.nodeId===o}function na(e){return bt(e).replace(/\s+/gu,"")}function rl(e,o,t){let a=e[sl];if(a){if(a.control==="textList"){let n=a.itemKey??"text";if(!Array.isArray(o))return;for(let s of o){let i=s?.[n];typeof i=="string"&&t.push(i)}return}let{text:r}=GI(o);r?t.push(r):a.placeholder&&t.push(a.placeholder);return}if(!e[zI]){if(e.type==="text"||e.type==="textarea"){typeof o=="string"&&o&&t.push(o);return}if(e.arrayFields&&Array.isArray(o)){for(let r of o)for(let[n,s]of Object.entries(e.arrayFields))rl(s,r?.[n],t);return}if(e.objectFields&&o&&typeof o=="object")for(let[r,n]of Object.entries(e.objectFields))rl(n,o[r],t)}}function $I(e){if(!e||typeof e!="object")return!1;let o=e;return o[zI]?!1:!!o[sl]||o.type==="text"||o.type==="textarea"}function il(e,o){let t=e[sl];return t?.label?t.label:typeof e.label=="string"?e.label:o}function Sf(e){let o=e.indexOf(" (");return(o>0?e.slice(0,o):e).trim()}function q8(e,o){if(!e)return[];let t=[];for(let[a,r]of Object.entries(e)){if(!r||typeof r!="object"||Ga(a))continue;let n=r,s=[];rl(n,o?.[a],s),!s.length&&n[HI]!==void 0&&rl(n,n[HI],s);let i=il(n,a),f=new Set;for(let{row:m,text:x}of _I(n,o?.[a])){let I=na(x);I.length<WI||(f.add(I),t.push({key:a,label:i,texts:[I],row:m}))}let u=new Set(f),p=[];for(let m of s){let x=na(m);x.length<WI||u.has(x)||(u.add(x),p.push(x))}p.length&&t.push({key:a,label:i,texts:p})}return t}var PE=vE;function qI(e,o){if(!o||typeof o!="object"||Ga(e)||Gp(o))return null;let t=o[sl];return!t||!PE.includes(t.control)?null:t}function j8(e,o){let t=qI(e,o);return t!==null&&t.identifier!==!0}function jI(e,o){if(!e)return[];let t=[];for(let[a,r]of Object.entries(e)){let n=qI(a,r);if(!n)continue;let{text:s,hidden:i}=GI(o?.[a]),f=s||n.placeholder||"",u=bt(f).replace(/\s+/gu," ").trim();t.push({key:a,label:Sf(il(r,a)),preview:u,offPage:n.offPage===!0,identifier:n.identifier===!0,hidden:!!i})}return t}var vf="_partStyles",OE="data-sf-part-styled",fl="data-sf-text-style",LE=/^(heading|body)-[1-7]$/;function la(e){return typeof e=="string"&&LE.test(e)}var dl={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function RE(e){if(!e)return null;for(let[o,t]of Object.entries(dl))if(t===e)return o;return null}function eh(e){if(la(e.textStyle))return e.textStyle;let o=e.role&&Oo.includes(e.role)?e.role:null;return o?dl[o]:void 0}var AE=[400,500,600,700],oh=["left","center","right","justify"],KI=5,VI=1e3,BE=-5,DE=10,Tf=0,Pf=64,Ff=2,Ef=120,tt=1280,Of=10,YI={size:{min:KI,max:VI,step:1},sizePhone:{min:KI,max:VI,step:1},padding:{min:Tf,max:Pf,step:Ff},width:{min:Ef,max:tt,step:Of}},_E=.05,NE=.01,ME=["line","letter"],HE=.5,WE=2.5,zE=-1,GE=1,UE=0,$E=400;function or(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function th(e){return or(e?.[vf])??{}}function ul(e,o){let t=th(e);return Object.hasOwn(t,o)?or(t[o])??{}:{}}function ah(e,o,t){let a={...th(e)};if(qE(t).length?a[o]=t:delete a[o],!Object.keys(a).length){let{[vf]:r,...n}=e;return n}return{...e,[vf]:a}}function qE(e){return Object.entries(e).filter(([,o])=>o!==void 0)}function jE(e){return ME.includes(e)}var er=(e,o,t)=>Math.min(t,Math.max(o,e));function KE(e,o){if(jE(e)){let t=Math.round(Number(o));return!Number.isFinite(t)||t===0?null:er(t,BE,DE)}if(e==="lineHeight"){let t=Number(o);return Number.isFinite(t)?sa(er(t,HE,WE),3):null}if(e==="letterSpacing"){let t=Number(o);return Number.isFinite(t)?sa(er(t,zE,GE),4):null}if(e==="paragraphSpacing"){let t=Math.round(Number(o));return!Number.isFinite(t)||t<=0?null:er(t,UE,$E)}if(Object.hasOwn(YI,e)){let{min:t,max:a}=YI[e],r=Math.round(Number(o));return Number.isFinite(r)?er(r,t,a):null}return e==="italic"?typeof o=="boolean"?o:null:e==="role"?Oo.includes(String(o))?o:null:e==="textStyle"?la(o)?o:null:o}var VE=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding","width"];function rh(e){let o=null,t=a=>{o??={...e},delete o[a]};for(let a of VE){let r=e[a];r!==void 0&&!(typeof r=="number"&&Number.isFinite(r))&&t(a)}return e.align!==void 0&&!oh.includes(e.align)&&t("align"),e.textStyle!==void 0&&!la(e.textStyle)&&t("textStyle"),o??e}var YE=[["font","role"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function XE(e){let o=[];for(let[t,a]of YE)t===e?o.push(a):a===e&&o.push(t);return o}function ia(e,o,t,a){let r={...ul(e,o)},n=a==null?null:KE(t,a);if(n===null)delete r[t];else{r[t]=n;for(let s of XE(t))delete r[s]}return ah(e,o,r)}function nh(e,o){return ah(e,o,{})}function ZE(e){return EE(e)??"none"}function QE(e){return FE(e)??""}var JE={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 eO(e,o){let t=e.role;return t&&Oo.includes(t)?t:o?.blockDrawsStyle?null:RE(e.textStyle)}function J8(e,o){return e==="Text"&&o==="text"}var oO={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 tO(e){let o=Kd[e],t=oO[o];return t?`var(--size-${o}, ${t})`:`var(--size-${o})`}function ar(e){let o={};return typeof e.lineHeight=="number"?o.lineHeight=e.lineHeight:e.line&&(o.lineHeight=sa(aO+e.line*_E,3)),typeof e.letterSpacing=="number"?o.letterSpacingEm=e.letterSpacing:e.letter&&(o.letterSpacingEm=sa(e.letter*NE,4)),o}var aO=1,rr="--sf-part-para",Lf="(max-width: 719.98px)";function XI(e){return e=rh(e),typeof e.sizePhone=="number"&&e.sizePhone>0?{fontSize:`${e.sizePhone}px`}:{}}function rO(e,o){return o&&typeof e.sizePhone=="number"&&e.sizePhone>0?{...e,size:e.sizePhone}:e}function cl(e,o,t){e=rh(e);let a=eO(e,t),r=ar(e),n=e.size?`${e.size}px`:a?tO(a):"";return{fontFamily:e.font?iO(e.font):a?`var(${JE[a]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:n,minWidth:n?"0":"",overflowWrap:n?"break-word":"",lineHeight:r.lineHeight!==void 0?String(r.lineHeight):"",letterSpacing:r.letterSpacingEm!==void 0?`${r.letterSpacingEm}em`:"",[rr]:e.paragraphSpacing?`${e.paragraphSpacing}px`:"",textTransform:QE(e.case),textAlign:e.align??"",paddingTop:Cf(e.padding),paddingBottom:Cf(e.padding),maxWidth:Cf(e.width),color:nO(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var nO=e=>e===void 0||e===""?"":Object.hasOwn(Vt,e)?Vt[e]:lh.test(e)?e:"",lh=/^#[0-9a-fA-F]{6}$/;function e$(e){return lh.test(e)}var Cf=e=>e===void 0?"":`${e}px`,sa=(e,o)=>Number(e.toFixed(o));function o$(e,o){let t=Number.parseFloat(e.fontSize)||16,a=Number.parseFloat(e.lineHeight),r=Number.parseFloat(e.letterSpacing),n=Number.parseFloat(e.paddingTop),s=Number.parseFloat(e.maxWidth);return{fontKey:o,sizePx:t,weight:lO(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(a)?sa(a/t,3):1.2,letterEm:Number.isFinite(r)?sa(r/t,4):0,align:sO(e.textAlign),case:ZE(e.textTransform),paddingPx:Number.isFinite(n)?Math.round(n):0,widthPx:Number.isFinite(s)&&s<tt?Math.round(s):tt}}function lO(e){return Number.isFinite(e)?AE.reduce((o,t)=>Math.abs(t-e)<Math.abs(o-e)?t:o):400}function sO(e){for(let o of oh)if(o===e)return o;return e==="end"?"right":"left"}function t$(e,o){let t=ZI(e);if(!t)return"";for(let a of Xe)if(ZI(o(a.cssVar))===t)return a.key;return""}var ZI=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function iO(e){let o=zt(e);return o?`var(${o.cssVar})`:""}function a$(e,o,t,a){return!o||nl(o)?.nodeId!==e?null:t.find(r=>a(r.getAttribute("class")))??t[0]??null}function r$(e,o,t=()=>tr,a=i=>i,r=dO,n=!1,s=()=>!1){let i=0;for(let{element:f,partId:u}of e){let p=nl(u)?.propKey;if(!p)continue;let m=a(p),x=Object.hasOwn(o,m)?or(o[m])??{}:{},I=cl(rO(x,n),tr,{blockDrawsStyle:s(p)});la(x.textStyle)?f.setAttribute?.(fl,x.textStyle):f.removeAttribute?.(fl);let y=wf.some(v=>f.style[v]),C=!1;for(let[v,T]of Object.entries(I))uO(f,v,T),T&&(C=!0);if(y||wf.some(v=>I[v]))for(let v of fO(f,r))for(let T of wf)v.style[T]=I[T]??"";C&&(i+=1)}return i}function fO(e,o){let t=na(e.textContent??""),a=[],r=e;for(let n=0;n<cO&&o(r);n+=1){let s=r.parentElement;if(!s||na(s.textContent??"")!==t)break;a.push(s),r=s}return a}var cO=8;function dO(e){let o=e;return typeof window>"u"||!o?.ownerDocument?!1:window.getComputedStyle(o).display==="inline"}var tr={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:tt};function uO(e,o,t){if(!o.startsWith("--")){e.style[o]=t;return}let a=e.style;typeof a.setProperty=="function"?t?a.setProperty(o,t):a.removeProperty?.(o):a[o]=t;let r=e;o===rr&&(t?r.setAttribute?.(QI,""):r.removeAttribute?.(QI))}var QI="data-sf-part-para",pO=Object.keys(cl({},tr)),kf=new Set(["color","overflowWrap",rr,"fontStyle"]),wf=pO.filter(e=>!kf.has(e));function n$(e,o,t,a=n=>n,r=()=>!1){let n=new Map;for(let f of e){let u=If(f.key,f.row);for(let p of f.texts){let m=n.get(p);m?(m.keys.add(f.key),m.partKeys.add(u)):n.set(p,{keys:new Set([f.key]),partKeys:new Set([u])})}}let s=new Map;for(let f of Object.keys(o)){if(!mO(f))continue;let u=or(o[f])??{},p=cl(u,tr),m=XI(u),x=la(u.textStyle)?u.textStyle:void 0;!Object.values(p).some(Boolean)&&!Object.keys(m).length&&!x||s.set(f,{stamp:JI(t,f),declarations:p,...Object.keys(m).length?{phone:m}:{},...x?{textStyle:x}:{}})}let i=new Map;for(let[f,{keys:u,partKeys:p}]of n){let m=p.size===1?[...p][0]:u.size===1?[...u][0]:null;if(!m)continue;let x=a(m);if(!Object.hasOwn(o,x))continue;let I=or(o[x])??{},y=cl(I,tr,{blockDrawsStyle:r(m)}),C=XI(I),v=la(I.textStyle)?I.textStyle:void 0;!Object.values(y).some(Boolean)&&!Object.keys(C).length&&!v||i.set(f,{stamp:JI(t,m),declarations:y,...Object.keys(C).length?{phone:C}:{},...v?{textStyle:v}:{}})}return i.size||s.size?{rules:i,kindRules:s,drawn:new Set(n.keys())}:null}function mO(e){return e.startsWith("@")}function l$(e,o){return e?.kindRules.get(o)??null}function JI(e,o){let t=a=>a.replace(/[^A-Za-z0-9_-]+/g,"-");return`${t(e)}~${t(o)}`}function s$(e){let o=[],t=new Set,a=r=>{let{stamp:n,declarations:s}=r;if(t.has(n))return;t.add(n);let i=Object.entries(s).filter(([,I])=>I!==""),f=I=>I.map(([y,C])=>`${IO(y)}: ${C}`).join("; "),u=`[${OE}="${n}"]`,p=i.filter(([I])=>!kf.has(I)),m=i.filter(([I])=>kf.has(I));p.length&&o.push(`${u}, *:has(> ${u}) { ${f(p)} }`),m.length&&o.push(`${u} { ${f(m)} }`),s[rr]&&o.push(...xO(u));let x=Object.entries(r.phone??{}).filter(([,I])=>I!=="");x.length&&o.push(`@media ${Lf} { ${u}, *:has(> ${u}) { ${f(x)} } }`)};for(let r of e.rules.values())a(r);for(let r of e.kindRules.values())a(r);return o.join(`
|
|
4
|
-
`)}function xO(e){let o=`var(${rr})`,t=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: ${o} }`,`${e} ${t}:not(:first-child) { margin-top: ${o} }`,`${e} ${t}:not(:last-child) { margin-bottom: ${o} }`]}var IO=e=>e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);function i$(e,o){if(!e)return null;let t=na(o),a=e.rules.get(t);if(a)return a;if(t.length<hO||e.drawn.has(t))return null;let r=null;for(let[n,s]of e.rules)if(n.includes(t)){if(r&&r.stamp!==s.stamp)return null;r=s}return r}var hO=8;function sh(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 Rf=e=>e==="sentence"?"none":void 0,Ho=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,nr=e=>typeof e=="string"&&e?e:void 0,fh=["font","color","size","sizePhone","weight","italic","lineHeight","letterSpacing","paragraphSpacing","letterCase","largestSize"];function ko(e){let o={};for(let t of fh)e[t]!==void 0&&(o[t]=e[t]);return o}function Bf(e,o){let{auto:t,...a}=e,r=new Set(o??[]),n=fh.filter(s=>r.has(s)&&e.values[s]===void 0);return n.length?{...a,auto:n}:a}function Df(e){let o=e.fonts,t=e.sizes,a=e.typography,r=fu(e.compression),n={"heading-1":{font:nr(o.heading),size:Ho(t.headingLarge),weight:Ho(a.weight),lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,letterCase:Rf(a.case),largestSize:Ho(a.maxPx)},"heading-2":{font:nr(o.heading2),size:Ho(t.headingMedium),weight:Ho(a.weight2),lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,letterCase:Rf(a.case2)},"heading-3":{font:nr(o.heading3),size:Ho(t.headingSmall),weight:Ho(a.weight3),lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,letterCase:Rf(a.case3)},"body-1":{font:nr(o.body),size:Ho(t.body)},"body-5":{font:nr(o.label),size:Ho(t.label)}};return gO().map(({id:s,kind:i,name:f})=>({id:s,kind:i,name:f,values:ko(n[s]??{})}))}function pl(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=>Bf({...o,values:ko(o.values??{})},Array.isArray(o.auto)?o.auto:void 0)):null}function I$(e){return pl(e)??[]}function at(e,o){let t=Df(o),a=pl(e);return a?a.map(r=>{let n={...Af(t,r.id)};for(let s of r.auto??[])delete n[s];return{...r,values:ko({...n,...r.values})}}):t}var Af=(e,o)=>e.find(t=>t.id===o)?.values??{},ih=["heading-1","heading-2","heading-3"];function ch({saved:e,old:o,cur:t,next:a,sizeOf:r}){let n=Df(o),s=pl(e)??n.map(m=>({...m,values:{}})),i=at(s,o),f=[],u=a.map(m=>{let x=t.find(g=>g.id===m.id),I=s.find(g=>g.id===m.id);if(!x||!I)return bO([m],r)[0];let y={...I.values},C=new Set(I.auto??[]),v=m.values,T=x.values,w=[...new Set([...Object.keys(v),...Object.keys(T)])].filter(g=>JSON.stringify(v[g])!==JSON.stringify(T[g]));w.sort((g,b)=>+(g==="letterSpacing")-+(b==="letterSpacing"));for(let g of w){let b=g==="lineSpacing"?"lineHeight":g,O=v[g];if(O===void 0){delete y[b],Af(n,m.id)[b]!==void 0&&(f.push([m.id,b]),C.add(b));continue}if(C.delete(b),g==="lineSpacing")y.lineHeight=fa(O/100,3);else if(g==="letterSpacing"){let F=i.find(P=>P.id===m.id),L=r({...m,values:ko({...F?.values??{},...y})});y.letterSpacing=L?fa(O/L,4):0}else y[b]=O}return Bf({id:m.id,kind:m.kind,name:m.name,values:ko(y)},C)}),p=o.compression;if(f.some(([m,x])=>(x==="lineHeight"||x==="letterSpacing")&&ih.includes(m))&&dt(p)!=="normal"){for(let m of ih){let x=u.find(y=>y.id===m);if(!x)continue;let I={...x.values};for(let y of["lineHeight","letterSpacing"])f.some(([C,v])=>C===m&&v===y)||I[y]===void 0&&!(x.auto??[]).includes(y)&&(I[y]=Af(n,m)[y]);x.values=ko(I)}p="normal"}return{saved:u,old:{...o,compression:p}}}function dh(e,o){let t={text_styles:e.saved};return e.old.compression!==o.compression&&(t.heading_compression=dt(e.old.compression)),t}var fa=(e,o)=>Number(e.toFixed(o));function uh(e,o){return e.map(t=>{let{lineHeight:a,letterSpacing:r,...n}=t.values,s={...n};return a!==void 0&&(s.lineSpacing=fa(a*100,1)),r!==void 0&&(s.letterSpacing=fa(r*o(t),2)),{id:t.id,kind:t.kind,name:t.name,values:s}})}function bO(e,o){return e.map(t=>{let{lineSpacing:a,letterSpacing:r,...n}=t.values,s={id:t.id,kind:t.kind,name:t.name,values:ko({...n})},i={...s.values};if(a!==void 0&&(i.lineHeight=fa(a/100,3)),r!==void 0){let f=o({...s,values:{...s.values}});i.letterSpacing=f?fa(r/f,4):0}return{...s,values:ko(i)}})}function h$(e){let o={fonts:Ba({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:Ts({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:dt(e.heading_compression),typography:du(e)},t=e.text_styles??null,a=Array.isArray(t)?_f(at(t,o),o):o;return{fonts:Ba(a.fonts),sizes:Ts(a.sizes),compression:dt(a.compression),typography:a.typography,textStyles:t}}function _f(e,o){let t=x=>e.find(I=>I.id===x)?.values??{},a=t("heading-1"),r=t("heading-2"),n=t("heading-3"),s=t("body-1"),i=t("body-5"),f=o.fonts,u=o.sizes,p=o.typography,m=x=>x==="none"?"sentence":"authored";return{fonts:{...f,heading:a.font??f.heading,heading2:r.font??a.font??f.heading2,heading3:n.font??a.font??f.heading3,body:s.font??f.body,label:i.font??f.label},sizes:{...u,headingLarge:a.size??null,headingMedium:r.size??null,headingSmall:n.size??null,body:s.size??null,label:i.size??null},compression:o.compression,typography:{...p,case:m(a.letterCase),weight:a.weight??null,maxPx:a.largestSize??null,weight2:r.weight??null,weight3:n.weight??null,case2:m(r.letterCase),case3:m(n.letterCase)}}}function SO(e){return e==="accent"?"var(--accent)":e==="text"?"var(--fg)":e==="labels"?"var(--fg-dim)":/^#[0-9a-f]{6}$/i.test(e)?e:null}function CO(e){let o=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: var(--sf-part-para) }`,`${e} ${o}:not(:first-child) { margin-top: var(--sf-part-para) }`,`${e} ${o}:not(:last-child) { margin-bottom: var(--sf-part-para) }`]}function g$(e){let o=[];for(let t of e){let a=t.values,r=`.${sh(t)}`,n=`[${fl}="${t.id}"]`,s=`${r}, ${n}`,i=[],f=a.font!==void 0?Xe.find(x=>x.key===a.font)?.cssVar:void 0;if(f&&i.push(`font-family: var(${f})`),a.size!==void 0){let x=a.largestSize!==void 0?Math.min(a.size,a.largestSize):a.size;i.push(`font-size: ${x}px`)}let u=a.color!==void 0?SO(a.color):null;u&&i.push(`color: ${u}`),a.italic===!0&&i.push("font-style: italic"),a.weight!==void 0&&i.push(`font-weight: ${a.weight}`);let p=[];a.lineHeight!==void 0&&p.push(`line-height: ${a.lineHeight}`),a.letterSpacing!==void 0&&p.push(`letter-spacing: ${a.letterSpacing}em`),t.kind==="body"&&i.push(...p);let m=yO(a.letterCase);if(m&&i.push(`text-transform: ${m}`),a.paragraphSpacing&&i.push(`--sf-part-para: ${a.paragraphSpacing}px`),i.length&&o.push(`${s} { ${i.join("; ")} }`),t.kind==="heading"&&p.length&&o.push(`${s}, ${r}:is(h1, h2, h3, h4), ${n}:is(h1, h2, h3, h4) { ${p.join("; ")} }`),a.paragraphSpacing&&o.push(...CO(`:is(${s})`)),a.sizePhone!==void 0){let x=wO[t.id],I=[`${s} { font-size: ${a.sizePhone}px }`];x&&I.push(`.sf-themed-content { --size-${x}: ${a.sizePhone}px !important }`),o.push(`@media ${Lf} { ${I.join(" ")} }`)}}return o.join(`
|
|
5
|
-
`)}var wO={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function y$(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function ph(e){return e?dl[e]:void 0}function Nf(e){let o=ar(e);return ko({font:e.font,color:e.color,size:e.size,weight:e.weight,italic:e.italic,lineHeight:o.lineHeight,letterSpacing:o.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function mh(e){return Object.keys(Nf(e)).length>0}function xh({saved:e,old:o,styleId:t,values:a}){return{saved:(pl(e)??Df(o).map(r=>({...r,values:{}}))).map(r=>r.id===t?Bf({...r,values:ko({...r.values,...a})},r.auto):r),old:o}}var Ih=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],FO=["size","lineSpacing","letterSpacing","letterCase"],EO=500,Mf=Xe.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function hh({saved:e,old:o,colours:t,sizeOf:a,onChange:r,openId:n,onOpenChange:s,readOnly:i=!1,withoutSize:f=!1}){let[u,p]=kO(null),m=PO()==="mobile",x=at(e,o),I=uh(x,a);return vO(TO,{styles:I,onChange:y=>r(ch({saved:e,old:o,cur:I,next:y,sizeOf:a})),fonts:Mf,colours:t,settings:f?Ih.filter(y=>y!=="size"):Ih,auto:FO,openId:n===void 0?u:n,onOpenChange:s??p,readOnly:i,device:m?"phone":"desktop",fallback:y=>{let C=x.find(T=>T.id===(y.kind==="heading"?"heading-1":"body-1")),v={};return C?.values.font&&y.id!==C.id&&(v.font=C.values.font),y.kind==="heading"&&(v.weight=EO),v}})}var yh=["font","size","weight","emphasis"],RO=500;function AO({font:e,size:o,weight:t,italic:a}){let r={font:e};return o!==null&&(r.size=o),t!==null&&(r.weight=t),a!==null&&(r.italic=a),{id:"accent",kind:"heading",name:l("Accent"),values:r}}function BO(e,o){let t=[],a=e.values,r=o.values;return r.font!==a.font&&r.font!==void 0&&t.push({key:"font",value:r.font}),r.size!==a.size&&t.push({key:"size",value:r.size??null}),r.weight!==a.weight&&t.push({key:"weight",value:r.weight??null}),r.italic!==a.italic&&t.push({key:"italic",value:r.italic??null}),t}function bh(e){let{headingWeight:o,open:t,onOpenChange:a,onChange:r,withoutSize:n=!1}=e,s=AO(e);return gh(LO,{label:l("Accent"),children:gh(OO,{style:s,fonts:Mf,settings:n?yh.filter(i=>i!=="size"):yh,auto:["size"],fallback:()=>({weight:o??RO}),open:t,onOpenChange:a,onChange:i=>BO(s,i).forEach(r)})})}import{Tabs as _O,Tooltip as rq,tabButtonId as NO,tabPanelId as MO}from"efficient-shell/ui";import{ContrastIcon as HO,NoteIcon as WO,SettingsIcon as zO,TypeIcon as GO}from"efficient-easel/icons";function Sh(e){switch(e.status){case"saved":return null;case"failed":return{msg:l("Not saved. Try again."),tone:"error"};case"skipped":switch(e.reason){case"empty":return null;case"no-token":return{msg:l("Not saved. Reload the page."),tone:"error"};case"template":return{msg:l("Templates keep their look. Press Done."),tone:"success"}}}}import{SettingsGroupSub as UO}from"efficient-easel/panel";import{previewFrame as $O}from"efficient-easel/screen/lib/puck/preview-dom";import{useEasel as DO}from"efficient-easel/easel";function ml({themeFromDocument:e,persist:o}){let{appState:t,dispatch:a}=DO(L=>L),{fonts:r,setFonts:n,sizes:s,setSizes:i,headingCompression:f,setHeadingCompression:u,headingTypography:p,setHeadingTypography:m,textStyles:x,setTextStyles:I}=V(),y=t.data,C=y.root?.props??{},v=e?Ba(C.fonts):r,T=e?au:s,w=e?dt(C.headingCompression):f,g=e?cu(C.headingTypography):p,b={fonts:v,sizes:T,compression:w,typography:g},O=e?C.textStyles:x,F=L=>a({type:"replaceRoot",root:{...y.root,props:{...C,...L}},recordHistory:!0});return{fonts:v,sizes:T,compression:w,typography:g,old:b,saved:O,write:(L,P)=>{let M=_f(at(L.saved,L.old),L.old);e?F({textStyles:L.saved,fonts:M.fonts,headingCompression:M.compression,headingTypography:M.typography}):(I(L.saved),n(M.fonts),i(M.sizes),u(M.compression),m(M.typography)),o(dh(L,b),P)},writeRoot:F}}var zf="sf-site-styles",qO="sf-site-styles-tabpanel",Gf=!1,jO="Show hints";function Uf({shown:e,onChange:o}){return Q("div",{className:"sf-hints",children:rt("button",{type:"button","aria-pressed":e,onClick:()=>o(!e),className:`sf-rung sf-hints-toggle${e?" is-active":""}`,children:[Q(WO,{size:13}),l(jO)]})})}var wh="text",ca=[{id:"basics",label:"Basics",icon:Q(zO,{})},{id:"theme",label:"Theme",icon:Q(HO,{})},{id:"text",label:"Text",icon:Q(GO,{})}];function KO({themeFromDocument:e,persist:o}){let{appState:t,dispatch:a}=Ch(u=>u),{theme:r,setTheme:n}=V(),s=t.data,i=s.root?.props??{},f=u=>{if(e){let p={...i,theme:u};a({type:"replaceRoot",root:{...s.root,props:p},recordHistory:!0})}else n(u);o({selected_preset:u.selected,theme_presets:u.themes})};return Q(uI,{value:e?i.theme:r,onChange:f})}function VO({themeFromDocument:e,persist:o}){let[t,a]=Wf(null),{theme:r,setFonts:n,setSizes:s,setHeadingTypography:i}=V(),f=ml({themeFromDocument:e,persist:o}),{old:u,saved:p,writeRoot:m}=f,x=f.fonts,I=f.sizes,y=f.typography,C=F=>F.values.size??JO(XO[F.id]??"body")??ZO[F.kind],v=F=>f.write(F),T=YO(r),w=F=>{let L={...x,accent:F};e?m({fonts:L}):n(L),o({accent_font:F})},g=F=>{s({...I,accent:F}),o({accent_size_px:F})},b=F=>{let L={...y,weightStrong:F};e?m({headingTypography:L}):i(L),o({heading_weight_strong:F})},O=F=>{let L={...y,italicStrong:F};e?m({headingTypography:L}):i(L),o({accent_italic:F})};return rt(Et,{children:[Q(hh,{saved:p,old:u,colours:T,sizeOf:C,onChange:v,openId:t===Hf?null:t,onOpenChange:a,withoutSize:e}),Q(bh,{font:x.accent,size:I.accent,weight:y.weightStrong,italic:y.italicStrong,headingWeight:y.weight,open:t===Hf,onOpenChange:F=>a(F?Hf:null),onChange:F=>{F.key==="font"?w(F.value):F.key==="size"?g(F.value):F.key==="weight"?b(F.value):O(F.value)},withoutSize:e})]})}var Hf="accent";function YO(e){let o=Gt(e);return[{key:"accent",name:l("Accent"),value:o.accent},{key:"text",name:l("Text"),value:o.text},{key:"labels",name:l("Labels"),value:o.muted??o.text}]}var XO={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},ZO={heading:32,body:14},QO={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 JO(e){if(typeof document>"u")return null;let o=($O()?.contentDocument??document).querySelector(QO[e]);if(!o)return null;let t=parseFloat(getComputedStyle(o).fontSize);return Number.isFinite(t)?t:null}function eL({themeFromDocument:e,persist:o,showHint:t}){let{appState:a,dispatch:r}=Ch(x=>x),{cornerRadiusPx:n,setCornerRadiusPx:s}=V(),i=a.data,f=i.root?.props??{},u=f.cornerRadiusPx===void 0?nu[ru(f.cornerStyle)]:Io(f.cornerRadiusPx),p=e?u:n,m=x=>r({type:"replaceRoot",root:{...i.root,props:{...f,...x}},recordHistory:!0});return Q(pI,{value:p,onChange:x=>{e?m({cornerRadiusPx:x}):s(x),o({corner_radius_px:x})},showHint:t})}function oL(e){return{site_width:e}}function tL({persist:e,showHint:o}){let{siteWidth:t,setSiteWidth:a,sectionBackgroundWidth:r,setSectionBackgroundWidth:n,sectionContentWidth:s,setSectionContentWidth:i}=V(),f=typeof t=="number"?t:pe.default,u=x=>{a(x),e(oL(x),x===null)},p=x=>{n(x),e({section_background_width:x},!0)},m=x=>{i(x),e({section_content_width:x},!0)};return rt(Et,{children:[Q(UO,{title:l(Jn),level:4}),Q(el,{value:r??"full",changed:r!==null,detail:l("Full width"),onChange:p,onReset:()=>p(null),hint:o?EI:void 0}),Q(ol,{mode:s??"content",px:f,min:pe.min,max:pe.max,changed:typeof t=="number"||s!==null,detail:`${l("Content width")} ${pe.default}px`,onMode:m,onPx:x=>u(x),onReset:()=>{m(null),u(null)},hint:o?OI:void 0})]})}function aL(e){return{block_gap:e}}function rL(e){return{site_gutter:e}}function nL({persist:e,showHint:o}){let{siteGutter:t,setSiteGutter:a}=V();return Q(CI,{value:t,onChange:r=>{a(r),e(rL(r),r===null)},showHint:o})}function lL({persist:e,showHint:o}){let{blockGap:t,setBlockGap:a}=V();return Q(hI,{value:t,onChange:r=>{a(r),e(aL(r),r===null)},showHint:o})}function sL({persist:e,showHint:o=!0}){return rt(Et,{children:[Q(tL,{persist:e,showHint:o}),Q(nL,{persist:e,showHint:o}),Q(lL,{persist:e,showHint:o})]})}function iL(e){return{card_shadow:e}}function fL(e){return e===null?{shadow_color:null}:{shadow_color:iu(e)}}function cL(e){return{hover_effect:e}}function dL({persist:e,showHint:o=!0}){let{cardShadow:t,setCardShadow:a,shadowColor:r,setShadowColor:n,hoverEffect:s,setHoverEffect:i}=V();return rt(Et,{children:[Q(mI,{value:t,onChange:f=>{a(f),e(iL(f),!0)},showHint:o}),Q(II,{value:r,onChange:f=>{n(f),e(fL(f),f===null)},showHint:o}),Q(gI,{value:s,onChange:f=>{i(f),e(cL(f),!0)},showHint:o})]})}function uL(e){return{photography_grayscale:e}}function pL({persist:e,showHint:o}){let{photographyGrayscale:t,setPhotographyGrayscale:a}=V();return Q(bI,{value:t,onChange:r=>{a(r),e(uL(r),!0)},showHint:o})}function mL({persist:e,showHint:o=!0}){return Q(Et,{children:Q(pL,{persist:e,showHint:o})})}function xL(e){return{share_button_on_posts:e}}function IL({persist:e,showHint:o=!0}){let{shareButtonOnPosts:t,setShareButtonOnPosts:a}=V();return Q(SI,{value:t,onChange:r=>{a(r),e(xL(r),!0)},showHint:o})}function da(){let{websiteName:e}=V();return e?.trim()||pu}function xl({themeFromDocument:e=!1,tokenRef:o,siteId:t,onNotify:a,tab:r,onTabChange:n}){let{persist:s}=Xt({themeFromDocument:e,tokenRef:o,siteId:t,onResult:C=>{let v=Sh(C);v&&a?.(v.msg,v.tone)}}),[i,f]=Wf(ca[0].id),u=r!==void 0,p=u?r:i,m=u?n??(()=>{}):f,x=ca.find(C=>C.id===p)??ca[0],[I,y]=Wf(Gf);return rt(Et,{children:[Q(hL,{activeId:x.id,onSelect:m}),rt("div",{id:MO(zf,x.id),className:qO,role:"tabpanel","aria-labelledby":NO(zf,x.id),children:[p==="basics"&&rt(Et,{children:[Q(eL,{themeFromDocument:e,persist:s,showHint:I}),!e&&Q(dL,{persist:s,showHint:I}),!e&&Q(sL,{persist:s,showHint:I}),!e&&Q(mL,{persist:s,showHint:I}),!e&&Q(IL,{persist:s,showHint:I}),Q(Uf,{shown:I,onChange:y})]}),p==="theme"&&Q(KO,{themeFromDocument:e,persist:s}),p==="text"&&Q(VO,{themeFromDocument:e,persist:s})]})]})}function hL({activeId:e,onSelect:o}){return Q("div",{className:"es-insp-tabs",children:Q(_O,{variant:"underline",block:!0,labelsFit:!0,"aria-label":l("Styles"),idPrefix:zf,value:e,onChange:o,items:ca.map(t=>{let a=l(t.label);return{id:t.id,icon:t.icon,label:a}})})})}import{InspectorIconButton as _L}from"efficient-easel/chrome";import{Button as Hh,Dialog as NL,FormField as ML,Input as Wh,PopupMenu as HL,PopupMenuItem as zh,toast as Gh}from"efficient-shell/ui";import{LayersTree as WL,TreeGroupLabel as zL,TreeRow as Uh,TreeRowAction as vl}from"efficient-easel/tree";import{AddIcon as GL,DuplicateIcon as UL,PageIcon as $L}from"efficient-easel/icons";import{PagesIcon as qL}from"efficient-easel/rail";import{useEaselHost as jL}from"efficient-easel/screen/lib/host";var $f="Main Pages",gL="Dynamic Pages",qf="dynamic",yL="dynamic";function jf(e){return e.kind===yL}function vh(e){let o=[],t=[];for(let a of e){if(jf(a)){t.push(a);continue}let r=a.groupKey??(a.group?`folder:${a.group}`:"top"),n=o[o.length-1];n&&n.key===r?n.rows.push(a):o.push({key:r,label:a.group??$f,rows:[a]})}if(t.length){let a=o.findIndex(r=>r.key.startsWith("system:"));o.splice(a===-1?o.length:a,0,{key:qf,label:gL,rows:t})}return o}import{useEaselSession as KL}from"efficient-easel/screen/lib/session-context";import{useCallback as Il,useEffect as bL,useSyncExternalStore as SL}from"react";import{useScreenDocument as Fh}from"efficient-easel/screen/components/ScreenDocumentContext";var kh=new WeakMap;function lr(e){let o=kh.get(e);return o||(o={rows:null,loading:null,listeners:new Set},kh.set(e,o)),o}function Kf(e,o){e.rows=o;for(let t of e.listeners)t()}var hl=new Set;function gl(e,o){o?hl.add(e):hl.delete(e)}function Th(e){let o=lr(e),t=e.listPages().then(a=>Kf(o,hl.size?a.filter(r=>!hl.has(r.id)):a),()=>Kf(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var Ph=()=>null,CL=()=>()=>{};function sr(){let{adapter:e,ready:o}=Fh(),t=Il(i=>{let{listeners:f}=lr(e);return f.add(i),()=>f.delete(i)},[e]),a=Il(()=>lr(e).rows,[e]),r=SL(o?t:CL,o?a:Ph,Ph);bL(()=>{if(!o)return;let i=lr(e);i.rows===null&&!i.loading&&Th(e)},[e,o]);let n=Il(()=>o?Th(e):Promise.resolve(),[e,o]),s=Il(i=>Kf(lr(e),i),[e]);return{rows:r,reload:n,setRows:s,getRows:a}}function wL(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function Eh(){let{currentSlug:e}=Fh(),{rows:o}=sr();return wL(o,e)}import{useEaselSession as vL}from"efficient-easel/screen/lib/session-context";import{useScreenDocument as kL}from"efficient-easel/screen/components/ScreenDocumentContext";var TL=new Set(["normal","dynamic"]);function yl(e){return!e.kind||TL.has(e.kind)}function bl(e,o){let t=It(e)||"page";if(!o.has(t))return t;let a=2;for(;o.has(`${t}-${a}`);)a+=1;return`${t}-${a}`}function Oh(e,o){return o.has(e)}function Lh(e,o){return{title:`${e.label||e.slug} copy`,slug:bl(`${e.slug}-copy`,o)}}function Sl(){let e=vL(),{siteId:o,templateId:t}=kL(),a=Se(e).pages;if(!(!a.duplicate||t))return(r,n)=>a.duplicate(r.id,{...n,...o?{siteId:o}:{}})}import{jsx as Ot,jsxs as Rh,Fragment as PL}from"react/jsx-runtime";import{useId as Ah,useState as ua}from"react";import{Button as Bh,Dialog as FL,FormField as Dh,Input as _h,Stack as EL}from"efficient-shell/ui";function Cl({source:e,taken:o,duplicate:t,onClose:a,onDuplicated:r}){let n=Ah(),s=Ah(),[i,f]=ua(null),[u,p]=ua(""),[m,x]=ua(""),[I,y]=ua(!1),[C,v]=ua(!1),[T,w]=ua(null);if(e!==i&&(f(e),e)){let F=Lh(e,o);p(F.title),x(F.slug),y(!1),w(null)}let g=Oh(m,o),b=!!(e&&u.trim()&&m&&!g&&!C),O=async()=>{if(!(!e||!b)){v(!0),w(null);try{let F=await t(e,{title:u.trim(),slug:m});r(F)}catch{w(l("Couldn\u2019t duplicate the page \u2014 please retry."))}finally{v(!1)}}};return Ot(FL,{open:e!==null,onClose:()=>{C||a()},size:"sm",title:l("Duplicate \u201C{name}\u201D",{name:e?.label??""}),description:l("The copy is a draft and stays hidden until you publish it. It opens in the editor."),footer:Rh(PL,{children:[Ot(Bh,{variant:"secondary",onClick:a,disabled:C,children:l("Cancel")}),Ot(Bh,{onClick:()=>{O()},disabled:!b,loading:C,children:l("Duplicate page")})]}),children:Rh(EL,{gap:4,children:[Ot(Dh,{label:l("Title"),htmlFor:n,error:T??void 0,children:Ot(_h,{id:n,value:u,invalid:!!T,onChange:F=>{p(F.target.value),I||x(It(F.target.value))},onKeyDown:F=>{F.key==="Enter"&&O()}})}),Ot(Dh,{label:l("URL handle"),htmlFor:s,hint:g?void 0:l("URL: /{slug}",{slug:m}),error:g?l("Another page uses this URL handle."):void 0,children:Ot(_h,{id:s,value:m,invalid:g,onChange:F=>{y(!0),x(It(F.target.value))},onKeyDown:F=>{F.key==="Enter"&&O()}})})]})})}var $h="sf-editor-pages-collapsed-groups";function qh({onNavigate:e,onClose:o,activeSurface:t,onPreviewSurface:a}){let r=KL().chrome?.pageRows,n=jL(),{adapter:s,capabilities:i,ready:f,currentSlug:u}=BL(),p=da(),{rows:m,reload:x,setRows:I,getRows:y}=sr(),[C,v]=nt(""),[T,w]=nt(!1),[g,b]=nt(null),[O,F]=nt(!1),[L,P]=nt(""),M=RL(),z=Sl(),[B,A]=nt(null),[W,D]=nt(()=>{if(typeof window>"u")return new Set;try{let E=window.localStorage.getItem($h);return new Set(E?JSON.parse(E):[])}catch{return new Set}});LL(()=>{try{window.localStorage.setItem($h,JSON.stringify([...W]))}catch{}},[W]);let ae=E=>D(q=>{let j=new Set(q);return j.has(E)?j.delete(E):j.add(E),j}),ie=Mh(()=>vh(m??[]),[m]),de=C.trim().toLowerCase(),no=E=>!de||E.toLowerCase().includes(de),lo=E=>de?!0:!W.has(E),Le=Mh(()=>new Set((m??[]).map(E=>E.slug)),[m]),so=()=>{if(i.pageCreationInAdminForm){n.send("storefront-editor:new-page");return}P(""),b(null),F(!0)},_e=async()=>{let E=L.trim();if(!(!E||!f||T||!s.createPage)){w(!0),b(null);try{let q=await s.createPage({slug:bl(E,Le),title:E,layout:{}});await x(),F(!1),P(""),e(q.slug)}catch{b(l("Couldn\u2019t add the page \u2014 please retry."))}finally{w(!1)}}},Te=i.hasSiteSettings&&!!s.createPage,xe=async()=>{if(!(!f||T||!s.createPage)){w(!0),b(null);try{let E=await s.createPage(bm(l("New popup"),Le));await x(),e(E.slug)}catch{b(l("Couldn\u2019t add the popup \u2014 please retry."))}finally{w(!1)}}},he=AL(null),[Ne,Pe]=nt(null),io=()=>{if(!Te)return so();if(Ne)return Pe(null);let E=he.current?.getBoundingClientRect();E&&Pe({top:E.bottom+6,right:Math.max(8,window.innerWidth-E.right)})},Me=E=>{let q=m??[],j=s.deletePage;if(!f||T||!j||q.length<=1)return;let Re=q.findIndex(Fe=>Fe.id===E.id),po=q.filter(Fe=>Fe.id!==E.id),Ye=E.slug===u;gl(E.id,!0),I(po),b(null),Ye&&po[0]&&e(po[0].slug);let Ht=()=>{gl(E.id,!1);let Fe=y()??[];if(Fe.some(Ur=>Ur.id===E.id))return;let Eo=[...Fe];Eo.splice(Math.max(0,Math.min(Re,Eo.length)),0,E),I(Eo)};Gh.undoable(l("Deleted \u201C{name}\u201D",{name:E.label}),{actionLabel:l("Undo"),commit:async Fe=>{await j(E.id,Fe),gl(E.id,!1)},undo:()=>{Ht(),Ye&&e(E.slug)},onFail:()=>{Ht(),Gh.error(l("Couldn\u2019t delete the page \u2014 please retry."))}})},Ge=E=>n.send("storefront-editor:open-page",{slug:E}),fo=E=>{if(!no(E.label))return null;let q=!t&&E.slug===u,j=i.canDeletePagesInline&&(m??[]).length>1,Re=jf(E),po=E.kind==="lightbox",Ye=[...Re?[{label:l("Dynamic"),tone:"info"}]:[],...po?[{label:l("Lightbox"),tone:"success"}]:[],...E.draft?[{label:l("draft"),tone:"draft"}]:[]],Ht=Ye.length>0?Ye:void 0,Fe=!!z&&yl(E),Eo=Fe||i.pageCreationInAdminForm||j?ir(Nh,{children:[Fe&&oe(vl,{kind:"plain",label:l("Duplicate \u201C{name}\u201D",{name:E.label}),disabled:T,onClick:()=>A(E),children:oe(UL,{size:13})}),i.pageCreationInAdminForm&&oe(vl,{kind:"plain",label:l("Edit \u201C{name}\u201D in {place}",{name:E.label,place:l("the admin")}),onClick:()=>Ge(E.slug),children:oe(wl,{name:"pencil",size:13,strokeWidth:1.7,rounded:!0})}),j&&oe(vl,{kind:"delete",label:l("Delete \u201C{name}\u201D",{name:E.label}),disabled:T,onClick:()=>Me(E),children:oe(wl,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return oe(Uh,{icon:oe($L,{size:14}),name:E.label,selected:q,onSelect:()=>e(E.slug),badge:Ht,actions:Eo,rowProps:{"data-page-slug":E.slug}},E.id)},co=(E,q,j)=>{let Re=j.filter(Boolean);if(Re.length===0)return null;let po=lo(E);return ir(OL,{children:[oe(zL,{count:Re.length,expanded:po,onToggle:()=>ae(E),children:q}),po&&Re]},E)},Fo=(r?.rows??[]).filter(E=>no(E.label)).map(E=>{let q=t===E.key;return oe(Uh,{icon:E.icon,name:E.label,selected:q,onSelect:()=>a(E.key),badge:{label:l("Preview"),tone:"warning"},actions:oe(vl,{kind:"plain",label:l("Open the {name} in a new tab",{name:E.label}),onClick:()=>window.open(E.href,"_blank","noopener,noreferrer"),children:oe(wl,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":E.key}},E.key)}),Ve=i.hasSiteSettings&&!!r,uo=(()=>{if(m===null)return null;let E=[],q=!1;for(let j of ie){Ve&&!q&&j.key.startsWith("system:")&&(E.push(co("shop",r.title,Fo)),q=!0);let Re=j.key===qf||j.label===$f?l(j.label):j.label;E.push(co(j.key,Re,j.rows.map(fo)))}return Ve&&!q&&E.push(co("shop",r.title,Fo)),E})();return ir("div",{className:"sf-pages",children:[oe(DL,{icon:oe(qL,{}),title:l("Pages"),context:p,actions:oe(_L,{buttonRef:he,label:Te?l("Add"):l("New page"),hasPopup:Te?"menu":void 0,expanded:Te?Ne!==null:void 0,onClick:io,children:oe(GL,{size:15})}),onHide:o}),Ne&&oe(HL,{portal:!0,style:{top:Ne.top,right:Ne.right},onClose:()=>Pe(null),children:ir("div",{role:"menu","aria-label":l("Add"),children:[oe(zh,{role:"menuitem",onClick:()=>{Pe(null),so()},children:l("Page")}),oe(zh,{role:"menuitem",disabled:T,onClick:()=>{Pe(null),xe()},children:l("Popup")})]})}),oe("div",{className:"sf-pages-find",children:oe(Wh,{type:"search",leftIcon:oe(wl,{name:"search",size:14,rounded:!0}),placeholder:l("Search all pages\u2026"),value:C,onChange:E=>v(E.target.value),"aria-label":l("Search all pages")})}),g&&!O&&oe("div",{className:"sf-note sf-note--error",role:"alert",children:g}),uo===null?oe("div",{className:"sf-note",children:l("Loading\u2026")}):uo.some(Boolean)?oe(WL,{ariaLabel:l("Pages"),className:"sf-scroll",children:uo}):oe("div",{className:"sf-note",children:C.trim()?l("No pages match your search"):l("No pages yet. Add one with + above.")}),z&&oe(Cl,{source:B,taken:Le,duplicate:z,onClose:()=>A(null),onDuplicated:E=>{A(null),x(),e(E.slug)}}),oe(NL,{open:O,onClose:()=>F(!1),size:"sm",title:l("Add a page"),description:l("Give the new template page a name. It starts blank \u2014 add sections once it opens."),footer:ir(Nh,{children:[oe(Hh,{variant:"secondary",onClick:()=>F(!1),children:l("Cancel")}),oe(Hh,{onClick:()=>{_e()},disabled:T||!L.trim(),loading:T,children:l("Add page")})]}),children:oe(ML,{label:l("Page name"),htmlFor:M,hint:L.trim()?l("URL: /{slug}",{slug:bl(L,Le)}):void 0,error:g??void 0,children:oe(Wh,{id:M,value:L,invalid:!!g,onChange:E=>P(E.target.value),onKeyDown:E=>{E.key==="Enter"&&_e()},placeholder:l("e.g. About")})})})]})}import{jsx as VL}from"react/jsx-runtime";import{createContext as YL,useCallback as XL,useContext as ZL,useState as QL}from"react";import{useSelectHandler as JL}from"efficient-easel/draw/client";var kl=["chat-bubble-left-right","chat-bubble-oval-left-ellipsis","chat","megaphone","phone","sparkles"],pa=kl[0];var Lt="right";function Tl(e){return kl.includes(e??"")?e:pa}function jh(e){return e==="left"?"left":Lt}function Kh(e){return/^#[0-9a-fA-F]{6}$/.test(e??"")?e.toLowerCase():""}var Pl={enabled:!0,title:"",subtitle:"",greeting:"",launcherColor:"",launcherIcon:"",launcherPosition:Lt,launcherLabel:"",showOnPhones:!0};function a9(e){return{enabled:e.enabled,title:e.title,subtitle:e.subtitle,greeting:e.greeting,launcherColor:Kh(e.launcherColor),launcherIcon:e.launcherIcon?Tl(e.launcherIcon):"",launcherPosition:jh(e.launcherPosition),launcherLabel:e.launcherLabel??"",showOnPhones:e.showOnPhones!==!1}}var Vh=YL({chat:Pl,setChat:()=>{},selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function r9({children:e,chat:o=Pl,onChatChange:t}){let[a,r]=QL(!1),n=XL(f=>t?.(f),[t]),{select:s,setSelectHandler:i}=JL();return VL(Vh.Provider,{value:{chat:o,setChat:n,selected:a,setSelected:r,select:s,setSelectHandler:i},children:e})}var Fl=()=>ZL(Vh);import{jsx as Vf}from"react/jsx-runtime";import{DesktopIcon as eR,PhoneIcon as oR,TabletIcon as tR}from"efficient-easel/icons";import{VIEW_TIERS as aR,VIEW_TIER_LABEL as rR}from"efficient-easel/draw";var nR={desktop:Vf(eR,{}),tablet:Vf(tR,{}),mobile:Vf(oR,{})},Yh=aR.map(e=>({id:e,get label(){return l(rR[e])},icon:nR[e]}));import{PreviewDeviceContext as oH}from"efficient-easel/draw/client";import{jsx as lR}from"react/jsx-runtime";import{createContext as sR,useCallback as Xh,useContext as iR,useMemo as fR,useRef as cR}from"react";var dR=Object.fromEntries(Kr.map(e=>[e,{value:"",error:null}])),Zh=sR({links:xu,rows:dR,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function m9({children:e,value:o}){let t=cR(()=>{}),a=Xh(()=>t.current(),[]),r=Xh(s=>{t.current=s},[]),n=fR(()=>({...o,openPanel:a,setOpenHandler:r}),[o,a,r]);return lR(Zh.Provider,{value:n,children:e})}var fr=()=>iR(Zh);import{jsx as uR}from"react/jsx-runtime";import{createContext as pR,useContext as mR,useMemo as xR,useState as IR}from"react";var Qh=pR(null);function g9({children:e}){let[o,t]=IR(null),a=xR(()=>({surface:o,setSurface:t}),[o]);return uR(Qh.Provider,{value:a,children:e})}function Jh(){return mR(Qh)??{surface:null,setSurface:()=>{}}}import{createPreviewSelectionContext as hR}from"efficient-easel/draw/client";var cr="Scrolling Bar",{Provider:S9,useSelection:eg}=hR("selectedHeroId");import{createPreviewSelectionContext as gR}from"efficient-easel/draw/client";var{Provider:v9,useSelection:El}=gR("selectedHeroPart");import{isShown as BR,lazyShowWhenContext as DR}from"efficient-shell/format";var Ol="product",yR="recordType",bR={key:Ol,label:"Product",fields:[]};var SR=new Map,CR=0;function T9(){return[bR,...SR.values()]}function P9(){return CR}function wR(e){let o=e?.[yR];return typeof o!="string"?Ol:o.trim()||Ol}function Yf(e){return wR(e)===Ol}var Xf="product",vR="tyre";var kR="productType",TR={[Xf]:"alloy-wheel",[vR]:"tyre"},PR=["alloy-wheel","tyre"];function og(e,o){return Yf(o)?FR(o)??TR[e]??null:null}function FR(e){if(!Yf(e))return null;let o=e?.[kR];return typeof o=="string"&&PR.includes(o)?o:null}var Ll=null,tg=null;function ER(e,o){Ll=e,tg=o}function R9(e){ER(e,null)}function A9(){return Ll}function ag(){return tg==="dynamic"||Ll===Xf}function B9(e){return og(Ll??"",e)??"alloy-wheel"}import{addShowWhenFacts as OR}from"efficient-shell/format";import{showWhenOf as Zf,shownForOption as LR,truthy as RR,withRowRules as AR,withRowsShownWhen as Rl,withShowWhen as Al}from"efficient-shell/format";var M9=OR;function ng(e,o,t){let a=!1,r={};for(let[n,s]of Object.entries(e))BR(Zf(s),o??{},t)?r[n]=s:a=!0;return a?r:e}function lg(e,o,t,a){let r=Qr(o,t,a);return{device:e,parentType:r?.item.type,parent:r?.item.props}}function rg(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 rg(t.not,o);for(let a of[t.all,t.any])if(Array.isArray(a)&&a.some(r=>rg(r,o)))return!0;return!1}function q9(e,o={}){return DR({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>ag(),root:()=>e.appState?.data?.root?.props,...o})}var ig=["one","side","stacked"];var K9={one:"One",side:"Side by side",stacked:"Stacked"};function fg(e){return ig.includes(e)?e:"one"}function sg(e){return e==="one"?1:2}function _R(e,o){if(ig.includes(e))return e;let t=fg(o);return t==="side"?"stacked":t}function Qf(e){let o=fg(e.mediaLayout);return Math.max(sg(o),sg(_R(e.mediaLayoutPhone,o)))}var dr=["media","image","image2"],ma={media:"Media",image:"Image",image2:"Image 2"},ur={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function Bl(e,o){return e==="image"&&Qf(o)>1?"Image 1":ma[e]}var Z9="Video file",Q9="Upload a video file";function NR(e,o){return{field:"mediaType",is:e,default:o}}var MR=new Set(["HeroSingle"]),cg="heroPart";function HR(e,o){return{...o,[cg]:e}}function J9(e,{parts:o={},onlyFor:t,fallback:a,rules:r}){let n={...e};for(let s of["image","video"])for(let i of t[s])n[i]=Al(n[i],NR(s,a));for(let[s,i]of Object.entries(r??{}))i&&(n[s]=Al(n[s],i));for(let s of dr)for(let i of o[s]??[])n[i]=HR(s,n[i]);return n}function WR(e){let o=e?.[cg];return dr.includes(o)?o:null}function dg(e,o){let t={};for(let[a,r]of Object.entries(e))WR(r)===o&&(t[a]=r);return t}function ug(e){if(!MR.has(e.type))return[];let o=[{part:"media",label:ma.media,depth:0}];return(e.props.mediaType??"image")!=="video"&&(o.push({part:"image",label:Bl("image",e.props),depth:1}),Qf(e.props)>1&&o.push({part:"image2",label:Bl("image2",e.props),depth:1})),o}function pr(e,o){return`${e}::${o}`}function pg(e){if(!e)return null;let o=e.lastIndexOf("::");if(o<=0)return null;let t=e.slice(o+2);return dr.includes(t)?{nodeId:e.slice(0,o),part:t}:null}var ej="data-sf-hero-part";import{jsx as Z,jsxs as lt,Fragment as es}from"react/jsx-runtime";import{useState as Uy}from"react";import{useEasel as y_}from"efficient-easel/easel";import{headWords as jy,InspectorHead as b_,InspectorIconButton as Xc}from"efficient-easel/chrome";import{DuplicateIcon as $y,TrashIcon as S_}from"efficient-easel/icons";import{panelFieldsOf as C_}from"efficient-easel/screen/lib/puck/panel-fields";import{jsx as k,Fragment as K,jsxs as Y}from"react/jsx-runtime";import{BlockBannerIcon as UR,BlockBoxIcon as $R,BlockButtonIcon as qR,BlockDividerIcon as xg,BlockFooterIcon as Ig,BlockHeadingIcon as jR,BlockProductIcon as KR,BlockSocialIcon as VR,BlockTextIcon as YR,ChatIcon as XR,GridIcon as ZR,ImageIcon as ec,MediaIcon as QR,PageIcon as JR}from"efficient-easel/icons";import{jsx as Jf,Fragment as zR,jsxs as GR}from"react/jsx-runtime";var mg=GR(zR,{children:[Jf("circle",{cx:"9",cy:"20",r:"1.3"}),Jf("circle",{cx:"18",cy:"20",r:"1.3"}),Jf("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 eA={header:Y(K,{children:[k("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),k("path",{d:"M3 9.5h18"})]}),website:Y(K,{children:[k("circle",{cx:"12",cy:"12",r:"9"}),k("path",{d:"M3 12h18M12 3c2.6 2.7 2.6 15.3 0 18M12 3c-2.6 2.7-2.6 15.3 0 18"})]}),social:Y(K,{children:[k("circle",{cx:"6",cy:"12",r:"2.5"}),k("circle",{cx:"18",cy:"6",r:"2.5"}),k("circle",{cx:"18",cy:"18",r:"2.5"}),k("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:Y(K,{children:[k("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),k("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:Y(K,{children:[k("path",{d:"M4 15.5h6M4 18h4"}),k("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:k("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:Y(K,{children:[k("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),k("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:k("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:Y(K,{children:[k("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),k("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:Y(K,{children:[k("circle",{cx:"11",cy:"11",r:"6"}),k("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:mg,CountrySwitchBlock:Y(K,{children:[k("circle",{cx:"12",cy:"12",r:"8.5"}),k("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"})]}),AccountBlock:Y(K,{children:[k("circle",{cx:"12",cy:"8",r:"4"}),k("path",{d:"M4.5 20c.8-3.8 3.8-6 7.5-6s6.7 2.2 7.5 6"})]}),ThemeSwitchBlock:Y(K,{children:[k("circle",{cx:"12",cy:"12",r:"8.5"}),k("path",{d:"M12 3.5v17M12 5.5l6 6M12 10.5l5.2 5.2M12 15.5l2.8 2.8"})]}),LegalLineBlock:Y(K,{children:[k("path",{d:"M3 9h18"}),k("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:Y(K,{children:[k("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),k("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:Y(K,{children:[k("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),k("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:Y(K,{children:[k("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),k("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),k("path",{d:"M7 17h7"})]}),Collections:Y(K,{children:[k("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),k("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),k("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:Y(K,{children:[k("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),k("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:Y(K,{children:[k("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),k("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),k("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),k("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),k("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:Y(K,{children:[k("path",{d:"M3 7h9M15.5 7H21"}),k("circle",{cx:"13.5",cy:"7",r:"1.7"}),k("path",{d:"M3 12h4M10.5 12H21"}),k("circle",{cx:"8.5",cy:"12",r:"1.7"}),k("path",{d:"M3 17h9M15.5 17H21"}),k("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:Y(K,{children:[k("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),k("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),k("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),k("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),k("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),k("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:Y(K,{children:[k("path",{d:"M3 5h10"}),k("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),k("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),k("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:Y(K,{children:[k("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),k("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),k("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:Y(K,{children:[k("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),k("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),k("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),k("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:Y(K,{children:[k("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),k("circle",{cx:"9",cy:"10",r:"1.6"}),k("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:Y(K,{children:[k("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),k("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:Y(K,{children:[k("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),k("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),k("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:Y(K,{children:[k("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),k("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:Y(K,{children:[k("path",{d:"M3.5 20h17"}),k("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:Y(K,{children:[k("circle",{cx:"6",cy:"12",r:"2.6"}),k("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),k("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:Y(K,{children:[k("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),k("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:Y(K,{children:[k("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),k("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:Y(K,{children:[k("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),k("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:Y(K,{children:[k("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),k("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:Y(K,{children:[k("path",{d:"M4 8.5h4.5M11 8.5h9"}),k("path",{d:"M4 14.5h16"})]}),HeroGroup:Y(K,{children:[k("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),k("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:Y(K,{children:[k("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),k("path",{d:"M6.5 9h11M6.5 12.5h11"}),k("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:k(K,{children:k("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:Y(K,{children:[k("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),k("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:Y(K,{children:[k("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),k("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),k("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),k("path",{d:"M4 13.5h11M4 17.5h7"}),k("path",{d:"M17 15l3 2-3 2"})]}),CustomHTML:k("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},oA=k("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),tA={footer:Ig,Footer:Ig,Divider:xg,FooterDivider:xg,Banner:UR,Flex:$R,FooterSocial:VR,page:JR,chat:XR,Heading:jR,Text:YR,ImageBlock:ec,ButtonBlock:qR,Grid:ZR,ProductRef:KR,heroMedia:QR,heroImage:ec,heroImage2:ec},aA={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",SiteHeader:"header",SiteFooter:"footer"};function Rt({type:e,size:o=16,className:t}){let a=aA[e]??e,r=tA[a];return r?k(r,{size:o,className:t}):k("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:eA[a]??oA})}import{PanelHideButton as Zc}from"efficient-easel/screen/components/SidePanelHead";import{useEaselSession as w_}from"efficient-easel/screen/lib/session-context";import{jsx as J,jsxs as oc,Fragment as rA}from"react/jsx-runtime";import{useEffect as nA,useId as hg,useState as lA}from"react";import{IconPicker as sA}from"efficient-shell/ui";import{SettingsDefaultReset as iA,SettingsField as xa,SettingsSegmented as fA,SettingsSwitch as gg}from"efficient-easel/panel";import*as cA from"efficient-easel/icons";import{ButtonIcon as dA,ButtonIconIcon as uA,EyeIcon as pA,PhoneIcon as mA,PlacementIcon as xA,TypeIcon as IA}from"efficient-easel/icons";var hA="Chat with us",gA="We usually reply within a few minutes",yA="Hi! Ask us anything \u2014 about a wheel, an order, or fitment. Leave your details and we\u2019ll reply.";function Dl({label:e,value:o,placeholder:t,onCommit:a,multiline:r=!1,hint:n}){let[s,i]=lA(o);nA(()=>i(o),[o]);let f=()=>{s!==o&&a(s)};return J(xa,{label:e,icon:J(IA,{}),changed:o!=="",action:J(Ia,{label:e,changed:o!=="",onReset:()=>a("")}),hint:n,children:r?J("textarea",{value:s,placeholder:t,rows:3,onChange:u=>i(u.target.value),onBlur:f,"aria-label":e}):J("input",{type:"text",value:s,placeholder:t,onChange:u=>i(u.target.value),onBlur:f,onKeyDown:u=>{u.key==="Enter"&&u.currentTarget.blur()},"aria-label":e,autoComplete:"off"})})}function Ia({label:e,changed:o,onReset:t}){return J(iA,{words:X()?.panel,label:e,changed:o,onReset:t})}function bA({label:e,icon:o,checked:t,fallback:a,onChange:r,hint:n}){let s=hg();return J(xa,{label:e,labelId:s,icon:o,changed:t!==a,action:oc("span",{className:"inline-flex items-center gap-2",children:[J(gg,{checked:t,onChange:r,ariaLabelledBy:s}),J(Ia,{label:e,changed:t!==a,onReset:()=>r(a)})]}),hint:n})}function SA(e){let o=e.replace(/(^|-)([a-z])/g,(a,r,n)=>n.toUpperCase()),t=cA[`${o}Icon`];return t?J(t,{size:16}):null}var CA=kl.map(e=>({value:e,icon:SA(e)}));function wA(){let{theme:e}=V(),o=He(e).themes[0];return Da(o)??o?.accent??""}function yg(){let{chat:e,setChat:o}=Fl(),t=hg(),a=wA(),r=e.launcherIcon?Tl(e.launcherIcon):pa;return oc(rA,{children:[J(xa,{label:l("Show the chat bubble"),labelId:t,icon:J(pA,{}),changed:!e.enabled,action:oc("span",{className:"inline-flex items-center gap-2",children:[J(gg,{checked:e.enabled,onChange:n=>o({enabled:n}),ariaLabelledBy:t}),J(Ia,{label:l("Show the chat bubble"),changed:!e.enabled,onReset:()=>o({enabled:!0})})]}),hint:e.enabled?l("The floating chat bubble shows in the corner of every page."):l("The chat bubble is hidden across the whole site.")}),J(ta,{label:"Look"}),J(xa,{label:l("Button color"),icon:J(dA,{}),changed:e.launcherColor!=="",action:J(qe,{label:l("Button color"),value:e.launcherColor,inherited:a,caption:e.launcherColor?void 0:l("Site button color"),onChange:n=>o({launcherColor:n}),after:J(Ia,{label:l("Button color"),changed:e.launcherColor!=="",onReset:()=>o({launcherColor:""})})})}),J(xa,{label:l("Icon"),icon:J(uA,{}),changed:r!==pa,action:J(Ia,{label:l("Icon"),changed:r!==pa,onReset:()=>o({launcherIcon:""})}),children:J(sA,{label:l("Icon"),value:r,options:CA,onChange:n=>o({launcherIcon:n===pa?"":n})})}),J(xa,{label:l("Position"),icon:J(xA,{}),changed:e.launcherPosition!==Lt,action:J(Ia,{label:l("Position"),changed:e.launcherPosition!==Lt,onReset:()=>o({launcherPosition:Lt})}),children:J(fA,{options:[{label:l("Right"),id:"right"},{label:l("Left"),id:"left"}],value:e.launcherPosition,ariaLabel:l("Position"),onChange:n=>o({launcherPosition:n})})}),J(Dl,{label:l("Label"),value:e.launcherLabel,placeholder:l("Icon only"),onCommit:n=>o({launcherLabel:n}),hint:l("Shows when a visitor points at the button")}),J(bA,{label:l("Show on phones"),icon:J(mA,{}),checked:e.showOnPhones,fallback:Pl.showOnPhones,onChange:n=>o({showOnPhones:n})}),J(ta,{label:"Wording"}),J(Dl,{label:l("Title"),value:e.title,placeholder:hA,onCommit:n=>o({title:n})}),J(Dl,{label:l("Subtitle"),value:e.subtitle,placeholder:gA,onCommit:n=>o({subtitle:n})}),J(Dl,{label:l("Greeting message"),value:e.greeting,placeholder:yA,onCommit:n=>o({greeting:n}),multiline:!0}),J("p",{className:"es-field-hint sf-hint-keep",children:l("Leave a field blank to use the built-in wording.")})]})}import{jsx as At,Fragment as wc,jsxs as vg}from"react/jsx-runtime";import{useEffect as JA,useId as Cg,useState as wg}from"react";import{SettingsField as eB}from"efficient-easel/panel";import{jsx as $A}from"react/jsx-runtime";import{forwardRef as vA,createElement as tc}from"react";var bg={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 $=(e,o,t,a)=>{let r=vA(({color:n="currentColor",size:s=24,stroke:i=2,title:f,className:u,children:p,...m},x)=>tc("svg",{ref:x,...bg[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${o}`,u].filter(Boolean).join(" "),...e==="filled"?{fill:n}:{strokeWidth:i,stroke:n},...m},[f&&tc("title",{key:"svg-title"},f),...a.map(([I,y])=>tc(I,y)),...Array.isArray(p)?p:[p]]));return r.displayName=`${t}`,r};var kA=[["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"}]],ac=$("outline","brand-facebook","BrandFacebook",kA);var TA=[["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"}]],rc=$("outline","brand-instagram","BrandInstagram",TA);var PA=[["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"}]],nc=$("outline","brand-line","BrandLine",PA);var FA=[["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"}]],lc=$("outline","brand-linkedin","BrandLinkedin",FA);var EA=[["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"}]],sc=$("outline","brand-pinterest","BrandPinterest",EA);var OA=[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]],ic=$("outline","brand-telegram","BrandTelegram",OA);var LA=[["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"}]],fc=$("outline","brand-tiktok","BrandTiktok",LA);var RA=[["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"}]],cc=$("outline","brand-wechat","BrandWechat",RA);var AA=[["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"}]],dc=$("outline","brand-whatsapp","BrandWhatsapp",AA);var BA=[["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"}]],uc=$("outline","brand-x","BrandX",BA);var DA=[["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"}]],pc=$("outline","brand-youtube","BrandYoutube",DA);var _A=[["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"}]],mc=$("filled","brand-facebook-filled","BrandFacebookFilled",_A);var NA=[["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"}]],xc=$("filled","brand-instagram-filled","BrandInstagramFilled",NA);var MA=[["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"}]],Ic=$("filled","brand-linkedin-filled","BrandLinkedinFilled",MA);var HA=[["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"}]],hc=$("filled","brand-pinterest-filled","BrandPinterestFilled",HA);var WA=[["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"}]],gc=$("filled","brand-tiktok-filled","BrandTiktokFilled",WA);var zA=[["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"}]],yc=$("filled","brand-whatsapp-filled","BrandWhatsappFilled",zA);var GA=[["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"}]],bc=$("filled","brand-x-filled","BrandXFilled",GA);var UA=[["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"}]],Sc=$("filled","brand-youtube-filled","BrandYoutubeFilled",UA);var RK="outline",_l={fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},qA={},Cc={fillRule:"evenodd"},jA=[["path",{..._l,d:"M21 4L3 11L7 13L9 19L12 15L17 20z"}],["path",{...Cc,d:"M21 4L3 11L7 13L9 19L12 15L17 20zM15.212 8.939 10.576 13.576 11.424 14.424 16.061 9.788z"}]],KA=[["path",{..._l,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",{...qA,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("")}]],VA=[["path",{..._l,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",{..._l,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",{...Cc,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",{...Cc,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("")}]],YA=$("filled","brand-telegram-filled","BrandTelegramFilled",jA),XA=$("filled","brand-line-filled","BrandLineFilled",KA),ZA=$("filled","brand-wechat-filled","BrandWechatFilled",VA),QA={instagram:{outline:rc,solid:xc},facebook:{outline:ac,solid:mc},tiktok:{outline:fc,solid:gc},youtube:{outline:pc,solid:Sc},x:{outline:uc,solid:bc},linkedin:{outline:lc,solid:Ic},pinterest:{outline:sc,solid:hc},whatsapp:{outline:dc,solid:yc},telegram:{outline:ic,solid:YA},line:{outline:nc,solid:XA},wechat:{outline:cc,solid:ZA}};function Sg({platform:e,iconStyle:o,size:t}){let a=QA[e][o];return $A(a,{size:t,stroke:1.75,"aria-hidden":"true",focusable:"false"})}var oB={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 tB({platform:e}){let{rows:o,saveLink:t}=fr(),{value:a,error:r}=o[e],[n,s]=wg(a),[i,f]=wg(!1),u=Cg(),p=Cg();JA(()=>s(a),[a]);let m=async()=>{if(n.trim()===a){n!==a&&s(a);return}f(!0),await t(e,n),f(!1)},x=mu[e];return vg(wc,{children:[At(eB,{label:l(x),htmlFor:u,icon:At(Sg,{platform:e,iconStyle:"outline",size:18}),children:At("input",{id:u,type:"text",inputMode:"url",value:n,placeholder:oB[e],onChange:I=>s(I.target.value),onBlur:()=>{m()},onKeyDown:I=>{I.key==="Enter"&&I.currentTarget.blur(),I.key==="Escape"&&(s(a),I.currentTarget.blur())},"aria-invalid":r?!0:void 0,"aria-describedby":r?p:void 0,"aria-busy":i||void 0,autoComplete:"off",spellCheck:!1})}),r&&At("p",{id:p,className:"sf-note sf-note--error",role:"alert",children:r})]})}function kg({unavailable:e}){let{canSave:o}=fr();return!o&&e?At(wc,{children:e}):vg(wc,{children:[At("p",{className:"es-field-hint sf-hint-keep",children:l("Paste a link to each profile. A platform left empty shows nothing on the site.")}),Kr.map(t=>At(tB,{platform:t},t))]})}import{jsx as ha,jsxs as aB}from"react/jsx-runtime";import{useId as rB,useMemo as nB}from"react";import{useEasel as lB}from"efficient-easel/easel";import{SettingsField as sB,SettingsSwitch as iB}from"efficient-easel/panel";import{EyeIcon as fB}from"efficient-easel/icons";var Tg=["","","","","",""];var cB="root:default-zone";function Pg({heroId:e}){let{appState:o,dispatch:t}=lB(p=>p),a=o.data.content??[],r=a.findIndex(p=>p.props.id===e),n=r>=0?a[r]:null,s=n?n.props.showTicker??!0:!0,i=nB(()=>{let p=n?.props.tickerItems;return Array.isArray(p)?p:Tg.map(m=>({text:m}))},[n]),f=rB();if(!n)return ha("p",{className:"sf-note",children:l("This ticker\u2019s hero is no longer on the page.")});let u=p=>t({type:"replace",destinationZone:cB,destinationIndex:r,data:{...n,props:{...n.props,...p}}});return aB("div",{children:[ha(ta,{label:"Ticker"}),ha(sB,{label:l("Show ticker"),labelId:f,icon:ha(fB,{}),action:ha(iB,{checked:s,onChange:p=>u({showTicker:p}),ariaLabelledBy:f})}),ha(nf,{label:rf.label,icon:rf.icon,items:i,placeholder:"item",onChange:p=>u({tickerItems:p}),markup:!0})]})}import{jsx as G,Fragment as Bc,jsxs as To}from"react/jsx-runtime";import{useContext as GB,useEffect as Lc,useRef as UB,useState as Jg}from"react";import{FieldSelect as $B,InspectorField as qB}from"efficient-easel/fields";import{SettingsField as jB}from"efficient-easel/panel";import{InspectorUpLevel as Gl}from"efficient-easel/chrome";import{StylesIcon as KB,TypeIcon as VB}from"efficient-easel/icons";import{useEasel as YB}from"efficient-easel/easel";import{TextPartPanel as XB}from"efficient-easel/copy";import{Tooltip as ZB}from"efficient-shell/ui";import{jsx as Fc,jsxs as gB}from"react/jsx-runtime";import{COPY_CELLS as mr,CopyBox as yB}from"efficient-easel/copy";import{PaddingYIcon as bB,WidthIcon as SB}from"efficient-easel/icons";import{useSyncExternalStore as dB}from"react";import{decodePartId as uB}from"efficient-easel/draw";function ga(e,o){let t=gf(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?tI(t,o.index):null:yf(e)?.[o.rowKey]??null}function Nl(e,o,t){let a=e.node.props,{key:r,row:n}=oo(e.propKey),s=n?NI(a,r,n,e.kind,o):DI(a,r,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}var pB=["bold","italic","underline","strike","link","sup","sub"],mB=["bullet","number"];function Tc(e,o){return e?[...pB,...o?mB:[]]:[]}function Fg(e,o){let t=uB(e);if(!t?.propKey)return null;let{nodeId:a,propKey:r}=t,n=o.getItemById(a),s=o.getSelectorForId(a);if(!n||!s)return null;let{key:i,row:f}=oo(r),u=o.components[n.type]?.fields?.[i],p=f?ga(u,f):u,m=ra(p);if(!m)return null;let x=n.props??{};if(f&&!(Array.isArray(x[i])&&f.index<x[i].length))return null;let I=f?Ja(x[i],f):x[i];return{node:n,selector:s,propKey:r,kind:m,stored:I,offPage:Dn(p)}}function Eg(e,o){let t=Fg(e,o);if(!t||t.offPage)return null;let{text:a,hidden:r}=et(t.stored);if(r)return null;let n=tl(t.kind);return{partId:e,value:a,rules:Yt,multiline:n,offered:Tc(t.kind!=="plainText",n),write:s=>{let i=Fg(e,o);i&&Nl({node:i.node,propKey:i.propKey,kind:i.kind,zone:i.selector.zone,index:i.selector.index},s,o.replace)}}}function Og(e,o,t){return e?.isConnected&&e.getAttribute(to)===t?e:o?.querySelector(`[${to}="${xB(t)}"]`)??null}function xB(e){return e.replace(/["\\]/g,"\\$&")}function Lg(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var vc=null,kc=new Set;function IB(){return vc}function Pc(e){if(e!==vc){vc=e;for(let o of kc)o()}}function hB(e){return kc.add(e),()=>{kc.delete(e)}}function Rg(){return dB(hB,IB,()=>null)}var CB=["left","center","right","justify"];function Ec(e,o,t,a={}){let r=ar(e),n=(a.phone?e.sizePhone:void 0)??e.size??o.sizePx;return[a.phone?{...mr.fontSize,value:e.sizePhone,styleValue:Math.round(o.sizePx),onChange:s=>t({sizePhone:s??null})}:{...mr.fontSize,value:e.size,styleValue:Math.round(o.sizePx),onChange:s=>t({size:s??null})},{...mr.lineHeight,value:r.lineHeight,styleValue:o.lineRatio,onChange:s=>t(s===void 0?{lineHeight:null,line:null}:{lineHeight:s})},{...mr.letterSpacing,scale:n,value:r.letterSpacingEm,styleValue:o.letterEm,onChange:s=>t(s===void 0?{letterSpacing:null,letter:null}:{letterSpacing:s})},{...mr.paragraphSpacing,value:e.paragraphSpacing,styleValue:0,onChange:s=>t({paragraphSpacing:s??null})},{key:"padding",name:l("Padding"),icon:Fc(bB,{}),unit:"px",step:Ff,shiftStep:10,min:Tf,max:Pf,value:e.padding,styleValue:o.paddingPx,onChange:s=>t({padding:s??null})},{key:"width",name:l("Width"),icon:Fc(SB,{}),unit:"px",step:Of,shiftStep:100,min:Ef,max:tt,value:e.width,styleValue:o.widthPx,onChange:s=>t({width:s??null})}]}function Ag({text:e,onTextChange:o,multiline:t,markup:a=!0,styled:r=!0,style:n,base:s,setValue:i,colors:f,placeholder:u,ariaLabel:p,head:m,typedOnCanvas:x=!1}){let I=Ec(n,s,i),y=Tc(a,t);return gB("div",{className:"sf-part-textbox",children:[m,Fc(yB,{value:e,onChange:o,multiline:t,placeholder:u,ariaLabel:p,rules:Yt,tools:y,barShows:x?"focus":"always",colors:a?f:[],align:r?{value:n.align??s.align,allow:CB,onChange:C=>i({align:C})}:void 0,letterCase:r?{value:n.case==="capitalize"?"":n.case??"",onChange:C=>i({case:C||null})}:void 0,cells:r?I:void 0})]})}import{UiIcon as ey}from"efficient-easel/draw/client";import{jsx as Ml,Fragment as wB,jsxs as vB}from"react/jsx-runtime";import{Button as Bg,Dialog as kB}from"efficient-shell/ui";function Dg({styleName:e,onCancel:o,onConfirm:t}){return Ml(kB,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Update {style}?",{style:e}),footer:vB(wB,{children:[Ml(Bg,{variant:"secondary",onClick:o,children:l("Cancel")}),Ml(Bg,{variant:"primary",onClick:t,children:l("Update style")})]}),children:Ml("p",{children:l("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 QB}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewDevice as JB}from"efficient-easel/draw/client";import{jsx as TB}from"react/jsx-runtime";import{createContext as PB,useContext as FB,useMemo as EB,useState as OB}from"react";var LB={partStyle:null,setPartStyle:()=>{}},_g=PB(LB);function FV({children:e}){let[o,t]=OB(null),a=EB(()=>({partStyle:o,setPartStyle:t}),[o]);return TB(_g.Provider,{value:a,children:e})}function Ng(){return FB(_g)}import{TEXT_FIELD_MARKER as eD}from"efficient-easel/draw";import{useSectionOps as oD}from"efficient-easel/screen/lib/puck/use-section-ops";var RB="#9ca3af";function AB(e){return fn.map(o=>({key:o,name:Ap[o],value:e?.[o]||RB}))}function Hl(e){return AB(e).map(o=>({name:o.key,label:l(o.name),value:o.value}))}function Hg(e){let o={},t=e.ownerDocument,a=t?.defaultView;if(!t||!a)return o;let r=a.getComputedStyle(e),n=t.createElement("canvas").getContext("2d");for(let s of fn){let i=Vt[s].replace(/^var\((--[\w-]+)\)$/,"$1"),f=r.getPropertyValue(i).trim();if(!f)continue;let u=Mg(f);!u&&n&&(n.fillStyle="#000000",n.fillStyle=f,u=Mg(String(n.fillStyle))),u&&(o[s]=u)}return o}function Mg(e){let o=e.trim().toLowerCase();if(/^#[0-9a-f]{6}$/.test(o))return o;if(/^#[0-9a-f]{3}$/.test(o))return`#${[...o.slice(1)].map(a=>a+a).join("")}`;let t=o.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return t?`#${t.slice(1,4).map(a=>Math.min(255,Number(a)).toString(16).padStart(2,"0")).join("")}`:null}var xr="@name",Wg="@body",zg="@value",BV={[xr]:"Name",[Wg]:"Body",[zg]:"Value"},BB={TimelineTrack:{"entries.date":xr,"entries.title":xr,"entries.blurb":Wg},Footprint:{"offices.city":xr},Stats:{"items.label":xr,"items.value":zg}};function DB(e){let{key:o,row:t}=oo(e);return t?`${o}.${t.rowKey}`:null}function Gg(e,o){if(!e)return o;let t=DB(o);return t?BB[e]?.[t]??o:o}import{useEaselHost as tD}from"efficient-easel/screen/lib/host";function _B(e){let o=new Set([...Object.keys(un[e]??{}),...pn[e]??[]]);for(let[t,a]of Object.entries(li[e]??{}))a.verb==="snapshot"&&o.add(t);return[...o].sort()}var NB={CollectionCard:"product",FooterMenu:"menu",Gallery:"product",GalleryItem:"product",ProductGrid:"product",ProductHero:"product",SpecTable:"product",Events:"blog",FeaturedCover:"blog",LongRead:"blog",SubscribeBlogs:"blog"},Ug={product:"Synced from the product.",blog:"Synced from the blog post.",menu:"Synced from the site menu."},$g="Open",qg={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 Ir(e){let o=e?.source?.slug;return typeof o=="string"&&o.length>0?o:void 0}function hr(e){return NB[e]??null}function jg(e,o){let t=hr(e);return t&&_B(e).includes(o)?t:null}function Wl(e){let o=e?.menu?.id;return typeof o=="string"&&o.length>0?o:void 0}var Kg="data-sf-spec-region";function HV(e,o,t){if(!e)return;let a=t[e];if(a)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${a}, ${o.builtIn})`}}function ya(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 MB(e){return`@${e}`}function Oc(e,o){if(!o.startsWith("@"))return null;let t=o.slice(1);return t in e?t:null}function HB(e,o){return o&&o in e?o:null}var gr={tag:"text-[length:var(--size-label,13px)]",name:"text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))]",namePhone:"max-[800px]: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)]"},WB={tag:{label:"Tag",follows:"Labels",builtIn:ya(gr.tag),writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:ya(gr.name),writable:!0},body:{label:"Body",follows:"Body",builtIn:ya(gr.body),writable:!0},price:{label:"Price",follows:"Labels",builtIn:ya(gr.price),writable:!0},link:{label:"Link",follows:"Labels",builtIn:ya(gr.link),writable:!0}},Vg=WB;var zB={number:{label:"Number",follows:"Labels",builtIn:"14px",writable:!0},question:{label:"Question",follows:"Body",builtIn:"18px",writable:!0},answer:{label:"Answer",follows:"Body",builtIn:"15px",writable:!0}},Yg=zB;var KV=Kg;var Xg={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 Zg={SpecTable:Xg,FAQ:Yg,Collections:Vg};function Qg(e){return e&&Object.hasOwn(Zg,e)?Zg[e]:null}function Ac(e){return e?l(e):null}function oy(e){return e.kind==="role"?Cs[e.role]:e.kind==="custom"?"Custom":null}function aD(e){let o=e.role;return o&&Oo.includes(o)?{kind:"role",role:o}:null}function rD(e,o){if(!e)return{kind:"unread"};let{faceRole:t,base:a}=e;if(o[t]===a.fontKey)return{kind:"role",role:t};let r=Object.keys(o).filter(n=>o[n]===a.fontKey);return r.length===1?{kind:"role",role:r[0]}:{kind:"custom"}}function Rc(e,o,t,a){return aD(ul(e,o))??rD(t,a)}function nD(e,o){if(!e.length)return null;let t=o(e[0]);return e.every(a=>o(a)===t)?t:null}var zl="";function lD({face:e,base:o,onPick:t}){let a=e.kind==="role"?e.role:zl,r=[{label:l("No style"),value:zl},...Oo.map(n=>({label:l(Cs[n]),value:n}))];return G($B,{ariaLabel:l("Style"),value:a,options:r,inline:!0,onChange:n=>t(n===zl?null:n),renderOption:n=>n.value===zl?To(Bc,{children:[G("span",{className:"es-fsel-label sf-part-style-keep",children:n.label}),G("span",{className:"sf-part-style-aside","aria-hidden":"true",children:l("Section\u2019s own")})]}):G("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${n.value})`},children:n.label}),renderValue:()=>G("span",{style:{fontFamily:o?.fontKey?`var(${zt(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:Ac(oy(e))}),valueText:n=>Ac(oy(e))??n?.label??""})}function sD({sectionName:e,onBack:o,textEditor:t,styleRow:a,children:r}){return To("div",{className:"sf-part-panel",children:[G(Gl,{inline:!0,name:l(e),onSelect:o}),t,a,r]})}function Ul({source:e,slug:o,menuId:t}){let a=tD(),r=qg[e],n=!r.needsSlug||!!o;return G("div",{className:"sf-note sf-note--source",children:To("p",{className:"es-field-hint sf-hint-keep",children:[l(Ug[e]),n?To(Bc,{children:[" ",G("button",{type:"button",className:"sf-source-open",onClick:()=>{r.type==="storefront-editor:open-menus"?a.send(r.type,{menuId:t??null}):o&&a.send(r.type,{slug:o})},children:l($g)})]}):null]})})}var ty=4,iD=120;function fD({region:e,sizePx:o,face:t,base:a,onFollowStyle:r,source:n,slug:s,onBack:i}){let f=e.follows;return To("div",{className:"sf-note",children:[G("p",{children:G("strong",{children:l(e.label)})}),G("p",{children:o?l("Its size follows Styles \u25B8 {follows} \u2014 {px}px right now.",{follows:l(f),px:Math.round(o)}):l("Its size follows Styles \u25B8 {follows}.",{follows:l(f)})}),r?G(Bc,{children:G(jB,{label:l("Style"),icon:G(KB,{}),hint:l("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:l(e.label).toLowerCase()}),children:G(lD,{face:t,base:a,onPick:r})})}):G("p",{className:"es-field-hint sf-hint-keep",children:l("Only the size follows a site style. This section sets its own font, weight and letter case.")}),n?G(Ul,{source:n,slug:s}):null,G(Gl,{inline:!0,name:l("Page"),onSelect:i})]})}function cD({onBack:e}){return To("div",{className:"sf-note",children:[G("p",{children:G("strong",{children:l("This part is no longer here.")})}),G("p",{children:l("The section it belonged to has been changed or removed.")}),G(Gl,{inline:!0,name:l("Page"),onSelect:e})]})}function dD({onBack:e,partId:o,why:t}){return To("div",{className:"sf-note",children:[G("p",{children:G("strong",{children:l("This part's settings did not open.")})}),G("p",{children:l("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.")}),G("p",{className:"sf-note-detail",children:To("code",{children:[o," \u2014 ",t]})}),G(Gl,{inline:!0,name:l("Page"),onSelect:e})]})}function ay({nodeId:e,propKey:o,onBack:t,onEditStyle:a}){let{getItemById:r,getSelectorForId:n,config:s}=YB(_=>_),i=oD(),f=Rg(),{partStyle:u}=Ng(),{fonts:p,textStyles:m}=V(),x=GB(QB),I=!x?.capabilities?.hasSiteTheme,{persist:y}=Xt({themeFromDocument:I,tokenRef:x?.tokenRef,siteId:x?.siteId??null}),C=ml({themeFromDocument:I,persist:y}),[v,T]=Jg(!1),w=JB()==="mobile",g=UB(null),b=r(e),O=n(e),F=b?s.components[b.type]:void 0,{key:L,row:P}=oo(o),M=F?.fields?.[L],z=P?ga(M,P):M,B=ll(e,o),A=b?.props??{},W=ra(z),D=Dn(z),ae=$I(z),ie=b?hr(b.type):null,de=b?jg(b.type,L):null,no=P?Ja(A[L],P):A[L],lo=!!P&&!(Array.isArray(A[L])&&P.index<A[L].length);Lc(()=>{Lg(document)||g.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[B]);let[Le,so]=Jg(0);Lc(()=>so(0),[B]);let _e=!!b&&!lo&&(!O||!z);Lc(()=>{if(!_e||Le>=ty)return;let _=setTimeout(()=>so(Ie=>Ie+1),iD);return()=>clearTimeout(_)},[_e,Le]);let Te=_e&&Le<ty;if(!b||lo)return G(cD,{onBack:t});let xe=Qg(b.type),he=xe?Oc(xe,o):null;if(xe&&he){let _=u?.partId===B?u:null,Ie=xe[he],mo=Ie.writable===!0&&!!O,Uo=Ss=>{O&&i.replaceComponent(O.zone,O.index,{...b,props:ia(A,o,"role",Ss)})};return G(fD,{region:Ie,sizePx:_?.base.sizePx??null,face:Rc(A,o,_,p),base:_?.base??null,onFollowStyle:mo?Uo:void 0,source:ie,slug:Ir(A),onBack:t})}if(!O||!z)return Te?G("div",{className:"sf-note","aria-busy":"true"}):G(dD,{onBack:t,partId:B,why:O?"no field":"no selector"});let Ne=_=>{i.replaceComponent(O.zone,O.index,{...b,props:_})},Pe=_=>{if(et(_).hidden!==et(no).hidden||!W){let Ie=P?bf(A,L,P,_):{...A,[L]:_};Ie&&Ne(Ie);return}Nl({node:b,propKey:o,kind:W,zone:O.zone,index:O.index},et(_).text,i.replaceComponent)},io=no,Me=u?.partId===B?u:null,Ge=Me?.styleOwner,fo=Ge?r(Ge.owner):null,co=Ge&&fo?n(Ge.owner):null,Fo=!!(Ge&&fo&&co),Ve=Fo?fo.props??{}:A,uo=Fo?_=>i.replaceComponent(co.zone,co.index,{...fo,props:_}):Ne,E=Fo?Ge.kind:Gg(b?.type,o),q=ul(Ve,E),j=[{partKey:E,face:Rc(Ve,E,Me,p),sizeGroup:Me?.sizeGroup??null,base:Me?.base??pD,style:q}],Re=nD(j,_=>_.sizeGroup),po=Hl(Me?.inks),Ye=(_,Ie)=>{let mo=Ve;for(let Uo of j)mo=ia(mo,Uo.partKey,_,Ie);uo(mo)},Ht=_=>_?Ye("textStyle",_):Fe({textStyle:null,role:null}),Fe=_=>{let Ie=Ve;for(let mo of j)for(let[Uo,Ss]of Object.entries(_))Ie=ia(Ie,mo.partKey,Uo,Ss??null);uo(Ie)},Eo=W==="text"||W==="textarea",{text:Ur,hidden:Wt}=et(no),$r=z?.[eD]?.label??o,Md=Wt?l("Show {label} on the slide",{label:l($r)}):l("Hide {label} on the slide",{label:l($r)}),Hd=To("div",{className:"sf-field-head",children:[G(VB,{}),G("span",{className:"sf-field-label sf-field-label--inline",children:l($r)}),Eo&&G(ZB,{content:Md,children:G("button",{type:"button",className:"sf-field-eye","aria-pressed":Wt,"aria-label":Md,onClick:()=>Pe({text:Ur,hidden:!Wt}),children:Wt?G(ey,{name:"eye-off",size:14}):G(ey,{name:"eye",size:14})})})]}),Wd=!D&&ae,XC=!!W&&(Gx(z)||D||Wt||!ae),zd=Rc(Ve,E,Me,p),ZC=zd.kind==="role"?zd.role:null,bs=eh(q)??ph(ZC),Gd=at(C.saved,C.old),QC=Object.entries(q).filter(([_,Ie])=>_!=="role"&&_!=="textStyle"&&Ie!==void 0).length,JC=()=>{let _=Ve;for(let Ie of j){let{role:mo,textStyle:Uo}=Ie.style;_=nh(_,Ie.partKey),mo&&(_=ia(_,Ie.partKey,"role",mo)),Uo&&(_=ia(_,Ie.partKey,"textStyle",Uo))}uo(_)},ft=bs,ew=mh(j[0].style),ow=ft?Gd.find(_=>_.id===ft)?.name??ft:"",tw=()=>{T(!1),ft&&(C.write(xh({saved:C.saved,old:C.old,styleId:ft,values:Nf(j[0].style)}),!0),JC())};return To(sD,{sectionName:F?.label??b.type,onBack:t,textEditor:G("div",{ref:g,className:"sf-part-text",children:XC?G(Ag,{text:Ur,onTextChange:_=>Pe(Eo?{text:_,hidden:Wt}:_),multiline:tl(W),markup:W!=="plainText",styled:!1,style:j[0].style,base:j[0].base,setValue:Fe,colors:po,placeholder:Ac(BI(z))??void 0,ariaLabel:l($r),head:Hd,typedOnCanvas:f===B}):W?Eo?Hd:null:G(qB,{field:z,name:o,value:io,onChange:Pe,id:`sf-part-${e}-${o}`})}),children:[de&&G(Ul,{source:de,slug:Ir(A),menuId:Wl(A)}),Wd&&G(XB,{style:{value:bs??"",options:[{value:"",label:l("No style"),description:l("Section\u2019s own")},...Gd.map(_=>({value:_.id,label:_.name,description:_.values.font?zt(_.values.font)?.label:void 0}))],onChange:_=>Ht(_||null),changed:QC>0,onEditStyles:a,onUpdateStyle:ft&&ew?()=>T(!0):void 0},font:{value:q.font??"",styleValue:zt(j[0].base.fontKey)?.label,options:Xe.map(_=>({label:_.label,value:_.key})),onChange:_=>Ye("font",_||null)},italic:{value:q.italic,styleValue:uD(m,bs),onChange:_=>Ye("italic",_??null)},cells:Ec(j[0].style,j[0].base,Fe,{phone:w}),align:{value:q.align??"",styleValue:j[0].base.align,onChange:_=>Ye("align",_||null)},letterCase:{value:q.case??"",styleValue:j[0].base.case,onChange:_=>Ye("case",_||null)}}),v&&ft&&G(Dg,{styleName:ow,onCancel:()=>T(!1),onConfirm:tw}),Wd&&Re===null&&G("p",{className:"es-field-hint sf-hint-keep",children:l("Fixed size \u2014 the site\u2019s Text setting doesn\u2019t resize this.")})]})}function uD(e,o){return!o||!Array.isArray(e)?!1:e.find(t=>t?.id===o)?.values?.italic===!0}var pD={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:tt};import{jsx as ao,jsxs as Dc,Fragment as mD}from"react/jsx-runtime";import{useCallback as xD,useRef as ID,useState as yr}from"react";import{InspectorIconButton as hD}from"efficient-easel/chrome";import{PopupMenu as gD,PopupMenuItem as yD,PopupMenuLabel as $l}from"efficient-shell/ui";import{CopyToPageIcon as bD}from"efficient-easel/icons";import{useEaselSession as SD}from"efficient-easel/screen/lib/session-context";import{cloneNodeWithFreshIds as CD}from"efficient-easel/screen/lib/puck/section-doc";import{FOOTER_TYPE as wD}from"efficient-easel/draw";function ry({node:e,currentSlug:o,siteId:t,tokenRef:a,runAuthed:r,onNotify:n}){let[s,i]=yr(!1),[f,u]=yr(null),p=SD(),[m,x]=yr(!1),[I,y]=yr(null),C=ID(null),[v,T]=yr(null),w=xD(async()=>{if(p.usesBridgedToken&&!a.current){x(!0);return}try{u(await Se(p).pages.list(t?{siteId:t}:void 0))}catch{x(!0)}},[a,t,p]),g=()=>{if(s){i(!1);return}let F=C.current?.getBoundingClientRect();F&&T({top:F.bottom+6,right:Math.max(8,window.innerWidth-F.right)}),u(null),x(!1),w(),i(!0)},b=(f??[]).filter(F=>F.slug!==o),O=async F=>{if(I)return;y(F.slug);let L=CD(e),P=p.documentHooks?.storedNode?.(L)??L,M=Se(p).pages,z=await r(async()=>{let B=await M.load({id:F.id});if(!B)throw new Error(`Page "${F.slug}" no longer exists.`);let A=B.layout??{},W=Array.isArray(A.content)?[...A.content]:[],D=W.findIndex(ae=>ae?.type===wD);W.splice(D===-1?W.length:D,0,P),await M.save(F.id,{layout:{root:{},zones:{},...A,content:W}},{version:B.version,clientId:""})});y(null),i(!1),n?.(z?l("Duplicated to \u201C{name}\u201D",{name:F.label}):l("Couldn\u2019t duplicate the section \u2014 please retry"),z?"success":"error")};return Dc(mD,{children:[ao("span",{"data-menu-toggle":!0,style:{display:"contents"},children:ao(hD,{buttonRef:C,label:l("Duplicate to another page"),hasPopup:"menu",expanded:s,onClick:g,children:ao(bD,{size:15})})}),s&&v&&ao(gD,{portal:!0,style:{top:v.top,right:v.right},onClose:()=>i(!1),children:Dc("div",{role:"menu","aria-label":l("Duplicate to page"),children:[ao($l,{children:l("Duplicate to page")}),m?ao($l,{children:l("Couldn\u2019t load pages")}):f===null?ao($l,{children:l("Loading\u2026")}):b.length===0?ao($l,{children:l("No other pages")}):b.map(F=>Dc(yD,{role:"menuitem",disabled:I!==null,onClick:()=>{O(F)},children:[ao("span",{className:"min-w-0 flex-1 truncate",children:F.label}),I===F.slug?ao("span",{className:"shrink-0 text-xs",children:l("Copying\u2026")}):F.draft&&ao("span",{className:"shrink-0 text-xs",children:l("draft")})]},F.id))]})})]})}import{useScreenDocument as v_}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSectionOps as k_}from"efficient-easel/screen/lib/puck/use-section-ops";import{SELECTION_MODE as T_}from"efficient-easel/screen/lib/screen-parts";import{usePreviewParts as P_}from"efficient-easel/draw/client";import{jsx as br,jsxs as vD}from"react/jsx-runtime";import{SettingsDrill as kD}from"efficient-easel/panel";import{UiIcon as TD}from"efficient-easel/draw/client";var PD="Not shown on the page";function FD({part:e,onOpen:o}){return br(kD,{name:l(e.label),preview:e.offPage?l(PD):e.preview||l("Empty"),offPage:e.offPage,status:e.hidden?br("span",{className:"sf-entry-eye",role:"img","aria-label":l("Hidden on the page"),children:br(TD,{name:"eye-off",size:14})}):void 0,onOpen:()=>o(e.key)})}function _c(e){return e.filter(o=>!o.identifier)}function ny({parts:e,onOpen:o,heading:t=!0}){let a=_c(e);return a.length?vD("div",{className:"sf-entries",children:[t?br("h3",{className:"sf-entries-head",children:l("Text")}):null,a.map(r=>br(FD,{part:r,onOpen:o},r.key))]}):null}import{HEADER_TYPE as F_,ROOT_ZONE as qy}from"efficient-easel/draw";import{HEADER_TYPE as De,FOOTER_TYPE as le,newNodeId as ED}from"efficient-easel/draw";function ql(){return{type:De,props:{id:ED(De)}}}var ly=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterGroup",label:"Footer Box"},{type:"FooterDivider",label:"Divider"}],OD=ly.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),LD="FooterGroup",sy="blocks";function iy(e){return e===le?ly:e===LD?OD:null}function jl(){let e=(o,t)=>({type:o,props:{id:`${o}-${crypto.randomUUID()}`,...t}});return[e("FooterLogo",{widthPct:100,align:"left",tagline:""}),e("FooterGroup",{direction:"vertical",align:"start",blocks:[e("FooterText",{text:"Join our email list",size:"md",tone:"default"}),e("FooterEmailSignup",{heading:"",placeholder:"Email address",buttonLabel:"Subscribe"})]})]}var se="SiteHeader",re="SiteFooter",Nc="sections",oX=[se,re],ba=e=>e===se||e===re,fy=e=>`${e}:${Nc}`;function cy(e,o,t=[]){return{type:e,props:{id:o,[Nc]:t}}}var RD=new Set(["Footer",se,re]);function Sa(e){let o=new Set,t=!1,a=e.filter(r=>{let n=r?.type??"";return n==="Header"?(t=!0,!1):RD.has(n)?o.has(n)?(t=!0,!1):(o.add(n),!0):!0});return t?a:e}function Kl(e,o){return e.some(t=>t?.type===o.type)?e:o.type===se?[o,...e]:[...e,o]}var dy={[se]:{max:3,takes:["Flex","Ticker"]},[re]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function uy(e,o,t){if(!ba(e))return!0;let a=dy[e];return t<a.max&&a.takes.includes(o)}function py(e,o){let t=o,a=t?.props?.id;if(a==null)return null;let r=e?.content;if(!Array.isArray(r))return null;for(let n of r){if(!ba(n?.type))continue;let s=n.props?.[Nc];if(!Array.isArray(s)||!s.some(f=>f?.props?.id===a))continue;let i=dy[n.type];return i.takes.includes(t?.type??"")?s.length>=i.max?{group:n.type,why:"full"}:null:{group:n.type,why:"type"}}return null}function Mc(e){switch(e?.type){case se:case re:return l("On every page");case De:case le:return l("On every page \xB7 old style");default:return null}}var my=()=>null,xy=()=>l("Changed on every page");function Vl(e,o){let t=rp(e,o);if(t)return t;let a=py(e,o);if(!a)return null;let r=a.group===se;return a.why==="type"?r?l("The header cannot take another one of these"):l("The footer cannot take another one of these"):r?l("The header holds at most 3 sections"):l("The footer holds at most 6 sections")}import{jsx as Zl,Fragment as zD,jsxs as GD}from"react/jsx-runtime";import{useState as UD}from"react";import{createNode as $D,newId as qD}from"efficient-easel/data";import{useEasel as jD}from"efficient-easel/easel";import{Banner as KD,Button as Hc}from"efficient-shell/ui";import{useScreenDocument as VD}from"efficient-easel/screen/components/ScreenDocumentContext";var Yl="Flex",AD={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock"},BD=e=>{let{id:o,...t}=e;return t},Iy=e=>typeof e=="string"?e:"",Xl=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,hy={sm:12,md:13,lg:15},DD="md",gy=1.5,_D={size:13,lineHeight:gy,width:280},ND=14,MD=40,HD=e=>e==="center"||e==="right"?e:"left";function WD(e){let o={},t=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(let[a,r]of t){let n=Xl(e[a]);n&&(o[r]=n)}return o}function yy(e,o){let t=e.props??{},a=AD[e.type];if(a)return[o(a,BD(t))];switch(e.type){case"FooterLogo":{let r=HD(t.align),n=o("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round(Iu*((Xl(t.widthPct)??100)/100)),href:"/",align:r,...WD(t)}),s=Iy(t.tagline).trim();return s?[n,o("Text",{text:s,tone:"dim",align:r,_partStyles:{text:{..._D}}})]:[n]}case"FooterText":{let r=typeof t.size=="string"&&t.size in hy?t.size:DD;return[o("Text",{text:Iy(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:hy[r],lineHeight:gy}}})]}case"FooterDivider":{let r=Xl(t.thickness),n=Xl(t.lengthPct);return[o("Divider",{...r!==void 0?{thickness:r}:{},...n!==void 0?{lengthPct:n}:{},...t.hideOnMobile===!0?{hideOnMobile:!0}:{}})]}case"FooterGroup":{let r=Array.isArray(t.blocks)?t.blocks:[];return[o(Yl,{direction:t.direction==="horizontal"?"row":"column",gap:ja("FooterGroup",t.gap),align:t.align==="center"||t.align==="end"?t.align:"start",content:r.flatMap(n=>yy(n,o))})]}default:return[]}}function Sr(e,o,t){let a=e&&Array.isArray(e.props?.blocks)?e.props.blocks:[],r=u=>o(Yl,{direction:"row",wrap:!0,share:"equal",gap:MD,content:u}),n=[],s=[];for(let u of a){let p=yy(u,o);if(u.type==="FooterDivider"){s.length&&n.push(r(s)),s=[],n.push(...p);continue}p.length<=1?s.push(...p):s.push(o(Yl,{direction:"column",gap:ND,align:"stretch",content:p}))}(s.length||!n.length)&&n.push(r(s));let i=o(Yl,{direction:"column",content:[o("LegalLineBlock")]}),f=cy(re,t,[...n,i]);return{...f,props:{...f.props,...e?.props?.width==="full"?{fullWidth:!0}:{}}}}function by(){let{appState:e,dispatch:o,config:t}=jD(p=>p),{readOnly:a}=VD(),[r,n]=UD(!1),s=e.data.content;if(a||s.some(p=>p.type===re))return null;let i=s.find(p=>p.type===le)??null,f=(p,m)=>$D(t,p,m),u=()=>{let p=Sr(i,f,qD(re));o({type:"setData",data:m=>({...m,content:[...Kl(m.content,p)]}),recordHistory:!0}),n(!1)};return Zl(KD,{tone:"info",title:l("This footer uses the old layout"),action:r?GD(zD,{children:[Zl(Hc,{variant:"primary",size:"sm",onClick:u,children:l("Switch now")}),Zl(Hc,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:l("Cancel")})]}):Zl(Hc,{variant:"secondary",size:"sm",onClick:()=>n(!0),children:l("Switch to Box footer")}),children:l("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 Vc}from"react/jsx-runtime";import{useLayoutEffect as c_,useMemo as Hy,useRef as d_,useState as jc}from"react";import{useEasel as u_,useSelectedFields as p_}from"efficient-easel/easel";import{Inspector as m_,planFields as Wy}from"efficient-easel/fields";import{jsx as Ca}from"react/jsx-runtime";import{usePreviewDevice as YD}from"efficient-easel/draw/client";import{NoControlMark as Sy,noControlField as Cy}from"efficient-easel/screen/lib/puck/panel-no-control-mark";var Wc=e=>l(ea[e==="content"?"page":"full"]),wy=e=>`${e} ${l("from Styles")}`;function vy(){let{siteWidth:e,sectionBackgroundWidth:o,sectionContentWidth:t}=V();return{px:typeof e=="number"?e:pe.default,background:o??"full",content:t??"content"}}function ky(){try{return YD()==="mobile"}catch{return!1}}function XD({type:e,onChange:o}){let t=vo(),a=vy(),r=ky(),n=ji(e,t).background;return Ca(el,{value:n??a.background,changed:n!==null,detail:wy(Wc(a.background)),onChange:s=>o(s),onReset:()=>o(Va),disabled:r})}function ZD({type:e,onChange:o}){let t=vo(),[,a]=Hn("contentMax"),r=vy(),n=ky(),s=ji(e,t),i=(s.background??r.background)==="content",f=s.content??r.content;return Ca(ol,{mode:i&&f==="full"?"content":f,px:s.contentMax??r.px,max:i?r.px:pe.max,changed:s.content!==null,detail:wy(r.content==="full"?Wc("full"):`${Wc("content")} ${r.px}px`),fullClosed:i,disabled:n,hint:n?LI:i?FI:void 0,onMode:u=>{o(u),u==="full"&&a(null)},onPx:u=>{o("content"),a(u===r.px?null:u)},onReset:()=>{o(Va),a(null)}})}function QD(e){return ot({_gWidth:ve(Jn),backgroundWidth:{type:"custom",render:({onChange:o})=>Ca(XD,{type:e,onChange:o})},contentWidth:{type:"custom",render:({onChange:o})=>Ca(ZD,{type:e,onChange:o})},contentMax:{...Cy({type:"custom",render:()=>Ca(Sy,{})},"always"),reachedBy:"contentWidth"},widthMode:{...Cy({type:"custom",render:()=>Ca(Sy,{})},"always"),reachedBy:"backgroundWidth"}})}var Ty=Object.keys(QD(""));import{deviceField as JD,deviceMetaOf as Fy}from"efficient-easel/screen/lib/puck/device-fields";import{DESIGN_GROUPS as Gc,SETTINGS_BUCKETS as e_}from"efficient-easel/panel";import{BUCKET_KEY as We,DESIGN_GROUP_KEY as Cr}from"efficient-easel/screen/lib/puck/field-buckets";var wr=e_;var o_="Editor only \u2014 not shown live",Uc={"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","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 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",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[o_]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",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",Height:"Size"},Ey={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},Oy={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function zc(e,o,t){let a=`${e}.${o}`;return Oy[a]??Ey[a]??Uc[t]}function Ly(e){return e==="Animation"?[We.Animation]:[We.Design,Cr[e]]}function Ql(...e){let o=[];for(let t of e)for(let a of Object.values(t)){let r=Fy(a),n=No(r?r.inner:a),s=n?Uc[n.label]:void 0;if(s)for(let i of Ly(s))o.includes(i)||o.push(i)}return o}var MX=[...Ql(Gn(),Un("full"),$n(),qn(),tf()),...Object.keys(Gn()),...Object.keys(Un("full")),...Object.keys($n()),...Object.keys(qn()),...Object.keys(tf()),...Ty],HX=[...Ql(Nn()),...Object.keys(Nn())],WX=[...Ql(Wn()),...Object.keys(Wn())],zX=[...Ql(zn()),...Object.keys(zn())],t_=Object.keys(aI()),a_=new Set(["cardImage","imageBackground"]),GX=[...Ly(zc("ProductGrid","_gCards","Cards")??"Design"),...t_.filter(e=>e.startsWith("_g")||a_.has(e))],UX=Object.keys(rI()),$X=Object.keys(nI({bottomDefault:!0})),r_={"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)","EmailFormBlock._gContent":"duplicated the Content 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)"},Ry={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},Ay={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{let e={...Gn(),...Un("full"),...$n(),...qn(),...Nn(),...Wn(),...zn()};for(let o of Object.keys(Ay)){let t=No(e[o]),a=t?Uc[t.label]:void 0;if(!t||t.level!==2||!a||!Ry[a].includes(t.label))throw new Error(`INJECTED_RETIRED (lib/puck/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 n_=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),l_=new Map([[We.Design,"Content"],[We.Animation,"Animation"],...Gc.map(e=>[Cr[e],e])]);function By(e){let o=new Set([...Object.values(We),Cr.Content]);for(let[t,a]of Object.entries(e))if(!o.has(t)&&No(a)?.level===1)return 1;return 2}function s_(e){let o=`${e}.`;return Object.keys(r_).filter(t=>t.startsWith(o)).map(t=>t.slice(o.length))}function i_(e,o){let t=Fy(e),a=ve(o);return t?JD(t.tier,a):a}function f_(e,o){let t=No(o);return t?e==="Content"||e==="Animation"?jx(o,t.label):Kx(o):o}function Py(e){return e==="Design"?Gc:["Animation"]}function qX(e,o){let t=[],a=new Set(s_(o)),r=new Set,n=!1,s=null;for(let[x,I]of Object.entries(e)){let y=No(I);if(n_.has(x))throw new Error(`${o}.${x}: 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 C=l_.get(x);if(C!==void 0){if(y?.level!==1)throw new Error(`${o}.${x}: that key is reserved for the ${C} heading of the settings panel, but this field is ${y?`a level-${y.level} "${y.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(x===We.Design||x===We.Animation)&&(n=!0),t.push(s={place:C,entries:[],adopted:!0});continue}if(!y){s||t.push(s={place:"Content",entries:[]}),s.entries.push([x,I]);continue}if(a.has(x)||x in Ay){let T=zc(o,x,y.label);if(y.level!==2||!T||!Ry[T].includes(y.label))throw new Error(`${o}.${x}: ${a.has(x)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${y.level} "${y.label}" header in the ${T??"(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.`);a.has(x)&&r.add(x),t.push(s={place:T,entries:[]});continue}let v=zc(o,x,y.label);if(!v)throw new Error(`${o}.${x}: the inspector group "${y.label}" is not classified in LABEL_GROUP (lib/puck/field-groups.ts), so there is no way to say which of ${[...Gc,"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:[[x,y.level===2?I:i_(I,y.label)]]})}let i=new Set(Object.entries(e).filter(([,x])=>No(x)).map(([x])=>x));for(let[x,I]of[["BLOCK_KEY_GROUP",Oy],["KEY_GROUP",Ey]]){let y=Object.keys(I).filter(C=>C.startsWith(`${o}.`)).filter(C=>!i.has(C.slice(o.length+1)));if(y.length)throw new Error(`${o}: ${x} (lib/puck/field-groups.ts) lists ${JSON.stringify(y)}, 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 f=n?[]:[...a].filter(x=>!r.has(x));if(f.length)throw new Error(`${o}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(f)}, but this section has no such fold header${f.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 u=new Set(t.filter(x=>x.entries.length>0).map(x=>x.place)),p=wr.filter(x=>Py(x).some(I=>u.has(I))),m={};for(let x of p){m[We[x]]=_n(x,x===p[0]?p:null);for(let I of Py(x)){if(!u.has(I))continue;let y=t.filter(v=>v.place===I),C=y.findIndex(v=>v.adopted);C>0&&y.unshift(...y.splice(C,1)),x==="Design"&&(m[Cr[I]]=Ji(I));for(let v of y)for(let[T,w]of v.entries)m[T]=f_(I,w)}}return m}function jX(e){return We.Design in e?e:{[We.Design]:_n("Design",null),[Cr.Content]:Ji("Content"),...e}}function KX(e){return wr.some(o=>We[o]in e)}function VX(e){let o=wr.filter(a=>We[a]in e);if(o.length===0)return e;let t={...e};for(let a of o)t[We[a]]=_n(a,a===o[0]?o:null);return t}import{usePreviewDevice as x_}from"efficient-easel/draw/client";var $c=" text",Dy="Text";function qc(e){let o=e.rows.filter(t=>t.shown);return o.length===0||o.length===1&&o[0].labelled}function _y(e){return e.filter(qc).map(o=>o.key)}function Ny(e,o){let t=null;for(let a of o){let r=e[a];!r||r.marker!==!0||typeof r.fold!="string"||(t??={...e},t[a]={...r,fold:!1})}return t??e}function My(e,o){if(e.size!==o.size)return!1;for(let t of e)if(!o.has(t))return!1;return!0}var Kc=new Map,Jl=new Set;function I_(e,o){let t=new Map;for(let r of e.querySelectorAll(".es-insp-row[data-field]"))t.set(r.getAttribute("data-field")??"",r);let a=[];for(let[r,n]of o)a.push({key:r,rows:n.map(s=>{let i=t.get(s),f=!!i&&[...i.children].some(p=>!p.hidden),u=i?.querySelector(".es-field-label, .es-list-label")?.textContent?.trim();return{shown:f,labelled:f&&!!u}})});return a}var h_=Object.fromEntries(wr.map(e=>{let o=Ux[e];return[e,Vc(o,{},e)]}));function vr({entries:e,entryCount:o=0,part:t=null}){let{id:a,fields:r,values:n,readOnly:s,onChange:i}=p_(),f=x_(),{appState:u,config:p}=u_(W=>W),m=lg(f,p,u.data.content??[],u.ui.itemSelector),x=dg(r,t),I=ng(x,n,m),[y,C]=jc(()=>new Set(Jl)),[v,T]=jc(()=>new Set),w=d_(null),g=Hy(()=>{let W=new Map;for(let D of Wy(I).rows){if(!D.fold)continue;let ae=W.get(D.fold.key)??[];ae.push(D.name),W.set(D.fold.key,ae)}return W},[I]);c_(()=>{let W=w.current?.parentElement;if(!W)return;let D=new Set(_y(I_(W,g)));T(ae=>My(ae,D)?ae:D)});let b=Hy(()=>Ny(I,v),[I,v]),O={key:$c,rows:Array.from({length:o},()=>({shown:!0,labelled:!0}))},F=qc(O)?void 0:{key:$c,title:Dy},[L,P]=jc(()=>Kc.get(a)),M=Kc.get(a),z=Wy(I).buckets,B=M&&z.includes(M)?M:L&&z.includes(L)?L:z[0],A=B===void 0||$x(z,B)!==!0;return Vc(m_,{fields:b,values:n,onChange:i,readOnly:s,showWhenContext:{...m,node:n},tab:B,onTab:W=>{Kc.set(a,W),P(W)},tabIcons:h_,idPrefix:a,ariaLabel:l("Section settings"),lead:A?e:null,leadFold:F,closedFolds:y,onFold:(W,D)=>{D?Jl.delete(W):Jl.add(W),C(new Set(Jl))},children:Vc("span",{ref:w,hidden:!0})})}import{jsx as Yc,jsxs as g_}from"react/jsx-runtime";import{InspectorUpLevel as zy}from"efficient-easel/chrome";function Gy({nodeId:e,part:o,sectionName:t,onUpToSection:a}){let{select:r}=El();return g_("div",{children:[o!=="media"?Yc(zy,{inline:!0,name:l(ma.media),onSelect:()=>r(pr(e,"media"))}):Yc(zy,{inline:!0,name:l(t),onSelect:a}),Yc(vr,{part:o})]})}import{SettingsSwitch as E_}from"efficient-easel/panel";var Ky=T_,Jc={kind:"header"},ed={kind:"website"},Vy={kind:"chat"},Yy={kind:"social"},kr="Part";function O_(e){return l("Part of {name}",{name:l(e)})}function L_(e,o,t){let a=e.describeNode(o);return{name:t,kindLabel:a?O_(a.label):l(kr)}}function R_(e){switch(e){case"Header":return{title:l("Header settings belong to a website."),own:l("Each website created from this template sets its own header afterwards.")};case"Appearance":return{title:l("Appearance settings belong to a website."),own:l("Each website created from this template sets its own appearance afterwards.")};case"Live chat":return{title:l("Live chat settings belong to a website."),own:l("Each website created from this template sets its own live chat afterwards.")};case"Social link":return{title:l("Social link settings belong to a website."),own:l("Each website created from this template sets its own social link afterwards.")};default:return{title:l("{what} settings belong to a website.",{what:e}),own:l("Each website created from this template sets its own {what} afterwards.",{what:e.toLowerCase()})}}}function Xy({what:e}){let o=R_(e);return lt("div",{className:"sf-note",children:[Z("p",{children:Z("strong",{children:o.title})}),lt("p",{children:[l("A template is a blueprint \u2014 it has no website of its own, so there is nothing here to change.")," ",o.own]})]})}function Qc(e){let o=ur[e];return{name:ma[e],kindLabel:kr,icon:o,head:(t,a)=>{if(t.kind!==o)return null;let r=a.describeNode(t.nodeId);if(!r)return null;let n=jy({name:l(Bl(e,r.props)),tier:"part",of:l(r.label)},{partOf:({name:s})=>l("Part of {name}",{name:s})});return{name:n.name,kindLabel:n.kind}},render:(t,a)=>t.kind===o?Z(Gy,{nodeId:t.nodeId,part:e,sectionName:a.describeNode(t.nodeId)?.label??"Hero",onUpToSection:()=>a.onSelectNode(t.nodeId)}):null}}var A_={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{let t=o.hostPanels?.header;return t?Z(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)=>Z(xl,{themeFromDocument:!o.capabilities.hasSiteTheme,tokenRef:o.tokenRef,siteId:o.siteId,onNotify:o.onNotify})},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>Z(yg,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>Z(kg,{unavailable:Z(Xy,{what:"Social link"})})},ticker:{name:cr,kindLabel:kr,icon:"ticker",head:(e,o)=>e.kind==="ticker"?L_(o,e.heroId,l(cr)):null,render:e=>Z(Pg,{heroId:e.kind==="ticker"?e.heroId:""})},heroMedia:Qc("media"),heroImage:Qc("image"),heroImage2:Qc("image2"),part:{name:kr,kindLabel:kr,icon:"Text",head:(e,o)=>{if(e.kind!=="part")return null;let t=o.describeNode(e.nodeId);if(!t)return null;let{key:a,row:r}=oo(e.propKey),n=r?ga(t.fields[a],r):t.fields[a],s=MI(l(Sf(il(n??{},a))),r),i=jy({name:s,tier:"part",of:l(t.label)},{partOf:({name:f})=>l("Part of {name}",{name:f})});return{name:i.name,kindLabel:i.kind}},render:(e,o)=>e.kind==="part"?Z(ay,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},B_=new Set(["header","website","chat"]);function D_(e,o){if(e==="puck")return null;let t=A_[e];return B_.has(e)&&!o.hasSiteSettings?{...t,kindLabel:"Not part of a template",render:()=>Z(Xy,{what:t.name})}:t}function Zy({mode:e,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:a,hideNodeActions:r=!1,onNotify:n,onHidePanel:s}){let{capabilities:i,tokenRef:f,notifyParent:u,currentSlug:p,siteId:m,runAuthed:x,readOnly:I,navigate:y}=v_(),C=Sl(),{rows:v,reload:T}=sr(),w=v?.find(q=>q.slug===p)??null,[g,b]=Uy(null),{websiteName:O}=V(),F=k_({readOnly:I}),{select:L}=P_(),{selectedItem:P,getItemById:M,getSelectorForId:z,config:B,appState:A}=y_(q=>q),W=C_(B,P?{type:P.type,props:P.props}:null),D=P?jI(W??B.components[P.type]?.fields,P.props):[],ae=q=>B.components[q]?.label??q,ie=P?z(P.props.id):void 0,de=D_(e.kind,i),no=w_(),lo={capabilities:i,tokenRef:f,hostPanels:no.chrome?.panels,describeNode:q=>{let j=M(q);if(!j)return null;let Re=B.components[j.type];return{type:j.type,label:Re?.label??j.type,fields:Re?.fields??{},props:j.props??{}}},siteId:m,websiteName:O??null,notifyParent:u,onNotify:n,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:a},Le=de?.head?.(e,lo)??null,so=Le?.name??(de?l(de.name):P?l(ae(P.type)):l("Page settings")),_e=Le?.kindLabel??(de?l(de.kindLabel):P?ie&&ie.zone!==qy?l("Block"):l("Section"):l("Page")),Te=de?de.icon:P?P.type:"page",xe=de?null:P?B.components[P.type]?.fields??null:B.root?.fields??null,he=xe?By(xe):2,Ne=e.kind==="puck"&&P?hr(P.type):null,Pe=!!P&&!!ie&&ie.zone===qy&&P.type!==le&&P.type!==F_,io=Vl(A?.data,P),Me=()=>{io||ie&&F.duplicateComponent(ie.zone,ie.index)},Ge=()=>{ie&&(F.removeComponent(ie.zone,ie.index),F.select(null))},fo=P?B.components[P.type]?.defaultProps?.previewHover:void 0,co=e.kind==="puck"&&!!P&&!!ie&&fo!==void 0,Fo=co&&P.props.previewHover===!0,Ve=()=>{!P||!ie||F.replaceComponent(ie.zone,ie.index,{...P,props:{...P.props,previewHover:!Fo}})},[uo,E]=Uy(Gf);return lt("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right${uo||!(!de&&P)?"":" sf-hints-folded"}`,children:[Z(b_,{icon:Z(Rt,{type:Te,size:15}),name:so,kind:_e,actions:!r&&e.kind==="puck"&&P&&P.type!==le?lt(es,{children:[Z(Xc,{label:l("Duplicate section"),title:io??void 0,disabled:io!==null,onClick:Me,children:Z($y,{size:15})}),Pe&&i.hasSiteSettings&&Z(ry,{node:P,currentSlug:p,siteId:m??void 0,tokenRef:f,runAuthed:x,onNotify:n}),Z(Xc,{label:l("Remove section"),danger:!0,onClick:Ge,children:Z(S_,{size:15})}),s?Z(Zc,{side:"right",onHide:s,divider:!0}):null]}):!de&&!P&&e.kind==="puck"&&C&&w&&yl(w)?lt(es,{children:[Z(Xc,{label:l("Duplicate page"),onClick:()=>b(w),children:Z($y,{size:15})}),s?Z(Zc,{side:"right",onHide:s,divider:!0}):null]}):s?Z(Zc,{side:"right",onHide:s}):void 0}),C&&Z(Cl,{source:g,taken:new Set((v??[]).map(q=>q.slug)),duplicate:C,onClose:()=>b(null),onDuplicated:q=>{b(null),T(),y({kind:"page",slug:q.slug,siteId:m??void 0})}}),co&<("div",{className:"sf-preview-pin",children:[lt("div",{className:"sf-preview-pin-text",children:[Z("span",{className:"sf-preview-pin-label",children:l("Preview hover state")}),Z("span",{className:"sf-preview-pin-hint",children:l("not shown live")})]}),Z(E_,{checked:Fo,onChange:Ve,ariaLabel:l("Preview hover state")})]}),Z(gx,{tier:he,children:Z("div",{className:"sf-insp-body es-insp-body sf-scroll",children:de?de.render(e,lo):P?lt(es,{children:[P.type===le&&i.hasSiteSettings&&Z(by,{}),Z($p,{children:Z(vr,{entries:Z(ny,{parts:D,heading:!1,onOpen:q=>L(ll(P.props.id,q))}),entryCount:_c(D).length})}),Ne&&Z(Ul,{source:Ne,slug:Ir(P?.props),menuId:Wl(P?.props)}),Z(Uf,{shown:uo,onChange:E})]}):Z(es,{children:Z(vr,{})})})})]})}import{jsx as c,jsxs as S,Fragment as tb}from"react/jsx-runtime";var ye={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)"},od="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 R({w:e,h:o,tone:t="dark",r:a=2,style:r}){return c("div",{style:{width:e,height:o,borderRadius:a,background:ye[t],flex:"none",...r}})}var __={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",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",LegalLineBlock:"legalline",SearchBlock:"search",CartBlock:"cart",CountrySwitchBlock:"countryswitch"},N={position:"absolute",inset:0},d={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 zo({size:e,style:o}){let t=Math.max(2,Math.round(e*.13)),a=(r,n,s)=>({position:"absolute",inset:r,background:n,borderRadius:t,...s?{mixBlendMode:s}:null});return S("span",{style:{position:"absolute",display:"block",width:e,height:e,...o},children:[c("span",{style:a("8% 26% 30% 6%",d.mark1)}),c("span",{style:a("26% 6% 8% 30%",d.mark2,"multiply")})]})}function ts({children:e}){return c("span",{style:{fontSize:"4.64cqw",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:d.muted},children:e})}function Qy({over:e,overTone:o,head:t,headSize:a=11.5,cta:r,ctaBg:n,ctaFg:s,tone:i}){return S(tb,{children:[e&&c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:o},children:e}),c("span",{style:{fontSize:a,lineHeight:1.15,fontWeight:700,maxWidth:"78%",color:i},children:t}),r&&c("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:r})]})}function td({name:e,price:o}){return S("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[c("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",...fe(d.paper,d.paper2,150)},children:c(zo,{size:34,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),c("span",{style:{fontSize:"3.65cqw",fontWeight:600,color:d.text},children:e}),c("span",{style:{fontSize:"3.65cqw",color:d.muted},children:o})]})}function Wo({k:e,v:o,ok:t}){return S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,padding:"3.5px 2px",borderBottom:`1px solid ${d.rule}`,fontSize:"3.98cqw",color:d.muted},children:[c("span",{children:e}),S("span",{style:{display:"flex",gap:6,alignItems:"center"},children:[c("b",{style:{color:d.text,fontWeight:700},children:o}),t&&c("span",{style:{color:d.rust,fontWeight:700},children:"\u2713"})]})]})}function ne({title:e,children:o}){return S("div",{style:{...N,background:d.card,padding:"9px 10px",display:"flex",flexDirection:"column",gap:6},children:[c(ts,{children:e}),o]})}function Jy({size:e=14}){return c("span",{style:{width:e,height:e,borderRadius:"50%",flex:"none",display:"block",background:`linear-gradient(150deg,${d.mark1},${d.mark2})`}})}function ad({filled:e=5,size:o=6}){return S("span",{style:{fontSize:o,letterSpacing:"0.06em",color:d.rust,lineHeight:1},children:["\u2605".repeat(e),c("span",{style:{color:d.mark1},children:"\u2605".repeat(5-e)})]})}function Tr({n:e,label:o,tone:t=d.text}){return S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[c("b",{style:{fontSize:"8.16cqw",lineHeight:1,color:t},children:e}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",opacity:.62,color:t},children:o})]})}function ke({children:e,w:o}){return c("span",{style:{fontSize:"3.98cqw",lineHeight:1.45,color:d.muted,width:o,display:"block"},children:e})}function os({label:e,w:o="100%",filled:t}){return S("div",{style:{width:o,display:"flex",flexDirection:"column",gap:2},children:[c("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:d.muted},children:e}),c("span",{style:{height:9,borderRadius:3,border:`1px solid ${d.rule}`,background:t?d.paper:d.card}})]})}function eb({children:e}){return c("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:d.text,color:d.onInk},children:e})}var N_={wheelslisting:c(ne,{title:"All wheels",children:c("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])=>S("div",{style:{display:"flex",alignItems:"center",gap:6},children:[c("span",{style:{width:20,height:15,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",...fe(d.paper,d.paper2,150)},children:c(zo,{size:12,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),c("b",{style:{flex:1,fontSize:"4.31cqw",color:d.text},children:e}),c("span",{style:{fontSize:"3.65cqw",color:d.muted},children:o}),c("b",{style:{fontSize:"4.31cqw",color:d.text,width:26,textAlign:"right"},children:t})]},e))})}),catalogfilterbar:S("div",{style:{...N,background:d.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[S("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[["20 inch","6\xD7139.7","Black"].map(e=>S("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"4px 7px",borderRadius:99,background:d.text,color:d.onInk,display:"flex",gap:4,alignItems:"center"},children:[e,c("span",{style:{opacity:.6},children:"\u2715"})]},e)),c("span",{style:{fontSize:"3.65cqw",color:d.rust,fontWeight:700},children:"Clear"})]}),S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"128 results"}),c("span",{style:{fontSize:"3.65cqw",color:d.muted,border:`1px solid ${d.rule}`,borderRadius:3,padding:"3px 6px"},children:"Sort: Price \u25BE"})]})]}),fitmentfinder:S("div",{style:{...N,padding:"10px 12px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center",...fe(d.ink,d.inkSoft)},children:[c("span",{style:{fontSize:"5.31cqw",fontWeight:700,color:d.onInk},children:"Will it fit your rig?"}),S("div",{style:{display:"flex",gap:4},children:[["2021","Toyota","Hilux"].map(e=>S("span",{style:{flex:1,fontSize:"3.65cqw",color:d.text,background:d.card,borderRadius:3,padding:"5px 6px",display:"flex",justifyContent:"space-between"},children:[e," ",c("span",{style:{color:d.muted},children:"\u25BE"})]},e)),c("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.08em",background:d.warm,color:d.ink,borderRadius:3,padding:"5px 7px"},children:"GO"})]})]}),compatibletyres:c(ne,{title:"Tyres that suit",children:c("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])=>S("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[c("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",background:d.ink},children:c("span",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",width:26,height:26,borderRadius:"50%",border:`5px solid ${d.mark2}`,boxSizing:"border-box"}})}),c("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:d.text,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e}),c("span",{style:{fontSize:"3.32cqw",color:d.muted},children:o})]},e))})}),tyresizes:c(ne,{title:"Available sizes",children:c("div",{style:{flex:1,display:"flex",flexWrap:"wrap",gap:4,alignContent:"center"},children:["265/65R17","285/70R17","265/60R18","275/55R20"].map((e,o)=>c("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"5px 7px",borderRadius:3,border:`1px solid ${o===0?d.rust:d.rule}`,color:o===0?d.rust:d.text,background:o===0?d.paper:d.card},children:e},e))})}),tyrefitment:S(ne,{title:"Will it fit your car?",children:[c("div",{style:{display:"flex",gap:3},children:["Make","Model","Year","Trim"].map(e=>S("span",{style:{flex:1,minWidth:0,fontSize:"3.32cqw",color:d.muted,background:d.paper,border:`1px solid ${d.rule}`,borderRadius:3,padding:"4px 5px",display:"flex",justifyContent:"space-between",gap:2,overflow:"hidden",whiteSpace:"nowrap"},children:[e," ",c("span",{style:{color:d.muted},children:"\u25BE"})]},e))}),c("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])=>S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:6,borderTop:`1px solid ${d.rule}`,paddingTop:3},children:[c("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:d.text},children:e}),c("span",{style:{fontSize:"3.32cqw",fontWeight:t?700:400,letterSpacing:"0.06em",color:t?d.warm:d.muted},children:o})]},e))})]}),eutyrelabel:S("div",{style:{...N,background:d.card,padding:"9px 11px",display:"flex",gap:8,alignItems:"center"},children:[c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1.5},children:[["A","42%"],["B","56%"],["C","70%"],["D","84%"]].map(([e,o],t)=>S("div",{style:{display:"flex",alignItems:"center",gap:3},children:[c("span",{style:{width:o,height:6,borderRadius:"0 2px 2px 0",background:t===1?d.rust:d.mark1}}),c("span",{style:{fontSize:"3.32cqw",fontWeight:700,color:t===1?d.rust:d.muted},children:e})]},e))}),S("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:3,alignItems:"center"},children:[c("b",{style:{fontSize:"6.63cqw",lineHeight:1,color:d.text},children:"72"}),c("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",color:d.muted},children:"dB"})]})]}),bundleoffer:S("div",{style:{...N,background:d.paper,padding:"9px 11px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[c(ts,{children:"Buy it with"}),S("div",{style:{display:"flex",alignItems:"center",gap:5},children:[[0,1].map(e=>c("span",{style:{width:26,height:22,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",background:d.card},children:c(zo,{size:17,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})},e)),c("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:d.muted},children:"+"}),S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1},children:[c("span",{style:{fontSize:"3.65cqw",color:d.muted,textDecoration:"line-through"},children:"$1,024"}),c("b",{style:{fontSize:"6.02cqw",color:d.rust,lineHeight:1},children:"$899"})]})]})]}),checkoutcta:S("div",{style:{...N,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,...fe(d.ink,d.ink2)},children:[S("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",color:d.warm,fontWeight:700},children:"READY TO ORDER"}),c("b",{style:{fontSize:"6.63cqw",color:d.onInk,lineHeight:1},children:"$1,956"}),c("span",{style:{fontSize:"3.65cqw",color:d.onInk,opacity:.65},children:"4 items \xB7 fitted free"})]}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"6px 10px",borderRadius:2,background:d.warm,color:d.ink,flex:"none"},children:"CHECKOUT"})]}),contact:c(ne,{title:"Who do you need?",children:c("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])=>S("div",{style:{display:"flex",alignItems:"center",gap:5},children:[c("b",{style:{flex:1,fontSize:"4.31cqw",color:d.text},children:e}),c("span",{style:{fontSize:"3.65cqw",color:d.muted},children:o}),c("span",{style:{fontSize:"4.64cqw",color:d.rust,lineHeight:1},children:"\u203A"})]},e))})}),contactlocations:c(ne,{title:"Find us",children:c("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])=>S("div",{style:{border:`1px solid ${d.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[c("b",{style:{fontSize:"4.31cqw",color:d.text},children:e}),c("span",{style:{fontSize:"3.32cqw",color:d.muted},children:o}),c("span",{style:{fontSize:"3.32cqw",color:d.rust,fontWeight:700},children:t})]},e))})}),form:c(ne,{title:"Send us a message",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[S("div",{style:{display:"flex",gap:5},children:[c(os,{label:"Name"}),c(os,{label:"Email"})]}),c(os,{label:"Message",filled:!0}),c(eb,{children:"SEND"})]})}),appointmentbooking:c(ne,{title:"Book a fitting",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[c("div",{style:{display:"flex",gap:3},children:["Mon","Tue","Wed","Thu"].map((e,o)=>c("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",fontWeight:o===2?700:500,padding:"4px 0",borderRadius:3,background:o===2?d.text:d.paper,color:o===2?d.onInk:d.muted},children:e},e))}),c("div",{style:{display:"flex",gap:3},children:["8:00","10:30","13:00","15:30"].map((e,o)=>c("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",padding:"4px 0",borderRadius:3,border:`1px solid ${o===1?d.rust:d.rule}`,color:o===1?d.rust:d.muted,background:o===3?d.paper:d.card,textDecoration:o===3?"line-through":"none"},children:e},e))})]})}),reviewform:c(ne,{title:"Leave a review",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[c(ad,{filled:4,size:14}),c(os,{label:"Your review",filled:!0}),c(eb,{children:"POST"})]})}),submitbuild:c(ne,{title:"Show us your build",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,border:`1px dashed ${d.mark1}`,borderRadius:5,background:d.paper},children:[c("span",{style:{fontSize:"6.63cqw",lineHeight:1,color:d.rust,fontWeight:300},children:"+"}),c("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"Drop a photo of your rig"})]})}),masthead:S("div",{style:{...N,background:d.paper,display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 13px",gap:5},children:[c("span",{style:{height:1.5,background:d.text}}),c("span",{style:{fontSize:"7.65cqw",fontWeight:800,letterSpacing:"0.02em",color:d.text,lineHeight:1},children:"THE TRACK"}),S("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"3.65cqw",letterSpacing:"0.1em",textTransform:"uppercase",color:d.muted},children:[c("span",{children:"Issue 14"}),c("span",{children:"Spring 2026"})]}),c("span",{style:{height:1,background:d.rule}})]}),featuredcover:S("div",{style:{...N,overflow:"hidden",...fe(d.ink,d.inkSoft2)},children:[c(zo,{size:92,style:{right:-18,top:-14}}),c("div",{style:{position:"absolute",inset:0,background:`linear-gradient(0deg,${d.scrim},transparent 62%)`}}),S("div",{style:{position:"absolute",left:12,right:12,bottom:11,display:"flex",flexDirection:"column",gap:3},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:d.warm},children:"FEATURE"}),c("span",{style:{fontSize:"6.16cqw",lineHeight:1.15,fontWeight:700,color:d.onInk},children:"Four days on the Madigan Line"})]})]}),longread:S("div",{style:{...N,background:d.card,padding:"10px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.14em",fontWeight:700,color:d.rust},children:"12 MIN READ"}),c("span",{style:{fontSize:"6.02cqw",lineHeight:1.15,fontWeight:700,color:d.text},children:"What breaks first, and why"}),c(ke,{children:"Every failure starts in the same place \u2014 not the rim, not"}),c(ke,{w:"62%",children:"the tyre, but the bolt nobody re-torqued."})]}),series:c(ne,{title:"Recurring columns",children:c("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])=>S("div",{style:{display:"flex",alignItems:"center",gap:6},children:[c("span",{style:{width:3,height:12,borderRadius:2,background:d.rust,flex:"none"}}),c("b",{style:{flex:1,fontSize:"4.64cqw",color:d.text},children:e}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:d.muted},children:o})]},e))})}),events:c(ne,{title:"Latest posts",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[[d.inkSoft,d.inkSoft2,"Madigan Line, four days"],[d.rust,d.warm,"Why offset beats width"]].map(([e,o,t])=>S("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[c("span",{style:{width:24,height:18,borderRadius:3,flex:"none",...fe(e,o,150)}}),S("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[c("b",{style:{fontSize:"4.31cqw",color:d.text},children:t}),c("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"4 Sep \xB7 Shed Notes"})]})]},t))})}),docmasthead:S("div",{style:{...N,background:d.card,padding:"12px 14px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:d.muted},children:"POLICY"}),c("span",{style:{fontSize:"6.49cqw",fontWeight:700,color:d.text,lineHeight:1.1},children:"Returns & refunds"}),c("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"Version 3 \xB7 Updated 4 Sep 2026"}),c("span",{style:{height:2,width:26,background:d.rust,borderRadius:1}})]}),docbody:c("div",{style:{...N,background:d.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])=>S("div",{style:{display:"flex",gap:5},children:[c("b",{style:{fontSize:"3.98cqw",color:d.rust,flex:"none"},children:e}),c(ke,{children:o})]},e))}),docmetacards:c(ne,{title:"At a glance",children:c("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])=>S("div",{style:{border:`1px solid ${d.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[c("b",{style:{fontSize:"5.31cqw",color:d.text,lineHeight:1},children:e}),c("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:d.muted},children:o})]},o))})}),doctabs:S("div",{style:{...N,background:d.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:0,padding:"0 11px"},children:[c("div",{style:{display:"flex",gap:0},children:["Returns","Warranty","Shipping"].map((e,o)=>c("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"5px 8px",color:o===0?d.text:d.muted,background:o===0?d.paper:"transparent",borderRadius:"4px 4px 0 0",border:`1px solid ${o===0?d.rule:"transparent"}`,borderBottom:"none"},children:e},e))}),c("span",{style:{height:1,background:d.rule}}),S("div",{style:{paddingTop:6,display:"flex",flexDirection:"column",gap:2},children:[c(ke,{children:"Unfitted wheels come back within 30 days, no questions."}),c(ke,{w:"58%",children:"Freight on a change of mind is yours."})]})]}),paragraphs:S("div",{style:{...N,background:d.card,padding:"11px 14px",display:"flex",gap:10,alignItems:"center"},children:[c("span",{style:{flex:1,fontSize:"5.86cqw",lineHeight:1.2,fontWeight:700,color:d.text},children:"The right wheel is the boring one."}),S("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[c(ke,{children:"Forged, correctly offset, rated for what you actually"}),c(ke,{children:"carry. Everything else is a photograph."})]})]}),keyfeatures:c(ne,{title:"Key features",children:c("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=>S("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[c("span",{style:{fontSize:"4.64cqw",color:d.rust,fontWeight:700,lineHeight:1},children:"\u2713"}),c("span",{style:{fontSize:"4.31cqw",color:d.text},children:e})]},e))})}),statsparagraph:S("div",{style:{...N,background:d.paper,padding:"10px 12px",display:"flex",gap:10,alignItems:"center"},children:[S("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:5},children:[c(Tr,{n:"27k",label:"Rigs"}),c(Tr,{n:"4.9",label:"Rating"})]}),S("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[c(ke,{children:"Twelve years of fitting the same three questions, and the"}),c(ke,{children:"answer has not moved: load rating, offset, then looks."})]})]}),chart:S(ne,{title:"Load vs weight",children:[c("div",{style:{flex:1,display:"flex",alignItems:"flex-end",gap:5,paddingBottom:2},children:[38,62,84,71,96].map((e,o)=>c("span",{style:{flex:1,height:`${e}%`,borderRadius:"2px 2px 0 0",background:o===4?d.rust:d.mark1}},o))}),c("span",{style:{height:1,background:d.rule,marginTop:-4}})]}),mockup:c("div",{style:{...N,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",...fe(d.inkSoft,d.ink)},children:S("div",{style:{width:"72%",height:"74%",borderRadius:4,overflow:"hidden",background:d.card,boxShadow:`0 6px 14px ${d.scrim}`},children:[c("div",{style:{height:9,background:d.paper,display:"flex",alignItems:"center",gap:2,padding:"0 4px"},children:[0,1,2].map(e=>c("span",{style:{width:2.5,height:2.5,borderRadius:"50%",background:d.mark1}},e))}),S("div",{style:{padding:5,display:"flex",flexDirection:"column",gap:3},children:[c("span",{style:{height:4,width:"56%",borderRadius:1,background:d.mark2}}),c("span",{style:{height:14,borderRadius:2,...fe(d.paper,d.paper2,150)}}),c("span",{style:{height:3,width:"38%",borderRadius:1,background:d.rust}})]})]})}),manifesto:c("div",{style:{...N,overflow:"hidden",display:"flex",alignItems:"center",padding:"0 16px",...fe(d.ink,d.ink2)},children:S("span",{style:{fontSize:"6.63cqw",lineHeight:1.2,fontWeight:700,color:d.onInk},children:["We build for the ",c("span",{style:{color:d.warm},children:"last"})," ten percent of the track."]})}),timeline:c(ne,{title:"Our story",children:c("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)=>S("div",{style:{display:"flex",gap:7,alignItems:"flex-start",position:"relative"},children:[t<2&&c("span",{style:{position:"absolute",left:3,top:8,bottom:-8,width:1,background:d.rule}}),c("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",marginTop:1,background:d.rust,zIndex:1}}),S("div",{style:{display:"flex",flexDirection:"column",gap:0,minWidth:0},children:[c("b",{style:{fontSize:"4.64cqw",color:d.text},children:e}),c(ke,{children:o})]})]},e))})}),timelinetrack:S("div",{style:{...N,padding:"0 12px",display:"flex",flexDirection:"column",gap:10,justifyContent:"center",...fe(d.ink,d.inkSoft)},children:[c("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:d.warm},children:"Milestones"}),S("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",paddingTop:7},children:[c("span",{style:{position:"absolute",left:0,right:0,top:3,height:1,background:d.mark2,opacity:.55}}),["1998","2009","2016","2024"].map((e,o)=>S("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,position:"relative"},children:[c("span",{style:{position:"absolute",top:-7,width:6,height:6,borderRadius:"50%",background:o===3?d.warm:d.mark1}}),c("span",{style:{fontSize:"4.31cqw",fontWeight:700,color:o===3?d.warm:d.onInk,opacity:o===3?1:.75},children:e})]},e))]})]}),footprint:S("div",{style:{...N,overflow:"hidden",...fe(d.paper,d.paper2,150)},children:[c("span",{style:{position:"absolute",left:"8%",top:"18%",width:"62%",height:"64%",borderRadius:"48% 52% 40% 60% / 55% 45% 55% 45%",background:d.mark1,opacity:.75}}),c("span",{style:{position:"absolute",left:"52%",top:"52%",width:"34%",height:"34%",borderRadius:"58% 42% 55% 45% / 45% 58% 42% 55%",background:d.mark2,opacity:.55}}),[["26%","38%"],["44%","58%"],["62%","34%"]].map(([e,o])=>c("span",{style:{position:"absolute",left:e,top:o,width:7,height:7,borderRadius:"50% 50% 50% 0",transform:"rotate(-45deg)",background:d.rust}},e)),c("span",{style:{position:"absolute",left:11,bottom:9,fontSize:"4.64cqw",fontWeight:700,color:d.text},children:"3 fitting bays"})]}),banner:S("div",{style:{...N,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,background:d.rust},children:[S("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[c("b",{style:{fontSize:"6.02cqw",color:d.onInk},children:"End of season \xB7 20% off"}),c("span",{style:{fontSize:"3.98cqw",color:d.onInk,opacity:.8},children:"Fitted free, this month only."})]}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:d.onInk,color:d.text,flex:"none"},children:"SHOP"})]}),titlewithbuttons:S("div",{style:{...N,background:d.paper,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:7,padding:"0 14px",textAlign:"center"},children:[c("span",{style:{fontSize:"6.49cqw",lineHeight:1.15,fontWeight:700,color:d.text},children:"Not sure what fits?"}),S("div",{style:{display:"flex",gap:5},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:d.text,color:d.onInk},children:"FIND MY FIT"}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,border:`1px solid ${d.text}`,color:d.text},children:"CALL US"})]})]}),ticker:c("div",{style:{...N,overflow:"hidden",background:d.ink,display:"flex",alignItems:"center"},children:c("span",{style:{whiteSpace:"nowrap",fontSize:"6.29cqw",fontWeight:800,letterSpacing:"0.06em",color:d.warm,marginLeft:-14},children:"FREE FITTING \xB7 48HR DISPATCH \xB7 FREE FITTING \xB7 48HR DISPATCH"})}),countdown:S("div",{style:{...N,padding:"10px 12px",display:"flex",flexDirection:"column",alignItems:"center",gap:6,justifyContent:"center",...fe(d.ink,d.ink2)},children:[c("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.16em",textTransform:"uppercase",color:d.muted},children:"Back online in"}),c("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[["23","Hours"],["59","Minutes"],["48","Seconds"]].map(([e,o],t)=>S("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[t>0&&c("b",{style:{fontSize:"9.5cqw",lineHeight:1,color:d.warm},children:":"}),S("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[c("b",{style:{fontSize:"11.5cqw",lineHeight:1,color:d.onInk,fontVariantNumeric:"tabular-nums"},children:e}),c("span",{style:{fontSize:"3.2cqw",letterSpacing:"0.1em",textTransform:"uppercase",opacity:.62,color:d.onInk},children:o})]})]},o))})]}),breadcrumb:c("div",{style:{...N,background:d.card,display:"flex",alignItems:"center",padding:"0 13px"},children:S("span",{style:{fontSize:"4.64cqw",color:d.muted},children:["Home ",c("span",{style:{opacity:.5},children:"/"})," Wheels ",c("span",{style:{opacity:.5},children:"/"})," ",c("span",{style:{color:d.text,fontWeight:700},children:"20 inch"})]})}),categorybar:S("div",{style:{...N,background:d.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[c("div",{style:{display:"flex",gap:5},children:["All","Wheels","Tyres","Lift"].map((e,o)=>c("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"4px 7px",borderRadius:99,background:o===0?d.text:d.paper,color:o===0?d.onInk:d.muted},children:e},e))}),c("span",{style:{height:1,background:d.rule}})]}),intro:S("div",{style:{...N,overflow:"hidden",background:d.card},children:[c("div",{style:{position:"absolute",inset:0,...fe(d.ink,d.inkSoft2)}}),c(zo,{size:64,style:{right:8,top:6}}),S("div",{style:{position:"absolute",left:16,right:16,bottom:8,top:"46%",background:d.paper,borderRadius:6,padding:"8px 11px",display:"flex",flexDirection:"column",gap:2,boxShadow:`0 -4px 10px ${d.scrim}`},children:[c("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:d.text},children:"Since 1998"}),c(ke,{children:"One shed, one lathe, one idea."}),c(ke,{w:"66%",children:"It turned out to be right."})]})]}),gallerygrid:c(ne,{title:"From our customers",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gridTemplateRows:"repeat(2,1fr)",gap:4,minHeight:0},children:[[d.rust,d.warm],[d.inkSoft,d.ink],[d.paper2,d.mark2],[d.ink,d.inkSoft2],[d.warm,d.paper2],[d.mark2,d.inkSoft]].map(([e,o],t)=>c("div",{style:{borderRadius:3,...fe(e,o,140+t*22)}},t))})}),gallery:S(ne,{title:"Gallery",children:[c("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:-2},children:["On the truck","Studio","Close-ups"].map((e,o)=>c("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,color:o===0?d.text:d.muted,borderBottom:`1.5px solid ${o===0?d.rust:"transparent"}`,paddingBottom:2},children:e},e))}),c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:[[d.rust,d.warm],[d.ink,d.inkSoft],[d.paper2,d.mark2]].map(([e,o],t)=>c("div",{style:{borderRadius:3,...fe(e,o,150+t*20)}},t))})]}),ordersummary:S(ne,{title:"Order summary",children:[S("div",{style:{display:"flex",gap:6,alignItems:"center",paddingBottom:4},children:[c("span",{style:{width:26,height:26,borderRadius:4,position:"relative",overflow:"hidden",flex:"none",...fe(d.paper,d.paper2,150)},children:c(zo,{size:18,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),S("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[c("b",{style:{fontSize:"4.31cqw",color:d.text},children:"Ridge Grappler"}),c("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"20\xD79 +12 \xB7 qty 4"})]})]}),S("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[c(Wo,{k:"Subtotal",v:"$1,956"}),c(Wo,{k:"Fitting",v:"Free"}),S("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:5,fontSize:"4.64cqw"},children:[c("b",{style:{color:d.text},children:"Total"}),c("b",{style:{color:d.text,fontSize:"6.02cqw"},children:"$1,956"})]})]})]}),deliveryoptions:c(ne,{title:"Delivery",children:c("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,a])=>S("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"5px 6px",borderRadius:4,border:`1px solid ${a?d.rust:d.rule}`,background:a?d.paper:d.card},children:[c("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",border:`1.5px solid ${a?d.rust:d.mark1}`,background:a?d.rust:"transparent"}}),c("span",{style:{flex:1,fontSize:"4.31cqw",fontWeight:600,color:d.text},children:e}),c("span",{style:{fontSize:"3.98cqw",color:d.muted},children:o}),c("b",{style:{fontSize:"4.31cqw",color:d.text},children:t})]},e))})}),paymentbadges:S("div",{style:{...N,background:d.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[c(ts,{children:"Ways to pay"}),c("div",{style:{display:"flex",gap:5},children:[["VISA",d.ink],["MC",d.rust],["AMEX",d.inkSoft],["PayPal",d.ink2]].map(([e,o])=>c("span",{style:{flex:1,textAlign:"center",fontSize:"3.65cqw",fontWeight:800,letterSpacing:"0.06em",color:d.onInk,borderRadius:3,padding:"6px 0",background:o},children:e},e))})]}),stats:S("div",{style:{...N,padding:"10px 12px",display:"flex",flexDirection:"column",gap:9,justifyContent:"center",...fe(d.ink,d.ink2)},children:[c("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:d.warm},children:"By the numbers"}),S("div",{style:{display:"flex",gap:8},children:[c(Tr,{n:"27k",label:"Rigs fitted",tone:d.onInk}),c(Tr,{n:"12",label:"Years",tone:d.onInk}),c(Tr,{n:"4.9",label:"Avg rating",tone:d.warm})]})]}),testimonials:S("div",{style:{...N,overflow:"hidden",background:d.paper,padding:"10px 11px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center"},children:[c("span",{style:{position:"absolute",right:10,top:2,fontSize:"22.4cqw",lineHeight:1,fontWeight:800,color:d.rust,opacity:.16},children:"\u201D"}),c(ad,{filled:5,size:7}),c("span",{style:{position:"relative",fontSize:"5.31cqw",lineHeight:1.35,color:d.text,fontWeight:600},children:"\u201CTook them out to the Simpson and back. Not one chip.\u201D"}),S("div",{style:{display:"flex",alignItems:"center",gap:5},children:[c(Jy,{}),c("span",{style:{fontSize:"3.98cqw",color:d.muted},children:"Dave M. \xB7 Hilux N80"})]})]}),reviews:S(ne,{title:"Reviews",children:[c("div",{style:{display:"flex",gap:4,height:22},children:[[d.inkSoft,d.inkSoft2],[d.rust,d.warm],[d.ink,d.inkSoft],[d.mark2,d.mark1]].map(([e,o],t)=>c("div",{style:{flex:1,borderRadius:3,...fe(e,o,140+t*15)}},t))}),c("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])=>S("div",{style:{display:"flex",gap:5,alignItems:"flex-start"},children:[c(Jy,{size:12}),S("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[S("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[c("b",{style:{fontSize:"3.98cqw",color:d.text},children:e}),c(ad,{filled:o})]}),c(ke,{children:t})]})]},e))})]}),logos:S("div",{style:{...N,display:"flex",flexDirection:"column",gap:9,justifyContent:"center",padding:"0 12px",...fe(d.ink,d.inkSoft)},children:[c("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:d.warm},children:"As fitted by"}),c("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:8},children:["ARB","TJM","IRONMAN","OPPOSITE"].map(e=>c("span",{style:{textAlign:"center",fontSize:"4.31cqw",fontWeight:800,letterSpacing:"0.08em",color:d.onInk,opacity:.82},children:e},e))})]}),prose:S("div",{style:{...N,background:d.paper,padding:"11px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[c("span",{style:{fontSize:"5.86cqw",fontWeight:700,color:d.text},children:"Why offset matters"}),S("div",{style:{display:"flex",gap:6},children:[c("span",{style:{fontSize:"15.3cqw",lineHeight:.78,fontWeight:800,color:d.rust,marginTop:1},children:"T"}),S("div",{style:{display:"flex",flexDirection:"column"},children:[c(ke,{children:"he number on the back of your wheel decides whether the"}),c(ke,{w:"76%",children:"tyre sits under the guard or an inch outside it."})]})]})]}),cards:c(ne,{title:"What you get",children:c("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])=>S("div",{style:{border:`1px solid ${d.rule}`,borderRadius:4,padding:6,display:"flex",flexDirection:"column",gap:2},children:[c("span",{style:{width:11,height:11,borderRadius:3,background:d.rust,opacity:.9}}),c("b",{style:{fontSize:"3.98cqw",color:d.text},children:e}),c(ke,{children:o})]},e))})}),faq:c(ne,{title:"Questions",children:c("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])=>S("div",{style:{borderBottom:`1px solid ${d.rule}`,padding:"4px 2px"},children:[S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6},children:[c("b",{style:{fontSize:"4.31cqw",color:d.text},children:e}),c("span",{style:{fontSize:"4.64cqw",color:d.muted,lineHeight:1},children:o?"\u2212":"+"})]}),o&&c(ke,{w:"90%",children:"Use the fitment finder \u2014 it reads your build, not just the model."})]},e))})}),hero:S("div",{style:{...N,overflow:"hidden",...fe(d.ink,d.ink2)},children:[c("div",{style:{...N,background:`linear-gradient(90deg,${d.scrim},transparent 70%)`}}),c("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",padding:"12px 14px",gap:5},children:c(Qy,{over:"NEW \xB7 SUMMER",overTone:d.warm,head:"Built for the worst road you own",cta:"SHOP ALL",ctaBg:d.warm,ctaFg:d.ink,tone:d.onInk})}),c(zo,{size:104,style:{right:-24,bottom:-30}})]}),herosingle:S("div",{style:{...N,display:"flex",background:d.paper,overflow:"hidden"},children:[c("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:c(Qy,{over:"ALL-TERRAIN",overTone:d.rust,head:"Grip that does not ask",headSize:12,cta:"EXPLORE",ctaBg:d.text,ctaFg:d.onInk,tone:d.text})}),c("div",{style:{flex:1,position:"relative",...fe(d.inkSoft,d.inkSoft2)},children:c(zo,{size:74,style:{right:-14,top:16}})})]}),productgrid:c(ne,{title:"Best sellers",children:S("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[c(td,{name:"Ridge 19",price:"$365"}),c(td,{name:"Ridge 29",price:"$410"}),c(td,{name:"Ridge 39",price:"$455"})]})}),collections:c(ne,{title:"Shop by category",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Wheels",d.inkSoft,d.inkSoft2],["Tyres",d.rust,d.warm],["Lift kits",d.ink,d.inkSoft]].map(([e,o,t])=>c("div",{style:{borderRadius:4,display:"flex",alignItems:"flex-end",padding:5,color:d.onInk,...fe(o,t)},children:c("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.04em"},children:e})},e))})}),producthero:S("div",{style:{...N,display:"flex",background:d.card,overflow:"hidden"},children:[c("div",{style:{flex:1.1,position:"relative",...fe(d.paper,d.paper2,150)},children:c(zo,{size:78,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),S("div",{style:{flex:1,padding:"10px 10px 10px 8px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:d.rust},children:"NITTO"}),c("b",{style:{fontSize:"6.29cqw",color:d.text},children:"Ridge Grappler"}),c("span",{style:{fontSize:"6.63cqw",fontWeight:700,color:d.text},children:"$489"}),c("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,background:d.text,color:d.onInk},children:"ADD TO CART"})]})]}),spectable:c(ne,{title:"Specifications",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[c(Wo,{k:"Diameter",v:'20"'}),c(Wo,{k:"Width",v:"9.0J"}),c(Wo,{k:"Offset",v:"+12"}),c(Wo,{k:"Load",v:"1250 kg"})]})}),fitmenttable:c(ne,{title:"Will it fit?",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[c(Wo,{k:"Hilux N80",v:"20\xD79 +12",ok:!0}),c(Wo,{k:"Ranger PX3",v:"20\xD79 +12",ok:!0}),c(Wo,{k:"LC79",v:"17\xD78 \u221210",ok:!0})]})}),processsteps:S("div",{style:{...N,background:d.paper,padding:10,display:"flex",flexDirection:"column",gap:7,justifyContent:"center"},children:[c(ts,{children:"How it works"}),c("div",{style:{display:"flex",gap:6},children:["Pick your rig","Match the fit","We fit it"].map((e,o)=>S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[c("span",{style:{width:11,height:11,borderRadius:"50%",background:d.text,color:d.onInk,fontSize:"3.98cqw",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700},children:o+1}),c("span",{style:{fontSize:"3.98cqw",color:d.text,fontWeight:600},children:e})]},e))})]}),detailrows:c("div",{style:{...N,background:d.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 a=c("div",{style:{flex:1,...fe(t?d.rust:d.inkSoft,t?d.warm:d.inkSoft2)}},"art"),r=S("div",{style:{flex:1.1,padding:8,display:"flex",flexDirection:"column",gap:2,justifyContent:"center"},children:[c("b",{style:{fontSize:"4.64cqw",color:d.text},children:e}),c("span",{style:{fontSize:"3.98cqw",color:d.muted,lineHeight:1.3},children:o})]},"tx");return c("div",{style:{flex:1,display:"flex",minHeight:0},children:t?[r,a]:[a,r]},e)})}),specstrip:c("div",{style:{...N,background:d.ink,color:d.onInk,display:"flex",alignItems:"center",justifyContent:"space-around",padding:"0 8px"},children:[["5 yr","Warranty"],["Free","Fitting"],["48 hr","Dispatch"]].map(([e,o])=>S("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[c("b",{style:{fontSize:"5.69cqw",letterSpacing:"0.02em"},children:e}),c("span",{style:{fontSize:"3.65cqw",color:d.mark2,letterSpacing:"0.1em",textTransform:"uppercase"},children:o})]},o))})},ob={subscribe:S("div",{style:{...N,padding:13,display:"flex",flexDirection:"column"},children:[S("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[S("div",{style:{display:"flex",alignItems:"center",gap:6},children:[c(R,{w:8,h:8,r:2,tone:"accent"}),c(R,{w:38,h:7,r:3,tone:"dark"}),c(R,{w:16,h:7,r:3,tone:"accent"})]}),c(R,{w:38,h:4,r:2,tone:"soft"})]}),c("div",{style:{height:1,background:ye.line,marginBottom:10}}),S("div",{style:{flex:1,display:"flex",gap:10,border:`1px solid ${ye.line}`,borderRadius:7,padding:10},children:[S("div",{style:{flex:1.1,display:"flex",flexDirection:"column",justifyContent:"center",gap:5},children:[c(R,{w:"46%",h:3,r:2,tone:"accent"}),c(R,{w:"84%",h:8,r:4,tone:"dark"}),c(R,{w:"56%",h:8,r:4,tone:"accent"}),c(R,{w:"96%",h:3,r:2,tone:"soft",style:{marginTop:2}}),S("div",{style:{display:"flex",gap:5,marginTop:4},children:[c("div",{style:{flex:1,height:13,borderRadius:5,border:`1px solid ${ye.line}`,background:ye.block}}),c(R,{w:34,h:13,r:5,tone:"accent"})]})]}),S("div",{style:{flex:1,background:ye.block,borderRadius:6,padding:8,display:"flex",flexDirection:"column",gap:6},children:[c(R,{w:"52%",h:4,r:2,tone:"accent"}),Array.from({length:3}).map((e,o)=>S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,borderTop:o?`1px solid ${ye.line}`:"none",paddingTop:o?4:0},children:[c(R,{w:34,h:4,r:2,tone:"dark"}),c(R,{w:16,h:3,r:2,tone:"soft"})]},o))]})]})]}),split:S("div",{style:{...N,display:"flex"},children:[c("div",{style:{width:"44%",background:od}}),S("div",{style:{flex:1,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[c(R,{w:"44%",h:5,r:3,tone:"accent"}),c(R,{w:"88%",h:8,r:4,tone:"dark"}),c(R,{w:"70%",h:8,r:4,tone:"dark"}),c(R,{w:"94%",h:5,r:2,tone:"soft",style:{marginTop:2}}),c(R,{w:"80%",h:5,r:2,tone:"soft"}),c(R,{w:"40%",h:13,r:6,tone:"accent",style:{marginTop:5}})]})]}),sectionheader:S(tb,{children:[c(R,{w:"18%",h:6,r:3,tone:"accent",style:{position:"absolute",top:15,right:16}}),S("div",{style:{...N,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},children:[S("div",{style:{display:"flex",alignItems:"center",gap:9},children:[c(R,{w:16,h:16,r:4,tone:"accent"}),c(R,{w:"20%",h:9,r:4,tone:"dark"})]}),c(R,{w:"62%",h:10,r:5,tone:"dark"}),c(R,{w:"42%",h:6,r:3,tone:"soft"})]})]}),header:c("div",{style:{...N,padding:14,display:"flex",flexDirection:"column",justifyContent:"center"},children:S("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[c(R,{w:"22%",h:12,r:4,tone:"dark"}),S("div",{style:{display:"flex",gap:9,alignItems:"center"},children:[c(R,{w:26,h:6,r:3,tone:"soft"}),c(R,{w:26,h:6,r:3,tone:"soft"}),c(R,{w:26,h:6,r:3,tone:"soft"}),c(R,{w:18,h:14,r:5,tone:"accent"})]})]})}),footer:S("div",{style:{...N,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:12},children:[S("div",{style:{display:"flex",gap:14},children:[S("div",{style:{flex:1.4,display:"flex",flexDirection:"column",gap:6},children:[c(R,{w:"60%",h:9,r:4,tone:"dark"}),c(R,{w:"90%",h:5,r:2,tone:"soft"}),c(R,{w:"70%",h:5,r:2,tone:"soft"})]}),[0,1].map(e=>S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[c(R,{w:"50%",h:6,r:3,tone:"dark"}),c(R,{w:"80%",h:5,r:2,tone:"soft"}),c(R,{w:"66%",h:5,r:2,tone:"soft"})]},e))]}),c("div",{style:{height:1,background:ye.line}}),S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c(R,{w:"30%",h:5,r:2,tone:"soft"}),c(R,{w:"16%",h:5,r:2,tone:"soft"})]})]}),grid:c("div",{style:{...N,padding:14,display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr",gap:9},children:Array.from({length:4}).map((e,o)=>c("div",{style:{borderRadius:6,background:ye.block}},o))}),blanksection:c("div",{style:{...N,padding:14,display:"flex"},children:S("div",{style:{flex:1,border:`1px dashed ${ye.line}`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[c(R,{w:14,h:2,r:1,tone:"tint"}),c(R,{w:2,h:14,r:1,tone:"tint",style:{position:"absolute"}})]})}),spacer:S("div",{style:{...N,padding:14,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[c(R,{w:"100%",h:6,r:3,tone:"soft"}),c(R,{w:16,h:22,r:3,tone:"block",style:{alignSelf:"center"}}),c(R,{w:"100%",h:6,r:3,tone:"soft"})]}),divider:c("div",{style:{...N,padding:14,display:"flex",alignItems:"center"},children:c(R,{w:"100%",h:3,r:2,tone:"dark"})}),customhtml:S("div",{style:{...N,display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:od},children:[c(R,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(-14deg)"}}),c(R,{w:16,h:10,r:3,tone:"accent"}),c(R,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(14deg)"}})]}),heading:c("div",{style:{...N,padding:14,display:"flex",alignItems:"center"},children:c(R,{w:"64%",h:13,r:4,tone:"dark"})}),text:S("div",{style:{...N,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[c(R,{w:"100%",h:6,r:3,tone:"soft"}),c(R,{w:"96%",h:6,r:3,tone:"soft"}),c(R,{w:"100%",h:6,r:3,tone:"soft"}),c(R,{w:"58%",h:6,r:3,tone:"soft"})]}),image:c("div",{style:{position:"absolute",inset:14,borderRadius:7,background:od}}),button:c("div",{style:{...N,display:"flex",alignItems:"center",justifyContent:"center"},children:c(R,{w:"34%",h:16,r:8,tone:"accent"})}),menu:S("div",{style:{...N,padding:"14px 22%",display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[c(R,{w:"48%",h:7,r:3,tone:"dark"}),c(R,{w:"82%",h:5,r:2,tone:"soft"}),c(R,{w:"66%",h:5,r:2,tone:"soft"}),c(R,{w:"74%",h:5,r:2,tone:"soft"}),c(R,{w:"58%",h:5,r:2,tone:"soft"})]}),emailform:S("div",{style:{...N,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[c(R,{w:"56%",h:8,r:3,tone:"dark"}),S("div",{style:{display:"flex",gap:6},children:[c("div",{style:{flex:1,height:16,borderRadius:5,border:`1px solid ${ye.line}`}}),c(R,{w:"30%",h:16,r:5,tone:"accent"})]})]}),sociallogos:c("div",{style:{...N,display:"flex",alignItems:"center",justifyContent:"center",gap:9},children:[0,1,2,3].map(e=>c(R,{w:16,h:16,r:8,tone:"dark"},e))}),search:c("div",{style:{...N,padding:"0 18%",display:"flex",alignItems:"center"},children:S("div",{style:{flex:1,height:22,borderRadius:11,border:`1px solid ${ye.line}`,display:"flex",alignItems:"center",gap:7,padding:"0 9px"},children:[c("div",{style:{width:9,height:9,borderRadius:5,border:`2px solid ${ye.dark}`}}),c(R,{w:"46%",h:5,r:2,tone:"soft"})]})}),cart:S("div",{style:{...N,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[c("div",{style:{width:22,height:18,borderRadius:"3px 3px 6px 6px",border:`2px solid ${ye.dark}`}}),c("div",{style:{padding:"2px 6px",borderRadius:6,border:`1.5px solid ${ye.dark}`},children:c(R,{w:7,h:7,r:2,tone:"dark"})})]}),countryswitch:S("div",{style:{...N,padding:14,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:5},children:[S("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",border:`1px solid ${ye.line}`},children:[c(R,{w:22,h:6,r:2,tone:"dark"}),c(R,{w:6,h:4,r:1,tone:"soft"})]}),S("div",{style:{width:"46%",display:"flex",flexDirection:"column",gap:4,padding:6,border:`1px solid ${ye.line}`},children:[c(R,{w:"80%",h:4,r:2,tone:"accent"}),c(R,{w:"64%",h:4,r:2,tone:"soft"}),c(R,{w:"72%",h:4,r:2,tone:"soft"})]})]}),legalline:S("div",{style:{...N,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[c("div",{style:{height:1,background:ye.line}}),S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c(R,{w:"38%",h:5,r:2,tone:"soft"}),S("div",{style:{display:"flex",gap:5},children:[c(R,{w:14,h:5,r:2,tone:"soft"}),c(R,{w:14,h:5,r:2,tone:"soft"}),c(R,{w:14,h:5,r:2,tone:"soft"})]})]})]}),fallback:c("div",{style:{position:"absolute",inset:14,borderRadius:8,background:ye.block}})};function ab({type:e}){let o=__[e]??"",t=N_[o]??ob[o]??ob.fallback;return c("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 ys}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as wa,jsxs as M_}from"react/jsx-runtime";import H_ from"efficient-easel/screen/components/SidePanelHead";import{StylesIcon as W_}from"efficient-easel/rail";import{Tooltip as z_}from"efficient-shell/ui";function rb({tokenRef:e,siteId:o,onClose:t,onNotify:a,tab:r,onTabChange:n}){let s=da();return M_("div",{className:"sf-styles",children:[wa(H_,{icon:wa(W_,{}),title:l("Styles"),context:wa(z_,{content:l("{name} \u2014 renamed in the Console: {place}.",{name:s,place:l("Storefront \u25B8 Sites \u25B8 Settings")}),className:"sf-name-tip",children:wa("span",{className:"sf-name-text",children:s})}),onHide:t}),wa("div",{className:"sf-insp-body es-insp-body sf-scroll",children:wa(xl,{tokenRef:e,siteId:o,onNotify:a,tab:r,onTabChange:n})})]})}import{jsx as be,jsxs as Dt,Fragment as K_}from"react/jsx-runtime";import{Fragment as yb,useEffect as bb,useRef as fd}from"react";import{useTreeDrag as Sb}from"efficient-easel/drag";import{GlobeIcon as V_,ImageIcon as Y_,LocationIcon as X_,MapIcon as Z_,TextLinesIcon as Q_,TrashIcon as Cb}from"efficient-easel/icons";import{Subtree as wb,TreeRow as Fr,TreeRowAction as vb,TreeSeam as kb}from"efficient-easel/tree";import{useEaselStrings as J_}from"efficient-easel/strings";import{createPreviewSelectionContext as G_}from"efficient-easel/draw/client";var{Provider:mQ,useSelection:nb}=G_("selectedLocationPartId");function lb(e,o,t){return`${e}::${o}::${t}`}function sb(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")return null;let a=Number(o[o.length-2]);if(!Number.isInteger(a)||a<0)return null;let r=o.slice(0,-2).join("::");return r?{nodeId:r,index:a,part:t}:null}import{useSyncExternalStore as U_}from"react";var $_={level:"groups"},fb=$_,rd=new Set;function ro(e){fb=e;for(let o of rd)o()}function q_(e){return rd.add(e),()=>{rd.delete(e)}}var ib=()=>fb;function cb(){return U_(q_,ib,ib)}function db(e,o,t){let a=[];return e.forEach((r,n)=>{let s=o(r),i=a.find(f=>f.key===s);i||(i={key:s,name:t(r),items:[]},a.push(i)),i.items.push({item:r,index:n})}),a}function gQ(e){if(e<=1)return"grid-cols-1";if(e===2)return"grid-cols-2";if(e===3)return"grid-cols-3";if(e===4)return"grid-cols-4";let o=t=>e%t||t;return o(4)>=o(3)?"grid-cols-4":"grid-cols-3"}var Pr=e=>String(e?.group??""),nd=new WeakMap,j_=0;function as(e){let o=nd.get(e);return o||(o=`loc${++j_}`,nd.set(e,o)),o}var ub=(e,o)=>o||e||"Ungrouped",pb={photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
6
|
-
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""};function Bt(e){return db(e,Pr,o=>String(o?.groupName??"")).map(o=>({key:o.key,name:o.name,cards:o.items.map(t=>t.item)}))}var ld=e=>e.flatMap(o=>o.cards),mb=(e,o,t)=>Math.min(Math.max(e,o),t);function rs(e,o,t){let a=0;for(let r=0;r<e.length;r++)if(Pr(e[r])===o){if(a===t)return r;a++}return-1}function sd(e,o,t){let a=Bt(e);if(o<0||o>=a.length)return e;let[r]=a.splice(o,1),n=mb(o<t?t-1:t,0,a.length);return a.splice(n,0,r),ld(a)}function id(e,o,t,a,r){let n=Bt(e),s=n.find(m=>m.key===o),i=n.find(m=>m.key===a);if(!s||!i||t<0||t>=s.cards.length)return e;let[f]=s.cards.splice(t,1),u=o===a?f:{...f,group:i.key,groupName:i.name};u!==f&&nd.set(u,as(f));let p=mb(s===i&&t<r?r-1:r,0,i.cards.length);return i.cards.splice(p,0,u),ld(n)}function xb(e,o){let t=Bt(e),a=t.find(n=>n.key===o),r={...pb,group:o,groupName:a?.name??""};return a?(a.cards.push(r),ld(t)):[...e,r]}function Ib(e){let o=new Set(Bt(e).map(r=>r.key)),t=o.size+1,a=`Group ${t}`;for(;o.has(a);)a=`Group ${++t}`;return{cards:[...e,{...pb,group:a,groupName:""}],key:a}}function hb(e,o){return e.filter(t=>Pr(t)!==o)}function gb(e,o,t){let a=rs(e,o,t);return a<0?e:e.filter((r,n)=>n!==a)}function SQ(e,o,t){let a=e.flatMap((s,i)=>Pr(s)===o?[i]:[]),r=e.slice();a.forEach((s,i)=>{r[s]=t[i]});let n=t.slice(a.length);return[...r.filter(s=>s!==void 0),...n]}function CQ(e,o,t){return o.flatMap(a=>{let r=e.filter(n=>Pr(n)===a);return r.length?r:t(a)})}var ls="ContactLocations",ns=e=>({parentId:`locations-${e}`,slot:"groups"}),cd=(e,o)=>({parentId:`locations-${e}`,slot:`cities:${o}`});function Tb(e,o){let{readOnly:t,selected:a}=o,r=J_().tree,n=o.data?.content??[],s=e.kind===Ky.kind,i=fd(null);bb(()=>{let g=a?.type===ls?String(a.props.id):null;g&&g!==i.current&&ro({level:"groups"}),i.current=g},[a?.props.id]);let{selectedLocationPartId:f,setSelectedLocationPartId:u,setSelectHandler:p}=nb(),m=cb(),x=(g,b)=>{let O=n[g];O&&o.replace(g,{type:O.type,props:{...O.props,locations:b}})},I=g=>{let b=n[g]?.props?.locations;return Array.isArray(b)?b:[]},y=Sb({keyOf:g=>`group:${g.si}:${g.index}`,readOnly:!!t,canDrop:(g,b)=>b.parentId===ns(g.si).parentId&&b.slot==="groups",onDrop:(g,b)=>{x(g.si,sd(I(g.si),g.index,b.index)),m.level==="city"&&ro({level:"groups"})},onStep:(g,b)=>{x(g.si,sd(I(g.si),g.index,b<0?g.index-1:g.index+2)),m.level==="city"&&ro({level:"groups"})}}),C=Sb({keyOf:g=>`city:${g.si}:${g.group}:${g.index}`,readOnly:!!t,canDrop:(g,b)=>b.parentId===ns(g.si).parentId&&b.slot.startsWith("cities:"),onDrop:(g,b)=>{let O=b.slot.slice(7);x(g.si,id(I(g.si),g.group,g.index,O,b.index)),ro({level:"group",key:O})},onStep:(g,b)=>{x(g.si,id(I(g.si),g.group,g.index,g.group,b<0?g.index-1:g.index+2)),m.level==="city"&&ro({level:"group",key:g.group})}}),v=fd(n);v.current=n;let T=fd(()=>{});bb(()=>{p(g=>{let b=sb(g);if(!b)return;let O=v.current.findIndex(F=>F.props?.id===b.nodeId);O<0||T.current(O,{level:b.part,index:b.index})})},[p]);let w=(g,b)=>{i.current=n[g]?.props?.id??null,o.select(g),ro(b),e.reveal();let O=n[g]?.props?.id;typeof O=="string"&&(b.level==="image"||b.level==="map")?u(lb(O,b.index,b.level)):u(null),typeof O=="string"&&o.scrollTo(O)};return T.current=w,{renderLocationTree:(g,b,{rowClick:O,isCollapsed:F,toggleCollapse:L})=>{let P=I(b),M=Bt(P),z=String(g.props.id),B=s&&a?.props.id===z,A=D=>be(kb,{...t?{}:y.seam({place:{...ns(b),index:D}})},`seam:${z}:groups:${D}`),W=(D,ae)=>be(kb,{...t?{}:C.seam({place:{...cd(b,D),index:ae}})},`seam:${z}:cities:${D}:${ae}`);return Dt(K_,{children:[be(Fr,{icon:be(Q_,{size:13}),name:l("Texts"),words:r,onSelect:()=>w(b,{level:"texts"}),selected:B&&m.level==="texts",rowProps:{onClick:O(()=>w(b,{level:"texts"}))}}),M.map((D,ae)=>{let ie=`${z}::grp::${D.key}`,de=F(ie),no=B&&m.level==="group"&&m.key===D.key,lo=D.name||D.key?ub(D.key,D.name):l("Ungrouped"),Le={...cd(b,D.key),index:D.cards.length},so=C.row({item:{si:b,group:D.key,index:-1},place:Le,into:Le,canDrag:!1},{onClick:O(()=>w(b,{level:"group",key:D.key}))}),_e=y.row({item:{si:b,index:ae},place:{...ns(b),index:ae}},so.rowProps);return Dt(yb,{children:[ae===0&&A(0),be(Fr,{icon:be(V_,{size:13}),name:lo,words:r,onSelect:()=>w(b,{level:"group",key:D.key}),selected:no,draggable:_e.draggable,dragging:_e.dragging,drop:_e.drop??so.drop,fold:{open:!de,label:l("group"),onToggle:()=>L(ie)},actions:be(vb,{kind:"delete",label:$e("Delete {label} group ({n} city)","Delete {label} group ({n} cities)",D.cards.length,{label:lo}),onClick:()=>{x(b,hb(P,D.key)),ro({level:"groups"})},children:be(Cb,{size:15})}),rowProps:_e.rowProps,children:be("span",{className:"es-group-count",children:D.cards.length})}),!de&&Dt(wb,{children:[D.cards.map((Te,xe)=>{let he=rs(P,D.key,xe),Ne=B&&m.level==="city"&&m.index===he,Pe=String(Te?.name??"")||l("City"),io=`${z}::city::${as(Te)}`,Me=F(io),{rowProps:Ge,...fo}=C.row({item:{si:b,group:D.key,index:xe},place:{...cd(b,D.key),index:xe}},{onClick:O(()=>w(b,{level:"city",index:he}))});return Dt(yb,{children:[xe===0&&W(D.key,0),be(Fr,{icon:be(X_,{size:13}),name:Pe,words:r,onSelect:()=>w(b,{level:"city",index:he}),selected:Ne,...fo,fold:{open:!Me,label:Pe,onToggle:()=>L(io)},actions:be(vb,{kind:"delete",label:l("Delete {name}",{name:Pe}),onClick:()=>{x(b,gb(P,D.key,xe)),ro({level:"group",key:D.key})},children:be(Cb,{size:15})}),rowProps:Ge}),!Me&&Dt(wb,{children:[be(Fr,{icon:be(Y_,{size:13}),name:l("Image"),words:r,onSelect:()=>w(b,{level:"image",index:he}),selected:B&&m.level==="image"&&m.index===he,rowProps:{onClick:O(()=>w(b,{level:"image",index:he}))}}),be(Fr,{icon:be(Z_,{size:13}),name:l("Map"),words:r,onSelect:()=>w(b,{level:"map",index:he}),selected:B&&m.level==="map"&&m.index===he,rowProps:{onClick:O(()=>w(b,{level:"map",index:he}))}})]}),W(D.key,xe+1)]},as(Te))}),Dt("button",{type:"button",className:"sf-add-card",onClick:()=>{let Te=xb(P,D.key);x(b,Te);let xe=Bt(Te).find(he=>he.key===D.key);ro(xe&&xe.cards.length?{level:"city",index:rs(Te,D.key,xe.cards.length-1)}:{level:"group",key:D.key})},children:[be("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add city")]})]}),A(ae+1)]},ie)}),Dt("button",{type:"button",className:"sf-add-card",onClick:()=>{let{cards:D,key:ae}=Ib(P);x(b,D),w(b,{level:"group",key:ae})},children:[be("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add group")]})]})},sectionPressed:g=>{g?.type===ls&&ro({level:"groups"})}}}import{useEffect as eN,useRef as oN}from"react";import{createNode as dd,newId as ud}from"efficient-easel/data";import{useEaselApi as tN}from"efficient-easel/easel";import{useScreenDocument as aN}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as rN}from"efficient-easel/screen/lib/session-context";import{ROOT_ZONE as va,missingPinnedTypes as nN,pinnedDuplicateIds as pd}from"efficient-easel/draw";function Pb(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function Fb(e,o){let t=e.some(i=>i?.type===re),a=e[e.length-1],r=!t&&a?.type===le?a:null,n=e.filter(i=>i?.type===le&&i!==r).map(i=>String(i.props?.id??"")).filter(Boolean),s=o.hasChromeDoc&&!t&&!r;return{remove:n,seedHeader:!e.some(i=>i?.type===De),seedFooter:s,seedSiteHeader:s&&!e.some(i=>i?.type===se)}}async function Eb(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!==se||!e.stillOpen())return!1;let a=e.latest();return a.some(r=>r?.type===se)?!1:(e.write(Kl(a,t)),!0)}function Ob(e,o){let{adapter:t,capabilities:a,currentSlug:r,docId:n,data:s,saveStatus:i,siteId:f,tokenRef:u}=aN(),p=rN(),{hasSiteSettings:m,hasPinnedChrome:x}=a,I=!!a.editsPinnedInPlace&&r!==jt,y=r===jt,C=tN().getState,v=oN(null);eN(()=>{if(!Pb({docId:n,saveStatus:i,seededDocId:v.current})||(v.current=n,!x))return;let T=C().appState.data,w=T.content,g=s?.content??[],b=(P,M)=>P.some(z=>z?.type===M);if(!m){let P=new Set(pd(w)),M=P.size?w.filter(B=>!P.has(B.props.id)):w;if(P.size&&e.setDocument({...T,content:M}),y)return;let z=nN(M,g);if(z.includes(le)){let B=M.length,A=e.insertSection(le,B);e.replaceComponent(va,B,{type:le,props:{id:A,blocks:jl()}})}z.includes(De)&&e.insertNode(va,0,ql());return}if(y){let P=Sa(w);if(P!==w&&e.setDocument({...T,content:[...P]}),!P.find(M=>M.type===le)&&!b(g,le)&&!b(P,re)&&!b(g,re)){let M=(B,A)=>dd(o,B,A),z={type:le,props:{blocks:jl()}};e.insertNode(va,P.length,Sr(z,M,ud(re)))}return}if(I){let P=!!t?.pinnedChrome?.state().docId,M=Fb(w,{hasChromeDoc:P}),z=new Set([...M.remove,...pd(w.filter(A=>!M.remove.includes(String(A.props.id))))]),B=z.size?w.filter(A=>!z.has(String(A.props.id))):w;if(B.length!==w.length&&e.setDocument({...T,content:B}),M.seedFooter&&!b(g,le)&&!b(g,re)){let A=(D,ae)=>dd(o,D,ae),W={type:le,props:{blocks:jl()}};e.insertNode(va,B.length,Sr(W,A,ud(re)))}if(M.seedHeader&&!b(g,De)){let A=B[0]?.type===se?1:0;e.insertNode(va,A,ql())}if(M.seedSiteHeader&&!b(g,se)&&!b(g,le)&&!b(g,re)){let A=n;Eb({blocks:mn(p),make:(W,D)=>dd(o,W,D),id:ud(se),siteId:f??null,token:u.current,latest:()=>C().appState.data.content,stillOpen:()=>v.current===A,write:W=>{let D=C().appState.data;e.setDocument({...D,content:[...W]})}})}return}let O=w.filter(P=>P.type!==le),F=new Set(pd(O)),L=F.size?O.filter(P=>!F.has(P.props.id)):O;L.length!==w.length&&e.setDocument({...T,content:L}),!b(L,De)&&!b(g,De)&&e.insertNode(va,0,ql())},[n,i,s,C,e,m,x,y,I,t,p,f,u])}import{useEffect as Ab,useState as Bb}from"react";var ss=new Map;async function lN(e,o){try{return(await Se().site.get({siteId:o})).slug?.trim()||null}catch(t){return console.warn("[editor-site-slug] could not resolve the site slug",t),null}}function Lb(e,o){let t=ss.get(o);return t||(t=lN(e,o),ss.set(o,t),t.catch(()=>{ss.get(o)===t&&ss.delete(o)})),t}var sN=/^(localhost|(?:[a-z0-9-]+\.)+localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\]|::1)$/i;function md(e){return!!e&&sN.test(e)}function Rb(e){let{pageSlug:o,siteSlug:t,hostname:a}=e,r=o===an?"/":`/${encodeURIComponent(o)}`;if(!md(a))return r;let n=t?.trim();return n?`${r}?site=${encodeURIComponent(n)}`:r}function Db(e){let{pageSlug:o,siteId:t,token:a}=e,[r,n]=Bb(null),[s,i]=Bb(null),f=jr();Ab(()=>i(f?new URL(f).hostname:window.location.hostname),[f]),Ab(()=>{if(!md(s)||!t||!a){n(null);return}let p=!1;return Lb(a,t).then(m=>{p||n(m)}),()=>{p=!0}},[s,t,a]);let u=Rb({pageSlug:o,siteSlug:r,hostname:s});return f?`${f}${u}`:u}import{jsx as Er,jsxs as iN}from"react/jsx-runtime";import{ExternalIcon as _b}from"efficient-easel/icons";import{Button as fN,Tooltip as Nb,buttonClasses as cN}from"efficient-shell/ui";function dN({pageId:e,liveHref:o,draftLink:t,win:a=window}){let r=a.open("","_blank");if(r)try{r.opener=null}catch{}let n=s=>{r&&!r.closed?r.location.href=s:a.open(s,"_blank","noopener,noreferrer")};return t(e).then(s=>n(s.url??o),()=>n(o))}function Mb({liveHref:e,pageId:o,draftLink:t}){return t&&o?Er(Nb,{content:l("Open your saved draft in a new tab. Visitors don't see it."),children:Er(fN,{variant:"secondary",onClick:()=>{dN({pageId:o,liveHref:e,draftLink:t})},rightIcon:Er(_b,{size:15}),"aria-label":l("Preview your saved draft in a new tab"),children:l("Preview")})}):Er(Nb,{content:l("Preview the live site (opens in a new tab)"),children:iN("a",{className:cN({variant:"secondary"}),href:e,target:"_blank",rel:"noopener noreferrer","aria-label":l("Preview the live site in a new tab"),children:[l("Preview"),Er(_b,{size:15})]})})}import{createElement as gN,useCallback as yN,useEffect as rS,useRef as nS,useState as bN}from"react";import{ClockIcon as SN}from"efficient-shell/icons/efficient";import{useScreenDocument as CN}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSyncExternalStore as uN}from"react";import{useScreenDocument as pN}from"efficient-easel/screen/components/ScreenDocumentContext";var mN=()=>()=>{},Hb=()=>null;function is(e){return uN(e?e.subscribe:mN,e?e.state:Hb,e?e.state:Hb)}function fs(){let{adapter:e}=pN();return e?.pinnedChrome}import{useSyncExternalStore as Gb}from"react";var Or=!1,ka=null,xd=new Set;function Rr(){for(let e of xd)e()}function Ub(e){return xd.add(e),()=>{xd.delete(e)}}function $b(){Or||(Or=!0,Rr())}function qb(){Or&&(Or=!1,Rr())}function Wb(){return Or}function jb(){return Gb(Ub,Wb,Wb)}function zb(){return ka}function cs(){ka&&(ka=null,Rr())}function Kb(){return Gb(Ub,zb,zb)}var Lr=class extends Error{constructor(){super("The editor's last changes could not be saved, so nothing was restored."),this.name="HeldEditsNotSaved"}};async function Vb(e,o,t,{flushSave:a,reload:r}){if(!await a())throw new Lr;let n=await e.restore(o,t);return im(n.liveState),r(),n}async function Yb({access:e,version:o,page:t,...a}){let r=await Vb(e,o.id,t?{page:t.id}:{},a);ka={title:xN(o,t??null),undo:r.undo},Rr()}async function Xb({access:e,...o}){let t=ka?.undo;t&&(await Vb(e,t,{},o),ka=null,Rr())}function Zb(e){return e.name?e.name:e.kind==="draft_before_restore"?l("Draft before restore"):l("Version {n}",{n:e.number})}function xN(e,o){return e.kind==="draft_before_restore"?l("Your drafts from before the restore are back"):o?l("{page} from version {n} is now your draft",{page:o.name,n:e.number}):l("Version {n} is now your draft",{n:e.number})}function Qb(e){let o=e.changes.filter(a=>a.kind==="page").length,t=[...o?[$e("{n} page","{n} pages",o)]:[],...e.changes.filter(a=>a.kind!=="page").map(a=>a.name)];if(!t.length)return"";try{return new Intl.ListFormat(Ls(),{type:"conjunction"}).format(t)}catch{return t.join(", ")}}function Jb(e){return e.change==="take_down"?l("{name} (taken down)",{name:e.name}):e.name}function eS(e,o=new Date){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let a=Ls(),r=new Intl.DateTimeFormat(a,{hour:"numeric",minute:"2-digit"}).format(t);if(t.toDateString()===o.toDateString())return l("Today, {time}",{time:r});let n=new Intl.DateTimeFormat(a,{day:"numeric",month:"short",...t.getFullYear()===o.getFullYear()?{}:{year:"numeric"}}).format(t);return l("{day}, {time}",{day:n,time:r})}import{useSyncExternalStore as IN}from"react";var Ta=new Map,Id=new Set;function hd(e,o){if(!(Ta.has(e)&&Ta.get(e)===o)){Ta.set(e,o);for(let t of Id)t()}}function PJ(e,o){hd(e,o)}function FJ(e,o){let t=Ta.get(e);hd(e,o??(t==="live"?"changed":t))}function EJ(e,o){hd(e,o??"live")}function OJ(e){return Ta.get(e)}function hN(e){return Id.add(e),()=>{Id.delete(e)}}function oS(e){let o=()=>e?Ta.get(e):void 0;return IN(hN,o,o)}function tS(e,o){return e==="live"&&o?"changed":e}function gd({live:e,onPress:o,busy:t=!1,pinnedUnpublished:a=!1,goingLive:r}){let n=e==="live"&&!a,s=e==="changed"?l("Changes not live yet"):e==="never"?l("Never published"):a?l("Header and footer not live yet"):e==="live"?l("Everything is live"):null;return{label:l("Publish"),tooltip:e==="never"?l("Put this page on your site"):l("Put your changes on your site"),status:s,quiet:n?{label:l("Published"),reason:l("Everything is live")}:null,...r&&r.length?{goingLive:r}:{},onPress:o,busy:t}}function aS(e){return e.map(o=>o.change==="take_down"?l("{name} (taken down)",{name:o.name}):o.name)}function lS(e){let{docId:o,capabilities:t,hasUnsavedEdits:a,onPublish:r,adapter:n}=CN(),s=tS(oS(o??null),a),i=is(fs()),f=n.siteLiveState;rS(()=>{if(f)return Si(f),hn(0),()=>Si(null)},[f]);let u=gn(),[p,m]=bN(!1),x=nS(e);x.current=e;let I=nS(!0);rS(()=>(I.current=!0,()=>{I.current=!1}),[]);let y=yN(()=>{m(!0),r(x.current).then(()=>{cs()}).finally(()=>{I.current&&m(!1)})},[r]);if(t.canPublish){if(f){let C=u===void 0?void 0:a||u.state==="changed"?"changed":"live",v=gd({live:C,onPress:y,busy:p,goingLive:aS(u?.changes??[])});return n.siteVersions?{...v,menuItems:wN()}:v}return gd({live:s,onPress:y,busy:p,pinnedUnpublished:i?.unpublished??!1})}}function wN(){return[{key:"version-history",label:l("Version history"),icon:gN(SN),onSelect:$b}]}import{jsx as H,jsxs as ze,Fragment as Dr}from"react/jsx-runtime";import{useCallback as vN,useEffect as kN,useId as fS,useRef as TN,useState as je}from"react";import{Avatar as PN,Banner as Ar,Button as _t,ColoredBadge as yd,Dialog as cS,Drawer as FN,DropdownMenu as EN,FormField as dS,iconButtonClasses as ON,Inline as bd,Input as LN,ListRow as RN,Select as AN,SortableList as BN,Stack as Br}from"efficient-shell/ui";import{EditIcon as DN,EyeIcon as sS,MenuIcon as _N,MoreIcon as NN,PageIcon as uS,RevertIcon as iS,StylesIcon as MN}from"efficient-shell/icons/efficient";import{useScreenDocument as pS}from"efficient-easel/screen/components/ScreenDocumentContext";var HN={page:uS,menu:_N};function WN(e,o){return e.pages.find(t=>t.id===o)??e.pages[0]??null}function zN(e,o){let t=window.open("","_blank");if(t)try{t.opener=null}catch{}return e.preview(o).then(({url:a})=>{t&&!t.closed?t.location.href=a:window.open(a,"_blank","noopener,noreferrer")},a=>{throw t?.close(),a})}function GN({version:e,page:o,waiting:t,busy:a,error:r,onCancel:n,onConfirm:s,onPage:i}){let f=fS();if(!e)return null;let u=e.kind==="draft_before_restore",p=e.number,m=Qb(e),x=u?l("Put your drafts back?"):o?l("Restore {page} from version {n}?",{page:o.name,n:p}):l("Restore version {n}?",{n:p}),I=u?l("Your drafts go back to how they were before the restore."):o?l("{page} goes back to version {n} as a draft. Nothing else on your website changes.",{page:o.name,n:p}):m?l("The whole website goes back to version {n} as a draft: {what}.",{n:p,what:m}):l("The whole website goes back to version {n} as a draft.",{n:p}),y=e.deletedPictures??0;return H(cS,{open:!0,onClose:()=>{a||n()},size:"sm",title:x,footer:ze(Dr,{children:[H(_t,{variant:"secondary",onClick:n,disabled:a,children:l("Cancel")}),H(_t,{onClick:s,loading:a,disabled:a,children:l("Restore as draft")})]}),children:ze(Br,{gap:4,children:[o&&e.pages.length>1?H(dS,{label:l("Page"),htmlFor:f,children:H(AN,{id:f,value:o.id,options:e.pages.map(C=>({value:C.id,label:C.name})),onChange:i,disabled:a})}):null,H("p",{children:I}),H("p",{children:l("Your live website does not change until you press Publish.")}),y>0?H(Ar,{tone:"warning",children:$e("{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.",y)}):null,t?H(Ar,{tone:"info",title:l("Your unpublished changes are kept"),children:l("They are saved in Version history as \u201CDraft before restore\u201D, so you can get them back.")}):null,r?H(Ar,{tone:"danger",children:r}):null]})})}function UN({version:e,onCancel:o,onSave:t}){let a=fS(),[r,n]=je(null),[s,i]=je(""),[f,u]=je(!1),[p,m]=je(null);if(e!==r&&(n(e),i(e?.name??""),m(null)),!e)return null;let x=s.trim()===e.name,I=async()=>{if(!(f||x)){u(!0),m(null);try{await t(s.trim())}catch{m(l("The name was not saved. Try again."))}finally{u(!1)}}};return H(cS,{open:!0,onClose:()=>{f||o()},size:"sm",title:l("Name this version"),footer:ze(Dr,{children:[H(_t,{variant:"secondary",onClick:o,disabled:f,children:l("Cancel")}),H(_t,{onClick:()=>{I()},loading:f,disabled:f||x,children:l("Save")})]}),children:H(dS,{label:l("Name"),htmlFor:a,hint:l("Named versions are always kept. Leave it empty to take the name away."),error:p??void 0,children:H(LN,{id:a,value:s,invalid:!!p,onChange:y=>i(y.target.value),onKeyDown:y=>{y.key==="Enter"&&I()}})})})}function $N({version:e,expanded:o,onToggle:t,onPreview:a,onRestore:r,onRestorePage:n,onName:s}){let i=e.kind==="draft_before_restore",f=!e.live,u=e.changes.length,p=[...i?[]:[{key:"preview",label:l("Preview"),icon:H(sS,{}),onSelect:a}],...f?[{key:"restore",label:i?l("Put these drafts back"):l("Restore whole website"),icon:H(iS,{}),onSelect:r}]:[],...f&&!i&&e.pages.length?[{key:"restore-page",label:l("Restore one page only"),icon:H(uS,{}),onSelect:n}]:[],...i?[]:[{type:"divider",key:"divider"},{key:"name",label:l("Name this version"),icon:H(DN,{}),onSelect:s}]];return H(RN,{title:ze("span",{className:"sf-version-title",children:[H("span",{children:Zb(e)}),e.live?H(yd,{tone:"success",size:"xs",children:l("Live")}):null,e.name?H(yd,{tone:"neutral",size:"xs",children:l("Version {n}",{n:e.number})}):null,i?H(yd,{tone:"warning",size:"xs",children:l("Not published")}):null]}),expanded:o,onToggle:t,actions:H(EN,{align:"end","aria-label":l("More"),items:p,triggerClassName:ON({variant:"ghost",size:"sm"}),trigger:H(NN,{})}),below:ze(Br,{gap:3,children:[ze(bd,{gap:2,align:"center",wrap:!0,className:"sf-version-meta",children:[H(PN,{name:e.createdBy,size:"xs"}),H("span",{children:e.createdBy}),H("span",{"aria-hidden":"true",children:"\xB7"}),H("span",{children:eS(e.createdAt)}),u?ze(Dr,{children:[H("span",{"aria-hidden":"true",children:"\xB7"}),H("span",{children:$e("{n} change","{n} changes",u)})]}):null]}),o?ze(Br,{gap:3,children:[u?H(Br,{gap:2,children:e.changes.map(m=>{let x=HN[m.kind]??MN;return ze(bd,{gap:2,align:"center",children:[H(x,{size:16}),H("span",{children:Jb(m)})]},`${m.kind}:${m.id}`)})}):null,ze(bd,{gap:2,children:[i?null:H(_t,{variant:"secondary",size:"sm",leftIcon:H(sS,{}),onClick:a,children:l("Preview")}),f?H(_t,{variant:"secondary",size:"sm",leftIcon:H(iS,{}),onClick:r,children:l("Restore")}):null]})]}):null]})})}function qN({open:e,onClose:o,access:t,waiting:a}){let{flushSave:r,reloadFromServer:n,docId:s}=pS(),[i,f]=je(null),[u,p]=je(!1),[m,x]=je(null),[I,y]=je(null),[C,v]=je(!1),[T,w]=je(null),[g,b]=je(null),[O,F]=je(!1),L=TN(0),P=vN(()=>{let B=++L.current;p(!1),t.list().then(A=>{B===L.current&&f(A)},()=>{B===L.current&&p(!0)})},[t]);kN(()=>{e&&P()},[e,P]);let M=B=>{F(!1),zN(t,B.id).catch(()=>F(!0))},z=async()=>{if(!(!I||C)){v(!0),w(null);try{await Yb({access:t,version:I.version,page:I.page,flushSave:r,reload:n}),y(null),o()}catch(B){w(B instanceof Lr?l("Your last changes did not save, so nothing was restored. Try again."):l("The version was not restored. Nothing changed. Try again."))}finally{v(!1)}}};return ze(Dr,{children:[H(FN,{open:e,onClose:o,side:"right",size:"md",title:l("Version history"),description:ze(Dr,{children:[l("Every Publish keeps a copy of the whole website: pages, menus and site styles.")," ",l("Products, prices and forms always show as they are now.")]}),footer:H("span",{className:"sf-version-foot",children:l("The newest 30 are kept. Named versions are always kept.")}),children:ze(Br,{gap:3,children:[O?H(Ar,{tone:"danger",onDismiss:()=>F(!1),children:l("The preview did not open. Try again.")}):null,u?H(Ar,{tone:"danger",action:H(_t,{variant:"secondary",size:"sm",onClick:P,children:l("Try again")}),children:l("Version history did not load.")}):i===null?H("p",{className:"sf-version-foot",children:l("Loading versions")}):i.length===0?H("p",{className:"sf-version-foot",children:l("No versions yet. Every Publish from now on keeps one.")}):H(BN,{"aria-label":l("Versions"),spacing:"comfortable",children:i.map(B=>H($N,{version:B,expanded:m===B.id,onToggle:()=>x(A=>A===B.id?null:B.id),onPreview:()=>M(B),onRestore:()=>{w(null),y({version:B,page:null})},onRestorePage:()=>{w(null),y({version:B,page:WN(B,s)})},onName:()=>b(B)},B.id))})]})}),H(GN,{version:I?.version??null,page:I?.page??null,waiting:a,busy:C,error:T,onCancel:()=>y(null),onConfirm:()=>{z()},onPage:B=>y(A=>A&&{...A,page:A.version.pages.find(W=>W.id===B)??A.page})}),H(UN,{version:g,onCancel:()=>b(null),onSave:async B=>{await t.name(g.id,B),b(null),P()}})]})}function mS(){let{adapter:e,hasUnsavedEdits:o}=pS(),t=e.siteVersions,a=jb(),r=gn();return t?H(qN,{open:a,onClose:qb,access:t,waiting:o||r?.state==="changed"}):null}import{useEaselSession as jC}from"efficient-easel/screen/lib/session-context";import{buildPaletteSections as lee,categoryLabel as see,paletteWithoutPinned as iee,pinnedSection as fee}from"efficient-easel/screen/lib/puck/palette-sections";var xS=["general","commerce","service"],Pa=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero Slideshow",set:"general"},{type:"HeroSingle",label:"Hero",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"},{type:"SpecStrip",label:"Spec Strip",set:"general"}]},{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:"DeliveryOptions",label:"Delivery Options",set:"commerce"},{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:"Manifesto",label:"Brand Text",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{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:"Split",label:"Image & Text Split",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:"Ticker",label:"Scrolling Bar",set:"general"},{type:"Countdown",label:"Countdown",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"}]},{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:"Series",label:"Recurring Columns",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"},{type:"DocMetaCards",label:"Document Detail Cards",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:"Spacer",label:"Spacer",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]}];function XJ(){return Object.fromEntries(Pa.map(e=>[e.key,{title:e.title,components:e.sections.map(o=>o.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var jN={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 a shape (Big left, Big right, Bigger left, Bigger right) and its own `Columns on phone`. 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/puck/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/puck/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.',TimelineTrack:"Lewis, 2026-10-09/10 (decisions.md ND, approved): the horizontal year rail and the Story Timeline do one job, so the rail becomes the Story Timeline's fourth Display, Track. Retired by card [MERGE] One Text Block And Click Through Parts (2026-10-22).\n\nWHAT REPLACES IT: a Story Timeline (`Timeline`) with Display set to Track. It draws this section's own component (`components/TimelineTrack`), so for the same words it draws the same bytes: the band colour (`Background color`, the same built-in), the padding, the CTA and each milestone's `Upcoming` switch (shown on each entry under Track only). An entry's `Body` is the rail's blurb. `scripts/test-timeline-track-display.tsx` \xA72 holds the bytes.\n\nWHAT A MERCHANT LOSES on a NEW rail, said plainly: (1) the head cannot move into a box of its own (`headPlacement`); the layered rebuild puts a head in one Box with its content anyway. (2) The year and title of every milestone are not one text kind: each run is styled on its own. (3) The Width rows follow the Story Timeline's family (`background`), not the rail's (`capped`).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Milestone Timeline still renders through it and can still be edited; no document is rewritten and NO MIGRATION RUNS.",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).
|
|
7
|
-
|
|
8
|
-
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.
|
|
9
|
-
|
|
10
|
-
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.
|
|
11
|
-
|
|
12
|
-
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.`,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."},ZJ=["Grid"],QJ=Array.from(new Set([...Pa.flatMap(e=>e.sections.map(o=>o.type)),...Object.keys(jN)])),JJ=Object.fromEntries(Pa.flatMap(e=>e.sections.map(o=>[o.type,o.label]))),KN={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",TimelineTrack:"general",KeyFeatures:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",MenuBlock:"service",EmailFormBlock:"service",SocialLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},ds={...KN,...Object.fromEntries(Pa.flatMap(e=>e.sections.map(o=>[o.type,o.set])))};function IS(e){return Object.prototype.hasOwnProperty.call(ds,e)?ds[e]:void 0}function Sd(e){return Object.keys(ds).filter(o=>ds[o]===e).sort()}var eee=Sd("general"),oee=Sd("commerce"),tee=Sd("service"),Cd="Flex",st="Box",aee=`${st}es`;function VN(e){return e==="section"?"Blank section":st}function wd(e,o,t){return e===Cd?VN(o):t}var YN={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"}};function hS(e){return YN[e]?.label}var gS=Cd;import{currentEaselSession as XN}from"efficient-easel/screen/lib/session";var ZN={general:!0,commerce:!0,service:!0};function vd(e){let o=e?.sets;return o?Object.fromEntries(xS.map(t=>[t,o.includes(t)])):ZN}function mee(e=XN()){return vd(e.blocks)}import{currentEaselSession as KS}from"efficient-easel/screen/lib/session";var Fa="content",ue="Flex",QN="Text & media",JN="Layout & structure",eM=[{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:"ButtonBlock",label:"Button"},{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:"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:QN})),oM=(Pa.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:JN})),yS=[...eM,...oM],kd=[{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:"ButtonBlock",label:"Button"},{type:"HeroGroup",label:st}],hee=kd.map(e=>e.type),tM=1,aM=kd.filter(e=>e.type!=="HeroGroup");function rM(e){return e<tM?kd:aM}var nM={Flex:{slot:Fa,choices:()=>yS},Grid:{slot:Fa,choices:()=>yS},HeroGroup:{slot:Fa,choices:rM}};function bS(e,o=0){let t=nM[e];return t?{slot:t.slot,choices:t.choices(o)}:null}var Ea=()=>({tag:"h2",_partStyles:{text:{textStyle:"heading-2"}}}),Td=()=>({_partStyles:{text:{textStyle:"body-5",color:"accent",letterSpacing:.3,case:"upper",lineHeight:1.5}}});function Oe(e,o,t,a={}){return{type:e,props:{...o(e),id:t(e),...a}}}function SS(e,o,t){return Oe(ue,e,o,{...t,sectionPaddingTop:void 0,sectionPaddingBottom:void 0})}var lM={Manifesto:(e,o)=>({type:ue,props:{...e(ue),id:o(ue),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[Oe(ue,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[Oe("Text",e,o,Td()),Oe("Text",e,o,Ea()),Oe("Text",e,o),Oe("Stats",e,o)]}),SS(e,o,{direction:"column",name:"Picture",content:[]})]}}),Split:(e,o)=>({type:ue,props:{...e(ue),id:o(ue),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[Oe(ue,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[Oe("Text",e,o,Td()),Oe("Text",e,o,Ea()),Oe("Text",e,o),Oe("ButtonBlock",e,o)]}),SS(e,o,{direction:"column",name:"Image",content:[Oe("ImageBlock",e,o)]})]}}),Subscribe:(e,o)=>({type:ue,props:{...e(ue),id:o(ue),direction:"column",name:"Subscribe",content:[Oe("Text",e,o,Ea()),Oe("Text",e,o),Oe("Form",e,o)]}})};function us(e){return lM[e]??null}import{blockTypesIn as $S}from"efficient-easel/screen/lib/puck/block-types-in";import{jsx as Nr,jsxs as DM}from"react/jsx-runtime";import{createContext as _M,useContext as NM}from"react";import{jsx as Oa,jsxs as RS}from"react/jsx-runtime";import{useEffect as Fd,useRef as wM,useState as _r}from"react";import{jsx as CS}from"react/jsx-runtime";import{createContext as sM,lazy as Pee,Suspense as Fee,useContext as iM}from"react";var fM={Link:$d,Image:Ud},cM=sM(fM);function wS(){return iM(cM)}function Eee(e){let{Link:o}=wS();return CS(o,{...e})}function vS(e){let{Image:o}=wS();return CS(o,{...e})}import{jsx as kS,Fragment as dM,jsxs as uM}from"react/jsx-runtime";import{useEffect as pM,useRef as TS,useState as mM}from"react";var xM="#t=0.001",IM=2;function hM(e,o){if(e.readyState<IM||!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 PS({src:e,objectPosition:o="50% 50%",onError:t}){let a=TS(null),r=TS(null),[n,s]=mM(!1);return pM(()=>{let i=a.current,f=r.current;if(n||!i||!f)return;let u=()=>{hM(i,f)&&s(!0)};return u(),i.addEventListener("loadeddata",u),i.addEventListener("seeked",u),()=>{i.removeEventListener("loadeddata",u),i.removeEventListener("seeked",u)}},[n]),uM(dM,{children:[kS("canvas",{ref:r,"aria-hidden":!0,className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:o,visibility:n?"visible":"hidden"}}),!n&&kS("video",{ref:a,src:`${e}${xM}`,muted:!0,playsInline:!0,preload:"auto",className:"hidden",onError:t})]})}import{imageCopyUrl as ES,imageSrcSet as gM}from"efficient-shell/image-copies";var FS;function Pd(){return FS===void 0?{}:{host:FS}}var Dee="(max-width: 800px) 100vw, min(100vw, 1600px)";function OS(e,{fallbackWidth:o=1280,maxWidth:t}={}){let a=gM(e,{...Pd(),...t===void 0?{}:{maxWidth:t}});return a?{src:ES(e,o,Pd()),srcSet:a}:{src:e}}function _ee(e){let o=ES(e,1920,Pd());return o===e?`url(${e})`:`url("${o}")`}import{formatFocal as yM,parseFocal as bM}from"efficient-shell/format";var SM="sf-focus-phone",CM="--sf-focus-phone";function LS(e){if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return{className:"",style:{}};let{x:o,y:t}=bM(e);return{className:SM,style:{[CM]:yM(o,t)}}}var vM=.5;function AS({videoSrc:e,posterSrc:o,showVideo:t=!0,playbackRate:a=vM,objectPosition:r="50% 50%",objectPositionPhone:n,quiet:s=!1}){let i=LS(n),f=o||"",u=e||"",[p,m]=_r(!1),[x,I]=_r(!1),[y,C]=_r(!1),[v,T]=_r(!1),[w,g]=_r(!1),b=wM(null);Fd(()=>{m(!1),I(!1),C(!1),T(!1)},[e,o]),Fd(()=>{if(typeof window>"u")return;let L=()=>{let P=window;P.requestIdleCallback?P.requestIdleCallback(()=>g(!0),{timeout:2e3}):setTimeout(()=>g(!0),800)};if(document.readyState==="complete"){L();return}return window.addEventListener("load",L,{once:!0}),()=>window.removeEventListener("load",L)},[]),Fd(()=>{let L=b.current;if(!L)return;let P=()=>{L.playbackRate=a};return P(),L.addEventListener("loadedmetadata",P),()=>L.removeEventListener("loadedmetadata",P)},[e,a]);let O=qd(f),F=f&&O&&!x?OS(f):{src:f};return RS("div",{className:"absolute inset-0 z-[1]",children:[Oa("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),f&&(O?Oa("img",{src:F.src,...F.srcSet?{srcSet:F.srcSet,sizes:"100vw"}:{},alt:"",className:`absolute inset-0 z-[2] h-full w-full object-cover ${i.className}`.trim(),style:{display:p?"none":"block",objectPosition:r,...i.style},onError:()=>F.srcSet?I(!0):m(!0)},f):Oa(vS,{src:f,alt:"",fill:!0,priority:!0,sizes:"100vw",className:`z-[2] object-cover ${i.className}`.trim(),style:{display:p?"none":"block",objectPosition:r,...i.style},onError:()=>m(!0)},f)),t&&!s&&u&&w&&!y&&RS("video",{ref:b,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:r},onError:()=>C(!0),children:[jd(u)&&Oa("source",{src:u.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),Oa("source",{src:u,type:"video/mp4"})]},u),t&&s&&u&&w&&!v&&(!f||p)&&Oa(PS,{src:u,objectPosition:r,onError:()=>T(!0)},u)]})}var BS=["top","middle","bottom"],DS=["left","center","right"],_S="bottom",NS="left",kM={top:"Top",middle:"Middle",bottom:"Bottom"},TM={left:"Left",center:"Center",right:"Right"};var Vee="Up and down",Yee="Sideways",PM={top:"flex-start",middle:"center",bottom:"flex-end"},FM={left:"flex-start",center:"center",right:"flex-end"},EM="--sf-hero-phone-y",OM="--sf-hero-phone-x";function LM(e){return BS.includes(e)?e:_S}function RM(e){return DS.includes(e)?e:NS}function MS(e,o){let t=LM(e),a=RM(o),r={};return t!==_S&&(r[EM]=PM[t]),a!==NS&&(r[OM]=FM[a]),r}function Xee(){return BS.map(e=>({label:kM[e],value:e}))}function Zee(){return DS.map(e=>({label:TM[e],value:e}))}var AM="#0A0A0A",BM=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function HS(e){let o=e.trim().replace(/^#/,""),t=o.length===3?o.split("").map(r=>r+r).join(""):o;if(!/^[0-9a-fA-F]{6}$/.test(t))return null;let a=Number.parseInt(t,16);return`${a>>16&255},${a>>8&255},${a&255}`}function WS(e){return e==null?!0:e!==!1}function zS(e){let o=(e?HS(e):null)??HS(AM);return`linear-gradient(180deg, ${BM.map(([t,a])=>`rgba(${o},${a}) ${t}%`).join(", ")})`}var MM=_M({});function soe({name:e,process:o,mediaType:t="video",mediaSrc:a,videoSpeed:r,poster:n,objectPosition:s,objectPositionPhone:i,tintColor:f="#000000",tintOpacity:u=0,groups:p,editing:m=!1,themeClassName:x,themeStyle:I}){let{alignment:y="left",textureOpacity:C,textureOn:v,textureColor:T,quietVideo:w,phoneUpDown:g,phoneSideways:b}=NM(MM),O=t==="video",F=O?Aa(a):void 0,L=O?Aa(n):Aa(a)??Aa(n),P=typeof r=="number"?r/100:1;return DM("section",{className:x?`relative h-full w-full overflow-hidden ${x}`:"relative h-full w-full overflow-hidden",style:I,"data-slide-name":e??"","data-slide-process":o??"","data-slide-media":F?"video":"still",children:[Nr(AS,{videoSrc:F,posterSrc:L,showVideo:O,playbackRate:P,objectPosition:s,objectPositionPhone:O?void 0:i,quiet:w}),u>0&&Nr("div",{className:"absolute inset-0 z-[2]",style:{background:f,opacity:Math.min(Math.max(u,0),100)/100}}),WS(v)&&Nr("div",{className:"absolute inset-0 z-[2]",style:{background:zS(T),...C!==void 0?{opacity:C/100}:null}}),Nr("div",{className:["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",m?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...bp,...MS(g,b)},children:p&&Nr(p,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}var GS=Array.from({length:3},(e,o)=>({name:`Slide ${o+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{newNodeId as US}from"efficient-easel/draw";var HM="ImageBlock",WM=3,ps=(e,o,t={})=>({type:e,props:{...o?.(e)??{},id:US(e),...t}}),zM=e=>({...e?.(ue)??{},direction:"column",[Fa]:[ps(HM,e),ps(ue,e,{direction:"column",[Fa]:[ps("Text",e,Ea()),ps("Text",e)]})]}),Po={Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>GS.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${st.toLowerCase()}`,seeds:()=>[],addBlocked:on,notice:$s},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${st.toLowerCase()}`,seeds:()=>[],addBlocked:on,notice:$s},ProcessSteps:{slot:"boxes",childType:ue,addLabel:`Add ${st.toLowerCase()}`,seeds:e=>Array.from({length:WM},()=>zM(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}};function xoe(e){for(let[o,t]of Object.entries(e)){if(o in Po&&Po[o]!==t)throw new Error(`lib/puck/slot-specs: "${o}" already has a slot spec`);Po[o]=t}}function Ioe(e,o){let t=Po[e];return t?{slot:t.slot,children:t.seeds(o).map(a=>({type:t.childType,props:{id:US(t.childType),...a}}))}:null}var qS=()=>({}),jS=new Map;function GM(e){let o=jS.get(e);if(o)return o;let t=new Set,a=Po[e];if(a)for(let s of a.seeds(qS))for(let i of $S({type:a.childType,props:s}))t.add(i);let r=us(e);if(r){let s=0;for(let i of $S(r(qS,f=>`${f}-${s+=1}`)))t.add(i)}t.delete(e);let n=[...t].sort();return jS.set(e,n),n}function UM(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let o=vd(e),t=e.allow?new Set(e.allow):null,a=new Set(e.deny??[]),r=new Set(Object.keys(e.host??{})),n=f=>{if(a.has(f))return!1;if(r.has(f))return!0;let u=IS(f);return!u||!o[u]?!1:t?t.has(f):!0},s=new Map,i=f=>{let u=s.get(f);if(u!==void 0)return u;s.set(f,!1);let p=n(f)&&GM(f).every(i);return s.set(f,p),p};return{sets:o,offers:i}}var $M="block-offer";function Ed(e=KS()){return e.cache($M,()=>UM(mn(e)))}function VS(e,o=KS()){let t=Ed(o);return t?t.offers(e):!0}function YS(e,o=0){let t=jM(e,o),a=t?Ed():null;return t&&a?qM(t,a):t}function qM(e,o){if(e.spec)return o.offers(e.spec.childType)?e:null;let t=e.choices??[],a=t.filter(r=>o.offers(r.type));return a.length===t.length?e:a.length>0?{...e,choices:a}:null}function jM(e,o){let t=Po[e];if(t)return{source:"section",slot:t.slot,choices:null,spec:t};let a=bS(e,o);if(a)return{source:"container",slot:a.slot,choices:a.choices,spec:null};let r=iy(e);return r?{source:"footer",slot:sy,choices:r,spec:null}:null}import{useSyncExternalStore as KM}from"react";var Od=null,Ld=new Set;function XS(e){if(Od!==e){Od=e;for(let o of Ld)o()}}function VM(e){return Ld.add(e),()=>{Ld.delete(e)}}function Aoe(){return KM(VM,()=>Od,()=>null)}function ZS(e){return Ma(e)?.ownerId??null}function QS(e,o){let t=e.props;if(e.type==="FooterMenu"){let a=t.menu;return t.heading||a?.name||l("Menu")}if(e.type==="FooterText"){let a=typeof t.text=="string"?t.text.trim():"";return a?a.length>28?`${a.slice(0,28)}\u2026`:a:l("Text")}return e.type==="FooterEmailSignup"?t.heading||l("Email signup"):o(e.type)}var JS="sf-editor-left-view";function eC(){if(typeof window>"u")return"pages";try{let e=window.localStorage.getItem(JS);return e==="sections"||e==="styles"?e:"pages"}catch{return"pages"}}function oC(e){if(!(typeof window>"u"))try{window.localStorage.setItem(JS,e)}catch{}}function tC(e,o){return e==="styles"&&!o?"sections":e}function aC(e,o){return e?"sections":o}var rC="Footer",YM=[se,rC,re],La=e=>{let o=e?.content;return Array.isArray(o)?o:[]},Nt=e=>{let o=e?.zones;return o&&typeof o=="object"&&!Array.isArray(o)?o:null},Mr=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0},nC=e=>Ma(e)?.ownerId??"";function lC(e){let o=Sa(La(e)),t=o.some(a=>a?.type===re);return o.filter(a=>a?.type===se||a?.type===re||a?.type===rC&&!t)}function Rd(e,o){let t=new Set,a=r=>{if(Array.isArray(r)){for(let s of r)a(s);return}if(!r||typeof r!="object")return;let n=r;if(typeof n.type=="string"&&n.props&&typeof n.props=="object"){let s=Mr(n);s&&t.add(s)}for(let s of Object.values(r))a(s)};if(a(e),o){let r=!0,n=new Set;for(;r;){r=!1;for(let[s,i]of Object.entries(o))n.has(s)||!t.has(nC(s))||(n.add(s),a(i),r=!0)}}return t}function Ad(e,o){let t={},a={};for(let[r,n]of Object.entries(e??{}))(o.has(nC(r))?t:a)[r]=n;return{owned:t,rest:a}}function Woe(e,o){if(!o)return e;let t=lC(o);if(!t.length)return e;let a=t.filter(i=>i.type===se),r=t.filter(i=>i.type!==se),n={...e,content:[...a,...La(e),...r]},{owned:s}=Ad(Nt(o),Rd(t,Nt(o)));return Object.keys(s).length&&(n.zones={...Nt(e)??{},...s}),n}function zoe(e,o){if(!o)return{page:e,chrome:null};let t=lC(o),a=new Set(t.map(Mr).filter(w=>!!w)),r=[],n=[];for(let w of La(e)){let g=Mr(w);g&&a.has(g)||ba(w?.type)?n.push(w):r.push(w)}let s=new Map(n.map(w=>[Mr(w),w])),i=new Set,f=Sa(La(o)).flatMap(w=>{let g=Mr(w);if(!g||!a.has(g))return[w];let b=s.get(g);return b?(i.add(b),[b]):[]});for(let w of n)i.has(w)||f.some(g=>g?.type===w.type)||(f=w.type===se?[w,...f]:[...f,w]);f=Sa(f);let u=f.length===La(o).length&&f.every((w,g)=>w===La(o)[g]),p=Nt(e),m=Rd(f,p),{owned:x,rest:I}=Ad(p,m),y=Ad(Nt(o),Rd(t,Nt(o))).owned,C={...o,content:u?o.content:[...f]},v=Nt(o);if(v||Object.keys(x).length){let w={};for(let[g,b]of Object.entries(v??{}))g in y?g in x&&(w[g]=x[g]):w[g]=b;for(let[g,b]of Object.entries(x))g in w||(w[g]=b);C.zones=w,v&&XM(C.zones,v)&&(C.zones=v)}let T={...e,content:r};return p&&(Object.keys(I).length||!Object.keys(y).length?T.zones=I:delete T.zones),{page:T,chrome:C}}function XM(e,o){let t=Object.keys(e),a=Object.keys(o);return t.length===a.length&&t.every((r,n)=>r===a[n]&&e[r]===o[r])}function sC(e,o){return t=>e(t)||t!==void 0&&YM.includes(t)&&o()}var ms=null;function Uoe(e){ms=e}function iC(){return!!(ms&&ms.state().lockHolder)}function Mt(){return ms!==null}var ZM=new Set(["BookingBox","SubmitBox"]);function QM(e){return typeof e=="string"&&ZM.has(e)}var fC=sC(QM,iC);import{copyNode as JM}from"efficient-easel/data";var cC=null;function Voe(e){cC=e}function Go(){return cC}var dC=null;function Bd(e){dC=e}function xs(){return dC}function uC(e){let o=typeof e?.props?.id=="string"?e.props.id:null,t=Go(),a=o&&t?t.sectionOf(o):null;if(!t||!a)return null;let r=t.usedOn(a);return r?r.length===1?l("On 1 page"):l("On {count} pages",{count:r.length}):l("On other pages")}var pC={usedOn:e=>{let o=Go(),t=o?.sectionOf(e.props.id)??null;return!o||!t?null:o.usedOn(t)??[]},openPage:e=>xs()?.openPage(e),adopt:(e,o)=>Go()?.adopt(e.props.id,o),nodeOf:e=>Go()?.place(e)??null,detach:e=>{let o=xs()?.config;return o?JM(e,o):e},removed:()=>xs()?.reload()};import{sharedSectionsOf as tH}from"efficient-easel/screen/lib/shared-sections";import{scrollPreviewToSection as aH,scrollPreviewToTop as HC}from"efficient-easel/screen/lib/puck/preview-dom";import{Fragment as _d,jsx as Hr,jsxs as T2}from"react/jsx-runtime";import{useMemo as kC,useRef as TC}from"react";import{EaselCanvas as P2,useEaselApi as F2}from"efficient-easel/easel";import{jsx as yC,Fragment as i2,jsxs as f2}from"react/jsx-runtime";import{useEffect as bC,useLayoutEffect as c2}from"react";var mC={accent:"#2563eb",accentTint:"#eff6ff",accentText:"#1d4ed8",appBg:"#f9fafb",previewBg:"#f3f4f6",panel:"#ffffff",fieldBg:"#ffffff",inputBorder:"#d1d5db",text:"#111827",text2:"#374151",muted:"#6b7280",line:"#e5e7eb",chipBg:"#f3f4f6",chipFg:"#6b7280",panelRadius:12,rowRadius:8,panelShadow:"0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.06)",topbarShadow:"0 1px 3px rgba(0,0,0,.06)",panelGap:10,leftWidth:288,rightWidth:308,topbarHeight:52,labelFont:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif"};var Is="data-theme",xC="light";function e2(e){return e.getAttribute(Is)===xC?"light":"dark"}function o2(e,o){return e2(e)===o?!1:(o==="light"?e.setAttribute(Is,xC):e.removeAttribute(Is),!0)}function t2(e){return Os(e).getItem(ws)}function ate(e,o){Os(e).setItem(ws,o)}function a2(e,o,t=new Date().getHours()){return Vd({mode:o.mode,override:t2(e),switchShown:o.switchShown,hour:t})}function IC(e,o){let t=e.documentElement;if(!t)return()=>{};let a=()=>o2(t,a2(e,o));a();let r=e.defaultView?.MutationObserver;if(!r)return()=>{};let n=new r(a);return n.observe(t,{attributes:!0,attributeFilter:[Is]}),()=>n.disconnect()}var r2="style";function n2(e,o){let t=tu(o),a=!1;for(let r of ou){let n=t[r]??"";e.style.getPropertyValue(r)!==n&&(n?e.style.setProperty(r,n):e.style.removeProperty(r),a=!0)}return a}function hC(e,o){let t=e.body;if(!t)return()=>{};let a=()=>n2(t,o);a();let r=e.defaultView?.MutationObserver;if(!r)return()=>{};let n=new r(a);return n.observe(t,{attributes:!0,attributeFilter:[r2]}),()=>n.disconnect()}var l2=String.raw`(function (doc) {
|
|
13
|
-
if (doc.__sfFitWords) return;
|
|
14
|
-
var win = doc.defaultView;
|
|
15
|
-
var SELECTOR = "h1,h2,h3,h4,h5,h6,[class*='font-heading'],[class*='font-display']";
|
|
16
|
-
var MIN_SCALE = 0.3, MIN_PX = 16, SLACK = 1;
|
|
17
|
-
|
|
18
|
-
function measure(el) {
|
|
19
|
-
var widest = 0, current = 0, last = null, split = false, lastBlock = null;
|
|
20
|
-
function blockOf(n) {
|
|
21
|
-
for (var p = n.parentElement; p && p !== el; p = p.parentElement) {
|
|
22
|
-
var d = win.getComputedStyle(p).display;
|
|
23
|
-
if (d.indexOf("inline") !== 0 && d !== "contents") return p;
|
|
24
|
-
}
|
|
25
|
-
return el;
|
|
26
|
-
}
|
|
27
|
-
function close() { if (current > widest) widest = current; current = 0; last = null; }
|
|
28
|
-
var walker = doc.createTreeWalker(el, 5), range = doc.createRange(), node;
|
|
29
|
-
while ((node = walker.nextNode())) {
|
|
30
|
-
if (node.nodeType === 1) {
|
|
31
|
-
if (node.tagName === "BR" || node.tagName === "WBR") close();
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
var block = blockOf(node);
|
|
35
|
-
if (block !== lastBlock) close();
|
|
36
|
-
lastBlock = block;
|
|
37
|
-
var re = /(\S+)|(\s+)/g, m;
|
|
38
|
-
while ((m = re.exec(node.data))) {
|
|
39
|
-
if (m[2]) { close(); continue; }
|
|
40
|
-
range.setStart(node, m.index);
|
|
41
|
-
range.setEnd(node, m.index + m[0].length);
|
|
42
|
-
var rects = range.getClientRects();
|
|
43
|
-
for (var i = 0; i < rects.length; i++) {
|
|
44
|
-
var r = rects[i];
|
|
45
|
-
if (r.width <= 0) continue;
|
|
46
|
-
current += r.width;
|
|
47
|
-
if (last && r.top > last.top + last.height / 2) split = true;
|
|
48
|
-
last = r;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
close();
|
|
53
|
-
return { widest: widest, split: split };
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function lineWidth(el) {
|
|
57
|
-
var cs = win.getComputedStyle(el);
|
|
58
|
-
return el.getBoundingClientRect().width - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight)
|
|
59
|
-
- parseFloat(cs.borderLeftWidth) - parseFloat(cs.borderRightWidth);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// ⚠️ THE HEADING ELEMENT IS NEVER TOUCHED — no style="", no data-*. This
|
|
63
|
-
// runs before React hydrates, and React 19 in development reports ANY
|
|
64
|
-
// attribute that differs from what it rendered ("a tree hydrated but some
|
|
65
|
-
// attributes didn't match"): first our inline font-size on the hero (which
|
|
66
|
-
// React owns via --heading-size), then, when that moved to a data-sf-fit
|
|
67
|
-
// attribute, the attribute itself. So the fitted size lives only in this
|
|
68
|
-
// script's own stylesheet, in <head>, addressed to each heading by its
|
|
69
|
-
// POSITION (":root>*:nth-child(2)>…"). A position goes stale when the page's
|
|
70
|
-
// structure changes, so the rules are rewritten in the MutationObserver
|
|
71
|
-
// callback, which runs before the next paint. !important so the size also
|
|
72
|
-
// beats a part's own inline size.
|
|
73
|
-
var head = doc.head || doc.documentElement;
|
|
74
|
-
var fitEl = doc.createElement("style");
|
|
75
|
-
fitEl.id = "storefront-fit-words-sizes";
|
|
76
|
-
head.appendChild(fitEl);
|
|
77
|
-
var fitted = new Map(); // heading -> fitted size, e.g. "43.8px"
|
|
78
|
-
|
|
79
|
-
function pathOf(el) {
|
|
80
|
-
var parts = [];
|
|
81
|
-
for (var e = el; e && e.parentElement; e = e.parentElement) {
|
|
82
|
-
var i = 1, s = e;
|
|
83
|
-
while ((s = s.previousElementSibling)) i++;
|
|
84
|
-
parts.unshift("*:nth-child(" + i + ")");
|
|
85
|
-
}
|
|
86
|
-
return ":root>" + parts.join(">");
|
|
87
|
-
}
|
|
88
|
-
function writeRules() {
|
|
89
|
-
var css = "";
|
|
90
|
-
fitted.forEach(function (size, el) {
|
|
91
|
-
if (!el.isConnected) { fitted.delete(el); return; }
|
|
92
|
-
css += pathOf(el) + "{font-size:" + size + " !important}";
|
|
93
|
-
});
|
|
94
|
-
if (fitEl.textContent !== css) fitEl.textContent = css;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function unfit(el) {
|
|
98
|
-
if (fitted.delete(el)) writeRules();
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function fits(el) {
|
|
102
|
-
var m = measure(el);
|
|
103
|
-
return !m.split && m.widest <= lineWidth(el) + SLACK;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function fit(el) {
|
|
107
|
-
unfit(el);
|
|
108
|
-
if (lineWidth(el) <= 0) return; // hidden, or not laid out yet
|
|
109
|
-
if (fits(el)) return;
|
|
110
|
-
var set = parseFloat(win.getComputedStyle(el).fontSize);
|
|
111
|
-
if (!set) return;
|
|
112
|
-
var floor = Math.max(set * MIN_SCALE, MIN_PX);
|
|
113
|
-
if (floor >= set) return;
|
|
114
|
-
function size(px) { return Math.floor(px * 10) / 10 + "px"; }
|
|
115
|
-
// The SEARCH tries sizes on the element's own style and then puts that
|
|
116
|
-
// attribute back byte for byte (or removes it, if it had none), so nothing
|
|
117
|
-
// is left for React to see. A trial in a stylesheet instead restyles the
|
|
118
|
-
// whole page per step: a full pass on the Hartes home took 75–160ms at 4x
|
|
119
|
-
// CPU that way.
|
|
120
|
-
var hadStyle = el.hasAttribute("style"), origStyle = el.getAttribute("style");
|
|
121
|
-
function attempt(px) { el.style.setProperty("font-size", size(px), "important"); }
|
|
122
|
-
function done() { if (hadStyle) el.setAttribute("style", origStyle); else el.removeAttribute("style"); }
|
|
123
|
-
attempt(floor);
|
|
124
|
-
if (!fits(el)) { done(); return; } // even the floor does not fit: leave it as set
|
|
125
|
-
var lo = floor, hi = set;
|
|
126
|
-
for (var i = 0; i < 8; i++) {
|
|
127
|
-
var mid = (lo + hi) / 2;
|
|
128
|
-
attempt(mid);
|
|
129
|
-
if (fits(el)) lo = mid; else hi = mid;
|
|
130
|
-
}
|
|
131
|
-
done();
|
|
132
|
-
fitted.set(el, size(lo));
|
|
133
|
-
writeRules();
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// What each heading measured right after we last fitted it, so the
|
|
137
|
-
// ResizeObserver below can tell a real change (a font swap, a rotate, a
|
|
138
|
-
// container that moved) from the size change our own write just caused.
|
|
139
|
-
var seen = new WeakMap();
|
|
140
|
-
function remember(el) {
|
|
141
|
-
var b = el.getBoundingClientRect();
|
|
142
|
-
seen.set(el, b.width + "x" + b.height);
|
|
143
|
-
}
|
|
144
|
-
function fitAndRemember(el) { fit(el); remember(el); }
|
|
145
|
-
|
|
146
|
-
// ⚠️ A ResizeObserver, NOT fonts.ready or a resize event, and the reason is
|
|
147
|
-
// WHEN it runs: after layout, BEFORE paint. The web font arriving re-wraps a
|
|
148
|
-
// fitted heading, and fonts.ready resolves only after that frame is painted —
|
|
149
|
-
// measured on the Hartes hero: a 42px jump in 2 of 3 loads. A size change
|
|
150
|
-
// reported here is fitted in the same frame, so the broken state is never
|
|
151
|
-
// drawn. It also covers a container that resizes.
|
|
152
|
-
var ro = new win.ResizeObserver(function (entries) {
|
|
153
|
-
for (var i = 0; i < entries.length; i++) {
|
|
154
|
-
var el = entries[i].target;
|
|
155
|
-
var b = el.getBoundingClientRect();
|
|
156
|
-
if (seen.get(el) === b.width + "x" + b.height) continue; // our own write
|
|
157
|
-
fitAndRemember(el);
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
// Its own set, not seen: fitAndRemember has written seen by the
|
|
161
|
-
// time watch runs, so a seen test observed no heading at all, and a
|
|
162
|
-
// heading fitted in the fallback face was never fitted again when the web
|
|
163
|
-
// font arrived (hartesmetal.com.au, "FusionForge." with its "." alone).
|
|
164
|
-
var watched = new WeakSet();
|
|
165
|
-
function watch(el) { if (!watched.has(el)) { watched.add(el); ro.observe(el); } }
|
|
166
|
-
|
|
167
|
-
function fitAll() {
|
|
168
|
-
var els = doc.querySelectorAll(SELECTOR);
|
|
169
|
-
for (var i = 0; i < els.length; i++) { fitAndRemember(els[i]); watch(els[i]); }
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
var queued = 0, all = false, touched = new Set();
|
|
173
|
-
function run() {
|
|
174
|
-
queued = 0;
|
|
175
|
-
if (all) { all = false; touched.clear(); fitAll(); return; }
|
|
176
|
-
var els = Array.from(touched);
|
|
177
|
-
touched.clear();
|
|
178
|
-
for (var i = 0; i < els.length; i++) if (els[i].isConnected) { fitAndRemember(els[i]); watch(els[i]); }
|
|
179
|
-
}
|
|
180
|
-
function schedule() { if (!queued) queued = win.requestAnimationFrame(run); }
|
|
181
|
-
function scheduleAll() { all = true; schedule(); }
|
|
182
|
-
|
|
183
|
-
fitAll();
|
|
184
|
-
// A backstop only: a font that changes widths without changing any
|
|
185
|
-
// heading's box is not seen by the ResizeObserver.
|
|
186
|
-
if (doc.fonts && doc.fonts.ready) doc.fonts.ready.then(scheduleAll, function () {});
|
|
187
|
-
|
|
188
|
-
// …and the viewport WIDTH, which the ResizeObserver cannot stand in for: a
|
|
189
|
-
// heading sized to its own text (fit-content, a flex item) keeps the SAME box
|
|
190
|
-
// when the phone turns to 844, so nothing reports a change and it would stay
|
|
191
|
-
// shrunk. The probe's rotate check caught exactly that.
|
|
192
|
-
var lastWidth = win.innerWidth;
|
|
193
|
-
function onResize() {
|
|
194
|
-
if (win.innerWidth === lastWidth) return; // a phone's toolbar changing HEIGHT is not our business
|
|
195
|
-
lastWidth = win.innerWidth;
|
|
196
|
-
scheduleAll();
|
|
197
|
-
}
|
|
198
|
-
win.addEventListener("resize", onResize);
|
|
199
|
-
|
|
200
|
-
var mo = new win.MutationObserver(function (records) {
|
|
201
|
-
// Positions first: a node added or removed anywhere can shift the
|
|
202
|
-
// nth-child path of a fitted heading, and this callback runs before paint.
|
|
203
|
-
if (fitted.size) {
|
|
204
|
-
for (var q = 0; q < records.length; q++) if (records[q].type === "childList") { writeRules(); break; }
|
|
205
|
-
}
|
|
206
|
-
for (var i = 0; i < records.length; i++) {
|
|
207
|
-
var r = records[i];
|
|
208
|
-
var target = r.target.nodeType === 1 ? r.target : r.target.parentElement;
|
|
209
|
-
var own = target && target.closest(SELECTOR);
|
|
210
|
-
if (own) touched.add(own);
|
|
211
|
-
for (var j = 0; j < r.addedNodes.length; j++) {
|
|
212
|
-
var n = r.addedNodes[j];
|
|
213
|
-
if (n.nodeType !== 1) continue;
|
|
214
|
-
if (n.matches(SELECTOR)) touched.add(n);
|
|
215
|
-
var inner = n.querySelectorAll(SELECTOR);
|
|
216
|
-
for (var k = 0; k < inner.length; k++) touched.add(inner[k]);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
if (touched.size) schedule();
|
|
220
|
-
});
|
|
221
|
-
mo.observe(doc.body, { childList: true, subtree: true, characterData: true });
|
|
222
|
-
|
|
223
|
-
doc.__sfFitWords = function stop() {
|
|
224
|
-
win.removeEventListener("resize", onResize);
|
|
225
|
-
ro.disconnect();
|
|
226
|
-
mo.disconnect();
|
|
227
|
-
if (queued) win.cancelAnimationFrame(queued);
|
|
228
|
-
fitted.clear();
|
|
229
|
-
fitEl.remove();
|
|
230
|
-
delete doc.__sfFitWords;
|
|
231
|
-
};
|
|
232
|
-
// For the probe and for debugging: which headings are fitted, at what size,
|
|
233
|
-
// and the sheet that holds it (disable it to read a heading's set size).
|
|
234
|
-
doc.__sfFitWords.fitted = fitted;
|
|
235
|
-
doc.__sfFitWords.sheet = fitEl;
|
|
236
|
-
})(document);`,s2="storefront-fit-words";function gC(e){let o=e.createElement("script");return o.id=s2,o.textContent=l2,(e.head??e.documentElement).appendChild(o),()=>{e.__sfFitWords?.(),o.remove()}}var d2=`
|
|
237
|
-
[${to}][${to}] { cursor: text; }
|
|
238
|
-
[${Be}][${Be}][${Be}] {
|
|
239
|
-
outline: 1px solid ${mC.accent};
|
|
240
|
-
outline-offset: 2px;
|
|
241
|
-
}
|
|
242
|
-
[${Be}][${Be}]:has([${Be}]),
|
|
243
|
-
[data-puck-overlay-portal][data-puck-overlay-portal]:has([${Be}]) {
|
|
244
|
-
outline: none;
|
|
245
|
-
}
|
|
246
|
-
[${Be}][${Be}][${Be}][data-es-typing],
|
|
247
|
-
[data-es-typing] [${Be}][${Be}][${Be}] {
|
|
248
|
-
outline: none;
|
|
249
|
-
}
|
|
250
|
-
`;function SC({children:e,document:o}){let{theme:t,themeMode:a,themeSwitchShown:r}=V(),n=He(t);return bC(()=>{if(o)return IC(o,{mode:a,switchShown:r})},[o,a,r]),bC(()=>{if(o)return hC(o,n)},[o,n]),c2(()=>{if(o)return gC(o)},[o]),f2(i2,{children:[yC(Hu,{}),yC("style",{children:d2}),e]})}import{jsx as Dd}from"react/jsx-runtime";import{useEffect as u2,useState as p2}from"react";import{Banner as m2}from"efficient-shell/ui";var hs={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."},x2={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."},I2=hs.load,h2=hs.lock,g2=hs.conflict,y2=hs.save;function b2(e){if(!e)return null;if(e.loadFailed)return l(I2);if(e.lockHolder)return l(h2,{name:e.lockHolder.name||l("Somebody else")});if(e.conflict)return l(g2);if(e.saveFailed)return l(y2);let o=e.sections?.[0];if(!o)return null;let t=o.title||l("A shared section"),a=o.holder?.name||l("Somebody else");return l(x2[o.problem],{section:t,name:a})}function S2({report:e}){let o=b2(is(e)),[t,a]=p2(null);return u2(()=>{o||a(null)},[o]),!o||t===o?null:Dd("aside",{className:"sf-canvas-notice",children:Dd(m2,{tone:"warning",onDismiss:()=>a(o),children:o})})}function CC(){return Dd(S2,{report:fs()})}import{jsx as gs}from"react/jsx-runtime";import{useState as wC}from"react";import{Banner as C2,Button as w2}from"efficient-shell/ui";import{UndoIcon as v2}from"efficient-shell/icons/efficient";import{useScreenDocument as k2}from"efficient-easel/screen/components/ScreenDocumentContext";function vC(){let e=Kb(),{adapter:o,flushSave:t,reloadFromServer:a}=k2(),r=o.siteVersions,[n,s]=wC(!1),[i,f]=wC(!1);if(!e)return null;let u=async()=>{if(!(!r||n)){s(!0),f(!1);try{await Xb({access:r,flushSave:t,reload:a})}catch{f(!0)}finally{s(!1)}}};return gs("aside",{className:"sf-canvas-notice",children:gs(C2,{tone:i?"danger":"info",title:e.title,onDismiss:cs,action:r&&e.undo?gs(w2,{variant:"secondary",size:"sm",leftIcon:gs(v2,{}),loading:n,disabled:n,onClick:()=>{u()},children:l("Undo")}):void 0,children:i?l("Undo did not work. Nothing changed. Try again."):l("Check it with Preview. Press Publish to put it live.")})})}import{usePreviewParts as PC}from"efficient-easel/draw/client";import{useSectionOps as E2}from"efficient-easel/screen/lib/puck/use-section-ops";function O2({children:e,componentId:o}){let{selectedPartId:t}=PC();return UI(t,o)?Hr(_d,{}):Hr(_d,{children:e})}function FC(e){let{mirrorHostStyles:o}=Ds(),t=zu(),{sectionBackgroundWidth:a,sectionContentWidth:r,themeFromDocument:n}=V(),s=kC(()=>({...e.metadata??t??{},...Ix(n?null:a,n?null:r)}),[e.metadata,t,a,r,n]),i=TC(null),f=L2(i),{onDocument:u}=e,p=m=>{i.current=m,u?.(m)};return T2(_d,{children:[Hr(vC,{}),Hr(CC,{}),Hr(P2,{...e,onDocument:p,typing:f,metadata:s,height:"fill",mirrorStyles:o,frameWrapper:SC,overlay:O2})]})}function L2(e){let o=F2(),t=E2(),a=PC(),r=TC({ops:t,parts:a});return r.current={ops:t,parts:a},kC(()=>{let n={getItemById:i=>o.getState().getItemById(i),getSelectorForId:i=>o.getState().getSelectorForId(i),get components(){return o.getState().config.components},replace:(i,f,u)=>r.current.ops.replaceComponent(i,f,u)},s=(i,f)=>{let u=Eg(i,n);if(!u)return null;let p=f,m=()=>(p=Og(p,p?.ownerDocument??e.current,i),p),x=m();return x?{element:m,value:u.value,rules:u.rules,multiline:u.multiline,write:u.write,toolbar:{offered:u.offered,colors:u.offered.length>0?Hl(Hg(x)):void 0}}:null};return{at:i=>{let f=i.closest(`[${to}]`),u=f?.getAttribute(to);return f&&u?s(u,f):null},atSelection:()=>{let i=r.current.parts.selectedPartId;return i?s(i,null):null},onChange:i=>{if(!i.typing){Pc(null);return}let f=i.element.closest(`[${to}]`)?.getAttribute(to)??null;Pc(f),f&&r.current.parts.selectedPartId!==f&&r.current.parts.select(f)}}},[o,e])}var R2=uu.mediaFields,A2=/video|poster|focal|phone/i;function EC(e){return(R2[e]??[]).find(o=>!o.includes("[]")&&!A2.test(o))??null}var OC={adds:{kind:"block",type:"ImageBlock"},takes:e=>EC(e.type)!==null,replace:(e,o)=>{let t=EC(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 LC={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 theme-color-accented stat cards.",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."};var B2="Save your page changes first";function RC(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:B2}:{visible:!0,enabled:!0}:{visible:!1,hiddenReason:"no-site"}:{visible:!1,hiddenReason:"not-operator"}:{visible:!1,hiddenReason:"no-console"}}var AC="storefront-editor:save-as-template";var D2="plain",BC=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],_2="line",N2={KeyFeatures:"filled"};function Wr(e){return N2[e]??D2}function Zte(e,o){return Ko(BC,Wr(o),e)}function Qte(e){return Ko(BC,_2,e)}var M2="inline",H2=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];var it={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"}},Ra="SectionHeader";function DC(e){return e in it}function tae(e){return Ko(H2,M2,e)}var _C=new Set(["Flex"]);function aae(e){return!!e?.type&&_C.has(e.type)}var W2={not:{context:"parentType",in:[..._C]}};function rae(e,o,t){return Rl(e,t,W2)}var z2={not:{field:"headPlacement",is:"own-box"}};function nae(e,o,t){return Rl(e,t,z2)}function NC(e,{nodeDefaults:o,newNodeId:t,sectionLabel:a,blockIsOffered:r}){let n=us(e);return n?n(o,t):DC(e)&&r(ue)&&r(Ra)?{type:ue,props:{...o(ue),id:t(ue),direction:"column",name:`${a(e)} section`,content:[{type:Ra,props:{...o(Ra),id:t(Ra),...it[e]?.headStyle?{headStyle:it[e].headStyle}:{},...it[e]?.headRowGap?{rowGap:it[e].headRowGap}:{},...it[e]?.headDescriptionSize?{descriptionSize:it[e].headDescriptionSize}:{},...Wr(e)!==Wr(Ra)?{eyebrowLook:Wr(e)}:{}}},{type:e,props:{...o(e),id:t(e),headPlacement:"own-box"}}]}}:Po[e]?.fixed===!0?{type:e,props:{...o(e),id:t(e),layout:"boxes"}}:null}import{useEffect as G2,useState as U2}from"react";import{useEaselSession as $2}from"efficient-easel/screen/lib/session-context";function MC(){let e=$2().chrome?.products?.list,[o,t]=U2(null);return G2(()=>{if(!e)return;let a=!1;return e().then(r=>{a||t(r)}),()=>{a=!0}},[e]),o}function KC({mode:e,open:o}){let{setSelectedHeroId:t,setSelectHandler:a}=eg(),r=qC().tree,n=e,s=n.kind==="ticker"?n.heroId:null,i=Gr(f=>{f&&(o({kind:"ticker",heroId:f}),aH(f))},[o]);return Ke(()=>{t(s)},[s,t]),Ke(()=>{a(i)},[a,i]),{partRows:(f,{rowClick:u})=>{let p=String(f.props.id);return f.type==="Hero"&&me(UC,{icon:me(Rt,{type:"ticker",size:13}),name:l(cr),onSelect:()=>i(p),selected:s===p,rowProps:{onClick:u(()=>i(p))},words:r})}}}function VC({mode:e,select:o}){let{setSelectedHeroPart:t,setSelectHandler:a}=El(),r=qC().tree,{appState:n}=$C(x=>x),s=n.data.content??[],i=q2(s);i.current=s;let f=e,u=dr.find(x=>ur[x]===f.kind),p=u&&"nodeId"in f?pr(String(f.nodeId),u):null,m=Gr(x=>{let I=pg(x);if(!I)return;let y=i.current.findIndex(v=>String(v.props.id)===I.nodeId);if(y<0)return;let C={kind:ur[I.part],nodeId:I.nodeId};o({index:y},C)},[o]);return Ke(()=>{t(p)},[p,t]),Ke(()=>{a(m)},[a,m]),{partRows:(x,{rowClick:I})=>{let y=String(x.props.id),C=ug(x);if(C.length===0)return null;let v=g=>{let b=pr(y,g.part);return me(UC,{icon:me(Rt,{type:g.part==="media"?"heroMedia":"heroImage",size:13}),name:l(g.label),onSelect:()=>m(b),selected:p===b,rowProps:{onClick:I(()=>m(b))},words:r},b)},[T,...w]=C;return zr(GC,{children:[v(T),w.length>0&&me(eH,{children:w.map(v)})]})}}}function YC(e,o){return{partRows:(t,a)=>zr(GC,{children:[e.partRows?.(t,a),o.partRows?.(t,a)]})}}function rH(e){let{adapter:o,capabilities:t,currentSlug:a,siteId:r,docId:n,hasUnsavedEdits:s,bridgeCapabilities:i,notifyParent:f,token:u}=ys(),{hasPreviewLink:p}=t,m=Se(jC()).preview?.draftLink,x=lS(e.data),I=RC({hasTrustedConsole:!!u,canCreatePlatformTemplate:i.canCreatePlatformTemplate,capabilities:t,siteId:r,hasUnsavedEdits:s}),y=Gr(()=>{!r||!a||f(AC,{siteId:r,slug:a})},[f,r,a]),C=Db({pageSlug:a,siteId:r,token:u}),v=o.previewHref?.(a)??C;return{barLead:()=>I.visible&&me(V2,{side:"bottom",content:I.enabled?l("Save this website as a platform template"):l(I.disabledReason),children:me("span",{className:"sf-tip-disabled",tabIndex:I.enabled?void 0:0,children:me(K2,{variant:"secondary",disabled:!I.enabled,onClick:y,rightIcon:me(J2,{size:15}),children:l("Save as Template")})})}),barTrail:()=>p&&a&&me(Mb,{liveHref:v,pageId:n??null,draftLink:m}),mainAction:x}}function nH(e,o){let{capabilities:t,templateId:a,siteId:r,tokenRef:n,navigate:s}=ys(),{hasSiteTheme:i,explainsSiteSettings:f}=t,u=T=>o.setView(T),[p,m]=j2(ca[0].id),{surface:x,setSurface:I}=Jh(),y=()=>{if(i){u("styles"),o.reveal(),HC();return}e.show(ed),e.reveal(),HC()},C={id:"pages",label:l("Pages"),icon:me(X2,{}),panel:({onHide:T})=>me(qh,{activeSurface:x,onPreviewSurface:I,onNavigate:w=>{I(null),s(a?{kind:"template",id:a,pageSlug:w}:{kind:"page",slug:w,siteId:r??void 0})},onClose:T})},v=[];return!i&&f&&v.push({id:"appearance",label:l("Appearance"),icon:me(Q2,{}),active:e.kind==="website",onSelect:y}),i&&v.push({id:"styles",label:l("Styles"),icon:me(Z2,{}),panel:({onHide:T,notify:w})=>me(rb,{tokenRef:n,siteId:r??void 0,onClose:T,onNotify:w,tab:p,onTabChange:m})}),{railLead:[C],railTrail:v,resolveLeftView:T=>tC(T,i),openSettings:y,openStyles:()=>{m(wh),u("styles")}}}function lH(){let{navigate:e,siteId:o,reloadFromServer:t,docId:a}=ys(),r=$C(s=>s.config),n=jC();Ke(()=>(Bd({openPage:s=>e({kind:"page",slug:s.slug,siteId:o??void 0}),reload:()=>{t()},config:r}),()=>Bd(null)),[e,o,t,r]),Ke(()=>{let s=Go();if(!s||!a)return;let i=!1;return tH(n).list().then(f=>{i||s.learn(f)}).catch(()=>{}),()=>{i=!0}},[a,n])}function sH(e,o,t,a){let{kind:r,open:n}=e,{selected:s,zoneOf:i}=o;Ke(()=>{XS(s?.type==="BookingBox"&&s.props.region==="confirm"?ZS(i(String(s.props.id))):null)},[s?.props.id]);let f=Tb(e,o),{capabilities:{hasSiteSettings:u}}=ys();lH();let{setSelected:p,setSelectHandler:m}=V(),{chat:x,setChat:I,setSelected:y,setSelectHandler:C}=Fl(),v=r==="header";Ke(()=>{p(v)},[v,p]),Ke(()=>{m(()=>n(Jc))},[m,n]);let T=Gr(()=>n(Vy),[n]),w=r==="chat";Ke(()=>{y(w)},[w,y]),Ke(()=>{C(T)},[C,T]);let{setOpenHandler:g}=fr(),b=Gr(()=>n(Yy),[n]);Ke(()=>{g(b)},[g,b]);let O=YC(KC(e),VC(e)),F=rH(o),L=nH(e,a),P=t.device;return{...O,...F,...L,hasOwnRows:M=>M.type===ls,ownRows:f.renderLocationTree,sectionPressed:f.sectionPressed,wrap:M=>me(_s.Provider,{value:!0,children:zr(oH.Provider,{value:P,children:[M,me(mS,{})]})}),addPanelRow:M=>u?zr("div",{className:"sf-addside-sitewide",children:[me("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:me(Rt,{type:"chat",size:16})}),zr("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{M(),T()},children:[l("Live chat"),me("span",{className:"sf-addside-sitewide-desc",children:l("A chat bubble on every page")})]}),me(Y2,{checked:x.enabled,onChange:z=>I({enabled:z}),ariaLabel:l("Show the chat bubble on the whole site")})]}):void 0}}var WC=null,Nd=new WeakMap;function iH(e){let o=bu();if(!e||!o)return e;WC!==o&&(WC=o,Nd=new WeakMap);let t=Nd.get(e);return t||(t={...e,choices:e.choices?e.choices.map(a=>({...a,label:l(a.label)})):null,spec:e.spec?{...e.spec,addLabel:l(e.spec.addLabel)}:null},Nd.set(e,t)),t}var fH={isLockedBlock:(e,o)=>fC(e)||!!(o&&Go()?.heldElsewhere(o.props.id)),duplicateBlocked:Vl,nestDepth:(e,o,t)=>o===tn?np(e,t):0,newSectionNode:NC,canAddTo:(e,o)=>iH(YS(e,o)),blockIsOffered:VS},cH=new Proxy(LC,{get:(e,o)=>{let t=Reflect.get(e,o);return typeof t=="string"?l(t):t}}),dH={labelAtLevel:(e,o,t)=>l(wd(e,o,t)),descriptions:cH,categoryLabel:e=>{let o=hS(e);return o===void 0?void 0:l(o)},firstSection:gS,blockRowName:QS,plainText:bt,Icon:Rt,Thumbnail:ab,useProducts:MC},uH={desktop:2e3,tablet:800,mobile:390},zC="desktop",pH={options:Yh,initial:zC,fluid:zC,widths:uH},mH={read:eC,write:e=>oC(e),forSelection:(e,o)=>aC(e,o)},xH={first:De,last:le,firstGroup:se,lastGroup:re,isSectionGroup:ba,sectionGroupZone:fy,panelOf:e=>e===De?Jc:null,get sharedReach(){return Mt()?hH:void 0},get shared(){return Go()?pC:void 0},get groupTab(){return Mt()?my:void 0},get groupBadge(){return Mt()?Mc({type:re})??void 0:void 0},get changeNotice(){return Mt()?xy():void 0},get band(){return Mt()?IH:void 0},get groupAccepts(){return Mt()?uy:void 0}},IH={foldable:!0},hH=e=>Mc(e)??uC(e);function gH(e){return{...YC(KC(e),VC(e)),openSettings:()=>e.show(ed)}}var wre={useOwnerName:da,useDocumentLabel:Eh,useBridges:sH,useStandaloneBridges:gH,useDocumentPass:Ob,blockRules:fH,blockLook:dH,devices:pH,leftView:mH,pinned:xH,Canvas:FC,canvasDrag:{media:OC},Inspector:Zy};export{XJ as a,ZJ as b,QJ as c,JJ as d,st as e,vd as f,mee as g,Se as h,mn as i,yS as j,hee as k,Eee as l,vS as m,Dee as n,OS as o,_ee as p,LS as q,AS as r,_S as s,NS as t,Vee as u,Yee as v,Xee as w,Zee as x,AM as y,bp as z,MM as A,soe as B,qo as C,en as D,Qw as E,Y5 as F,xt as G,X5 as H,Z5 as I,tn as J,np as K,xoe as L,Ioe as M,UM as N,op as O,Vw as P,z5 as Q,Jr as R,tp as S,Yw as T,Xw as U,Zw as V,$5 as W,q5 as X,j5 as Y,K5 as Z,Zf as _,LR as $,RR as aa,AR as ba,Rl as ca,Al as da,M9 as ea,se as fa,re as ga,oX as ha,cy as ia,Kl as ja,Ko as ka,it as la,tae as ma,aae as na,rae as oa,nae as pa,If as qa,J3 as ra,e4 as sa,Vt as ta,o4 as ua,t4 as va,ck as wa,dk as xa,bt as ya,Ga as za,nl as Aa,ll as Ba,to as Ca,G8 as Da,Be as Ea,U8 as Fa,kE as Ga,TE as Ha,$8 as Ia,na as Ja,q8 as Ka,j8 as La,OE as Ma,fl as Na,la as Oa,th as Pa,ul as Qa,J8 as Ra,Lf as Sa,cl as Ta,e$ as Ua,o$ as Va,t$ as Wa,a$ as Xa,r$ as Ya,pO as Za,n$ as _a,l$ as $a,s$ as ab,i$ as bb,xr as cb,Wg as db,zg as eb,Gg as fb,u5 as gb,I5 as hb,h5 as ib,g5 as jb,pe as kb,$0 as lb,Hi as mb,q0 as nb,Fz as ob,eo as pb,Oz as qb,Lz as rb,K0 as sb,Rz as tb,fx as ub,cx as vb,Y0 as wb,X0 as xb,Wz as yb,Gz as zb,Uz as Ab,$z as Bb,qz as Cb,ea as Db,Bo as Eb,qi as Fb,mx as Gb,oP as Hb,ji as Ib,Ln as Jb,Vz as Kb,Rk as Lb,K4 as Mb,an as Nb,It as Ob,Ha as Pb,up as Qb,n3 as Rb,Ks as Sb,l3 as Tb,nn as Ub,Cp as Vb,F3 as Wb,E3 as Xb,Av as Yb,O3 as Zb,A3 as _b,vp as $b,B3 as ac,Dv as bc,D3 as cc,x0 as dc,Cn as ec,YW as fc,Ei as gc,XW as hc,C0 as ic,ZW as jc,JW as kc,ez as lc,cz as mc,dz as nc,uz as oc,Em as pc,$W as qc,qW as rc,jW as sc,KW as tc,P0 as uc,vn as vc,tz as wc,Mm as xc,yH as yc,X as zc,l as Ac,$e as Bc,Hg as Cc,FV as Dc,Ng as Ec,im as Fc,hn as Gc,fm as Hc,H6 as Ic,OT as Jc,lW as Kc,Im as Lc,D5 as Mc,H5 as Nc,Vs as Oc,Pv as Pc,v3 as Qc,M3 as Rc,ii as Sc,fi as Tc,W4 as Uc,z4 as Vc,jp as Wc,G4 as Xc,U4 as Yc,$4 as Zc,Qp as _c,em as $c,pW as ad,gm as bd,Ce as cd,Cu as dd,wH as ed,aw as fd,vH as gd,kH as hd,vu as id,FH as jd,rw as kd,EH as ld,OH as md,lw as nd,AH as od,sw as pd,BH as qd,Pu as rd,Fu as sd,Eu as td,Ou as ud,Lu as vd,Ru as wd,jt as xd,MH as yd,HH as zd,WH as Ad,zH as Bd,Xr as Cd,GH as Dd,As as Ed,XH as Fd,_u as Gd,Iw as Hd,QH as Id,ki as Jd,wW as Kd,Ti as Ld,r0 as Md,GW as Nd,rz as Od,nz as Pd,lz as Qd,sz as Rd,iz as Sd,Xm as Td,W0 as Ud,mz as Vd,Vm as Wd,Ym as Xd,xz as Yd,Tn as Zd,Pn as _d,hz as $d,Jt as ae,En as be,bz as ce,Sz as de,Cz as ee,nx as fe,vz as ge,et as he,No as ie,Qi as je,wo as ke,sU as le,iU as me,fU as ne,cU as oe,mU as pe,xU as qe,yF as re,IU as se,hU as te,gU as ue,yU as ve,bU as we,SU as xe,CU as ye,ve as ze,wU as Ae,kF as Be,vU as Ce,kU as De,ta as Ee,TU as Fe,Nn as Ge,oa as He,PU as Ie,Xx as Je,Wn as Ke,zn as Le,FU as Me,EU as Ne,OU as Oe,LU as Pe,RU as Qe,AU as Re,BU as Se,DU as Te,_U as Ue,NU as Ve,MU as We,HU as Xe,Gn as Ye,WU as Ze,Un as _e,$n as $e,tf as af,qn as bf,zU as cf,kt as df,GU as ef,UU as ff,$U as gf,qU as hf,jU as if,KU as jf,VU as kf,YU as lf,Jo as mf,XU as nf,ZU as of,jn as pf,QU as qf,af as rf,JU as sf,e7 as tf,rf as uf,o7 as vf,aI as wf,rI as xf,nI as yf,t7 as zf,p1 as Af,a7 as Bf,r7 as Cf,QD as Df,Ty as Ef,We as Ff,Cr as Gf,o_ as Hf,Ly as If,MX as Jf,HX as Kf,WX as Lf,zX as Mf,GX as Nf,UX as Of,$X as Pf,qX as Qf,jX as Rf,KX as Sf,VX as Tf,Ol as Uf,yR as Vf,T9 as Wf,P9 as Xf,wR as Yf,kR as Zf,og as _f,ER as $f,R9 as ag,A9 as bg,ag as cg,B9 as dg,ng as eg,rg as fg,q9 as gg,Tl as hg,jh as ig,Kh as jg,Pl as kg,a9 as lg,r9 as mg,Fl as ng,dR as og,m9 as pg,fr as qg,g9 as rg,Jh as sg,PJ as tg,FJ as ug,EJ as vg,OJ as wg,Woe as xg,zoe as yg,Voe as zg,Uoe as Ag,S9 as Bg,eg as Cg,v9 as Dg,El as Eg,mQ as Fg,nb as Gg,lb as Hg,f5 as Ig,sh as Jg,I$ as Kg,h$ as Lg,g$ as Mg,y$ as Ng,Gf as Og,Uf as Pg,ig as Qg,K9 as Rg,fg as Sg,_R as Tg,Qf as Ug,Z9 as Vg,Q9 as Wg,NR as Xg,J9 as Yg,pr as Zg,pg as _g,ej as $g,mg as ah,RK as bh,Sg as ch,Tg as dh,Kg as eh,HV as fh,MB as gh,HB as hh,gr as ih,WB as jh,zB as kh,KV as lh,Qg as mh,le as nh,jl as oh,ro as ph,cb as qh,db as rh,gQ as sh,Pr as th,ub as uh,pb as vh,SQ as wh,CQ as xh,Lb as yh,md as zh,Rb as Ah,YS as Bh,Aoe as Ch,mC as Dh,Is as Eh,e2 as Fh,o2 as Gh,ate as Hh,t5 as Ih,l5 as Jh,D2 as Kh,BC as Lh,_2 as Mh,Wr as Nh,Zte as Oh,Qte as Ph,wre as Qh};
|