efficient-web-builder 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/chunks/{PreviewFooter-TTWVSN7F.js → PreviewFooter-SNJQZ6JZ.js} +1 -1
- package/dist/chunks/{SectionEditorShell-QHF74BM4.js → SectionEditorShell-U5FUJW2M.js} +1 -1
- package/dist/chunks/{StorefrontEditorChrome-VAFMI23Y.js → StorefrontEditorChrome-6OQOFCL6.js} +1 -1
- package/dist/chunks/{chunk-5WIA75VU.js → chunk-6VNEBJKI.js} +1 -1
- package/dist/chunks/{chunk-FEL3RPX5.js → chunk-CZ46NWN5.js} +1 -1
- package/dist/chunks/{chunk-2Z43RC3L.js → chunk-RTCXXI5U.js} +2 -2
- package/dist/chunks/{chunk-23HYGLAH.js → chunk-TX7ND7AF.js} +1 -1
- package/dist/chunks/{chunk-X2DL3VCU.js → chunk-WQ7W4AXL.js} +6 -6
- package/dist/chunks/{render-client-3H6QYWG7.js → render-client-ISZ5CGAI.js} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- /package/dist/chunks/{chunk-2Z43RC3L.js.LEGAL.txt → chunk-RTCXXI5U.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-X2DL3VCU.js.LEGAL.txt → chunk-WQ7W4AXL.js.LEGAL.txt} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{$b as la,Aa as
|
|
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:!1,autoOpenDelaySec:15,formSlug:"",trigger:"delay",scrollPercent:50,showOn:"all",showOnPages:[],hideAfter:"days",hideDays:7,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},xe=je,zS=Ou,Du=Nu,Hu=da;function pa(e,t,o){return typeof t=="string"&&e.includes(t)?t:o}function Ts(e,t,o){let r=zS(e,o);return Math.min(t.max,Math.max(t.min,Math.round(r)))}function KS(e){return typeof e.hideAfter=="string"?pa(MS,e.hideAfter,Rs.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Rs.hideAfter}function $S(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t.trim():"").filter(Boolean).map(t=>t.startsWith("/")?t:`/${t}`):[]}function Mu(e,t){if(e==null)return t;let o=r=>r.trim()?r:"";if(typeof e=="string")return o(e);if(typeof e=="object"&&"text"in e){let r=e.text;return typeof r=="string"?o(r):""}return t}function VS(e,t){return Array.isArray(e)?Hu(e,[]):t}function qS(e,t){return Array.isArray(e)?e.map(o=>{let r=o??{};return{label:xe(r.label,""),value:xe(r.value,"")}}).filter(o=>o.label||o.value):t}function EN(e){let t=e??{},o=Rs;return{metaLabel:xe(t.metaLabel,o.metaLabel),issueLabel:Mu(t.issueLabel,o.issueLabel),issueNumber:Mu(t.issueNumber,o.issueNumber),kicker:xe(t.kicker,o.kicker),heading:xe(t.heading,o.heading),deck:xe(t.deck,o.deck),stats:qS(t.stats,o.stats),formLabel:xe(t.formLabel,o.formLabel),formHeading:xe(t.formHeading,o.formHeading),formIntro:xe(t.formIntro,o.formIntro),firstNameLabel:xe(t.firstNameLabel,o.firstNameLabel),firstNamePlaceholder:xe(t.firstNamePlaceholder,o.firstNamePlaceholder),emailLabel:xe(t.emailLabel,o.emailLabel),emailPlaceholder:xe(t.emailPlaceholder,o.emailPlaceholder),interestsLabel:xe(t.interestsLabel,o.interestsLabel),interests:Hu(t.interests,o.interests),frequencyLabel:xe(t.frequencyLabel,o.frequencyLabel),frequencies:VS(t.frequencies,o.frequencies),submitText:xe(t.submitText,o.submitText),finePrint:xe(t.finePrint,o.finePrint),dismissText:xe(t.dismissText,o.dismissText),emailInvalidText:xe(t.emailInvalidText,o.emailInvalidText),submitErrorText:xe(t.submitErrorText,o.submitErrorText),successHeading:xe(t.successHeading,o.successHeading),successBody:xe(t.successBody,o.successBody),keepBrowsingText:xe(t.keepBrowsingText,o.keepBrowsingText),formSlug:typeof t.formSlug=="string"?t.formSlug.trim():o.formSlug,autoOpen:Du(t.autoOpen,o.autoOpen),autoOpenDelaySec:Ts(t.autoOpenDelaySec,GS,o.autoOpenDelaySec),trigger:pa(BS,t.trigger,o.trigger),scrollPercent:Ts(t.scrollPercent,WS,o.scrollPercent),showOn:pa(DS,t.showOn,o.showOn),showOnPages:$S(t.showOnPages),hideAfter:KS(t),hideDays:Ts(t.hideDays,US,o.hideDays),formSide:pa(HS,t.formSide,o.formSide),valuePanelOnPhone:Du(t.valuePanelOnPhone,o.valuePanelOnPhone),sectionAccent:t.sectionAccent,sectionCorners:t.sectionCorners,sectionCornerSides:t.sectionCornerSides,textStyles:Bu(t)}}var mo=class extends Error{constructor(t,o,r={}){super(o??YS[t],r.cause===void 0?void 0:{cause:r.cause}),this.name="WebsiteBackendError",this.kind=t,this.conflict=r.conflict,this.holder=r.holder}},YS={unauthorized:"The editor's sign-in was refused.","changed-elsewhere":"This page was changed somewhere else.","lock-taken":"Somebody else is editing this page.","not-found":"This no longer exists.",invalid:"The request was refused.",unavailable:"The server could not be reached."};function ma(e,t){if(!e||typeof e!="object")return!1;let o=e;return o.name!=="WebsiteBackendError"||typeof o.kind!="string"?!1:t===void 0||o.kind===t}import{readLockHolder as pC}from"efficient-easel/edit-lock";var _s="/api/storefront/section-templates/",Es=e=>`${_s}${encodeURIComponent(e)}/`,Ls=e=>e.node!=null;function xa(e){if(!Ls(e))throw new Error(`Section template ${e.id} has no design`);return e}var Os=(e,t)=>e instanceof at&&e.status===t;function XS(e){return{list:()=>sr(`${_s}?no_page=true`,{token:e()}).then(t=>Array.isArray(t)?t:t.results??[]),get:t=>sr(Es(t),{token:e()}).catch(o=>{if(Os(o,404))return null;throw o}),create:t=>sr(_s,{method:"POST",token:e(),body:JSON.stringify(t)}),patch:(t,o)=>sr(Es(t),{method:"PATCH",token:e(),body:JSON.stringify(o)}),remove:t=>sr(Es(t),{method:"DELETE",token:e()})}}var As="sf:section-templates",Gu=`${As}.imported`,jS="Untitled section",JS=160,ga=e=>(typeof e=="string"?e.trim().slice(0,JS):"")||jS;function ZS(e){try{let t=JSON.parse(e);return Array.isArray(t)?t.filter(o=>{let r=o?.node;return typeof o?.id=="string"&&typeof r?.type=="string"}):[]}catch{return[]}}async function QS(e,t=xs){let o={created:0,seeded:0,left:0,skipped:0,kept:!1},r=t.getItem(As);if(r===null)return o;for(let n of ZS(r))try{let a=await e.get(n.id);if(a)a.node==null?(await e.patch(n.id,{node:n.node}),o.seeded+=1):o.left+=1;else try{await e.create({id:n.id,name:ga(n.name),node:n.node}),o.created+=1}catch(l){if(!Os(l,400))throw l;o.skipped+=1}}catch{return{...o,kept:!0}}return t.setItem(Gu,r),t.getItem(Gu)===r&&t.removeItem(As),o}var Ia=class{constructor(t,o=xs){this.readToken=t;this.storage=o;this.imported=null;this.http=XS(t)}ready(){return this.imported?this.imported:this.readToken()?(this.imported=QS(this.http,this.storage).catch(()=>{}),this.imported):Promise.resolve()}async list(){return await this.ready(),(await this.http.list()).filter(Ls)}async get(t){return await this.ready(),this.http.get(t)}async ensure(t,o,r){await this.ready();let n=async l=>l?Ls(l)?l:xa(await this.http.patch(t,{node:r})):null,a=await n(await this.http.get(t));if(a)return a;try{return xa(await this.http.create({id:t,name:ga(o),node:r}))}catch(l){if(Os(l,400)){let s=await n(await this.http.get(t));if(s)return s}throw l}}async save(t,o){return await this.ready(),xa(await this.http.create({name:ga(t),node:o}))}async update(t,o){return await this.ready(),xa(await this.http.patch(t,{node:o}))}async rename(t,o){return await this.ready(),this.http.patch(t,{name:ga(o)})}async remove(t){await this.ready(),await this.http.remove(t)}};var dt="homepage";var eC="product",tC="tyre";var oC="productType",rC={[eC]:"alloy-wheel",[tC]:"tyre"},nC=["alloy-wheel","tyre"];function DN(e,t){return aC(t)??rC[e]??null}function aC(e){let t=e?.[oC];return typeof t=="string"&&nC.includes(t)?t:null}var lC=["home","products","gallery","about","contact"],sC=e=>{let t=e.slug.trim().toLowerCase(),o=(e.title??"").trim().toLowerCase(),r=lC.findIndex(n=>n===t||n===o);return r===-1?Number.POSITIVE_INFINITY:r},Wu=e=>e.map((t,o)=>({page:t,idx:o,rank:sC(t)})).sort((t,o)=>t.rank-o.rank||t.idx-o.idx).map(t=>t.page);var Ku="Popups",Uu="Site",iC="Main Pages",cC="Dynamic Pages",fC="dynamic",dC="dynamic";function uC(e){return e.kind===dC}var $u={[Fs]:{label:"Site popup",group:Ku},[lt]:{label:"Footer",group:Uu},[ua]:{label:"Cart drawer",group:Uu}};function rn(e){return $u[e.slug]?.label||e.title||e.slug}function Ns(e){let t=e.group?.trim();return t||null}function zu(e,t){let o=new Map;for(let r of e){let n=t(r),a=o.get(n);a?a.push(r):o.set(n,[r])}return o}function Vu(e){let t=Wu(e),o=[],r=t.filter(s=>!on(s.slug)),n=r.filter(s=>!Ns(s));n.length&&o.push({key:"top",group:null,pages:n});let a=r.filter(s=>Ns(s));for(let[s,i]of zu(a,c=>Ns(c)))o.push({key:`folder:${s}`,group:s,pages:i});let l=t.filter(s=>on(s.slug));for(let[s,i]of zu(l,c=>$u[c.slug]?.group??Ku))o.push({key:`system:${s}`,group:s,pages:i});return o}function VN(e){let t=[],o=[];for(let r of e){if(uC(r)){o.push(r);continue}let n=r.groupKey??(r.group?`folder:${r.group}`:"top"),a=t[t.length-1];a&&a.key===n?a.rows.push(r):t.push({key:n,label:r.group??iC,rows:[r]})}if(o.length){let r=t.findIndex(n=>n.key.startsWith("system:"));t.splice(r===-1?t.length:r,0,{key:fC,label:cC,rows:o})}return t}var an="page_changed_elsewhere",nn=e=>e.layout_updated_at??e.updated_at??null;function mC(e){if(!e||typeof e!="object")return null;let t=e;return t.code!==an?null:{savedBy:typeof t.saved_by=="string"?t.saved_by:"",savedByYou:t.saved_by_you===!0,secondsAgo:typeof t.seconds_ago=="number"?t.seconds_ago:0}}function xC(e){return e===401||e===403?"unauthorized":e===404?"not-found":e===lr||e>=500?"unavailable":"invalid"}function gC(e){if(!(e instanceof at))return e;if(e.status===409){let t=mC(e.data);if(t)return new mo("changed-elsewhere",e.message,{conflict:t,cause:e});let o=pC(e.data);if(o)return new mo("lock-taken",e.message,{holder:o,cause:e})}return new mo(xC(e.status),e.message,{cause:e})}var IC={group:"Template pages",groupKey:"template"},qu=e=>({id:e.id,slug:e.slug,label:e.title||e.slug,...IC,draft:!1});function Xu(e){let t=async s=>{let i=e.token();if(!i)throw new mo("unauthorized","The editor has no sign-in yet.");try{return await s(i)}catch(c){throw gC(c)}},o={list:s=>t(async i=>{let c=await oe.listPages(i,s?.siteId);return Vu(c.filter(f=>f.slug!==lt)).flatMap(f=>f.pages.map(u=>({id:u.id,slug:u.slug,label:rn(u),group:f.group,groupKey:f.key,draft:!u.is_published,kind:u.kind??null})))}),load:s=>t(async i=>{let c="id"in s?s.id:(await oe.findPageBySlug(s.slug,i,s.siteId))?.id,f=c?await oe.getPageById(c,i):null;return f?{id:f.id,layout:f.layout,kind:f.kind,version:nn(f)}:null}),save:(s,i,c)=>{let{version:f}=c;return f?t(async u=>({version:nn(await oe.saveLayout(s,i.layout,u,f,c.clientId||void 0))})):Promise.reject(new Error("Refusing to save this page: the editor does not know which version it is replacing. Reload the page and try again."))},version:s=>t(i=>oe.getPageById(s,i).then(nn)),publish:(s,i)=>t(async c=>({version:nn(await oe.publishPage(s,c,i?.version))}))},r=s=>({list:()=>t(async i=>(await oe.listTemplatePages(s,i)).map(qu)),load:i=>t(async c=>{let f=x=>"id"in i?x.id===i.id:x.slug===i.slug,u=x=>({id:x.id,layout:x.layout,version:null}),d=await oe.listTemplatePages(s,c);if(d.length)return u(d.find(f)??d[0]);let p=await oe.getTemplate(s,c).catch(()=>null);try{return u(await oe.createTemplatePage(s,{slug:dt,title:"Home",layout:p?.layout??{}},c))}catch{let x=await oe.listTemplatePages(s,c),g=x.find(f)??x[0];return g?u(g):null}}),save:(i,c)=>t(async f=>(await oe.saveTemplatePageLayout(i,c.layout,f),{version:null})),create:i=>t(async c=>qu(await oe.createTemplatePage(s,{slug:i.slug,title:i.title,layout:i.layout},c))),remove:i=>t(c=>oe.deleteTemplatePage(i,c))}),n=s=>{let i=s?.siteId??e.siteId();if(!i)throw new mo("not-found","This editor is not connected to a website.");return i},a=s=>({name:s.name,slug:s.slug,mapsApiKey:s.maps_api_key,mapsMapId:s.maps_map_id}),l={pages:o,lock:{claim:(s,i,c)=>t(async f=>({heartbeatSeconds:(await oe.claimPageEditLock(s,f,i,c)).heartbeat_seconds})),release:s=>t(i=>oe.releasePageEditLock(s,i))},site:{get:s=>t(async i=>a(await oe.getSite(n(s),i))),update:(s,i)=>t(async c=>a(await oe.updateSite(n(i),s.mapsApiKey===void 0?{}:{maps_api_key:s.mapsApiKey},c)))},media:{resolve:Xd},sectionTemplates:new Ia(e.token),templates:{get:s=>t(async i=>{let c=await oe.getTemplate(s,i);return{id:c.id,name:c.name}}),pages:r}};return l[Kd]=!0,l}var Yu=new WeakMap;function ln(e=Ye()){if(e.hostBackend)return e.hostBackend;let t=Yu.get(e);return t||(t=Xu({token:()=>e.auth.token,siteId:()=>e.siteId()}),Yu.set(e,t)),t}function rB(e={}){return Xu({token:()=>Ye().auth.token,siteId:()=>e.siteId??Ye().siteId()})}var ju=["general","commerce","service"],fr=[{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:"BrandStrip",label:"Brand Strip",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:"TimelineTrack",label:"Milestone 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"},{type:"KeyFeatures",label:"Key Features",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:"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 aB(){return Object.fromEntries(fr.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var hC={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.',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."},lB=["Grid"],sB=Array.from(new Set([...fr.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(hC)])),iB=Object.fromEntries(fr.flatMap(e=>e.sections.map(t=>[t.type,t.label]))),bC={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"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"},ha={...bC,...Object.fromEntries(fr.flatMap(e=>e.sections.map(t=>[t.type,t.set])))};function Ju(e){return Object.prototype.hasOwnProperty.call(ha,e)?ha[e]:void 0}function Bs(e){return Object.keys(ha).filter(t=>ha[t]===e).sort()}var cB=Bs("general"),fB=Bs("commerce"),dB=Bs("service"),yC="Flex",xo="Box",uB=`${xo}es`;function SC(e){return e==="section"?"Blank section":xo}function pB(e,t,o){return e===yC?SC(t):o}import{createContext as CC,useContext as PC,useEffect as kC}from"react";import{jsx as wC}from"react/jsx-runtime";var Zu=CC(null);function IB({session:e,children:t}){return Is(e),kC(()=>(Is(e),()=>qd(e)),[e]),wC(Zu.Provider,{value:e,children:t})}function ba(){return PC(Zu)??Ye()}var Ds="sf-editor-footer-return";function yB(e){if(!(typeof window>"u"))try{window.sessionStorage.setItem(Ds,e)}catch{}}function Ms(){if(typeof window>"u")return null;try{return window.sessionStorage.getItem(Ds)}catch{return null}}function Hs(){if(!(typeof window>"u"))try{window.sessionStorage.removeItem(Ds)}catch{}}import{accessForNewDocument as vC}from"efficient-easel/edit-lock";function Qu(e){return e.failed?"error":e.pending?"saving":e.saved?"saved":"idle"}function PB(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function ep(e,t){t.resetAutosave(),t.setVersion(null),t.setSaveConflict(null),t.setAccess(vC(e))}import{useEffect as TC,useState as RC}from"react";function dr(){return Ye().auth.token}function tp({fetch:e,keyBy:t}){let o=null,r=null,n=null;return(a=!1)=>{let l=dr(),s=t?t():null;return(a||!o||r===null&&l!==null||n!==s)&&(r=l,n=s,o=l?e(l,s).catch(()=>[]):Promise.resolve([])),o}}var ya=tp({fetch:(e,t)=>oe.listProducts(e,{siteId:t,kinds:["alloy-wheel","tyre"]}),keyBy:Lo}),No=(e=!1)=>ya(e).then(t=>t.filter(o=>o.kind==="alloy-wheel"));function op(e){let[t,o]=RC(null);return TC(()=>{let r=!1;return e().then(n=>{r||o(n)}),()=>{r=!0}},[e]),t}function AB(){return op(No)}function OB(){return op(ya)}import{createContext as FC,useContext as EC,useEffect as _C,useSyncExternalStore as LC}from"react";import{jsx as BC}from"react/jsx-runtime";var rp=FC(null),sn=null;function DB({panel:e,children:t}){return sn=e,_C(()=>(sn=e,()=>{sn===e&&(sn=null,sp(Ft?.request.requestId??"",null))}),[e]),BC(rp.Provider,{value:e,children:t})}function MB(){return EC(rp)}function np(){return sn!==null}var Ft=null,Gs=new Set,ap=()=>{for(let e of[...Gs])e()};function lp(e){return new Promise(t=>{let o=Ft;Ft={request:e,resolve:t},ap(),o?.resolve(null)})}function sp(e,t){if(!Ft||Ft.request.requestId!==e)return;let{resolve:o}=Ft;Ft=null,ap(),o(t)}function HB(){Ft&&sp(Ft.request.requestId,null)}function AC(e){return Gs.add(e),()=>{Gs.delete(e)}}var OC=()=>Ft?.request??null,NC=()=>null;function GB(){return LC(AC,OC,NC)}var Ws=new Map,ip=0;function DC(){return ip+=1,`mp-${typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():String(ip)}`}function Us(e,t){if(!e.connected)return Promise.resolve(null);let o=DC();return np()?lp({requestId:o,accept:t.accept,title:t.title,file:t.file??null}):new Promise(r=>{Ws.set(o,r),e.send("storefront-editor:open-media-picker",{requestId:o,accept:t.accept,title:t.title,...t.file?{file:t.file}:{}})})}function zs(e,t){let o=Ws.get(e);o&&(Ws.delete(e),o(t))}var MC={"Logos.logosPerRow":"columns","HeroSlide.tintOpacity":"overlay","Split.textBgTint":"overlay"};function HC(e){return Array.isArray(e)&&e.length>0&&e.every(t=>!!t&&typeof t=="object"&&typeof t.type=="string")}function Ks(e){let t=e.props,o=!1;if(e.type&&t)for(let[r,n]of Object.entries(MC)){let a=r.indexOf("."),l=r.slice(0,a),s=r.slice(a+1);if(l!==e.type||!(s in t))continue;let i=t[s],c={...t};delete c[s],(!(n in c)||c[n]===void 0)&&(c[n]=i),t=c,o=!0}if(t){let r=t;for(let[n,a]of Object.entries(t)){if(!HC(a))continue;let l=a.map(Ks);l.some((s,i)=>s!==a[i])&&(r===t&&(r={...t}),r[n]=l,o=!0)}t=r}return o?{...e,props:t}:e}function cp(e){let t=e;if(!t||typeof t!="object")return e;let o=!1,r={...e};if(Array.isArray(t.content)){let n=t.content.map(Ks);n.some((a,l)=>a!==t.content[l])&&(r.content=n,o=!0)}if(t.zones&&typeof t.zones=="object"){let n=!1,a=Object.fromEntries(Object.entries(t.zones).map(([l,s])=>{if(!Array.isArray(s))return[l,s];let i=s.map(Ks);return i.some((c,f)=>c!==s[f])&&(n=!0),[l,i]}));n&&(r.zones=a,o=!0)}return o?r:e}import{createContext as CT,useCallback as we,useContext as PT,useEffect as ut,useMemo as bc,useRef as ot,useState as Ct}from"react";var GC={general:!0,commerce:!0,service:!0};function $s(e){let t=e?.sets;return t?Object.fromEntries(ju.map(o=>[o,t.includes(o)])):GC}function cn(e=Ye()){return $s(e.blocks)}function fp(e,t){let o=t?{siteId:t}:void 0;return{resolve:r=>e.load({slug:r,...o}),saveLayout:(r,n,a,l)=>e.save(r,{layout:n},{version:a,clientId:l??""}),rereadVersion:e.version?r=>e.version(r):void 0,publish:e.publish?(r,n)=>e.publish(r,n?{version:n}:void 0):void 0,listPages:()=>e.list(o),createPage:e.create?r=>e.create({...r,...o}):void 0,deletePage:e.remove?r=>e.remove(r):void 0}}function dp(e,t=ln(),o=cn()){let r=gs(t),n=e?{siteId:e}:void 0,a=r?!!e:!0,l=t.site.update;return{capabilities:{canPublish:!!t.pages.publish,hasSiteSettings:r,hasSiteTheme:r,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!t.pages.create,canDeletePagesInline:!!t.pages.remove,hasEditLock:!!t.lock,hasEditGuard:!0,hasPinnedChrome:r&&o.commerce&&o.service,explainsSiteSettings:!1,hasSiteRecord:a,canEditSiteRecord:a&&!!l,hasPreviewLink:r||!!t.preview,hasCatalog:r&&o.commerce,hasForms:r&&o.service,offersCommerce:o.commerce,offersService:o.service},...fp(t.pages,e),lock:t.lock,site:a?()=>t.site.get(n):void 0,updateSite:a&&l?s=>l(s,n):void 0,previewHref:t.preview?s=>t.preview.href(s):void 0}}function up(e,t=ln(),o=cn()){let r=gs(t),n=t.templates,a=n?n.pages(e):{list:()=>Promise.reject(new Error(Vs)),load:()=>Promise.reject(new Error(Vs)),save:()=>Promise.reject(new Error(Vs))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!a.create,canDeletePagesInline:!!a.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:r&&o.commerce&&o.service,explainsSiteSettings:r,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:r&&o.commerce,hasForms:r&&o.service,offersCommerce:o.commerce,offersService:o.service},...fp(a,void 0),publish:void 0,templateName:n?()=>n.get(e).then(l=>l.name):void 0}}var Vs="This editor's backend has no website templates.";import{EDIT_LOCK_TAKEN as WC}from"efficient-easel/edit-lock";var UC={unauthorized:401,"changed-elsewhere":409,"lock-taken":409,"not-found":404,invalid:400,unavailable:lr};function qs(e){if(e instanceof at)return{status:e.status,data:e.data};if(!ma(e))return null;if(e.cause instanceof at)return{status:e.cause.status,data:e.cause.data};let t=UC[e.kind];return e.kind==="changed-elsewhere"?{status:t,data:{code:an,saved_by:e.conflict?.savedBy??"",saved_by_you:e.conflict?.savedByYou===!0,seconds_ago:e.conflict?.secondsAgo??0}}:e.kind==="lock-taken"?{status:t,data:{code:WC,holder_name:e.holder?.name??"",seconds_since_seen:e.holder?.secondsSinceSeen??0,seconds_since_held:e.holder?.secondsSinceHeld??0}}:{status:t,data:null}}function pp(e){return qs(e)?.status===401}import{Fragment as zC}from"react";function Sa(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}import{jsx as KC,jsxs as $C}from"react/jsx-runtime";var Ca=["FusionForge\xAE","Precision Forged","Monoblock Cast"];function Ys(e){return Sa(e)}function mp(e){let t=e.split("\xAE");return t.length===1?e:t.map((o,r)=>$C(zC,{children:[o,r<t.length-1&&KC(ou,{})]},r))}var xp=Ca.map((e,t)=>({key:e,num:String(t+1).padStart(2,"0"),title:mp(e)}));function Xs(e){if(e.length===0)return[...Ca];let t=new Set(e.map(o=>o.process));return Ca.filter(o=>t.has(o))}function gp(e){return Xs(e).map((t,o)=>({key:t,num:String(o+1).padStart(2,"0"),title:mp(t)}))}var i1=Object.fromEntries(Ca.map(e=>[e,Ys(e)]));var Ip=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],hp={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Et="var(--wheel-stage)",_t="transparent",fn="inherit";function Pa(e,t){return e===fn?Et:e==null?t:e===!0?Et:e===!1?_t:e}function d1(e){return typeof e=="string"&&e!==fn?e:Et}function bp(e){return e!==_t&&e!=="none"&&e!==""}function yp(e,t){return e===fn||e===!0?!0:e==null?t===Et:!1}import{useEffect as Lg,useId as jv,useMemo as wr}from"react";var Sp=1;function VC(e){return so(e)}function Cp(e){let t=VC(e);return t===null?{}:{"--sf-card-image-radius":`${t}px`}}var wp="sf.gapContainer",go={min:-32,max:64,step:2},vp={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},ka={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},qC=new Set(["Events","GalleryB"]);function Js(e,t,o){if(typeof t=="number"&&Number.isFinite(t)&&t>=go.min)return t;if(typeof t=="string"){let r=vp[e]?.[t];if(typeof r=="number")return r}return typeof o=="number"&&Number.isFinite(o)?o:ka[e]}var YC="sf-gap-overlap",XC="--sf-gap-overlap",Tp="--sf-block-gap",jC="--sf-block-gap-rem",js={min:0,max:go.max,step:go.step};function JC(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.min(Math.max(Math.round(e),js.min),js.max);return t-t%js.step}function x1(e){let t=JC(e);return t===null?{}:{[Tp]:`${t}px`,[jC]:`${t/16}rem`}}var Pp="sf-gap-zone",kp="--sf-gap-len";function Zs(e,t){return typeof t=="number"&&Number.isFinite(t)&&t>=go.min?!0:typeof t=="string"&&typeof vp[e]?.[t]=="number"}var ZC={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function Rp(e,t,o){if(!Zs(e,t)){let n=`${ka[e]}px`,a=qC.has(e)?`var(--sf-card-gap, ${n})`:n;return{className:` ${Pp}`,style:{[kp]:`var(${Tp}, ${a})`}}}let r=Js(e,t);return r>=0?{className:` ${Pp}`,style:{[kp]:`${r}px`}}:{className:` ${YC} ${ZC[o]}`,style:{gap:"0px",[XC]:`${-r/2}px`}}}import{useMemo as gk,useState as Ik}from"react";function QC(e){return(e.components??[]).reduce((o,r)=>o+r.wheels,0)>4}function h1(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(QC)}var eP=150,tP="Front + rear",Fp="L/R pair",Ep="Not handed",oP="L/R";function rP(e){return e.et==null||e.rearEt==null?0:Math.abs(e.rearEt-e.et)}function nP(e){return rP(e)>=eP}function b1(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(nP)}function ur(e){return e.directional===!0}function _p(e){return e.rearWidth!=null||e.rearEt!=null&&e.rearEt!==e.et}function Lp(e){return{twoObjects:lP(e),handed:e.handed??!1,staggered:!1}}function Ap(e){let t=[e.twoObjects?tP:"",e.handed?oP:""].filter(Boolean);return t.length?t.join(" \xB7 "):null}function Op(e){return e.handed}function aP(e){return new Set((e.components??[]).map(t=>t.partNumber)).size>1}function y1(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(aP)}function lP(e){return(e.setWheelCount??0)>4}var sP=new Set(["boltPattern"]);function S1(e,t){return e&&sP.has(t)}function iP(e){return typeof e=="number"?String(e):""}function Np(e){let t=iP(e);return t&&`${t} LUG`}function Qs(e){let t=e.spec?.lugs;return typeof t=="number"?t:null}function Bp(e){let t=new Set;for(let o of e){let r=Qs(o);r!==null&&t.add(r)}return[...t].sort((o,r)=>o-r)}function Be(e){return Number.isInteger(e)?String(e):String(Number(e.toFixed(2)))}function Dp(e,t){return e===t?`ET ${e}`:`ET ${e}\u2013${t}`}function Mp(e,t){return e===t?`${Be(e)}"`:`${Be(e)}"\u2013${Be(t)}"`}function k1(e){return e==="\u2014"?e:`${e}"`}function cP(e){return e.length===0?null:{min:Math.min(...e),max:Math.max(...e)}}function wa(e){let t=cP(e);return t?Mp(t.min,t.max):null}function Hp(e){let t=new Set;for(let o of e)for(let r of o.sizes??[])typeof r=="number"&&t.add(r);return[...t].sort((o,r)=>o-r)}var Gp=5,zp=.2;function Kp(e){if(!e)return{holes:null,circles:[]};let t=e.replace(/\([^)]*\)?/g," ").trim(),o=t.match(/^\s*(\d+)\s*[x×*]\s*(.+)$/i),r=o?Number(o[1]):null,a=(o?o[2]:t).split(/[-/,]/).map(l=>Number(l.trim().replace(/[^\d.]/g,""))).filter(l=>Number.isFinite(l)&&l>0);return{holes:r,circles:a}}function ei(e){if(!e||e.length<2)return null;let[t,o]=e;return!Number.isFinite(t)||!Number.isFinite(o)?null:[Math.min(t,o),Math.max(t,o)]}function _1(e){if(!e)return null;let t=Kp(e.pcd||e.boltPattern);if(t.holes===null||t.circles.length===0)return null;let o=t.circles[0],r=ei(e.etRange),n=r?[r[0]-Gp,r[1]+Gp]:null;return{holes:t.holes,circle:o,centreBore:typeof e.centreBore=="number"&&e.centreBore>0?e.centreBore:null,etRange:n}}function fP(e,t){return Math.abs(e-t)<=zp}function $p(e,t,o){let r=Kp(e);return(r.holes??t)!==o.holes?!1:r.circles.some(a=>fP(a,o.circle))}function Vp(e,t){return t.centreBore===null?!0:e+zp>=t.centreBore}function dP(e,t){return e[0]<=t[1]&&e[1]>=t[0]}function va(e,t){let o=`${t.holes}\xD7${t.circle}`;return e.pcds.length===0?{key:"unverifiable",wheel:"",vehicle:o}:e.pcds.some(r=>$p(r,e.lugs,t))?t.etRange!==null&&e.etRange!==null&&!dP(e.etRange,t.etRange)?{key:"et",wheel:Ta(e.etRange),vehicle:Ta(t.etRange)}:e.centreBores.length>0&&!e.centreBores.some(r=>Vp(r,t))?{key:"bore",wheel:`${e.centreBores.join(" / ")} mm`,vehicle:`${t.centreBore} mm`}:null:{key:"pcd",wheel:e.pcds.join(" / "),vehicle:o}}function qp(e){return{pcds:e.spec?.pcds??[],lugs:e.spec?.lugs??null,etRange:ei(e.spec?.etRange),centreBores:e.spec?.centreBores??[]}}function Yp(e){let t=e.et,o=e.rearEt??e.et;return{pcds:e.boltPattern?[e.boltPattern]:[],lugs:null,etRange:t==null||o==null?null:[Math.min(t,o),Math.max(t,o)],centreBores:e.centreBore==null?[]:[e.centreBore]}}function Xp(e,t){let o=va(e,t);return o===null||o.key!=="et"?o:va(e,{...t,etRange:null})}function L1(e,t){return va(qp(e),t)}function A1(e,t){return va(Yp(e),t)}function uP(e,t){return Xp(Yp(e),t)===null}function jp(e,t){return t?e.filter(o=>uP(o,t)):[...e]}function pP(e,t){return Xp(qp(e),t)===null}function Jp(e,t){return t?e.filter(o=>pP(o,t)):e}var Wp=1;function mP(e,t){let o=e.spec?.pcds??[],r=e.spec?.centreBores??[],n=ei(e.spec?.etRange);if(!t)return{pcds:o,etRange:n,centreBores:r};let a=e.spec?.lugs??null,l=o.filter(i=>$p(i,a,t)),s=r.filter(i=>Vp(i,t));return{pcds:l.length>0?l:o,etRange:n,centreBores:s.length>0?s:r}}function Ta(e){return Dp(e[0],e[1])}function Up(e){let t=e.slice(0,Wp).join(" / "),o=e.length-Wp;return o>0?`${t} +${o}`:t}var O1="\xB7";function Zp(e){return[{fieldKey:"diameter",text:wa(e.sizes)},{fieldKey:"holes",text:Np(e.spec?.lugs)}].filter(t=>!!t.text)}function N1(e,t){let{pcds:o,etRange:r,centreBores:n}=mP(e,t),a=[];return o.length>0&&a.push({fieldKey:"pcd",text:`PCD ${Up(o)}`}),r!==null&&a.push({fieldKey:"et",text:Ta(r)}),n.length>0&&a.push({fieldKey:"center_bore",text:`C/B ${Up(n)} mm`}),a}function xP(e){return e?[{key:"pcd",name:"Bolt pattern",value:`${e.holes}\xD7${e.circle}`},{key:"bore",name:"Hub bore",value:e.centreBore!==null?`${e.centreBore} mm bore`:null},{key:"et",name:"Offset",value:e.etRange!==null?Ta(e.etRange):null}]:[]}function B1(e){return xP(e).map(t=>t.value).filter(t=>t!==null).join(" \xB7 ")}var pr="off",Io="none",ti=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],oi=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function Qp(e){return Xe(ti,pr,e)}function H1(e){return Xe(oi,Io,e)}var Ra="sf-card-index",dn="sf-card-index",em="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",gP={plain:`counter(${dn})`,padded:`counter(${dn}, decimal-leading-zero)`,numero:`"N\xB0" counter(${dn}, decimal-leading-zero)`};function tm(e,t){return t==="off"?"":`.${e}{counter-reset:${dn}}.${e} .${Ra}{counter-increment:${dn}}.${e} .${Ra}::before{content:${gP[t]}}`}function om(e){return e==="hairline"?"border border-line hover:border-accent":""}var rm=[{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"}];function W1(e){let t=typeof e=="number"?e:Number.parseInt(String(e??""),10);return!Number.isFinite(t)||t<1||t>5?1:Math.trunc(t)}function IP(e,t){if(!e||!t||!Number.isFinite(t)||t<=0)return null;let o=e.lugRenderings?.[String(t)];if(!Array.isArray(o))return null;let r=o.filter(n=>typeof n=="string"&&n.length>0);return r.length>0?r:null}function hP({carRenderings:e,renderings:t,coverIndex:o,shownFinishName:r,defaultFinishName:n,shownSrc:a}){if(e&&e.length>0){let s=Math.min(Math.max(o,1)-1,e.length-1);return e[s]??a}if(o<=1||!t||t.length===0||!n||r!==n)return a;let l=Math.min(o-1,t.length-1);return t[l]??a}function nm({overrideSrc:e,hookSrc:t,failed:o}){return e&&!o.has(e)?e:t&&t!==e&&!o.has(t)?t:null}function am(e,t,o,r,n){let a=o===void 0?void 0:e.finishes?.find(l=>l.name===o);return hP({carRenderings:IP(a,n),renderings:e.defaultFinishRenderings,coverIndex:t,shownFinishName:o,defaultFinishName:e.defaultFinish,shownSrc:r})}function mr(e,t){return e.length===0?e:e.filter(o=>o.kind===void 0||o.kind===t)}function lm(e,t){if(t.length===0)return e;let o=xr(t);return Fa(e.filter(r=>o(r.fieldKey)),r=>r.fieldKey,t,"cardOrder")}function sm(e,t){let o=t==="filter"?"filterOrder":"cardOrder",r=new Map;for(let n of e){let a=n[o];if(typeof a!="number"||!Number.isFinite(a))continue;let l=r.get(n.fieldKey);(l===void 0||a<l)&&r.set(n.fieldKey,a)}return n=>n?r.get(n):void 0}function bP(e){return _a(e,"spec")}function z1(e){return _a(e,"fitment")}function K1(e,t){if(t.length===0)return e;let o=bP(t),r=e.filter(n=>o(n.fieldKey));return Fa(r,n=>n.fieldKey,t,"specOrder")}function Fa(e,t,o,r){let n=new Map;for(let i of o){let c=i[r];typeof c=="number"&&n.set(i.fieldKey,c)}if(n.size===0)return e;let a=[],l=[];e.forEach((i,c)=>{let f=t(i);f&&(a.push(c),l.push({item:i,index:c,order:n.get(f)}))}),l.sort((i,c)=>i.order!==void 0&&c.order!==void 0?i.order-c.order||i.index-c.index:i.order!==void 0?-1:c.order!==void 0?1:i.index-c.index);let s=[...e];return a.forEach((i,c)=>{s[i]=l[c].item}),s.every((i,c)=>i===e[c])?e:s}function xr(e){return _a(e,"card")}function im(e){return _a(e,"filter")}var Ea="collection";function ri(e,t){return{tyreSizes:{},brands:{"alloy-wheel":"brand",tyre:"brand"},finishes:{"alloy-wheel":"wheel_finish_ref"},diameters:{"alloy-wheel":"diameter",tyre:"rim_diameter"},collections:{"alloy-wheel":Ea},pcds:{"alloy-wheel":"pcd"},tyreTypes:{tyre:"tire_type"},speedRatings:{tyre:"speed_rating"}}[e]?.[t]}function _a(e,t){let o=new Set(e.filter(r=>r[t]===!1).map(r=>r.fieldKey));return r=>!r||!o.has(r)}import{Fragment as yP,jsx as cm,jsxs as SP}from"react/jsx-runtime";function ni(e,t){return!e&&!t?null:SP(yP,{children:[e&&cm("span",{className:"text-fg",children:e}),e&&t?cm("span",{className:"mx-[6px] text-fg-dim",children:"\xB7"}):null,t]})}function ai(e,t){let o=xr(t);return e.kind||e.brand&&o("brand")?!0:e.process&&o(Ea)}function fm({kindLabel:e,brand:t,process:o},r){if(!ai({kind:!!e,brand:!!t,process:!!o},r))return null;let n=xr(r);return ni(e,n("brand")?t:null)??(n(Ea)?o:null)}import{jsx as li,jsxs as CP}from"react/jsx-runtime";function si({finishes:e,availability:t,selectedIdx:o,hoverIdx:r,activeFinish:n,onSelect:a,onHover:l,showLabel:s=!0,className:i}){return CP("div",{className:["mt-4",i].filter(Boolean).join(" "),children:[li("div",{className:"flex flex-wrap items-center gap-2",onMouseLeave:()=>l(null),onClick:c=>c.preventDefault(),children:e.map((c,f)=>{if(!t[f])return null;let u=f===o,d=r===f&&r!==o;return li("button",{type:"button",title:c.name,"aria-label":c.name,"aria-pressed":u,onMouseEnter:()=>l(f),onFocus:()=>l(f),onBlur:()=>l(null),onClick:p=>{p.preventDefault(),p.stopPropagation(),a(f)},className:["h-4 w-4 shrink-0 rounded-full transition-all",u?"ring-2 ring-accent ring-offset-2 ring-offset-surface":d?"ring-1 ring-fg ring-offset-2 ring-offset-surface":"ring-1 ring-fg/30 ring-offset-1 ring-offset-surface"].join(" "),style:{background:c.color,border:"1px solid var(--swatch-border)"}},c.name)})}),s&&n&&li("div",{className:"mt-2 truncate font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:n.name})]})}import{useEffect as PP,useMemo as kP,useState as ii}from"react";import{jsx as dm}from"react/jsx-runtime";function La(e,t,o){let[r,n]=ii(()=>{let I=o?e.findIndex(h=>h.name===o):-1;return I>=0?I:0}),[a,l]=ii(null),[s,i]=ii(()=>e.map(()=>!0)),c=I=>{i(h=>{if(h[I]===!1)return h;let C=[...h];return C[I]=!1,C})},f=kP(()=>s.map((I,h)=>I?h:-1).filter(I=>I!==-1),[s]);PP(()=>{if(f.length===0){r!==-1&&n(-1),a!==null&&l(null);return}r>=0&&!f.includes(r)&&n(f[0]),a!==null&&!f.includes(a)&&l(null)},[f,r,a]);let u=a??r,d=u>=0?e[u]:void 0,p=d?.src??t,x=f.length>=2,g=e.length>0?dm("div",{className:"hidden","aria-hidden":!0,children:e.map((I,h)=>dm(io,{src:I.src,alt:"",width:16,height:16,loading:"eager",onError:()=>c(h)},I.src))}):null;return{selectedIdx:r,setSelectedIdx:n,hoverIdx:a,setHoverIdx:l,availability:s,finish:d,shownSrc:p,showSwatches:x,probes:g}}import{useState as wP}from"react";import{jsx as gr,jsxs as um}from"react/jsx-runtime";function ci({src:e,alt:t=""}){let[o,r]=wP(!1),n=e||"";return gr("div",{className:"relative aspect-square overflow-hidden bg-bg",children:um("div",{className:"absolute inset-0 flex items-center justify-center transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)] group-hover:rotate-[60deg]",children:[gr("div",{className:"absolute inset-0 z-[1] flex items-center justify-center",children:um("div",{className:"relative flex h-[70%] w-[70%] items-center justify-center rounded-full border-2",style:{borderColor:"var(--accent)"},children:[gr("div",{className:"absolute inset-[10%] rounded-full border",style:{borderColor:"var(--accent)",opacity:.4}}),gr("div",{className:"absolute left-1/2 top-1/2 h-[18%] w-[18%] -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{borderColor:"var(--accent)"}}),gr("div",{className:"absolute left-1/2 top-1/2 h-[6%] w-[6%] -translate-x-1/2 -translate-y-1/2 rounded-full",style:{background:"var(--accent)"}})]})}),n&&gr("img",{src:n,alt:t,className:"absolute inset-0 z-[2] h-full w-full object-contain",style:{display:o?"none":"block"},onError:()=>r(!0)})]})})}import{createContext as vP,useContext as TP,useMemo as RP}from"react";import{jsx as EP}from"react/jsx-runtime";var pm=[],FP={imageBackgroundFill:Et,spinOnHover:!0,coverIndex:1,indexBadge:pr,outline:Io,showBadge:!0,fieldUsage:pm,reserveEyebrow:!1,showCardPrice:!0,showCardFinishes:!0,showCardSizes:!1,showCardBuy:!1,showCardPage:!1},mm=vP(FP);function xm({imageBackgroundFill:e,spinOnHover:t,coverIndex:o=1,indexBadge:r=pr,outline:n=Io,showBadge:a=!0,fieldUsage:l=pm,reserveEyebrow:s=!1,showCardPrice:i=!0,showCardFinishes:c=!0,showCardSizes:f=!1,showCardBuy:u=!1,showCardPage:d=!1,children:p}){let x=RP(()=>({imageBackgroundFill:e,spinOnHover:t,coverIndex:o,indexBadge:r,outline:n,showBadge:a,fieldUsage:l,reserveEyebrow:s,showCardPrice:i,showCardFinishes:c,showCardSizes:f,showCardBuy:u,showCardPage:d}),[e,t,o,r,n,a,l,s,i,c,f,u,d]);return EP(mm.Provider,{value:x,children:p})}function gm(){return TP(mm)}import{useCallback as wm,useEffect as pi,useMemo as Ba,useRef as mi,useState as vm}from"react";import{useEffect as _P,useState as Im}from"react";var fi=new Map;function LP(e){let t=fi.get(e);if(t)return t;let o=Rt.getWheel(e).catch(r=>{throw fi.delete(e),r});return fi.set(e,o),o}function hm(e,t){let[o,r]=Im("idle"),[n,a]=Im(null);return _P(()=>{if(!t)return;let l=!1;return r("loading"),LP(e).then(s=>{l||(a(s),r("ready"))}).catch(()=>{l||r("error")}),()=>{l=!0}},[e,t]),{state:o,wheel:n}}function bm(e,t){return t.length===0?-1:e.findIndex(o=>t.includes(o.family))}function ym(e){if(e.diameter==null||e.width==null)return e.size;let t=e.rearWidth!=null?`${Be(e.width)}/${Be(e.rearWidth)}`:Be(e.width);return`${e.diameter}" \xD7 ${t}`}function Aa(e){return e.et==null?null:e.rearEt!=null&&e.rearEt!==e.et?`${e.et}/${e.rearEt}`:String(e.et)}function di(e){return e.diameter==null||e.width==null?JSON.stringify([e.size]):JSON.stringify([e.kind,e.diameter,e.width,e.rearWidth??null])}function Sm(e){return e.diameter==null||e.width==null?e.size:`${e.diameter}" ${e.kind}`}function Cm(e){return e.diameter==null||e.width==null?"":e.rearWidth!=null?`${Be(e.width)} front / ${Be(e.rearWidth)} rear`:`${Be(e.width)} all round`}function gD(e){if(e.diameter==null||e.width==null)return e.size;let t=(o,r)=>`${e.diameter} \xD7 ${Be(o)}${r!=null?` ET ${r}`:""}`;return _p(e)?`${t(e.width,e.et)} front \xB7 ${t(e.rearWidth??e.width,e.rearEt)} rear`:t(e.width,e.et)}function ui(e,t){return t?e.filter(o=>o.finishName===t):[]}var AP="dually";function Oa(e){let t=e.components.reduce((n,a)=>n+a.wheels,0)||4,o=e.kind,r=[o==="staggered"?"Staggered":o===AP?"Dually":"",ur(e)?"L/R":""].filter(Boolean);return r.length?`${r.join(" ")} set of ${t}`:`Set of ${t}`}function OP(e,t){return[...new Set(e.filter(o=>!t||o.finishName===t).map(o=>o.size))]}function Na(e,t,o){if(!(!t||!o))return e.find(r=>r.finishName===t&&r.size===o)}function un(e){return e!=null&&e.inStock===!1}function Pm(e,t){return t?e.filter(o=>o.finishName===t&&un(o)):[]}function km(e,t,o){return t.findIndex((r,n)=>o[n]!==!1&&OP(e,r).length>0)}var NP=[];function Tm(e,t=NP){let o=Ba(()=>e.finishes.filter(Jn),[e.finishes]),r=o.length>0,n=La(o,e.coverImage??null,e.defaultFinish??void 0),[a,l]=vm(!1),s=wm(()=>{r&&l(!0)},[r]),{state:i,wheel:c}=hm(e.slug,a),f=Ba(()=>c?.variants??[],[c]),u=n.selectedIdx>=0?o[n.selectedIdx]?.name??null:null,[d,p]=vm(null),{setSelectedIdx:x}=n,g=mi(!1),I=wm(R=>{g.current=!0,x(R)},[x]),h=t.join(","),C=mi(null);pi(()=>{if(C.current===h)return;C.current=h;let R=bm(o,t);R<0||(g.current=!0,x(R))},[h,t,o,x]);let S=mi(!1);pi(()=>{if(S.current||g.current||f.length===0||!u||(S.current=!0,ui(f,u).length>0))return;let R=km(f,o.map(_=>_.name),n.availability);R>=0&&x(R)},[f,u,o,n.availability,x]);let P=Ba(()=>ui(f,u),[f,u]);pi(()=>{p(R=>R&&P.some(_=>_.size===R)?R:P.length===1?P[0].size:null)},[P]);let T=Na(f,u,d),b=un(T),w=T!=null&&!b,O=!r||i==="error"||i==="ready"&&P.length===0,D=Ba(()=>Pm(f,u),[f,u]);return{...n,setSelectedIdx:I,finishes:o,arm:s,detailState:i,confirmedFinishName:u,sizeOptions:P,size:d,setSize:p,selectedVariant:T,outOfStock:b,outOfStockVariants:D,canAdd:w,unsellable:O}}import{useEffect as uk,useState as pk}from"react";var qt=["width","profile","rim"],Rm={width:"Width",profile:"Profile",rim:"Rim"},BP=/^\s*(\d{2,3})\s*\/\s*(\d{2,3})\s*[A-Za-z]*\s*(\d{2}(?:\.\d+)?)\s*$/,DP={width:[100,500],profile:[20,100],rim:[10,30]};function Yt(e){let t=BP.exec(e??"");if(!t)return null;let o={width:Number(t[1]),profile:Number(t[2]),rim:Number(t[3])};return qt.every(n=>{let[a,l]=DP[n];return o[n]>=a&&o[n]<=l})?o:null}function Vt(e){if(e.width==null)return"";if(e.profile==null)return String(e.width);let t=`${e.width}/${e.profile}`;return e.rim==null?t:`${t} R${e.rim}`}function Fm(e){return[Vt({width:e.width}),Vt({width:e.width,profile:e.profile}),Vt(e)]}var ho=["alloy-wheel","tyre"],Em=["alloy-wheel"],Do={"alloy-wheel":"Alloy wheels",tyre:"Tyres"},_m="All products",Lm="All product types";function Am(e){return e.length===1&&e[0]==="alloy-wheel"?{one:"wheel",many:"wheels"}:e.length===1&&e[0]==="tyre"?{one:"tyre",many:"tyres"}:{one:"product",many:"products"}}var _D=ho.map(e=>({value:e,label:Do[e]}));function pn(e){return e==null?[...Em]:Array.isArray(e)?ho.filter(t=>e.includes(t)):[...Em]}var Je=e=>e;function ke(e){return Je(e).kind==="tyre"?"tyre":"alloy-wheel"}function LD(e,t){return e.filter(o=>t.includes(ke(o)))}function AD(e){return Je(e).slug??""}function xi(e){return Je(e).name??""}function Da(e){return Je(e).brand??""}function OD(e){let t=new Set;for(let o of e)if(t.add(Da(o)),t.size>1)return!0;return!1}function MP(e){return Je(e).process??""}function ND(e){let t=new Set;for(let o of e)if(t.add(MP(o)),t.size>1)return!0;return!1}function Mo(e){return Je(e).prices??void 0}function gi(e){return Je(e).inStock!==!1}function Om(e){let t=Je(e),o=ke(e)==="tyre"?t.rimDiameters:t.sizes;return Array.isArray(o)?o.filter(r=>typeof r=="number"&&Number.isFinite(r)):[]}function Ii(e){return ke(e)!=="tyre"&&Je(e).badge==="new"}function hi(e){return ke(e)==="tyre"?[]:(Je(e).finishes??[]).filter(t=>typeof t?.family=="string").map(t=>({family:t.family,color:t.color??null}))}function Nm(e){return hi(e).map(t=>t.family)}function Bm(e){if(ke(e)==="tyre")return[];let t=Je(e),o=t.categories;return o&&o.length>0?o:t.process?[t.process]:[]}function Dm(e){return ke(e)==="tyre"?[]:Je(e).spec?.pcds??[]}function Mm(e){return ke(e)!=="tyre"?[]:Je(e).tyreTypes??[]}function Hm(e){return ke(e)!=="tyre"?[]:Je(e).speedRatings??[]}function Ma(e){if(ke(e)!=="tyre")return[];let t=Je(e).sizes;return Array.isArray(t)?t.map(o=>Yt(typeof o=="string"?o:null)).filter(o=>o!==null):[]}var HP={recommended:"Recommended","price-asc":"Price \xB7 low to high","price-desc":"Price \xB7 high to low",new:"Newest",name:"Name A\u2013Z"},Gm=Object.keys(HP);function Wm(e){return Xe(Gm,"recommended",e)}function GP(e){return Gm.filter(t=>t!=="recommended"||e.length<=1)}function zD(e,t){let o=Wm(e);return GP(t).includes(o)?o:"name"}var mn=["tyreSizes","brands","finishes","diameters","collections","pcds","tyreTypes","speedRatings"],WP={tyreSizes:["tyre"],brands:["alloy-wheel","tyre"],finishes:["alloy-wheel"],diameters:["alloy-wheel","tyre"],collections:["alloy-wheel"],pcds:["alloy-wheel"],tyreTypes:["tyre"],speedRatings:["tyre"]},UP={diameters:"tyreSizes"};function Um(e){if(e.length===0)return[];let t=mn.filter(o=>e.every(r=>WP[o].includes(r)));return t.filter(o=>{let r=UP[o];return!r||!t.includes(r)})}function KD(e,t){return t&&e.includes(t)?[t]:[...e]}function zm(e){let t=new Set;for(let o of e)t.add(ke(o));return[...t]}var zP={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function KP(e){return`${$P(e.width)}\xD7${e.diameter}`}function Km(e){return(e.sizePairs??[]).map(KP)}function $P(e){return Be(e)}function xn(e,t,o,r=null){if(r!=="kind"&&t.kind&&ke(e)!==t.kind)return!1;for(let n of mn){if(r===n)continue;let a=t[n];if(a.length===0)continue;let l=a.map(String);if(!$m(e,n).some(s=>l.includes(s)))return!1}return!(r!=="price"&&!ra(Mo(e),o,null,t.priceMax)||r!=="inStock"&&t.inStockOnly&&!gi(e))}function $D(e,t,o){return e.filter(r=>gi(r)&&xn(r,t,o,"inStock")).length}function VP(e,t,o){let r=[...e],n=(l,s)=>xi(l).localeCompare(xi(s)),a=zm(e).length>1;switch(t){case"price-asc":return r.sort((l,s)=>cr(Mo(l),Mo(s),o,"asc"));case"price-desc":return r.sort((l,s)=>cr(Mo(l),Mo(s),o,"desc"));case"name":return r.sort(n);case"new":return r.sort((l,s)=>{let i=(Ii(s)?1:0)-(Ii(l)?1:0);return i!==0||!a?i:n(l,s)});default:return r}}function VD(e,t,o){return VP(e.filter(r=>xn(r,t,o)),t.sort,o)}function qD(e){return mn.some(t=>e[t].length>0)||e.priceMax!=null||e.inStockOnly||e.kind!=null}var qP={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size \xB7 diameter",collections:"Collection",pcds:"PCD \xB7 fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function $m(e,t){switch(t){case"tyreSizes":return[...new Set(Ma(e).flatMap(Fm))];case"brands":return Da(e)?[Da(e)]:[];case"finishes":return Nm(e);case"diameters":return Om(e).map(String);case"collections":return Bm(e);case"pcds":return Dm(e);case"tyreTypes":return Mm(e);case"speedRatings":return Hm(e)}}function YP(e){let t=new Map;for(let o of e)for(let r of hi(o))r.color&&!t.has(r.family)&&t.set(r.family,r.color);return t}function XP(e,t,o,r=zm(e),n=[]){let a=c=>JP(c,r,n),l=YP(e),s=Um(r).filter(c=>c!=="tyreSizes").filter(a).map(c=>{let f=t[c].map(String),u=new Set,d=new Map,p=new Map;for(let g of e){let I=$m(g,c);for(let h of I)u.add(h);for(let h of new Set(I))p.set(h,(p.get(h)??0)+1);if(xn(g,t,o,c))for(let h of new Set(I))d.set(h,(d.get(h)??0)+1)}let x=[...u].map(g=>({value:g,label:c==="diameters"?`${g}\u2033`:g,count:d.get(g)??0,checked:f.includes(g),swatch:c==="finishes"?l.get(g)??null:null})).sort((g,I)=>{if(c==="diameters")return Number(g.value)-Number(I.value);let h=(p.get(I.value)??0)-(p.get(g.value)??0);return h!==0?h:g.value.localeCompare(I.value)});return{key:c,label:qP[c],options:x}}).filter(c=>c.options.length>Vm),i=[];for(let c of s){let f=ZP(c.key,r,n);f!==void 0&&i.push({fieldKey:c.key,filterOrder:f})}return[...Fa(s,c=>c.key,i,"filterOrder")]}var Vm=1;function jP(e){return e.showCollection===!1?["collections"]:[]}function JP(e,t,o){return t.length===0||o.length===0?!0:t.some(r=>im(mr(o,r))(ri(e,r)))}function ZP(e,t,o){if(o.length===0)return;let r;for(let n of t){let a=sm(mr(o,n),"filter")(ri(e,n));a!==void 0&&(r===void 0||a<r)&&(r=a)}return r}function QP(e){let t=new Set;for(let o of e)for(let r of Ma(o))t.add(Vt(r));return t.size}function YD(e,t){return Um(t).includes("tyreSizes")?QP(e)>Vm:!1}function qm(e){let t=Yt(e);if(t)return t;let[o,r]=e.split("/");return{width:o?Number(o):void 0,profile:r?Number(r):void 0}}function ek(e,t,o){return qt.slice(0,qt.indexOf(o)).every(r=>{let n=t[r];return n==null||e[r]===n})}function XD(e,t,o){let r=qm(t.tyreSizes[0]??""),n=new Set(e.filter(a=>xn(a,t,o,"tyreSizes")));return qt.map(a=>{let l=new Map;for(let i of e){let c=Ma(i).filter(f=>ek(f,r,a));for(let f of new Set(c.map(u=>u[a])))l.has(f)||l.set(f,0),n.has(i)&&l.set(f,(l.get(f)??0)+1)}let s=[...l.keys()].sort((i,c)=>i-c).map(i=>({value:i,label:a==="rim"?`R${i}`:String(i),count:l.get(i)??0}));return{part:a,label:Rm[a],value:r[a]??null,options:s}})}function jD(e,t,o,r){let n={...qm(t)},a=qt.indexOf(o);n[o]=r??void 0;for(let l of qt.slice(a+1))n[l]!=null&&e.some(c=>qt.slice(0,qt.indexOf(l)+1).every(f=>n[f]==null||c[f]===n[f]))||(n[l]=void 0);return Vt(n)}function JD(e,t,o,r){if(t.length<2)return[];let n=e.filter(a=>xn(a,o,r,"kind"));return[{kind:null,label:_m,count:n.length,checked:o.kind===null},...t.map(a=>({kind:a,label:Do[a],count:n.filter(l=>ke(l)===a).length,checked:o.kind===a}))]}function ZD(e,t){if(e.length===0)return null;let o=e.map(a=>oa(Mo(a),t)).filter(a=>a!==null);if(o.length===0)return null;let r=Math.floor(Math.min(...o)),n=Math.ceil(Math.max(...o));return n>r?{min:r,max:n}:null}function QD(e,t,o){let r=[];e.kind&&r.push({key:"kind",value:e.kind,label:Do[e.kind]}),e.inStockOnly&&r.push({key:"inStock",value:"",label:"In stock"});for(let n of mn)for(let a of e[n]){let l=String(a);r.push({key:n,value:l,label:n==="diameters"?`${l}\u2033`:n==="pcds"?`PCD ${l}`:l})}return e.priceMax!=null&&r.push({key:"price",value:"",label:`Up to ${o(e.priceMax,t)}`}),r}var yt={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},bo="type",Ym="maxPrice",Xm="inStock",jm="sort",Jm="page";function eM(e){let t=a=>e.getAll(a).flatMap(l=>l.split(",")).filter(Boolean),o=Number(e.get(Ym)),r=Number(e.get(Jm)),n=e.get(bo);return{tyreSizes:t(yt.tyreSizes),brands:t(yt.brands),finishes:t(yt.finishes),diameters:t(yt.diameters).map(Number).filter(Number.isFinite),collections:t(yt.collections),pcds:t(yt.pcds),tyreTypes:t(yt.tyreTypes),speedRatings:t(yt.speedRatings),priceMax:Number.isFinite(o)&&o>0?o:null,inStockOnly:e.get(Xm)==="1",kind:ho.find(a=>a===n)??null,sort:Wm(e.get(jm)),page:Number.isFinite(r)&&r>=1?Math.floor(r):1}}function tM(e){let t=new URLSearchParams;for(let o of mn){let r=e[o];r.length>0&&t.set(yt[o],r.join(","))}return e.priceMax!=null&&t.set(Ym,String(e.priceMax)),e.inStockOnly&&t.set(Xm,"1"),e.kind&&t.set(bo,e.kind),e.sort!=="recommended"&&t.set(jm,e.sort),e.page>1&&t.set(Jm,String(e.page)),t}function oM(e,t){if(e<=7)return Array.from({length:e},(a,l)=>l+1);let o=[1],r=Math.max(2,t-1),n=Math.min(e-1,t+1);r>2&&o.push(null);for(let a=r;a<=n;a++)o.push(a);return n<e-1&&o.push(null),o.push(e),o}function rM(e,t,o){let r=e.length,n=Math.max(1,Math.floor(o)),a=Math.max(1,Math.ceil(r/n)),l=Math.min(Math.max(1,Math.floor(t)),a),s=(l-1)*n;return{items:e.slice(s,s+n),page:l,pageCount:a,total:r,from:r===0?0:s+1,to:Math.min(s+n,r)}}function hr(e){let t=e.lastIndexOf(" ");return t===-1?{lead:"",accent:e}:{lead:e.slice(0,t+1),accent:e.slice(t+1)}}import{Fragment as tk}from"react";import{Fragment as bi,jsx as St,jsxs as Lt}from"react/jsx-runtime";var Ha="mt-3 flex h-[26px] items-center gap-1",Ga="flex min-w-0 items-center gap-1 overflow-hidden",Wa="shrink-0 border border-line px-1.5 py-0.5 font-mono text-[length:var(--size-label,11px)] tracking-[0.08em] text-fg-dim",gn="border px-1.5 py-0.5 font-mono text-[length:var(--size-label,11px)] tracking-[0.08em] whitespace-nowrap",Ua=`${gn} border-accent/60 text-accent`,ok=e=>`calc((100% - ${e}px) / 2)`,rk=2,nk=28,Zm=e=>rk+2*nk+(e?10:0);var ak=16;var lk="whitespace-nowrap",sk=e=>typeof e=="string"?e:e.text;function Qm(e,t="\xB7"){return e.map((o,r)=>{let n=sk(o),a=typeof o!="string"&&o.accent;return Lt(tk,{children:[St("span",{className:`${lk}${a?" text-accent":""}`,children:r<e.length-1?`${n} ${t}`:n}),r<e.length-1?" ":null]},n)})}var za="mt-3 flex flex-col gap-2",br="cursor-pointer bg-btn px-4 py-2.5 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-btn-ink transition-colors hover:bg-fg",Ka="border border-btn px-4 py-2.5 text-center font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-btn transition-colors hover:bg-btn hover:text-btn-ink",ik="border px-2 py-1 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.3em]",yi="absolute right-[18px] top-[18px] z-10";function Si({tone:e,className:t,children:o}){return St("span",{className:[t,ik,e==="solid"?"border-accent bg-accent text-bg":"border-accent text-accent"].filter(Boolean).join(" "),children:o})}function In({variant:e="catalog",wide:t=!1,href:o,identityLink:r=!1,outline:n="none",imageBackgroundFill:a=_t,containerProps:l,probes:s,indexBadge:i,badges:c,image:f,imageSecond:u,plate:d,eyebrow:p,reserveEyebrow:x=!1,name:g,spec:I,was:h,price:C,metaLine:S,swatches:P,showPrice:T=!0,reserveSwatches:b=!0,extras:w}){let O=e==="catalog",D=bp(a),R=D&&a===Et,_=R?"bg-[var(--wheel-stage)] p-[5px]":D?"p-[5px]":"",G=D&&!R?{backgroundColor:a}:{},Y=(he,de)=>St("figure",{className:`m-0 aspect-square [flex:0_0_auto] max-w-full max-[800px]:w-[252px] ${de}`,style:{width:ok(Zm(D))},children:he}),M=O?Lt("div",{className:t?`relative mt-2 mb-5 flex items-center justify-center [&_img]:object-top max-[800px]:flex-col ${_}`:`relative mt-2 mb-5 flex aspect-square items-center justify-center overflow-hidden [&_img]:object-top ${_}`,style:t?{...G,borderRadius:10,columnGap:Zm(D),rowGap:ak}:{...G,borderRadius:"var(--sf-card-image-radius, 10px)"},children:[t?Lt(bi,{children:[Y(f,"max-[800px]:-translate-x-[38px]"),Y(u??f,"max-[800px]:translate-x-[38px]")]}):f,d]}):Lt("div",{className:"relative mb-[18px] aspect-square overflow-hidden bg-bg p-[30px] [&_img]:object-top",style:{borderRadius:"var(--sf-card-image-radius, 10px)"},children:[f,d]}),v=`font-mono text-[length:var(--size-label,12px)] uppercase text-accent ${O?"tracking-[0.3em]":"tracking-[0.25em]"}`,j=p?St("div",{className:v,children:p}):O&&x?St("div",{"aria-hidden":!0,className:v,children:"\xA0"}):null,F=St("div",{className:O?"mt-2 h-[60px] overflow-hidden break-words font-heading3 text-[length:var(--size-headingSmall,30px)] font-medium uppercase leading-none tracking-[-0.02em]":"mt-[6px] font-heading3 text-[length:var(--size-headingSmall,22px)] font-medium tracking-[-0.02em]",children:g}),E=St("div",{className:O?"mt-2 h-[38px] overflow-hidden font-mono text-[length:var(--size-label,13px)] leading-[19px] tracking-[0.14em] text-fg-dim":"mt-[4px] font-mono text-[length:var(--size-label,13px)] tracking-[0.1em] text-fg-dim",children:I}),se=T?Lt("div",{className:"mt-2 font-mono text-[length:var(--size-label,13px)]",children:[h&&St("span",{className:"mr-2 text-fg-dim line-through",children:h}),C]}):null,N=T&&S?St("div",{className:"mt-[2px] font-mono text-[length:var(--size-label,11px)] tracking-[0.08em] text-fg-dim",children:S}):null,le=O&&!P?b?St("div",{"aria-hidden":!0,className:"mt-4 h-4"}):null:P,ge=[O?"sf-card sf-card-fill group relative flex min-h-[460px] flex-col bg-[var(--card-bg)] px-7 pt-8 pb-7 transition-colors duration-200 hover:bg-[var(--card-bg-hover)]":"sf-card sf-card-fill group relative block bg-[var(--card-bg)] p-5 transition-colors duration-300 hover:bg-[var(--card-bg-hover)]",om(n),t?"col-span-2 max-[800px]:col-span-1 @max-[720px]:col-span-1":""].filter(Boolean).join(" "),ie=Lt(bi,{children:[M,j,F]}),te=Lt(bi,{children:[E,se,N,le,w]});return o?r?Lt("article",{...l,className:ge,children:[s,i,c,St(Pe,{href:o,className:"flex flex-col",children:ie}),te]}):Lt(Pe,{href:o,className:ge,children:[s,i,c,ie,te]}):Lt("article",{...l,className:ge,children:[s,i,c,ie,te]})}import{useId as nx,useRef as dk,useState as Pi}from"react";import{useEffect as Ci}from"react";function ex({active:e,onDismiss:t,focusRef:o,lockScroll:r=!0}){Ci(()=>{if(!e)return;let n=a=>{a.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),Ci(()=>{if(!e||!r)return;let n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e,r]),Ci(()=>{e&&o?.current?.focus()},[e,o])}import{useCallback as ox,useRef as ck,useState as fk}from"react";function mM({email:e,firstName:t,interests:o,frequency:r},n){return{email:e.trim(),firstName:t?.trim()||void 0,interests:o&&o.length?o:void 0,frequency:r||void 0,source:n}}var tx={popup:"shop_popup",subscribeSection:"subscribe_section",subscribeBlogsSection:"subscribe_blogs_section",footerSignup:"footer_signup",stockAlertOptIn:"stock_alert_optin"};function rx(){let[e,t]=fk("idle"),o=ck(!1),r=ox(()=>{o.current=!1,t("idle")},[]),n=ox(async({partNumbers:a,email:l,productSlug:s,subscribeToOffers:i=!1,dryRun:c=!1})=>{if(o.current)return;let f=l.trim();if(!bu(f)){t("invalid");return}o.current=!0,t("sending");try{if(!c)for(let u of a)await Rt.createStockAlert({partNumber:u,email:f,productSlug:s})}catch{o.current=!1,t("error");return}if(i&&!c)try{await Rt.createNewsletterSubscription({email:f,source:tx.stockAlertOptIn})}catch{}o.current=!1,t("sent")},[]);return{status:e,submit:n,reset:r}}import{jsx as ae,jsxs as Ge}from"react/jsx-runtime";function ki({wheelName:e,productSlug:t,finishName:o,variants:r,initialSize:n,onClose:a,editing:l=!1}){let s=nx(),i=nx(),c=dk(null),{currency:f}=co(),u=rx(),[d,p]=Pi(()=>n??r[0]?.size??""),[x,g]=Pi(""),[I,h]=Pi(!1);ex({active:!0,onDismiss:a,focusRef:c});let C=r.find(w=>w.size===d)??r[0];if(!C)return null;let S=u.status==="sent",P=u.status==="sending",T=u.status==="invalid"?"Please enter a valid email address.":u.status==="error"?"Couldn't save that \u2014 please try again.":null;function b(){C&&u.submit({partNumbers:C.components.map(w=>w.partNumber),email:x,productSlug:t,subscribeToOffers:I,dryRun:l})}return ae("div",{role:"dialog","aria-modal":"true","aria-labelledby":s,onClick:w=>{w.target===w.currentTarget&&a()},className:"fixed inset-0 z-[90] flex items-center justify-center overflow-y-auto p-6 backdrop-blur-[6px]",style:{background:"color-mix(in oklab, var(--bg) 78%, transparent)"},children:Ge("div",{ref:c,tabIndex:-1,className:"relative w-[420px] max-w-full border-2 border-accent bg-surface text-left shadow-[0_24px_60px_rgba(0,0,0,0.55)] outline-none",children:[ae("button",{type:"button",onClick:a,"aria-label":"Close",className:"absolute right-[10px] top-[10px] z-[2] flex h-9 w-9 cursor-pointer items-center justify-center text-fg-dim transition-colors hover:text-accent",children:ae("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:ae("path",{d:"M6 6l12 12M18 6 6 18"})})}),S?Ge("div",{className:"px-6 py-8 text-center",children:[ae("span",{className:"mx-auto mb-4 grid h-16 w-16 place-items-center rounded-full border-[1.5px] border-accent bg-accent/15",children:ae("svg",{width:"30",height:"30",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2.5","aria-hidden":!0,children:ae("path",{d:"M20 6 9 17l-5-5"})})}),ae("h3",{id:s,className:"font-display text-[22px] font-medium uppercase leading-tight tracking-[-0.02em]",children:"You're on the list"}),Ge("p",{className:"mx-auto mt-2 max-w-[34ch] text-[13px] leading-[1.6] text-fg-dim",children:["We'll alert ",ae("strong",{className:"font-normal text-fg",children:x.trim()})," as soon as the ",et(e)," in ",C.size," is back. Keep an eye on your inbox."]}),ae("button",{type:"button",onClick:a,className:"mt-6 w-full cursor-pointer border border-line px-4 py-3 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-fg transition-colors hover:border-accent hover:text-accent",children:"Continue browsing"})]}):Ge("form",{className:"p-6",noValidate:!0,onSubmit:w=>{w.preventDefault(),b()},children:[Ge("div",{className:"mb-2 flex items-center gap-3",children:[ae("span",{className:"grid h-11 w-11 flex-none place-items-center border-[1.5px] border-accent bg-accent/15",children:Ge("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2","aria-hidden":!0,children:[ae("path",{d:"M18 8a6 6 0 1 0-12 0c0 7-3 9-3 9h18s-3-2-3-9"}),ae("path",{d:"M13.7 21a2 2 0 0 1-3.4 0"})]})}),Ge("div",{children:[ae("div",{className:"font-mono text-[10px] uppercase tracking-[0.3em] text-accent",children:"Back-in-stock alert"}),ae("h3",{id:s,className:"mt-0.5 font-display text-[22px] font-medium uppercase leading-tight tracking-[-0.02em]",children:"Notify me"})]})]}),Ge("p",{className:"mb-5 text-[13px] leading-[1.6] text-fg-dim",children:["We'll email you the moment the"," ",ae("strong",{className:"font-normal text-fg",children:et(e)}),o?` in ${o}`:""," ","is back in stock. No spam \u2014 one alert, then we're done."]}),Ge("fieldset",{className:"mb-4 border-0 p-0",children:[ae("legend",{className:"mb-2 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:"Which fitment?"}),ae("div",{className:"flex flex-wrap gap-2",children:r.map(w=>{let O=w.size===C.size;return Ge("button",{type:"button","aria-pressed":O,onClick:()=>p(w.size),className:["flex min-w-[calc(50%-4px)] flex-1 cursor-pointer flex-col items-start gap-0.5 border-[1.5px] px-3 py-2.5 text-left transition-colors",O?"border-accent bg-accent/15":"border-line hover:border-accent/60"].join(" "),children:[ae("span",{className:"font-mono text-[12px] font-bold tracking-[0.08em] text-fg",children:w.size}),ae("span",{className:"font-mono text-[10px] tracking-[0.08em] text-fg-dim",children:(()=>{let D=gu(w.components,f);return D.setTotal!=null?uu(D.setTotal,f):pu})()})]},w.size)})})]}),Ge("div",{className:"mb-4",children:[ae("label",{htmlFor:i,className:"mb-2 block font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:"Email address"}),ae("input",{id:i,type:"email",value:x,onChange:w=>{g(w.target.value),(u.status==="invalid"||u.status==="error")&&u.reset()},placeholder:"you@example.com",disabled:P,className:"w-full border-2 border-line bg-bg px-3.5 py-3 font-display text-[15px] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent disabled:opacity-60"})]}),Ge("label",{className:"mb-5 flex cursor-pointer items-start gap-2.5 text-[12px] leading-[1.5] text-fg-dim",children:[ae("input",{type:"checkbox",checked:I,onChange:w=>h(w.target.checked),className:"mt-0.5 h-[18px] w-[18px] flex-none cursor-pointer accent-[var(--accent)]"}),ae("span",{children:"Also send me fitment tips and occasional offers for my vehicle."})]}),Ge("button",{type:"submit",disabled:P,className:"flex h-[50px] w-full cursor-pointer items-center justify-center gap-2 bg-btn px-4 font-mono text-[12px] font-bold uppercase tracking-[0.24em] text-btn-ink transition-colors hover:bg-fg disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-btn",children:[Ge("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[ae("path",{d:"m22 2-7 20-4-9-9-4Z"}),ae("path",{d:"M22 2 11 13"})]}),P?"Sending\u2026":"Notify me when available"]}),T&&ae("p",{role:"alert",className:"mt-2.5 text-[12px] leading-[1.5]",style:{color:"var(--alert)"},children:T}),Ge("div",{className:"mt-3 flex items-center justify-center gap-1.5 text-[11px] text-fg-dim",children:[Ge("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[ae("rect",{x:"3",y:"11",width:"18",height:"11",rx:"1"}),ae("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),"We never share your details."]})]})]})})}import{Fragment as xk,jsx as Xt,jsxs as $a}from"react/jsx-runtime";var wi=3;function mk({wheel:e,sel:t,price:o,editing:r,detailReady:n}){let{add:a,open:l,warmCatalog:s}=la();uk(()=>{r||s()},[r,s]);function i(){let c=t.selectedVariant;!c||!t.canAdd||o.priced&&(r||(a({id:`${e.slug}|${c.finishName}|${c.size}|quick`,slug:e.slug,name:hr(e.name),process:e.process,positionNo:"01",config:[{label:c.size},{label:c.finishName,gold:!0},{label:Oa(c)}],finishName:c.finishName,size:c.size,components:c.components,qty:1}),l()))}return Xt("button",{type:"button",onClick:i,[ta]:"",disabled:!t.canAdd,className:t.canAdd?br:n?"cursor-not-allowed border border-dashed border-accent/50 px-4 py-2.5 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-accent/70":`${br} opacity-80`,children:n&&!t.canAdd?"Select a size":"Add to basket"})}function ax({wheel:e,sel:t,price:o,editing:r,show:n,href:a}){let[l,s]=pk(!1),i=Km(e),c=i.length>0?i:e.sizes.map(S=>`${S}\u2033`),f=t.detailState==="ready",u=t.unsellable,d=S=>["cursor-pointer transition-colors",gn,S?"border-accent bg-accent text-bg":"border-accent/60 text-accent hover:border-accent hover:bg-accent/10"].join(" "),p=f&&!u?t.sizeOptions.length:c.length,x=Math.max(0,p-wi),g=n.sizes?$a("div",{className:Ha,children:[Xt("div",{className:Ga,children:f&&!u?t.sizeOptions.slice(0,wi).map(S=>Xt("button",{type:"button",title:S.size,"aria-label":S.size,"aria-pressed":t.size===S.size,onClick:()=>t.setSize(S.size),className:d(t.size===S.size),children:ym(S)},S.size)):u?Xt("span",{className:"truncate font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.16em] text-fg-dim",children:"Options on the product page"}):c.slice(0,wi).map(S=>Xt("span",{className:Ua,children:S},S))}),!u&&x>0&&$a("span",{className:Wa,children:["+",x]})]}):null,I=n.buy&&!u?t.outOfStock?Xt("button",{type:"button",onClick:()=>s(!0),className:br,children:"Notify me when back"}):o.priced?Xt(mk,{wheel:e,sel:t,price:o,editing:r,detailReady:f}):null:null,h=n.page?Xt(Pe,{href:a,className:Ka,children:"Open product page"}):null,C=I||h?$a("div",{className:za,children:[I,h]}):null;return{extras:g||C?$a(xk,{children:[g,C]}):null,dialog:l?Xt(ki,{wheelName:e.name,productSlug:e.slug,finishName:t.confirmedFinishName,variants:t.outOfStockVariants,initialSize:t.selectedVariant?.size,onClose:()=>s(!1),editing:r}):null}}import{Fragment as lx,jsx as yo,jsxs as sx}from"react/jsx-runtime";function hn({wheel:e,variant:t="compact",defaultFinish:o}){let r=t==="catalog",n=gk(()=>e.finishes.filter(Jn),[e.finishes]),a=e.coverImage??null,{currency:l}=co(),{imageBackgroundFill:s,spinOnHover:i,coverIndex:c,indexBadge:f,outline:u,showBadge:d,fieldUsage:p,reserveEyebrow:x,showCardPrice:g,showCardFinishes:I,showCardSizes:h,showCardBuy:C,showCardPage:S}=gm(),P=r&&(h||C||S),T=na(e.prices[l],e.msrpPrices?.[l]),b=aa(T,l,"from "),w=xu(T,l),O=Lp(e),D=Op(O),R=Ap(O),_=lm([...Zp(e).map(Ne=>({fieldKey:Ne.fieldKey,field:Ne.text})),...R?[{field:{text:R,accent:!0}}]:[]],p).map(Ne=>Ne.field),{selectedIdx:G,setSelectedIdx:Y,hoverIdx:M,setHoverIdx:v,availability:j,finish:F,shownSrc:E,showSwatches:se,probes:N}=La(n,a,o??e.defaultFinish??void 0),le=am(e,c,F?.name,E),ge="h-full w-full",ie=i?`transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)] ${r?"group-hover:rotate-[72deg]":"group-hover:rotate-[60deg]"}`:"",[te,he]=Ik(()=>new Set),de=Ne=>he(Ve=>Ve.has(Ne)?Ve:new Set(Ve).add(Ne)),z=nm({overrideSrc:le,hookSrc:E,failed:te}),Ae=z?yo(io,{src:z,alt:F?`${e.name} \u2014 ${F.name}`:e.name,width:1e3,height:1e3,sizes:"(max-width: 640px) 90vw, (max-width: 1024px) 45vw, 300px",className:`block object-contain ${ie} ${ge}`,draggable:!1,onError:()=>de(z)},z):yo(ci,{imageLabel:e.name}),Fe=r&&d&&e.badge?yo(Si,{className:yi,tone:e.badge==="new"?"solid":"outline",children:e.badge==="new"?"New":"Bestseller"}):null,Oe=R&&r?yo(Si,{className:yi,tone:"outline",children:R}):Fe,ne=fm({kindLabel:null,brand:null,process:e.process?et(e.process):null},p),K=D?sx(lx,{children:[ne,yo("span",{className:`${ne?"ml-2":""} inline-block bg-accent px-1.5 py-[2px] align-middle font-mono text-[10px] font-bold uppercase tracking-[0.18em] text-bg`,children:"Set"})]}):ne,H=f!=="off"?yo("span",{"aria-hidden":!0,className:`${Ra} ${em}`}):null,He=Tm(e),Ze=Iu(e,He.selectedVariant,l,1),It=ax({wheel:e,sel:He,price:Ze,href:`/wheels/${e.slug}`,show:{sizes:P&&h,buy:P&&C,page:P&&S}}),oo=I&&se?yo(si,{finishes:n,availability:j,selectedIdx:G,hoverIdx:M,activeFinish:F,onSelect:Y,onHover:v,showLabel:!1}):null;return sx(lx,{children:[yo(In,{variant:t,wide:D&&r,href:`/wheels/${e.slug}`,outline:u,imageBackgroundFill:s,probes:N,reserveEyebrow:x,indexBadge:H,badges:Oe,image:Ae,imageSecond:void 0,eyebrow:K,name:et(e.name),spec:Qm(_),was:D?void 0:w,price:D?T.priced?b:mu:P?hu(Ze,l):b,metaLine:D?"the set":void 0,swatches:oo,reserveSwatches:I,showPrice:g,identityLink:P,extras:It.extras}),It.dialog]})}import{Fragment as Yx}from"react";import{applyMark as b2,markupTools as y2,MARKUP_TOOLS as S2,COPY_FIELD_TOOLS as C2,STOREFRONT_MARKUP as P2,tokenizeInline as k2,stripInline as w2,isSafeLinkHref as v2}from"efficient-easel/markup";import{applyMark as hk,markedAt as bk,markupTools as yk,MARKUP_TOOLS as Sk,parseMarkup as Ck,STOREFRONT_MARKUP as Pk,tokenizeInline as x2}from"efficient-easel/markup";var Va=["highlight","strong","quiet"],Ho={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},At={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},ix=Object.fromEntries(Va.map(e=>[At[e].kind,e])),cx="data-sf-ws",f2=["accent","text","labels"],d2={accent:"Accent",text:"Text",labels:"Labels"},yr={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"};var vi={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},u2={highlight:{...vi},strong:{...vi},quiet:{...vi}};var dx=Va.map(e=>({open:At[e].delimiter,close:At[e].delimiter,kind:At[e].kind})),ux=[{style:At.highlight.kind,label:Ho.highlight,title:`${Ho.highlight} word style`},{style:At.strong.kind,label:Ho.strong,title:`${Ho.strong} word style`},{style:At.quiet.kind,label:Ho.quiet,title:`${Ho.quiet} word style`}],kk=new Set(dx.map(e=>e.open)),px=[...Pk.filter(e=>!kk.has(e.open)),...dx];function Ti(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function Ri(e){return Ck(typeof e=="string"?e:"",px)}var wk=["quiet"],fx=[...Sk.map(e=>e.style).filter(e=>!wk.includes(e)),...ux.map(e=>e.style)].filter(e=>px.some(t=>t.kind===e));function mx(){return[...yk(fx),...ux].filter(e=>fx.includes(e.style))}var xx=Object.fromEntries(Va.map(e=>[At[e].kind,At[e].delimiter]));function gx(e,t,o,r){let n=xx[r];if(!n)return hk(e,t,o,r);let a=e.slice(t,o),l=e.slice(Math.max(0,t-n.length),t),s=e.slice(o,o+n.length);if(l===n&&s===n)return{text:e.slice(0,t-n.length)+a+e.slice(o+n.length),selectionStart:t-n.length,selectionEnd:t-n.length+a.length};let i=a||"styled text";return{text:e.slice(0,t)+n+i+n+e.slice(o),selectionStart:t+n.length,selectionEnd:t+n.length+i.length}}function Ix(e,t,o,r){let n=xx[r];return n?t>=n.length&&e.slice(t-n.length,t)===n&&e.slice(o,o+n.length)===n:bk(e,t,o,r)}function jt(e){return Ri(e).map(t=>Ti(t)+hx(t.children)).join(`
|
|
3
|
-
`)}function hx(e){return e.map(t=>t.kind==="text"?t.text:hx(t.children)).join("")}function Fi(e,t){return t?`${e}[${t.index}].${t.rowKey}`:e}function Ei(e){let t=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return t?{key:t[1],row:{index:Number(t[2]),rowKey:t[3]}}:{key:e,row:null}}var _e="__text",bn="__link",yn="__scaffold";function Jt(e){return e&&typeof e=="object"?{text:e.text??"",hidden:!!e.hidden}:{text:typeof e=="string"?e:"",hidden:!1}}function Sr(e){return Jt(e).text}var bx={text:"scalar",textarea:"scalar",plainText:"scalar",copyText:"scalar",plainTextarea:"scalar",textList:"list"},Go=Object.entries(bx).filter(([,e])=>e==="scalar").map(([e])=>e);var yx={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},Sx={Events:["posts"],SubscribeBlogs:["posts"]};var vk=["anchor"],Tk=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function Sn(e){return vk.includes(e)||Tk.test(e)}var Rk={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:[]}},BrandStrip:{picks:{verb:"reference"}},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"}}};Rk.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var A2=Object.fromEntries(Object.entries(yx).map(([e,t])=>[e,Object.keys(t)])),O2=Object.fromEntries(Object.entries(Sx).map(([e,t])=>[e,[...t]]));var Fk=Go,Ek=["text","textarea"];function _k(e){return!e||typeof e!="object"?null:e[_e]?.control??null}function Cx(e){let t=_k(e);return t&&Fk.includes(t)?t:null}function qa(e){return Jt(e).text}function _i(e,t,o){return Ek.includes(e)?{text:o,hidden:Jt(t).hidden}:o}function H2(e,t,o,r){return qa(e[t])===r?null:{...e,[t]:_i(o,e[t],r)}}function Lk(e){if(!(!e||typeof e!="object"))return e[_e]}function Ak(e){if(!e||typeof e!="object")return null;let t=e.arrayFields;return t&&typeof t=="object"?t:null}function Px(e,t){if(!Array.isArray(t))return[];let o=Lk(e),r=[];if(o?.control==="textList"){let a=o.itemKey??"text";return t.forEach((l,s)=>{let i=l?.[a];typeof i=="string"&&i&&r.push({row:{index:s,rowKey:a},text:i})}),r}let n=Ak(e);return n?(t.forEach((a,l)=>{for(let[s,i]of Object.entries(n)){if(!Cx(i))continue;let c=qa(a?.[s]);c&&r.push({row:{index:l,rowKey:s},text:c})}}),r):[]}function Ok(e,t){if(Array.isArray(e))return e[t.index]?.[t.rowKey]}function Nk(e,t,o,r){let n=e[t];return!Array.isArray(n)||o.index<0||o.index>=n.length?null:{...e,[t]:n.map((a,l)=>l===o.index?{...a,[o.rowKey]:r}:a)}}function z2(e,t,o,r,n){let a=Ok(e[t],o);return qa(a)===n?null:Nk(e,t,o,_i(r,a,n))}function K2(e,t){return t?`${e} \xB7 row ${t.index+1}`:e}var Q2="data-sf-part",eH="data-sf-part-selected",tH="data-sf-part-kind",Li="::",kx=2;function oH(e,t){return`${e}${Li}${t??""}`}function Xa(e){let t=e.indexOf(Li);return t<=0?null:{nodeId:e.slice(0,t),propKey:e.slice(t+Li.length)||null}}function rH(e,t){if(!e)return!1;let o=Xa(e);return!!o?.propKey&&o.nodeId===t}function Cr(e){return jt(e).replace(/\s+/gu,"")}function Ya(e,t,o){let r=e[_e];if(r){if(r.control==="textList"){let a=r.itemKey??"text";if(!Array.isArray(t))return;for(let l of t){let s=l?.[a];typeof s=="string"&&o.push(s)}return}let{text:n}=Jt(t);n?o.push(n):r.placeholder&&o.push(r.placeholder);return}if(!e[bn]){if(e.type==="text"||e.type==="textarea"){typeof t=="string"&&t&&o.push(t);return}if(e.arrayFields&&Array.isArray(t)){for(let n of t)for(let[a,l]of Object.entries(e.arrayFields))Ya(l,n?.[a],o);return}if(e.objectFields&&t&&typeof t=="object")for(let[n,a]of Object.entries(e.objectFields))Ya(a,t[n],o)}}function nH(e){if(!e||typeof e!="object")return!1;let t=e;return t[bn]?!1:!!t[_e]||t.type==="text"||t.type==="textarea"}function wx(e,t){let o=e[_e];return o?.label?o.label:typeof e.label=="string"?e.label:t}function Bk(e){let t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function aH(e,t){if(!e)return[];let o=[];for(let[r,n]of Object.entries(e)){if(!n||typeof n!="object"||Sn(r))continue;let a=n,l=[];Ya(a,t?.[r],l),!l.length&&a[yn]!==void 0&&Ya(a,a[yn],l);let s=wx(a,r),i=new Set;for(let{row:u,text:d}of Px(a,t?.[r])){let p=Cr(d);p.length<kx||(i.add(p),o.push({key:r,label:s,texts:[p],row:u}))}let c=new Set(i),f=[];for(let u of l){let d=Cr(u);d.length<kx||c.has(d)||(c.add(d),f.push(d))}f.length&&o.push({key:r,label:s,texts:f})}return o}var Dk=Go;function vx(e,t){if(!t||typeof t!="object"||Sn(e))return null;let o=t[_e];return!o||!Dk.includes(o.control)?null:o}function lH(e,t){let o=vx(e,t);return o!==null&&o.identifier!==!0}function sH(e,t){if(!e)return[];let o=[];for(let[r,n]of Object.entries(e)){let a=vx(r,n);if(!a)continue;let{text:l,hidden:s}=Jt(t?.[r]),i=l||a.placeholder||"",c=jt(i).replace(/\s+/gu," ").trim();o.push({key:r,label:Bk(wx(n,r)),preview:c,offPage:a.offPage===!0,identifier:a.identifier===!0,hidden:!!s})}return o}var Ni="_partStyles",Mi="data-sf-part-styled",Mk=["none","upper","lower"],Hk=[400,500,600,700],Gk=["left","center","right"],Wk=9,Uk=144,zk=-5,Kk=10,$k=0,Vk=64,qk=2,Yk=200,ja=900,Xk=10,Tx={size:{min:Wk,max:Uk,step:1},padding:{min:$k,max:Vk,step:qk},width:{min:Yk,max:ja,step:Xk}},jk=.05,Jk=.01,Zk=["line","letter"],Bi={none:"none",upper:"uppercase",lower:"lowercase"};function Cn(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function _x(e){return Cn(e?.[Ni])??{}}function Qk(e,t){let o=_x(e);return Object.hasOwn(o,t)?Cn(o[t])??{}:{}}function Lx(e,t,o){let r={..._x(e)};if(ew(o).length?r[t]=o:delete r[t],!Object.keys(r).length){let{[Ni]:n,...a}=e;return a}return{...e,[Ni]:r}}function ew(e){return Object.entries(e).filter(([,t])=>t!==void 0)}function tw(e){return Zk.includes(e)}var Rx=(e,t,o)=>Math.min(o,Math.max(t,e));function ow(e,t){if(tw(e)){let o=Math.round(Number(t));return!Number.isFinite(o)||o===0?null:Rx(o,zk,Kk)}if(Object.hasOwn(Tx,e)){let{min:o,max:r}=Tx[e],n=Math.round(Number(t));return Number.isFinite(n)?Rx(n,o,r):null}return e==="role"?Kt.includes(String(t))?t:null:t}var rw=[["font","role"]];function nw(e){let t=[];for(let[o,r]of rw)o===e?t.push(r):r===e&&t.push(o);return t}function pH(e,t,o,r){let n={...Qk(e,t)},a=r==null?null:ow(o,r);if(a===null)delete n[o];else{n[o]=a;for(let l of nw(o))delete n[l]}return Lx(e,t,n)}function mH(e,t){return Lx(e,t,{})}function aw(e){for(let t of Mk)if(Bi[t]===e)return t;return"none"}function lw(e){return!e||!Object.hasOwn(Bi,e)?"":Bi[e]}var sw={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 iw(e){let t=e.role;return t&&Kt.includes(t)?t:null}var cw={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 So(e,t,o){let r=iw(e),n=e.size?`${e.size}px`:r?o?.has(ar[r])?`var(--size-${ar[r]})`:cw[ar[r]]??"":"";return{fontFamily:e.font?pw(e.font):r?`var(${sw[r]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:n,minWidth:n?"0":"",overflowWrap:n?"break-word":"",lineHeight:e.line?String(Ja(t.lineRatio+e.line*jk,3)):"",letterSpacing:e.letter?`${Ja(t.letterEm+e.letter*Jk,4)}em`:"",textTransform:lw(e.case),textAlign:e.align??"",paddingTop:Ai(e.padding),paddingBottom:Ai(e.padding),maxWidth:Ai(e.width),color:fw(e.color)}}var fw=e=>e===void 0||e===""?"":Object.hasOwn(yr,e)?yr[e]:Ax.test(e)?e:"",Ax=/^#[0-9a-fA-F]{6}$/;function Ox(e){return Ax.test(e)}var Ai=e=>e===void 0?"":`${e}px`,Ja=(e,t)=>Number(e.toFixed(t));function xH(e,t){let o=Number.parseFloat(e.fontSize)||16,r=Number.parseFloat(e.lineHeight),n=Number.parseFloat(e.letterSpacing),a=Number.parseFloat(e.paddingTop),l=Number.parseFloat(e.maxWidth);return{fontKey:t,sizePx:o,weight:dw(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?Ja(r/o,3):1.2,letterEm:Number.isFinite(n)?Ja(n/o,4):0,align:uw(e.textAlign),case:aw(e.textTransform),paddingPx:Number.isFinite(a)?Math.round(a):0,widthPx:Number.isFinite(l)&&l<ja?Math.round(l):ja}}function dw(e){return Number.isFinite(e)?Hk.reduce((t,o)=>Math.abs(o-e)<Math.abs(t-e)?o:t):400}function uw(e){for(let t of Gk)if(t===e)return t;return e==="end"?"right":"left"}function gH(e,t){let o=Fx(e);if(!o)return"";for(let r of ms)if(Fx(t(r.cssVar))===o)return r.key;return""}var Fx=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function pw(e){let t=zd(e);return t?`var(${t.cssVar})`:""}function IH(e,t,o,r){return!t||Xa(t)?.nodeId!==e?null:o.find(a=>r(a.getAttribute("class")))??o[0]??null}function mw(e){let t=new Set,o=e;if(typeof window>"u"||!o?.ownerDocument)return t;let r=window.getComputedStyle(o);for(let n of xw)r.getPropertyValue(`--size-${n}`).trim()&&t.add(n);return t}var xw=["headingLarge","headingMedium","headingSmall","accent","body","label"];function hH(e,t,o=()=>Pn,r=a=>a,n=hw){let a=0;for(let{element:l,partId:s}of e){let i=Xa(s)?.propKey;if(!i)continue;let c=r(i),f=Object.hasOwn(t,c)?Cn(t[c])??{}:{},u=!!f.line||!!f.letter,d=So(f,u?o(l):Pn,mw(l)),p=Oi.some(I=>l.style[I]),x=!1;for(let[I,h]of Object.entries(d))l.style[I]=h,h&&(x=!0);if(p||Oi.some(I=>d[I]))for(let I of gw(l,n))for(let h of Oi)I.style[h]=d[h]??"";x&&(a+=1)}return a}function gw(e,t){let o=Cr(e.textContent??""),r=[],n=e;for(let a=0;a<Iw&&t(n);a+=1){let l=n.parentElement;if(!l||Cr(l.textContent??"")!==o)break;r.push(l),n=l}return r}var Iw=8;function hw(e){let t=e;return typeof window>"u"||!t?.ownerDocument?!1:window.getComputedStyle(t).display==="inline"}var Pn={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:ja},bw=Object.keys(So({},Pn)),Di=new Set(["color","overflowWrap"]),Oi=bw.filter(e=>!Di.has(e));function Nx(e,t,o,r=n=>n){let n=new Map;for(let s of e){let i=Fi(s.key,s.row);for(let c of s.texts){let f=n.get(c);f?(f.keys.add(s.key),f.partKeys.add(i)):n.set(c,{keys:new Set([s.key]),partKeys:new Set([i])})}}let a=new Map;for(let s of Object.keys(t)){if(!yw(s))continue;let i=Cn(t[s])??{},c=So(i,Pn);Object.values(c).some(Boolean)&&a.set(s,{stamp:Ex(o,s),declarations:c})}let l=new Map;for(let[s,{keys:i,partKeys:c}]of n){let f=c.size===1?[...c][0]:i.size===1?[...i][0]:null;if(!f)continue;let u=r(f);if(!Object.hasOwn(t,u))continue;let d=Cn(t[u])??{},p=So(d,Pn);Object.values(p).some(Boolean)&&l.set(s,{stamp:Ex(o,f),declarations:p})}return l.size||a.size?{rules:l,kindRules:a,drawn:new Set(n.keys())}:null}function yw(e){return e.startsWith("@")}function Bx(e,t){return e?.kindRules.get(t)??null}function Ex(e,t){let o=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${o(e)}~${o(t)}`}function Dx(e){let t=[],o=new Set,r=n=>{let{stamp:a,declarations:l}=n;if(o.has(a))return;o.add(a);let s=Object.entries(l).filter(([,d])=>d!==""),i=d=>d.map(([p,x])=>`${Sw(p)}: ${x}`).join("; "),c=`[${Mi}="${a}"]`,f=s.filter(([d])=>!Di.has(d)),u=s.filter(([d])=>Di.has(d));f.length&&t.push(`${c}, *:has(> ${c}) { ${i(f)} }`),u.length&&t.push(`${c} { ${i(u)} }`)};for(let n of e.rules.values())r(n);for(let n of e.kindRules.values())r(n);return t.join(`
|
|
4
|
-
`)}var
|
|
5
|
-
`);return ue(Pr,{value:e,children:o.map((r,n)=>Ui("span",{children:[re(r,t),n<o.length-1?ue("br",{}):null]},n))})}function el(e){return e.split(/\n\s*\n/).map(t=>t.trim()).filter(Boolean)}import{jsxs as jx}from"react/jsx-runtime";function zi({text:e,linkText:t,linkHref:o}){let r=(t??"").trim(),n=(o??"").trim(),a=!!r&&!!n;return!e&&!a?null:jx("p",{className:"mt-5 font-mono text-[length:var(--size-label,13px)] tracking-[0.06em] text-fg-dim",children:[e?re(e):null,e&&a?" ":null,a&&jx(Pe,{href:n,className:"text-accent transition-colors hover:text-fg",children:[re(r)," \u2192"]})]})}import{createContext as Dw,useCallback as Jx,useContext as Mw,useEffect as Hw,useId as Gw,useMemo as Ww,useRef as Uw,useState as zw}from"react";import{jsx as Kw}from"react/jsx-runtime";var Zx=Dw(null);function XH({reason:e,children:t}){let[o,r]=zw([]),n=Uw(null),a=Jx(c=>{r(f=>f.includes(c)?f:[...f,c])},[]),l=Jx(c=>{r(f=>f.filter(u=>u!==c))},[]),s=e==="none-configured",i=Ww(()=>({noCurrencyConfigured:s,live:o,firstRendered:n,join:a,leave:l}),[s,o,a,l]);return Kw(Zx.Provider,{value:i,children:t})}function Qx(e){let t=Mw(Zx),o=Gw(),r=!!e&&!!t?.noCurrencyConfigured;r&&t&&t.firstRendered.current===null&&(t.firstRendered.current=o);let n=t?.join,a=t?.leave;return Hw(()=>{if(!(!r||!n||!a))return n(o),()=>a(o)},[r,n,a,o]),!r||!t?!1:(t.live.length>0?t.live[0]:t.firstRendered.current)===o}import{jsx as Vw}from"react/jsx-runtime";var $w="This website has no currency yet. Add one in Settings and these cards will price. Only you can see this line.";function Ki({editing:e}){return Qx(e)?Vw(zi,{text:$w}):null}import{createContext as qw,useContext as Yw,useEffect as Xw,useState as eg}from"react";import{jsx as tl}from"react/jsx-runtime";var tg=qw({wheels:[],loading:!1});function og({children:e}){let[t,o]=eg([]),[r,n]=eg(!0);return Xw(()=>{let a=!1;return No().then(l=>{a||(o(l),n(!1))}).catch(()=>{a||n(!1)}),()=>{a=!0}},[]),tl(tg.Provider,{value:{wheels:t,loading:r},children:e})}function jw({code:e,finish:t,wheel:o}){let{wheels:r,loading:n}=Yw(tg),a=o??(e?r.find(l=>l.slug===e):void 0);return a?tl(hn,{wheel:a,variant:"catalog",defaultFinish:t},t??""):tl("div",{className:"sf-card flex aspect-square w-full items-center justify-center bg-surface-2 p-4 text-center",children:tl("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:n?"Loading\u2026":e||"Set a design code"})})}import{createContext as Qw,useCallback as tt,useContext as ev,useEffect as tv,useMemo as ov,useRef as lg,useState as kr}from"react";var fG={default:"Sort \xB7 Featured",new:"Newest","price-asc":"Price \xB7 Low","price-desc":"Price \xB7 High",name:"Name A\u2013Z"},ol={process:null,size:null,lugs:null,finish:null,priceMin:null,priceMax:null,sort:"default"};function Jw(e,t,o){return!(t.process&&e.process!==t.process||t.size&&!e.sizes.includes(t.size)||t.lugs!=null&&Qs(e)!==t.lugs||t.finish&&!e.finishes.some(r=>r.family===t.finish)||!ra(e.prices,o,t.priceMin,t.priceMax))}function Zw(e,t,o){return[...e].sort((r,n)=>{switch(t){case"price-asc":return cr(r.prices,n.prices,o,"asc");case"price-desc":return cr(r.prices,n.prices,o,"desc");case"name":return r.name.localeCompare(n.name);case"new":return(n.badge==="new"?1:0)-(r.badge==="new"?1:0);default:return 0}})}function rg(e,t,o,r=null){let n=Jp(e,r);return Zw(n.filter(a=>Jw(a,t,o)),t.sort,o)}import{jsx as nv}from"react/jsx-runtime";var sg={fit:null,name:"",resolving:!1,unresolved:!1};function rv(e,t){return e.fit===t.fit&&e.name===t.name&&e.resolving===t.resolving&&e.unresolved===t.unresolved}var st=()=>{},ig=Qw({filters:ol,setProcess:st,setSize:st,setLugs:st,setFinish:st,setPriceMin:st,setPriceMax:st,setSort:st,clearAll:st,reportCount:st,total:0,reportLugs:st,lugOptions:[],reportSizes:st,sizeOptions:[],reportFinishes:st,finishOptions:[],optionsReported:!1,scrollProcess:null,vehicle:sg,publishVehicle:st}),rl="data-catalog-collection",ng=(e,t)=>e-t;function ag(e,t){return e.length===t.length&&e.every((o,r)=>o===t[r])}function $i(e){let t=lg(new Map),[o,r]=kr([]),n=tt((a,l)=>{let s=t.current.get(a);if(s&&ag(s,l))return;t.current.set(a,l);let i=new Set;for(let f of t.current.values())for(let u of f)i.add(u);let c=[...i].sort(e);r(f=>ag(f,c)?f:c)},[e]);return[o,n]}function xG({children:e,initial:t}){let[o,r]=kr(t??ol),n=tt(F=>r(E=>({...E,process:F})),[]),a=tt(F=>r(E=>({...E,size:F})),[]),l=tt(F=>r(E=>({...E,lugs:F})),[]),s=tt(F=>r(E=>({...E,finish:F})),[]),i=tt(F=>r(E=>({...E,priceMin:F})),[]),c=tt(F=>r(E=>({...E,priceMax:F})),[]),f=tt(F=>r(E=>({...E,sort:F})),[]),u=tt(()=>r(F=>({...ol,sort:F.sort})),[]),[d,p]=kr(sg),x=tt(F=>{p(E=>rv(E,F)?E:F)},[]),g=lg(new Map),[I,h]=kr(0),C=tt((F,E)=>{if(g.current.get(F)===E)return;g.current.set(F,E);let N=0;for(let le of g.current.values())N+=le;h(N)},[]),[S,P]=$i(ng),[T,b]=$i(ng),[w,O]=$i(Su),[D,R]=kr(!1),_=tt((F,E)=>{R(!0),P(F,E)},[P]),G=tt((F,E)=>{R(!0),b(F,E)},[b]),Y=tt((F,E)=>{R(!0),O(F,E)},[O]),[M,v]=kr(null);tv(()=>{let E=0,se=()=>{E=0;let le=null,ge=document.querySelectorAll(`[${rl}]`);for(let ie of ge){let te=ie.getBoundingClientRect();if(te.top<=140&&te.bottom>140){le=ie.getAttribute(rl)??null;break}}v(le)},N=()=>{E||(E=requestAnimationFrame(se))};return se(),window.addEventListener("scroll",N,{passive:!0}),window.addEventListener("resize",N),()=>{window.removeEventListener("scroll",N),window.removeEventListener("resize",N),E&&cancelAnimationFrame(E)}},[]);let j=ov(()=>({filters:o,setProcess:n,setSize:a,setLugs:l,setFinish:s,setPriceMin:i,setPriceMax:c,setSort:f,clearAll:u,reportCount:C,total:I,reportLugs:_,lugOptions:S,reportSizes:G,sizeOptions:T,reportFinishes:Y,finishOptions:w,optionsReported:D,scrollProcess:M,vehicle:d,publishVehicle:x}),[o,n,a,l,s,i,c,f,u,C,I,_,S,G,T,Y,w,D,M,d,x]);return nv(ig.Provider,{value:j,children:e})}function cg(){return ev(ig)}function av(e){if(!e.includes("_"))return e;let t=e.replace(/^_+/,""),o=e.slice(0,e.length-t.length),[r,...n]=t.split("_");return o+r+n.map(a=>a.slice(0,1).toUpperCase()+a.slice(1)).join("")}function Vi(e){if(Array.isArray(e))return e.map(Vi);if(e&&typeof e=="object"){let t={};for(let[o,r]of Object.entries(e))t[av(o)]=Vi(r);return t}return e}function lv(e){return Vi(e)}function nl(e){return e.map(t=>ke(t)==="tyre"?t:lv(t))}import{useCallback as Uv,useEffect as zv,useMemo as Kv,useState as _g}from"react";import{useState as sv}from"react";import{jsx as qi}from"react/jsx-runtime";function Yi({brand:e,logo:t}){let[o,r]=sv(!1),n=(e??"").trim();if(!n)return null;let a=o?void 0:$t(t??void 0);return qi("div",{className:"sf-card-plate absolute inset-x-0 bottom-0 flex h-1/4 items-center justify-center bg-[var(--card-bg)] px-4 transition-colors duration-200 group-hover:bg-[var(--card-bg-hover)]",children:a?qi("img",{src:a,alt:n,className:"max-h-[52%] max-w-[78%] object-contain",draggable:!1,onError:()=>r(!0)}):qi("span",{className:"truncate font-display text-[length:var(--size-body,18px)] font-medium uppercase leading-none tracking-[-0.01em] text-fg",children:n})})}import{useEffect as mv,useState as xv}from"react";import{createContext as iv,lazy as cv,Suspense as fv,useContext as dv}from"react";import{jsx as al}from"react/jsx-runtime";var uv={Link:Pe,Image:io},pv=iv(uv);function fg(){return dv(pv)}function ll(e){let{Link:t}=fg();return al(t,{...e})}function sl(e){let{Image:t}=fg();return al(t,{...e})}function TG(e){let t=cv(e);return function(r){return al(fv,{fallback:null,children:al(t,{...r})})}}import{jsx as Xi,jsxs as gv}from"react/jsx-runtime";function Wo({fallback:e,className:t,src:o,alt:r="",objectPosition:n,objectFit:a="cover",sizes:l="100vw",priority:s=!1,deferFetch:i=!1,showBackground:c=!0,treatment:f}){let[u,d]=xv(!1),p=o||"";mv(()=>{d(!1)},[p]);let x=Zn(p),g=!p||u;return gv("div",{className:`relative h-full w-full overflow-hidden ${t??""}`,children:[Xi("div",{className:"absolute inset-0 flex items-center justify-center",style:c?{background:"var(--surface)"}:void 0,children:g?e:null}),p&&(x?Xi("img",{src:p,alt:r,decoding:"async",...i?{loading:"lazy"}:{},className:`absolute inset-0 h-full w-full${f?.className?` ${f.className}`:""}`,style:{display:u?"none":"block",objectFit:a,...n?{objectPosition:n}:{},...f?.style??{}},onError:()=>d(!0)}):Xi(sl,{src:p,alt:r,fill:!0,sizes:l,priority:s,...f?.className?{className:f.className}:{},style:{display:u?"none":"block",objectFit:a,...n?{objectPosition:n}:{},...f?.style??{}},onError:()=>d(!0)}))]})}import{useId as kv}from"react";var Iv=25.4,wn=400,cl=152,hv=58,dg=cl*Math.cos(hv*Math.PI/180),bv=14,yv=wn/2,Sv={sectionWidth:225,aspectRatio:60,rimDiameter:17};function pg(e){let t=Yt(e);return t?{sectionWidth:t.width,aspectRatio:t.profile,rimDiameter:t.rim}:Sv}function mg(e){let t=e.rimDiameter*Iv/2,o=t+e.sectionWidth*e.aspectRatio/100,r=cl*(e.sectionWidth/o),n=t/o;return{cy:yv,rx:dg,ry:cl,cxf:wn/2-r/2-bv,dx:r,rimRx:dg*n,rimRy:cl*n}}var X=e=>e.toFixed(1);function fl(e,t,o,r=!1){let n=e.cxf+t*e.dx,[a,l]=r?[e.cy+e.ry,e.cy-e.ry]:[e.cy-e.ry,e.cy+e.ry];return`M${X(n)} ${X(a)} A${X(e.rx)} ${X(e.ry)} 0 0 ${o} ${X(n)} ${X(l)}`}function ji(e,t,o){let r=e.cxf+t*e.dx,n=e.cxf+o*e.dx,a=e.cy-e.ry,l=e.cy+e.ry;return`M${X(r)} ${X(a)} L${X(n)} ${X(a)} A${X(e.rx)} ${X(e.ry)} 0 0 1 ${X(n)} ${X(l)} L${X(r)} ${X(l)} A${X(e.rx)} ${X(e.ry)} 0 0 0 ${X(r)} ${X(a)} Z`}function il(e,t,o){let r=o*Math.PI;return[e.cxf+t*e.dx+e.rx*Math.sin(r),e.cy-e.ry*Math.cos(r)]}function xg(e,t,o,r,n){let[a,l]=il(e,t,r),[s,i]=il(e,t,n),[c,f]=il(e,o,n),[u,d]=il(e,o,r);return`M${X(a)} ${X(l)} A${X(e.rx)} ${X(e.ry)} 0 0 1 ${X(s)} ${X(i)} L${X(c)} ${X(f)} A${X(e.rx)} ${X(e.ry)} 0 0 0 ${X(u)} ${X(d)} L${X(a)} ${X(l)} Z`}var ug=[{f:[0,.215]},{f:[.245,.485]},{f:[.515,.755]},{f:[.785,1]}],Cv={COM:[{f:[0,.115]},{f:[.145,.26]},{f:[.29,.405]},{f:[.435,.55]},{f:[.58,.695]},{f:[.725,.84]},{f:[.87,1]}],P:[{f:[0,.17],blocks:{count:9,gap:.34}},{f:[.2,.38]},{f:[.42,.58]},{f:[.62,.8]},{f:[.83,1],blocks:{count:9,gap:.34,phase:.5}}],HP:[{f:[0,.3]},{f:[.34,.52]},{f:[.56,.7]},{f:[.74,1],blocks:{count:16,gap:.18}}],UHP:[{f:[0,.34]},{f:[.4,.56]},{f:[.62,1]}],SUV:[{f:[0,.16],blocks:{count:7,gap:.4}},{f:[.2,.36],blocks:{count:11,gap:.26,phase:.5}},{f:[.4,.6]},{f:[.64,.8],blocks:{count:11,gap:.26,phase:.5}},{f:[.84,1],blocks:{count:7,gap:.4}}],LT:[{f:[0,.22],blocks:{count:11,gap:.26}},{f:[.26,.48],blocks:{count:11,gap:.26,phase:.5}},{f:[.52,.74],blocks:{count:11,gap:.26}},{f:[.78,1],blocks:{count:11,gap:.26,phase:.5}}],AT:[{f:[0,.23],blocks:{count:6,gap:.46}},{f:[.29,.5],blocks:{count:6,gap:.46,phase:.5}},{f:[.56,.77],blocks:{count:6,gap:.46}},{f:[.83,1],blocks:{count:6,gap:.46,phase:.5}}],MT:[{f:[0,.29],blocks:{count:4,gap:.58}},{f:[.36,.64],blocks:{count:4,gap:.58,phase:.5}},{f:[.71,1],blocks:{count:4,gap:.58}}]},Pv=[["ultra high performance","UHP"],["uhp","UHP"],["high performance","HP"],["hp","HP"],["performance","HP"],["sport","HP"],["mud terrain","MT"],["mud","MT"],["mt","MT"],["all terrain","AT"],["at","AT"],["light truck","LT"],["lt","LT"],["commercial","COM"],["com","COM"],["van","COM"],["cargo","COM"],["suv","SUV"],["4x4","SUV"],["crossover","SUV"],["cuv","SUV"],["passenger","P"],["touring","P"],["highway","P"],["p","P"]];function gg(e){let t=` ${(e??"").toLowerCase().replace(/[^a-z0-9]+/g," ").trim()} `;if(t.trim()==="")return ug;for(let[o,r]of Pv)if(t.includes(` ${o} `))return Cv[r];return ug}var BG="Illustrations are drawn to each tyre's listed size and represent its category; supplier photography replaces them where available.";import{Fragment as vn,jsx as V,jsxs as Nt}from"react/jsx-runtime";var it={rib:.2,grooveWall:.16,shoulder:.22,silhouette:.26,relief:[.26,.15,.11],lettering:.1,dishFill:.06,dishEdge:.3,spoke:.3,hubFill:.16,hubEdge:.34},wv=[.8,.52,.24],Ig=.4,hg=.88,bg=.3,yg=5,Sg=.3,Cg=.84,vv=7,Q=e=>Math.round(e*10)/10;function Ji({size:e,type:t,className:o}){let r=kv().replace(/[^a-zA-Z0-9]/g,""),n={tread:`${r}-tread`,wall:`${r}-wall`,rim:`${r}-rim`,shadow:`${r}-shadow`,crown:`${r}-crown`},a=mg(pg(e)),l=ji(a,0,1),s=e?`${e} tyre illustration`:"Tyre illustration";return Nt("svg",{"data-tyre-placeholder":"",viewBox:`0 0 ${wn} ${wn}`,role:"img","aria-label":s,fill:"none",className:o??"block h-full w-full",children:[V("title",{children:s}),Nt("defs",{children:[V(Rv,{id:n}),V("clipPath",{id:n.crown,children:V("path",{d:l})})]}),V("ellipse",{cx:Q(a.cxf+a.dx/2),cy:Q(a.cy+a.ry-4),rx:Q(a.dx*1.5),ry:16,fill:`url(#${n.shadow})`}),V(Fv,{g:a,id:n}),V(Ev,{g:a,id:n}),V("path",{d:l,fill:`url(#${n.tread})`}),V("g",{clipPath:`url(#${n.crown})`,children:gg(t).map(i=>V(Tv,{g:a,column:i},i.f[0]))}),V("path",{d:fl(a,0,0,!0),stroke:"currentColor",strokeOpacity:it.shoulder,strokeWidth:1.2}),V("path",{d:fl(a,1,1),stroke:"currentColor",strokeOpacity:it.silhouette,strokeWidth:1.4})]})}function Tv({g:e,column:t}){let[o,r]=t.f;if(!t.blocks)return Nt(vn,{children:[V("path",{d:ji(e,o,r),fill:"currentColor",fillOpacity:it.rib}),V("path",{d:fl(e,o,1),stroke:"currentColor",strokeOpacity:it.grooveWall,strokeWidth:1})]});let{count:n,gap:a,phase:l=0}=t.blocks,s=1/n,i=[];for(let c=-1;c<=n;c+=1){let f=Math.max((c+l+a/2)*s,0),u=Math.min((c+l+1-a/2)*s,1);u-f>s*.15&&i.push([f,u])}return V(vn,{children:i.map(([c,f])=>V("path",{d:xg(e,o,r,c,f),fill:"currentColor",fillOpacity:it.rib,stroke:"currentColor",strokeOpacity:it.grooveWall,strokeWidth:1},c))})}function Rv({id:e}){return Nt(vn,{children:[Nt("linearGradient",{id:e.tread,x1:"0",y1:"0",x2:"1",y2:"0",children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.07}),V("stop",{offset:"0.14",stopColor:"currentColor",stopOpacity:.24}),V("stop",{offset:"0.45",stopColor:"currentColor",stopOpacity:.18}),V("stop",{offset:"0.84",stopColor:"currentColor",stopOpacity:.1}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.05})]}),Nt("linearGradient",{id:e.wall,x1:"0.15",y1:"0",x2:"0.9",y2:"1",children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.28}),V("stop",{offset:"0.45",stopColor:"currentColor",stopOpacity:.17}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.08})]}),Nt("linearGradient",{id:e.rim,x1:"0.1",y1:"0",x2:"0.9",y2:"1",children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.46}),V("stop",{offset:"0.5",stopColor:"currentColor",stopOpacity:.26}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.12})]}),Nt("radialGradient",{id:e.shadow,children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.22}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:0})]})]})}function Fv({g:e,id:t}){let o=e.rimRy/e.ry,r=a=>o+(1-o)*a,n=Math.max(6,(e.ry-e.rimRy)*.3);return Nt(vn,{children:[V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rx),ry:Q(e.ry),fill:`url(#${t.wall})`}),wv.map((a,l)=>{let s=r(a);return V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rx*s),ry:Q(e.ry*s),stroke:"currentColor",strokeOpacity:it.relief[l],strokeWidth:1},a)}),V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rx*r(Ig)),ry:Q(e.ry*r(Ig)),stroke:"currentColor",strokeOpacity:it.lettering,strokeWidth:Q(n)})]})}function Ev({g:e,id:t}){let o=Array.from({length:yg},(r,n)=>{let a=(n*(360/yg)-90)*Math.PI/180;return{x1:e.cxf+e.rimRx*Sg*Math.cos(a),y1:e.cy+e.rimRy*Sg*Math.sin(a),x2:e.cxf+e.rimRx*Cg*Math.cos(a),y2:e.cy+e.rimRy*Cg*Math.sin(a)}});return Nt(vn,{children:[V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rimRx),ry:Q(e.rimRy),fill:`url(#${t.rim})`}),V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rimRx*hg),ry:Q(e.rimRy*hg),fill:"currentColor",fillOpacity:it.dishFill,stroke:"currentColor",strokeOpacity:it.dishEdge,strokeWidth:1}),o.map((r,n)=>V("line",{x1:Q(r.x1),y1:Q(r.y1),x2:Q(r.x2),y2:Q(r.y2),stroke:"currentColor",strokeOpacity:it.spoke,strokeWidth:vv,strokeLinecap:"round"},n)),V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rimRx*bg),ry:Q(e.rimRy*bg),fill:"currentColor",fillOpacity:it.hubFill,stroke:"currentColor",strokeOpacity:it.hubEdge,strokeWidth:1})]})}import{jsx as Zi}from"react/jsx-runtime";function Qi({image:e,size:t,type:o,sizes:r,priority:n=!1,className:a="aspect-square",showBackground:l=!0}){return Zi("div",{className:`text-fg ${a}`,style:{padding:"var(--sf-tyre-image-inset, 0)"},children:Zi(Wo,{label:t||"Tyre",src:$t(e??void 0),alt:t?`${t} tyre`:"Tyre",objectFit:"contain",sizes:r,priority:n,showBackground:l,fallback:Zi(Ji,{size:t,type:o,className:"block h-full w-full p-3"})})})}import{useEffect as _v,useState as Pg}from"react";var ec=new Map;function Lv(e){let t=ec.get(e);if(t)return t;let o=Rt.getTyre(e).catch(r=>{throw ec.delete(e),r});return ec.set(e,o),o}function kg(e,t){let[o,r]=Pg("idle"),[n,a]=Pg(null);return _v(()=>{if(!t||!e)return;let l=!1;return r("loading"),Lv(e).then(s=>{l||(a(s),r("ready"))}).catch(()=>{l||r("error")}),()=>{l=!0}},[e,t]),{state:o,tyre:n}}function ZG(e){if(!e||e.year===null)return null;let{make:t,model:o,year:r,modification:n}=e;return!t||!o||!n?null:{make:t,model:o,year:r,modification:n}}function Av(e,t){let o=new URLSearchParams({make:t.make,model:t.model,year:String(t.year),modification:t.modification});return`/api/v1/tyres/${encodeURIComponent(e)}/fitment?${o.toString()}`}function dl(e,t=""){return{vehicle:{...e,region:t},status:"unknown",oemSizes:[],variants:[]}}function Ov(e,t){if(typeof t!="object"||t===null)return dl(e);let o=t,r=typeof o.vehicle=="object"&&o.vehicle!==null?o.vehicle:{},n=typeof r.region=="string"?r.region:"",a=o.status;if(a!=="fits"&&a!=="doesNotFit")return dl(e,n);let l=Array.isArray(o.variants)?o.variants.filter(s=>typeof s=="object"&&s!==null&&typeof s.sku=="string"&&typeof s.fits=="boolean"):[];return l.length===0?dl(e,n):{vehicle:{make:typeof r.make=="string"?r.make:e.make,model:typeof r.model=="string"?r.model:e.model,year:typeof r.year=="number"?r.year:e.year,modification:typeof r.modification=="string"?r.modification:e.modification,region:n},status:a,oemSizes:Array.isArray(o.oemSizes)?o.oemSizes.filter(s=>typeof s=="string"):[],variants:l.map(s=>({sku:s.sku,size:typeof s.size=="string"?s.size:"",fits:s.fits}))}}async function QG(e,t){try{let o=await Qd(Av(e,t),{baseUrl:eu});return Ov(t,o)}catch{return dl(t)}}function e4(e){if(!e)return[];let t=[];for(let o of[...e.frontTyres,...e.rearTyres]){let r=Yt(o);if(!r)continue;let n=Vt(r);t.includes(n)||t.push(n)}return t}function t4(e,t){if(t.length===0)return null;for(let o of e){let r=Yt(o);if(!r)continue;let n=Vt(r);if(t.includes(n))return n}return null}function Nv(e,t){if(!e||e.status==="unknown")return"unknown";let o=e.variants.find(r=>r.sku===t);return o?o.fits?"fits":"doesNotFit":"unknown"}var Bv="/tyres";function ul(e){return e?`${Bv}/${e}`:null}function tc(e,t){return cu({partNumber:e.sku,prices:e.prices},t)}var Dv="Tyre";function pl(e,t,o,r){return{id:`${e.slug}|${t.sku}|${o.unit}|${o.spares>0?"spare":"no-spare"}`,slug:e.slug,name:hr(e.name),process:e.brand||Dv,positionNo:"01",config:[{label:t.size},{label:ea(o)}],finishName:"",size:t.size,components:tc(t,o),qty:r,href:ul(e.slug)??void 0,kind:"tyre",sku:t.sku,pack:o}}function i4(e){return e.kind==="tyre"}function wg(e,t){let o=e.prices?.[t];return typeof o!="number"||!Number.isFinite(o)||o<=0?!1:e.inStock}var vg="handed",Tg="plain";function g4(e){let t=e.variants??[],o=e.finishes.map(d=>({value:d.name,label:d.name,swatch:d.color}));function r(d){let p=[];for(let x of t){let g=d(x);!g||p.some(I=>I.value===g.value)||p.push(g)}return p}let n=r(d=>({value:di(d),label:Sm(d),note:Cm(d)})),a=r(d=>d.boltPattern?{value:d.boltPattern,label:d.boltPattern}:null),l=r(d=>{let p=Aa(d);return p===null?null:{value:p,label:`ET ${p}`}}),s=r(d=>d.centreBore==null?null:{value:Be(d.centreBore),label:`${Be(d.centreBore)} mm`}),i=r(d=>({value:ur(d)?vg:Tg,label:ur(d)?Fp:Ep})),c=t.map(d=>({id:`${d.finishName}|${d.size}`,options:{finish:d.finishName,size:di(d),variantSize:d.size,...d.boltPattern?{boltPattern:d.boltPattern}:{},...Aa(d)!==null?{et:Aa(d)}:{},...d.centreBore==null?{}:{centreBore:Be(d.centreBore)},pairing:ur(d)?vg:Tg},inStock:!un(d),image:null,components:d.components})),u=((e.defaultFinish?o.find(d=>d.value===e.defaultFinish):void 0)??o[0])?.value;return{kind:"alloy-wheel",source:e,slug:e.slug,name:e.name,eyebrow:e.process,badge:e.badge==="new"?"New 2026":e.badge?"Bestseller":"",href:`/wheels/${e.slug}`,crumbs:[{label:"Home",href:"/"},{label:"Wheels",href:"/wheels"},{label:e.process,href:"/wheels"},{label:e.name}],cover:e.coverImage??null,inStock:e.inStock===!0,mediaGroups:e.mediaGroups,optionFields:[{key:"finish",label:"Finish",prompt:"Select a finish",role:"resolves",display:"swatch",defaultValue:u},{key:"size",label:"Size",prompt:"Select a size",role:"resolves",display:"pill",empty:{text:"This wheel isn't available to order online in this finish.",linkText:"Contact us about it \u2192",href:"/contact"}},{key:"boltPattern",label:"Bolt pattern",prompt:"Select a bolt pattern",role:"describes",display:"pill"},{key:"et",label:"Offset",prompt:"Select an offset",role:"describes",display:"pill"},{key:"centreBore",label:"Centre bore",prompt:"Select a centre bore",role:"describes",display:"pill"},{key:"pairing",label:"Wheels",prompt:"Select a pairing",role:"describes",display:"pill"}],optionValues:{finish:o,size:n,boltPattern:a,et:l,centreBore:s,pairing:i},parts:c,anchorPrices:e.prices,anchorMsrpPrices:e.msrpPrices??{}}}function I4(e,t){if(e.kind!=="alloy-wheel"||t===null)return e;let o=new Set(jp(e.source.variants??[],t));if(o.size===0)return e;let r=e.parts.filter(s=>{let i=ml(e.source,s);return i!==null&&o.has(i)});if(r.length===0||r.length===e.parts.length)return e;let n=(s,i)=>new Set(s.map(c=>c.options[i]).filter(c=>c!==void 0)),a={},l=[];for(let s of e.optionFields){let i=n(e.parts,s.key),c=n(r,s.key),f=(e.optionValues[s.key]??[]).filter(d=>c.has(d.value)||!i.has(d.value));a[s.key]=f;let u=s.defaultValue!==void 0&&!f.some(d=>d.value===s.defaultValue)?f[0]?.value:s.defaultValue;l.push(u===s.defaultValue?s:{...s,defaultValue:u})}return{...e,optionFields:l,optionValues:a,parts:r}}function ml(e,t){return t?Na(e.variants??[],t.options.finish,t.options.variantSize)??null:null}function h4(e,t){return e.finishes.find(o=>o.name===t)??e.finishes[0]??yu}function w4(e){return e.kind==="tyre"?"advisory":"required"}var oc={choice:iu,qty:1};function Mv(e,t){if(e.kind!=="alloy-wheel")return`Set of ${4}`;let o=ml(e.source,t);return o?Oa(o):`Set of ${4}`}var Rg=(e,t)=>e===1?t:`${e} \xD7 ${t}`;function Fg(e){return e.unit==="set"?{label:`Add a spare \u2014 ${ir+1} instead of ${ir}`}:null}var Tn={howMany:"How many wheels",oneSet:"One set",oneSetPlusSpare:"One set + 1 spare",whichSide:"Which side is the spare?",left:"Left",right:"Right"};function Hv(e,t){return t.unit!=="set"||fu(e)===null?null:{counts:[{value:ir,label:Tn.oneSet},{value:ir+su,label:Tn.oneSetPlusSpare}],side:t.spares>0?{label:Tn.whichSide,options:[{value:"left",label:Tn.left},{value:"right",label:Tn.right}]}:null}}function Gv(e,t,o){if(e.kind==="tyre")return{packs:[{value:"set",label:`A set of ${ir}`},{value:"single",label:"Just one"}],extra:Fg(o.choice),spareCounts:[],spareSide:null,components:t?tc({sku:t.id,prices:t.components[0].prices},o.choice):[],quantityLabel:Rg(o.qty,ea(o.choice))};let r=t?Hv(t.components,o.choice):null;return{packs:[],extra:r?null:Fg(o.choice),spareCounts:r?.counts??[],spareSide:r?.side??null,components:t?bs(t.components,o.choice):[],quantityLabel:Rg(o.qty,du(Mv(e,t),o.choice))}}function v4(e,t,o,r,n){if(!t)return null;if(e.kind==="tyre"){let f=(e.source.variants??[]).find(u=>u.sku===t.id);return f?pl(e.source,f,r.choice,r.qty):null}let a=e.source,l=ml(a,t);if(!l)return null;let s=t.options.finish??"",i=l.size,c=r.choice.spares>0;return{id:`${a.slug}|${s}|${i}|${n.fitmentKey}${c?"|spare":""}`,slug:a.slug,name:hr(a.name),process:a.process,positionNo:"01",config:[{label:i},{label:s,gold:!0},{label:n.fitmentLabel},{label:Gv(e,t,r).quantityLabel}],finishName:s,size:i,components:bs(t.components,r.choice),qty:r.qty,...c?{pack:r.choice}:{}}}function Eg(e,t){let o=t.trim(),r=e.trim();return!r||!Wv(o,r)?o:o.slice(r.length).replace(/^[^\p{L}\p{N}]+/u,"")||o}function Wv(e,t){if(e.length<t.length||e.slice(0,t.length).toLowerCase()!==t.toLowerCase())return!1;let o=e[t.length];return o===void 0||!/[\p{L}\p{N}]/u.test(o)}import{Fragment as Yv,jsx as Co,jsxs as Rn}from"react/jsx-runtime";var $v="from ",Vv=2,qv=[];function rc({brand:e,brandLogo:t,brandPlate:o=!0,kindLabel:r=null,showBrand:n=!0,name:a,slug:l,sizes:s,fitSize:i=null,rimDiameters:c,prices:f,image:u,currency:d,editing:p=!1,fieldUsage:x=qv}){let g=xr(x),{add:I,open:h,warmCatalog:C}=la();zv(()=>{p||C("tyre")},[p,C]);let{currency:S}=co(),P=na(oa(f,d),null),T=aa(P,d,$v),b=[s.length>0?`${s.length} ${s.length===1?"size":"sizes"}`:null,g("rim_diameter")?wa(c):null].filter(Boolean).join(" \xB7 "),w=ul(l),[O,D]=_g(!1),R=Uv(()=>{l&&D(!0)},[l]),{state:_,tyre:G}=kg(l??null,O),Y=Kv(()=>G?.variants??[],[G]),[M,v]=_g(null),j=Y.length===1?Y[0].size:null,F=M??j,E=Y.find(z=>z.size===F),se=E!=null&&wg(E,S),N=_==="ready",le=!w||_==="error"||N&&Y.length===0;function ge(){!G||!E||!se||p||(I(pl(G,E,oc.choice,oc.qty)),h())}let ie=N&&Y.length>0?Y.map(z=>z.size):s,te=ie.slice(0,Vv),he=ie.length-te.length,de=z=>["cursor-pointer transition-colors",gn,z?"border-accent bg-accent text-bg":"border-accent/60 text-accent hover:border-accent hover:bg-accent/10"].join(" ");return Co(In,{href:w,identityLink:!0,containerProps:{onPointerEnter:R,onTouchStart:R,onFocusCapture:R},image:Co(Qi,{image:u,className:"h-full w-full",sizes:"(max-width: 640px) 90vw, (max-width: 1024px) 45vw, 280px",showBackground:!1}),plate:o?Co(Yi,{brand:e,logo:t}):null,eyebrow:ni(r,n&&g("brand")&&e||null),name:Eg(e??"",a),spec:b,price:T,metaLine:P.priced?"each":null,extras:Rn(Yv,{children:[i&&Rn("p",{className:"font-mono text-[length:var(--size-label,11px)] font-medium uppercase tracking-[0.14em] text-green",children:["Fits \xB7 ",i]}),Rn("div",{className:Ha,children:[Co("div",{className:Ga,children:te.map(z=>N&&Y.length>0?Co("button",{type:"button",title:z,"aria-label":z,"aria-pressed":F===z,onClick:()=>v(z),className:de(F===z),children:z},z):Co("span",{className:Ua,children:z},z))}),he>0&&Rn("span",{className:Wa,children:["+",he]})]}),Rn("div",{className:za,children:[!le&&P.priced&&Co("button",{type:"button",onClick:ge,[ta]:"",disabled:N&&!se,className:se||!N?`${br}${se?"":" opacity-80"}`:"cursor-not-allowed border border-dashed border-accent/50 px-4 py-2.5 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-accent/70",children:N&&!se?"Select a size":"Add to basket"}),w&&Co(Pe,{href:w,className:Ka,children:"Open product page"})]})]})})}import{jsx as Xv}from"react/jsx-runtime";function nc({item:e,currency:t,kindLabel:o=null,showBrand:r=!0,fitSize:n=null,editing:a=!1,fieldUsage:l}){return Xv(rc,{brand:e.brand,brandLogo:e.brandLogo,kindLabel:o,showBrand:r,name:e.name,slug:e.slug,sizes:e.sizes,fitSize:n,rimDiameters:e.rimDiameters,prices:e.prices,image:e.coverImage,currency:t,editing:a,fieldUsage:l})}import{Fragment as Qv,jsx as We,jsxs as Uo}from"react/jsx-runtime";var Ag={1:"grid-cols-1",2:"grid-cols-2 max-[800px]:grid-cols-1",3:"grid-cols-3 max-[800px]:grid-cols-1",4:"grid-cols-4 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",5:"grid-cols-5 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",6:"grid-cols-6 max-[1100px]:grid-cols-3 max-[800px]:grid-cols-1"},Og=[{value:"para",label:"Paragraph size \u2014 13px",cls:"font-mono font-normal uppercase tracking-[0.22em] text-[length:var(--size-label,13px)]"},{value:"sm",label:"Small \u2014 40px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,40px)] max-[800px]:text-[length:var(--size-headingMedium,28px)]"},{value:"md",label:"Medium \u2014 48px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,48px)] max-[800px]:text-[length:var(--size-headingMedium,32px)]"},{value:"lg",label:"Large \u2014 56px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,56px)] max-[800px]:text-[length:var(--size-headingMedium,36px)]"},{value:"xl",label:"Extra large \u2014 64px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,64px)] max-[800px]:text-[length:var(--size-headingMedium,40px)]"}],ac="lg";function Jv(e){return(Og.find(t=>t.value===e)??Og.find(t=>t.value===ac)).cls}function Zv({num:e,catalog:t,kinds:o,title:r,titleSize:n,padTop:a,description:l,link:s,products:i,source:c,columns:f,limit:u,editing:d,capWidth:p,imageBackground:x,spinOnHover:g,coverIndex:I,indexBadge:h,outline:C,showBadge:S,fieldUsage:P,showCardPrice:T,showCardFinishes:b,showCardSizes:w,showCardBuy:O,showCardPage:D,cardImage:R,gap:_}){let G=wr(()=>P?mr(P,"alloy-wheel"):void 0,[P]),Y=wr(()=>P?mr(P,"tyre"):void 0,[P]),M=`pg-${jv().replace(/:/g,"")}`,v=Ag[Math.min(6,Math.max(1,f??4))]??Ag[4],j=typeof u=="number"&&u>0,F=typeof p=="number",E=wr(()=>{let Ee=t??c?.wheels??null;return Ee?nl(Ee):null},[t,c]),se=c?.process,N=!!se,{filters:le,reportCount:ge,reportLugs:ie,reportSizes:te,reportFinishes:he,vehicle:de}=cg(),{currency:z}=co(),Ae=N&&!!le.process&&le.process!==se,Fe=wr(()=>E?N?rg(E,le,z,de.fit):E:null,[E,N,le,z,de.fit]);Lg(()=>{if(N)return ge(M,Ae?0:Fe?.length??0),()=>ge(M,0)},[N,Ae,Fe,ge,M]);let Oe=wr(()=>{let Ee=(Fe??[]).filter(B=>ke(B)!=="tyre");if(Ee.length===0)return!1;let A=Ee.some(B=>!!B.process);return Ee.some(B=>!!B.setWords)||ai({kind:!1,brand:!1,process:A},G??[])},[Fe,G]),ne=wr(()=>({lugs:Bp(E??[]),sizes:Hp(E??[]),finishes:Cu(E??[])}),[E]);Lg(()=>(ie(M,ne.lugs),te(M,ne.sizes),he(M,ne.finishes),()=>{ie(M,[]),te(M,[]),he(M,[])}),[ne,ie,te,he,M]);let K=Rp("ProductGrid",_,"both"),H=`${M} grid${K.className} bg-[var(--catalog-grid-bg)] ${v}`,He=Fe?Fe.length>0?We("div",{className:H,style:K.style,children:Fe.map((Ee,A)=>ke(Ee)==="tyre"?We(nc,{item:Ee,currency:z,editing:d,fieldUsage:Y},`tyre:${Ee.slug}-${A}`):We(hn,{wheel:Ee,variant:"catalog"},`${Ee.slug}-${A}`))}):d?We("div",{className:"flex min-h-[320px] items-center justify-center rounded bg-surface-2 p-4 text-center",children:Uo("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:["No products in \u201C",c?.name,"\u201D yet"]})}):null:We(i,{className:H,style:K.style,minEmptyHeight:320}),Ze=Fe?Fe.length:null,It=Am(pn(o)),Ne=e||r||l||s?Uo("div",{className:`${ku} sticky top-[var(--sf-header-h,88px)] z-30 mb-[18px] flex items-center justify-between gap-4 max-[800px]:flex-wrap max-[800px]:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${F?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-[800px]:-mx-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]"}`,children:[Uo("div",{className:"flex min-w-0 items-end gap-[21px]",children:[e&&We("span",{className:"font-mono text-[length:var(--size-label,13px)] leading-none uppercase tracking-[0.22em] text-fg-dim",children:re(e)}),r&&We("h2",{className:`${Jv(n)} leading-none text-fg max-[800px]:leading-[1] [&>span]:block`,children:Ot(r,!1)})]}),(l||s||Ze!==null)&&Uo("div",{className:"flex items-center gap-5 max-[800px]:gap-3",children:[l&&We("span",{className:"max-w-[340px] truncate font-display text-[length:var(--size-body,13px)] leading-[1.4] text-fg-dim max-[800px]:hidden",children:re(l)}),s&&Uo(Pe,{href:s.href,className:"inline-flex items-center gap-2 whitespace-nowrap font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg",children:[re(s.text),We("span",{"aria-hidden":!0,children:"\u2192"})]}),Ze!==null&&Uo("span",{className:"whitespace-nowrap font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:[Ze," ",Ze===1?It.one:It.many]})]})]}):null,Ve=typeof a=="number"?a:120,ht=Qp(h),rt=tm(M,ht),zt=Uo(Qv,{children:[j&&We("style",{children:`.${M} > *:nth-child(n+${u+1}){display:none}`}),rt&&We("style",{children:rt}),Ne,He,We(Ki,{editing:d})]});if(Ae)return null;let tr=We("section",{...N?{[rl]:se}:{},className:"relative z-[2] bg-bg px-[var(--sf-site-gutter,40px)] pt-[var(--pg-pt)] pb-[120px] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:pt-[70px] max-[800px]:pb-[70px]",style:{"--pg-pt":`${Ve}px`,...Cp(R)},children:F?We("div",{style:ru(!1,p)??void 0,children:zt}):zt}),Jr=d&&!E?We(og,{children:tr}):tr;return We(xm,{imageBackgroundFill:Pa(x,_t),spinOnHover:g??!0,coverIndex:I??1,indexBadge:ht,outline:C??Io,showBadge:S??!0,fieldUsage:G,reserveEyebrow:Oe,showCardPrice:T??!0,showCardFinishes:b??!0,showCardSizes:w??!1,showCardBuy:O??!1,showCardPage:D??!1,children:Jr})}var lc="wheels",eT="collection:",tT=60;function oT(e){let t=e?.props?.source;return e?.type==="ProductGrid"&&!!t?.process}function rT(e){return e.some(t=>t?.type==="CatalogFilterBar"||oT(t))}function nT(){return{type:"CatalogFilterBar",props:{id:"CatalogFilterBar-wheels-seed",showProcess:!0,showLugs:!0,showPrice:!0,showCount:!0,showSort:!0}}}function aT(e,t){let o=Ys(e);return{type:"ProductGrid",props:{id:`ProductGrid-wheels-${o}`,dynamic:!1,num:t,title:e,titleSize:ac,padTop:100,description:"",linkText:"Explore the collection",linkHref:`/wheels/collections/${o}`,columns:4,showAll:!0,limit:8,imageBackground:_t,spinOnHover:!0,source:{slug:`${eT}${o}`,name:e,process:e,wheels:[]},fullWidth:!0,pageWidth:Qn.default,products:[]}}}function lT(e){let t=e?gp(e):xp;return[nT(),...t.map(o=>aT(o.key,o.num))]}function Ng(e,t,o){if(e!==lc)return t;let r=t?.content??[];if(rT(r))return t;let n=lT(o),a=r.findIndex(s=>s?.type===jn),l=a===-1?[...r,...n]:[...r.slice(0,a),...n,...r.slice(a)];return{...t,content:l}}function Bg(e,t,o={}){let r=e?.content??[],n=o.scopeToCatalog?Xs(t):null,a=r.map(l=>{let s=l?.props?.source;if(l?.type==="CatalogFilterBar"&&n)return{...l,props:{...l.props,processOptions:n}};if(l?.type!=="ProductGrid"||!s?.process)return l;if(n&&!n.includes(s.process))return null;if(o.onlyEmpty&&(s.wheels?.length??0)>0)return l;let i=t.filter(c=>c.process===s.process).slice(0,tT);return{...l,props:{...l.props,source:{...s,wheels:i}}}}).filter(l=>l!==null);return{...e,content:a}}var sT="__all__",_5="All products";function Dg(e){return e?.slug===sT}var zo="AlloyWheelsListing",iT="ProductGrid",Mg="catalog",cT="CatalogFilterBar",xl="fieldUsage";function vr(e){return e?.type===iT&&Dg(e.props?.source)}function sc(e){return e?.type===cT}function fT(e){return e?.type===zo||vr(e)||sc(e)}function dT(e){let t=e.content??[],o=e.zones??{};return[...t,...Object.values(o).flat()]}function gl(e){return e?dT(e).some(t=>t?.type===zo||vr(t)):!1}function Hg(e,t){return pT(e,o=>vr(o)?{...o,props:{...cc(o).props,[Mg]:uT(t,pn(o.props?.kinds))}}:{...o,props:{...fc(o).props,products:t}})}function ic(e){return Wg(e,fT,t=>sc(t)?Gg(t):vr(t)?cc(t):fc(t))}function Gg(e){if(!e.props||!(xl in e.props))return e;let{[xl]:t,...o}=e.props;return{...e,props:o}}function cc(e){let{[Mg]:t,[xl]:o,...r}=e.props??{};return{...e,props:r}}function uT(e,t){let o=new Set(t);return e.filter(r=>{let n=r.kind??"alloy-wheel";return o.has(n)})}function N5(e){return vr(e)?cc(e):sc(e)?Gg(e):e?.type===zo?fc(e):e}function fc(e){let{wheels:t,products:o,[xl]:r,...n}=e.props??{};return{...e,props:n}}function pT(e,t){return Wg(e,o=>o?.type===zo||vr(o),t)}function Wg(e,t,o){let r=l=>t(l)?o(l):l,n=e,a={...e};return n.content&&(a.content=n.content.map(r)),n.zones&&(a.zones=Object.fromEntries(Object.entries(n.zones).map(([l,s])=>[l,s.map(r)]))),a}import{useEffect as zg,useRef as dc,useState as Kg}from"react";var mT="data-editor-theme";function Ug(e){typeof document>"u"||document.documentElement.setAttribute(mT,"light")}var xT=500,$g={canCreatePlatformTemplate:!1};function gT(e){return!e||typeof e!="object"?$g:{canCreatePlatformTemplate:e.canCreatePlatformTemplate===!0}}function IT(e,t={}){let o=t.session??Ye();o.auth.token=e.token,o.auth.brandId=e.brandId??null,Vd(o,e.siteId),(t.stampChromeTheme??!0)&&Ug(e.theme)}function Vg(e){let[t,o]=Kg(null),r=dc(null),[n,a]=Kg($g),l=dc(e?.onAuth),s=dc(e?.onMessage);zg(()=>{l.current=e?.onAuth,s.current=e?.onMessage});let i=fo(),c=ba();return zg(()=>{let f=i.subscribe(d=>{let p=d;if(p.type==="storefront-editor:auth"&&typeof p.token=="string"&&p.token){let x=!!r.current;r.current=p.token,o(p.token),IT({...p,token:p.token},{stampChromeTheme:i.ownsDocument,session:c}),a(gT(p.can)),l.current?.(x)}else s.current?.(d)});if(i.send("storefront-editor:ready"),!c.usesBridgedToken)return f;let u=window.setInterval(()=>{r.current?window.clearInterval(u):i.send("storefront-editor:ready")},xT);return()=>{f(),window.clearInterval(u)}},[i,c]),{token:t,tokenRef:r,capabilities:n}}var uc=new Set,pc=new Set,mc=new Set;function K5(e){return uc.add(e),()=>uc.delete(e)}function qg(){uc.forEach(e=>e())}function $5(e){return pc.add(e),()=>pc.delete(e)}function Yg(){pc.forEach(e=>e())}function Il(e){return mc.add(e),()=>mc.delete(e)}function xc(){mc.forEach(e=>e())}var gc=new Map,hT=9e5,Xg=0;function bT(){return Xg+=1,`fe-${typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():String(Xg)}`}function jg(e,t){e.connected&&e.send("storefront-editor:open-form",{mode:"edit",formId:t})}function Jg(e,t){if(!e.connected)return Promise.resolve({status:"closed"});let o=bT();return new Promise(r=>{let n=setTimeout(()=>Zg(o,{status:"timeout"}),t.timeoutMs??hT);gc.set(o,a=>{clearTimeout(n),r(a)}),e.send("storefront-editor:open-form",{requestId:o,mode:t.mode,...t.formId?{formId:t.formId}:{}})})}function Zg(e,t){let o=gc.get(e);o&&(gc.delete(e),o(t))}function Ic(e,t){Zg(e,t?{status:"saved",form:t}:{status:"closed"})}function Qg(e){switch(e?.type){case"storefront-editor:category-updated":return qg(),!0;case"storefront-editor:menus-updated":return Yg(),!0;case"storefront-editor:form-saved":{let o=e;return xc(),o.requestId&&Ic(o.requestId,o.form??null),!0}case"storefront-editor:form-closed":{let o=e;return xc(),o.requestId&&Ic(o.requestId,null),!0}case"storefront-editor:media-picked":{let o=e;return o.requestId&&zs(o.requestId,o.media??null),!0}case"storefront-editor:media-pick-cancelled":{let o=e;return o.requestId&&zs(o.requestId,null),!0}default:return!1}}var yT={unauthorized:"the editor's sign-in was refused (unauthorized).","changed-elsewhere":"the page changed while it was being opened (changed-elsewhere).","lock-taken":"somebody else holds this page (lock-taken).","not-found":"this page no longer exists (not-found).",invalid:"the backend refused the request (invalid).",unavailable:"the backend could not be reached (unavailable)."};function hc(e){return ma(e)?e.cause instanceof at?hc(e.cause):`${yT[e.kind]} ${e.message}`.trim():e instanceof at?e.status===lr?`${Zd} (no response)`:e.status===401||e.status===403?`the editor's sign-in was refused (${e.status}). Reload the console and open the editor again; if it keeps happening the bridged token is not valid for this site.`:e.status===404?"this page no longer exists (404).":e.status>=500?`the server failed (${e.status}). ${e.message}`:`the server refused the request (${e.status}). ${e.message}`:e instanceof Error?`${e.name}: ${e.message}`:String(e)}import{canWriteDocument as Ko,holderOf as kT,newEaselClientId as wT,reloadIfVersionMoved as vT}from"efficient-easel/edit-lock";import{useAutosave as TT}from"efficient-easel/autosave";import{createEditLock as ST}from"efficient-easel/edit-lock";var hl=ST({readFailure:qs,conflictCode:an});import{jsx as ET}from"react/jsx-runtime";var RT={content:[],root:{},zones:{}};function FT(e,t){if(e.kind!==t.kind)return!1;if(e.kind==="template"){let r=t;return e.id===r.id&&(e.pageSlug??dt)===(r.pageSlug??dt)}let o=t;return e.slug===o.slug&&e.siteId===o.siteId}var Po=CT(null);function eI(){let e=PT(Po);if(!e)throw new Error("useStorefrontDocument must be used within StorefrontDocumentProvider");return e}function EW({target:e,children:t}){let[o,r]=Ct(e),n=fo(),a=ba(),l=bc(()=>ln(a),[a]),s=o.kind==="template",i=o.kind==="template"?o.id:null,c=o.kind==="template"?o.pageSlug??dt:o.slug,f=o.kind==="page"?o.siteId??null:null,u=bc(()=>cn(a),[a]),d=bc(()=>o.kind==="template"?up(o.id,l,u):dp(o.siteId,l,u),[l,u,o.kind,o.kind==="template"?o.id:o.siteId]),p=d.capabilities,x=o.kind==="page"?o.originSlug??null:null;ut(()=>{$d(a,f)},[a,f]);let g=ot(o);ut(()=>{g.current=o},[o]);let{token:I,tokenRef:h,capabilities:C}=Vg({onMessage:k=>{if(Qg(k))return;if(k?.type==="storefront-editor:navigate"){let ye=k;ye?.target&&Ld(ye.target)}}}),S=a.usesBridgedToken?I!==null:!0,P=d.lock,T=!!l.lock,[b,w]=Ct(null),[O,D]=Ct(null),[R,_]=Ct(null),[G,Y]=Ct(null),M=ot(null),[v,j]=Ct(!1),F=ot(null),[E,se]=Ct(null),N=ot(null),[le,ge]=Ct(null),ie=ot(null);ut(()=>{ie.current=le},[le]);let[te,he]=Ct(p.hasEditLock?{kind:"checking"}:{kind:"editing"}),de=ot(te);ut(()=>{de.current=te},[te]);let z=ot(()=>Promise.resolve(!1)),Ae=we(k=>{M.current=k,j(!0)},[]),Fe=TT({save:async({id:k,data:L})=>{if(!Ko(de.current)){Ae({id:k,data:L});return}if(!await z.current(k,L)){if(!Ko(de.current)){Ae({id:k,data:L});return}throw new Error("page save did not land")}},onFailure:(k,L)=>{L===0&&n.send("storefront-editor:save-failed")}}),{state:Oe,push:ne,flush:K,pause:H,resume:He,stop:Ze,reset:It,retryNow:oo,hasPending:Ne}=Fe,Ve=ot(Oe);ut(()=>{Ve.current=Oe},[Oe]);let ht=Qu(Oe),rt=we(()=>{let k=M.current;k&&(M.current=null,j(!1),ne(k))},[ne]),zt=ot("");zt.current||(zt.current=wT());let[tr,Jr]=Ct(0),Ee=ot(!1),A=e.kind==="page"&&e.slug===lt,[W,B]=Ct(e.kind==="template"||A),ce=ot(!1);ut(()=>{if(ce.current)return;ce.current=!0;let k=n.address.search();if(e.kind==="page"&&e.slug===lt){let L=Ms(),ye=L&&L!==lt?L:dt;n.address.load({kind:"page",slug:ye,siteId:e.siteId});return}if(e.kind==="template"){if(new URLSearchParams(k).get("editTemplate")==="1"){B(!1);return}n.address.load({kind:"page",slug:dt})}},[e,n]);let Ie=n.send;ut(()=>{if(!S)return;let k=!1,L=d.resolve(c),Se=p.hasCatalog&&!s&&c===lc?No().catch(()=>[]):Promise.resolve([]);return Promise.all([L,Se]).then(async([me,qe])=>{if(k)return;if(!me){if(!s&&c!==dt){n.address.load({kind:"page",slug:dt,siteId:f??void 0});return}Y(s?"Couldn\u2019t open a page in this template.":`No storefront page with slug "${c}".`);return}w(me.id),D(me.kind??null),N.current=me.version??null;let Qe=me.layout,hS=Qe&&Object.keys(Qe).length?Qe:RT,bS=cp(hS),Ad=Ng(s||!p.hasCatalog?"":c,bS,qe),cs=qe.length?Bg(Ad,qe,{onlyEmpty:!0}):Ad;if(p.hasCatalog&&gl(cs)){let Od=await ya().catch(()=>[]);if(k)return;if(Od.length){_(Hg(cs,nl(Od)));return}}_(cs)}).catch(me=>{k||(console.error("[storefront-editor] document load failed",me),Y(me instanceof tu?`\u201C${c}\u201D exists on more than one website. Open it from the site you want to edit.`:`Could not load the document \u2014 ${hc(me)}`))}),()=>{k=!0}},[S,I,s,d,c]);let ro=we(k=>new Promise(L=>{let ye=Date.now(),Se=setInterval(()=>{let me=h.current;me&&me!==k?(clearInterval(Se),L(me)):Date.now()-ye>6e3&&(clearInterval(Se),L(null))},200)}),[]),nt=we(async k=>{let L=h.current;if(!L&&a.usesBridgedToken)return{ok:!1,error:new Error("no editor token")};try{return{ok:!0,value:await k(L??"")}}catch(ye){if(pp(ye)){Ie("storefront-editor:auth-expired");let Se=L?await ro(L):null;if(Se)try{return{ok:!0,value:await k(Se)}}catch(me){return{ok:!1,error:me}}}return{ok:!1,error:ye}}},[Ie,ro,a]),Zr=we(async k=>{let L=h.current?await nt(k):{ok:!1,error:new Error("no editor token")};return L.ok||Ie("storefront-editor:save-failed"),L.ok},[Ie,nt]),Yn=we(async(k,L,ye=!1)=>{if(!Ko(de.current)||ie.current)return!1;let Se=await nt(()=>d.saveLayout(k,L,N.current,zt.current));if(Se.ok)return N.current=Se.value.version??N.current,!0;let me=hl.readLockTaken(Se.error);if(me){let Qe={kind:"takenover",holder:me};return de.current=Qe,he(Qe),!1}let qe=hl.readSaveConflict(Se.error);if(qe){if(qe.savedByYou&&!ye&&d.rereadVersion){let Qe=await nt(()=>d.rereadVersion(k));if(Qe.ok&&Qe.value)return N.current=Qe.value,z.current(k,L,!0)}Ze(),ie.current=qe,ge(qe)}return!1},[d,nt,Ze]);ut(()=>{z.current=Yn},[Yn]);let cS=we(k=>{if(Ie("storefront-editor:dirty"),!b)return;let L=gl(k)?ic(k):k;if(F.current=L,!Ko(de.current)){Ae({id:b,data:L});return}ne({id:b,data:L})},[b,Ie,Ae,ne]),or=we(async()=>(Ko(de.current)&&rt(),await K()&&M.current==null),[rt,K]),Ed=ot(or);ut(()=>{Ed.current=or},[or]);let ss=ot(nt);ut(()=>{ss.current=nt},[nt]);let is=we(()=>{n.address.reload()},[n]),_d=ot(()=>Promise.resolve(!1));ut(()=>{_d.current=()=>{let k=d.rereadVersion;return!b||!k?Promise.resolve(!1):vT({ours:N.current,stored:async()=>{let L=await ss.current(()=>k(b));return L.ok?L.value:null},hasPending:()=>M.current!=null||Ne(),reload:is})}},[d,b,Ne,is]),ut(()=>{if(!P||!b||!S)return;let k=!1,L=null,ye=zt.current,Se=hl.makeClaimBeat({claim:async qe=>{let Qe=await ss.current(()=>P.claim(b,ye,qe));if(Qe.ok)return{heartbeat_seconds:Qe.value.heartbeatSeconds};throw Qe.error},cancelled:()=>k,currentAccess:()=>de.current,heldWrite:()=>({pending:M.current!=null||Ne(),autoSaveEnabled:!Ve.current.paused,saveConflict:ie.current!=null}),setAccess:qe=>{de.current=qe,he(qe)},releaseHeldWrite:()=>{Ed.current()},startHeartbeat:qe=>{L=setInterval(()=>{Se(!1)},qe)},stopHeartbeat:()=>{L&&(clearInterval(L),L=null)},reloadIfMoved:()=>{_d.current()}}),me=Ee.current;return Ee.current=!1,me||he({kind:"checking"}),Se(me),()=>{k=!0,L&&clearInterval(L),P.release(b,ye).catch(()=>{})}},[b,P,S,I,tr]);let fS=we(()=>{!P||!b||(Ee.current=!0,Jr(k=>k+1))},[b,P]),dS=we(()=>{he(k=>{let L=k.kind==="blocked"||k.kind==="takenover"?k.holder:null;return L?{kind:"readonly",holder:L}:k})},[]),uS=we(()=>{Ve.current.paused?(Ko(de.current)&&rt(),He()):H()},[rt,H,He]),pS=we(()=>{oo()},[oo]),Fo=we(k=>{if(F.current=null,ep(k.kind!=="template"&&T,{resetAutosave:()=>{It(),M.current=null,j(!1)},setVersion:L=>{N.current=L},setSaveConflict:ge,setAccess:he}),k.kind==="page"){let L=Ms();k.slug!==lt&&k.slug!==L&&Hs()}else Hs();r(k),w(null),D(null),_(null),Y(null),n.address.show(k),k.kind==="page"&&k.slug!==lt&&n.send("storefront-editor:navigated",{target:k})},[It,n,T]),Ld=we(k=>{if(FT(k,g.current))return;let L=M.current!=null;if(!L&&!Ne()){Fo(k);return}let ye=Ve.current;if(L||ye.paused||ye.failed||ye.stopped){se(k);return}K().then(Se=>{Se?Fo(k):se(k)})},[Fo,Ne,K]),mS=we(()=>se(null),[]),xS=we(()=>{se(k=>(k&&Fo(k),null))},[Fo]),gS=we(async()=>{let k=E;if(!k)return;await or()&&(se(null),Fo(k))},[E,or,Fo]),IS=we(async k=>{if(!b||!Ko(de.current)||ie.current)return;let L=gl(k)?ic(k):k;if(!await Yn(b,L)){ie.current||Ie("storefront-editor:save-failed");return}let Se=d.publish;if(!p.canPublish||!Se){Ie("storefront-editor:saved");return}let me=await nt(()=>Se(b,N.current??void 0));if(!me.ok){Ie("storefront-editor:save-failed");return}N.current=me.value.version??N.current,Ie("storefront-editor:published")},[b,d,p.canPublish,Ie,Yn,nt]);return ET(Po.Provider,{value:{target:o,adapter:d,capabilities:p,templateId:i,currentSlug:c,currentKind:O,siteId:f,ready:S,token:I,tokenRef:h,notifyParent:Ie,bridgeCapabilities:C,runAuthed:Zr,docId:b,data:R,getLiveData:()=>F.current??R,footerOriginSlug:x,error:G,redirecting:W,saveStatus:ht,saveState:Oe,autoSaveEnabled:!Oe.paused,autoSaveStoppedByConflict:Oe.stopped,hasUnsavedEdits:Oe.pending||v,toggleAutoSave:uS,retrySave:pS,onChange:cS,flushSave:or,onPublish:IS,access:te,readOnly:kT(te)!==null,takeOverEditing:fS,viewReadOnly:dS,saveConflict:le,reloadFromServer:is,navigate:Ld,pendingNav:E,cancelPendingNav:mS,discardAndNavigate:xS,saveAndNavigate:gS},children:t})}import{createContext as _T,useContext as LT}from"react";var AT=_T("desktop"),yc=()=>LT(AT);var Tr="content",Le="Flex",OT="Text & media",NT="Layout & structure",BT=[{type:"Eyebrow",label:"Eyebrow"},{type:"Heading",label:"Heading"},{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"}].map(e=>({...e,group:OT})),DT=(fr.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:NT})),tI=[...BT,...DT],Sc=[{type:"Eyebrow",label:"Eyebrow"},{type:"Heading",label:"Heading"},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"ButtonBlock",label:"Button"},{type:"HeroGroup",label:xo}],BW=Sc.map(e=>e.type),MT=1,HT=Sc.filter(e=>e.type!=="HeroGroup");function GT(e){return e<MT?Sc:HT}var WT={Flex:{slot:Tr,choices:()=>tI},Grid:{slot:Tr,choices:()=>tI},HeroGroup:{slot:Tr,choices:GT}};function oI(e,t=0){let o=WT[e];return o?{slot:o.slot,choices:o.choices(t)}:null}var bl="SiteHeader",Cc="SiteFooter",rI="sections",MW=[bl,Cc],HW=e=>e===bl||e===Cc,GW=e=>`${e}:${rI}`;function WW(e,t,o=[]){return{type:e,props:{id:t,[rI]:o}}}var UT=new Set(["Footer",bl,Cc]);function UW(e){let t=new Set,o=!1,r=e.filter(n=>{let a=n?.type??"";return a==="Header"?(o=!0,!1):UT.has(a)?t.has(a)?(o=!0,!1):(t.add(a),!0):!0});return o?r:e}function zW(e,t){return e.some(o=>o?.type===t.type)?e:t.type===bl?[t,...e]:[...e,t]}import{createContext as zT,useCallback as KT,useContext as $T,useState as VT}from"react";import{jsx as qT}from"react/jsx-runtime";var nI={enabled:!0,title:"",subtitle:"",greeting:""},aI=zT({chat:nI,setChat:()=>{},selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function qW({children:e,chat:t=nI,onChatChange:o}){let[r,n]=VT(!1),a=KT(i=>o?.(i),[o]),{select:l,setSelectHandler:s}=Ru();return qT(aI.Provider,{value:{chat:t,setChat:a,selected:r,setSelected:n,select:l,setSelectHandler:s},children:e})}var YW=()=>$T(aI);import{BlockBannerIcon as YT,BlockBoxIcon as XT,BlockButtonIcon as jT,BlockDividerIcon as lI,BlockFooterIcon as sI,BlockHeadingIcon as JT,BlockProductIcon as ZT,BlockSocialIcon as QT,BlockTextIcon as eR,ChatIcon as tR,GridIcon as oR,ImageIcon as rR,PageIcon as nR}from"efficient-easel/icons";import{Fragment as $,jsx as y,jsxs as q}from"react/jsx-runtime";var aR={header:q($,{children:[y("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),y("path",{d:"M3 9.5h18"})]}),website:q($,{children:[y("circle",{cx:"12",cy:"12",r:"9"}),y("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:q($,{children:[y("circle",{cx:"6",cy:"12",r:"2.5"}),y("circle",{cx:"18",cy:"6",r:"2.5"}),y("circle",{cx:"18",cy:"18",r:"2.5"}),y("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:q($,{children:[y("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),y("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:q($,{children:[y("path",{d:"M4 15.5h6M4 18h4"}),y("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:y("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:q($,{children:[y("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),y("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:y("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:q($,{children:[y("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),y("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:q($,{children:[y("circle",{cx:"11",cy:"11",r:"6"}),y("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:wu,CountrySwitchBlock:q($,{children:[y("circle",{cx:"12",cy:"12",r:"8.5"}),y("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"})]}),LegalLineBlock:q($,{children:[y("path",{d:"M3 9h18"}),y("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:q($,{children:[y("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),y("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),y("path",{d:"M7 17h7"})]}),Collections:q($,{children:[y("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),y("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),y("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:q($,{children:[y("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),y("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:q($,{children:[y("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),y("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),y("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),y("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),y("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:q($,{children:[y("path",{d:"M3 7h9M15.5 7H21"}),y("circle",{cx:"13.5",cy:"7",r:"1.7"}),y("path",{d:"M3 12h4M10.5 12H21"}),y("circle",{cx:"8.5",cy:"12",r:"1.7"}),y("path",{d:"M3 17h9M15.5 17H21"}),y("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:q($,{children:[y("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:q($,{children:[y("path",{d:"M3 5h10"}),y("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),y("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),y("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:q($,{children:[y("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),y("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),y("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:q($,{children:[y("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),y("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),y("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),y("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:q($,{children:[y("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),y("circle",{cx:"9",cy:"10",r:"1.6"}),y("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:q($,{children:[y("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),y("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:q($,{children:[y("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),y("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),y("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:q($,{children:[y("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),y("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:q($,{children:[y("path",{d:"M3.5 20h17"}),y("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:q($,{children:[y("circle",{cx:"6",cy:"12",r:"2.6"}),y("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),y("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:q($,{children:[y("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),y("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:q($,{children:[y("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),y("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:q($,{children:[y("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),y("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:q($,{children:[y("path",{d:"M4 8.5h4.5M11 8.5h9"}),y("path",{d:"M4 14.5h16"})]}),HeroGroup:q($,{children:[y("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),y("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M6.5 9h11M6.5 12.5h11"}),y("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:y($,{children:y("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:q($,{children:[y("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),y("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:q($,{children:[y("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),y("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),y("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),y("path",{d:"M4 13.5h11M4 17.5h7"}),y("path",{d:"M17 15l3 2-3 2"})]}),CustomHTML:y("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},lR=y("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),sR={footer:sI,Footer:sI,Divider:lI,FooterDivider:lI,Banner:YT,Flex:XT,FooterSocial:QT,page:nR,chat:tR,Heading:JT,Text:eR,ImageBlock:rR,ButtonBlock:jT,Grid:oR,ProductRef:ZT},iR={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",SiteHeader:"header",SiteFooter:"footer"};function cR({type:e,size:t=16,className:o}){let r=iR[e]??e,n=sR[r];return n?y(n,{size:t,className:o}):y("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:o,"aria-hidden":"true",children:aR[r]??lR})}function oU(){return{type:ps,props:{id:_o(ps)}}}function rU(e){let t=[];for(let o of e){let r=t[t.length-1];r&&r.group===o.group?r.items.push(o):t.push({group:o.group,items:[o]})}return t}var iI=[{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"}],fR=iI.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),dR="FooterGroup",cI="blocks";function fI(e){return e===jn?iI:e===dR?fR:null}function nU(){let e=(t,o)=>({type:t,props:{id:`${t}-${crypto.randomUUID()}`,...o}});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"})]})]}import{createContext as uR,useContext as pR}from"react";import{jsx as mR}from"react/jsx-runtime";var dI=uR(null);function sU({value:e,children:t}){return mR(dI.Provider,{value:e,children:t})}function iU(){return pR(dI)}function Ue(e,t,o,r={}){return{type:e,props:{...t(e),id:o(e),...r}}}var xR={Manifesto:(e,t)=>({type:Le,props:{...e(Le),id:t(Le),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[Ue(Le,e,t,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[Ue("Eyebrow",e,t,{eyebrowLook:"plain"}),Ue("Heading",e,t),Ue("Text",e,t),Ue("Stats",e,t)]}),Ue(Le,e,t,{direction:"column",name:"Picture",content:[]})]}}),Split:(e,t)=>({type:Le,props:{...e(Le),id:t(Le),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[Ue(Le,e,t,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[Ue("Eyebrow",e,t,{eyebrowLook:"plain"}),Ue("Heading",e,t),Ue("Text",e,t),Ue("ButtonBlock",e,t)]}),Ue(Le,e,t,{direction:"column",name:"Image",content:[Ue("ImageBlock",e,t)]})]}}),Subscribe:(e,t)=>({type:Le,props:{...e(Le),id:t(Le),direction:"column",name:"Subscribe",content:[Ue("Heading",e,t),Ue("Text",e,t),Ue("Form",e,t)]}})};function uI(e){return xR[e]??null}var Pc="plain",pI=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],gR="line",IR={KeyFeatures:"filled"};function hR(e){return IR[e]??Pc}function mU(e,t){return Xe(pI,hR(t),e)}function xU(e){return Xe(pI,gR,e)}import{createContext as SR,useContext as CR}from"react";var kc={tag:{label:"Tag",follows:"Labels",builtIn:"13px",writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:"48px",writable:!0},body:{label:"Body",follows:"Body",builtIn:"14px",writable:!0},price:{label:"Price",follows:"Labels",builtIn:"15px",writable:!0},link:{label:"Link",follows:"Labels",builtIn:"14px",writable:!0}},mI=kc;var Rr="data-sf-spec-region";function xI(e,t,o){if(!e)return;let r=o[e];if(r)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${r}, ${t.builtIn})`}}function wc(e){return`@${e}`}function bR(e,t){if(!t.startsWith("@"))return null;let o=t.slice(1);return o in e?o:null}function gI(e,t){return t&&t in e?t:null}function yR(e,t){let o=t?.closest(`[${Rr}]`)?.getAttribute(Rr);return gI(e,o??null)}import{jsx as ko,jsxs as vc}from"react/jsx-runtime";function PR(e){return jd(e)??void 0}var kR=SR({}),II=3;function wR({tag:e,name:t,desc:o,href:r,imageSrc:n,imageLabel:a,price:l}){let{showPrice:s,cardStyle:i,partStyles:c,editing:f}=CR(kR),u=i==="bordered"?" border border-line":i==="shadow"?" shadow-[0_8px_30px_rgba(0,0,0,0.12)]":"",d=PR(n),p=g=>f?{[Rr]:g}:{},x=g=>xI(c?.[wc(g)]?.role,kc[g],ar);return vc(Pe,{href:r||"#",className:`sf-card group relative block w-full min-w-0 overflow-hidden bg-surface-2${u}`,children:[ko("div",{className:"relative z-0 aspect-[4/5] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)] group-hover:scale-[1.04]",children:ko(Wo,{label:a||"collection.jpg",src:d})}),ko("div",{className:"pointer-events-none absolute inset-0 z-[1] [background:rgba(0,0,0,0.4)] group-hover:[background:rgba(0,0,0,0.3)] max-[800px]:hidden",style:{transition:"none"}}),vc("div",{className:"absolute inset-x-8 bottom-8 z-[2] flex flex-col gap-2.5 text-overlay-fg max-[800px]:relative max-[800px]:inset-auto max-[800px]:p-6 max-[800px]:gap-3 max-[800px]:text-fg",children:[e&&ko("span",{...p("tag"),style:x("tag"),className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.25em] opacity-70",children:re(e)}),t&&ko("h3",{...p("name"),style:x("name"),className:"font-heading2 text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))] font-medium leading-none tracking-[-0.03em] max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",children:typeof t=="string"?Ot(t,!1):t}),o&&el(o).map((g,I)=>ko("p",{...p("body"),style:x("body"),className:"max-w-[420px] text-[length:var(--size-body,14px)] leading-[1.5] opacity-80",children:re(g)},I)),s&&l&&ko("span",{...p("price"),style:x("price"),className:"font-mono text-[length:var(--size-label,15px)] tracking-[0.05em] text-accent",children:re(l)}),vc("span",{...p("link"),style:x("link"),className:"mt-2 inline-flex items-center gap-2.5 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em]",children:["Explore",ko("span",{className:"transition-transform group-hover:translate-x-[3px]","aria-hidden":!0,children:"\u2192"})]})]})]})}import{createContext as TR,useCallback as RR,useContext as FR,useEffect as yI,useRef as ER,useState as Rc}from"react";import{useState as vR}from"react";function hI(e){switch(e){case"tall":return"aspect-[3/4]";case"wide":return"aspect-[2/1]";case"landscape":return"aspect-[4/3]";case"portrait":return"aspect-[4/5]";case"auto":return"";default:return"aspect-square"}}function bI(e){return e==="below"}import{jsx as Pt,jsxs as Fr}from"react/jsx-runtime";function Tc({build:e,hiddenMobile:t,alwaysShowOverlay:o,forceHover:r,index:n,total:a,ratio:l,captionPlace:s}){let[i,c]=vR(!1),f=bI(s),u=Fr("div",{className:["sf-card group relative overflow-hidden bg-surface-2",hI(l),t?"max-[800px]:hidden":""].join(" "),children:[Fr("div",{className:["absolute inset-0 z-[1] flex items-center justify-center transition-[transform,filter,opacity] duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",r?"scale-[1.06] opacity-0 [filter:brightness(0.5)]":"group-hover:scale-[1.06] group-hover:opacity-0 group-hover:[filter:brightness(0.5)]"].join(" "),children:[Pt(Wo,{label:e.imageLabel,src:e.imageSrc}),Pt("div",{className:"absolute inset-0",style:{background:"rgba(0,0,0,0.35)"}})]}),Pt("div",{className:["absolute inset-0 z-[1] flex items-center justify-center transition-[transform,filter,opacity] duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",r?"opacity-100 scale-[1.06] [filter:brightness(0.5)]":"opacity-0 group-hover:scale-[1.06] group-hover:opacity-100 group-hover:[filter:brightness(0.5)]"].join(" "),style:{background:"var(--surface)"},children:e.detailSrc&&Pt(io,{src:e.detailSrc,alt:"",fill:!0,sizes:"(max-width: 800px) 100vw, (max-width: 1500px) 33vw, 25vw",loading:"lazy",className:"absolute inset-0 z-[3] object-cover",style:{display:i?"none":"block"},onError:()=>c(!0)})}),n!=null&&a!=null&&Fr("span",{className:"pointer-events-none absolute top-3 right-3 z-[3] font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.24em] max-[800px]:top-2.5 max-[800px]:right-2.5",style:{color:"rgba(245,241,232,0.7)"},children:[String(n).padStart(2,"0")," / ",String(a).padStart(2,"0")]}),e.process&&Pt("span",{className:["pointer-events-none absolute top-3 left-3 z-[3] inline-block max-w-[60%] truncate font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.24em] text-accent max-[800px]:top-2.5 max-[800px]:left-2.5","transition-opacity duration-300 ease-out",o||r?"opacity-100":"opacity-0 group-hover:opacity-100 max-[800px]:opacity-100"].join(" "),children:et(e.process)}),Fr("div",{className:["absolute inset-0 z-[2] flex flex-col justify-end gap-1 p-6","transition-[opacity,transform] duration-300 ease-out",o||r?"opacity-100 translate-y-0":"opacity-0 translate-y-2 group-hover:opacity-100 group-hover:translate-y-0 max-[800px]:opacity-100 max-[800px]:translate-y-0","max-[800px]:p-3.5"].join(" "),style:{color:"var(--overlay-fg)",background:"linear-gradient(180deg, transparent 40%, rgba(10,10,10,.85) 100%)"},children:[e.car&&Pt("div",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-accent max-[800px]:text-[length:var(--size-label,11px)] max-[800px]:tracking-[0.15em]",children:e.car}),e.wheel&&Pt("div",{className:"font-heading3 text-[length:var(--size-headingSmall,22px)] font-medium leading-[1.05] tracking-[-0.02em] max-[800px]:text-[length:var(--size-body,16px)]",children:e.wheel}),e.finish&&Pt("div",{className:"mt-1.5 flex gap-3.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.12em]",style:{color:"rgba(245,241,232,0.7)"},children:Pt("span",{children:et(e.finish)})})]})]});return f?Fr("div",{className:t?"max-[800px]:hidden":"",children:[u,Fr("div",{className:"bg-surface px-3.5 pt-3 pb-3.5",children:[e.wheel&&Pt("div",{className:"font-display text-[length:var(--size-body,15px)] font-medium leading-[1.25] tracking-[-0.01em] text-fg",children:e.wheel}),(e.finish||e.car)&&Pt("div",{className:"mt-0.5 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.14em] text-fg-dim",children:et(e.finish||e.car)})]})]}):u}import{Fragment as Er,jsx as pe,jsxs as ze}from"react/jsx-runtime";var _R=TR({}),LR="data-gallery-grid",Fc="data-gallery-tile";function AR(e,t){let[o,r]=Rc(null);return yI(()=>{let n=e.current,a=n?.closest(`[${LR}]`);if(!n||!a)return;let l=()=>{let i=Array.from(a.querySelectorAll(`[${Fc}]`)),c=i.indexOf(n),f=c>=0?{index:c+1,total:i.length}:null;r(u=>u?.index===f?.index&&u?.total===f?.total?u:f)};if(l(),!t)return;let s=new MutationObserver(l);return s.observe(a,{childList:!0,subtree:!0}),()=>s.disconnect()},[e,t]),o}var SI=[{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"}];function OR(e,t){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}function NR(e){let t=(e.photos??[]).map(a=>a?.src).filter(a=>!!a),o=e.image||t[0]||"",r=[o,...t].filter(a=>!!a),n=OR(e.name,"gallery-item");return{car:e.eyebrow??"",wheel:e.name??"",process:e.process??"",finish:e.meta??"",imageLabel:`${n}.jpg`,detailLabel:`${n}-detail.jpg`,imageSrc:o||void 0,detailSrc:t[0]||o||void 0,photos:r,href:e.href}}function BR({editing:e=!1,previewHover:t,ratio:o,captionPlace:r,...n}){let{galleryHref:a="/gallery",submitHref:l="/contact",previewHover:s}=FR(_R),i=NR(n),c=i.photos??(i.imageSrc?[i.imageSrc]:[]),f=ER(null),u=RR(S=>{f.current=S},[]),d=AR(f,e),p=e&&(!!t||!!s),[x,g]=Rc(!1),[I,h]=Rc(0);yI(()=>{if(!x)return;let S=T=>{T.key==="Escape"?g(!1):T.key==="ArrowLeft"&&c.length>1?h(b=>(b-1+c.length)%c.length):T.key==="ArrowRight"&&c.length>1&&h(b=>(b+1)%c.length)};window.addEventListener("keydown",S);let P=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",S),document.body.style.overflow=P}},[x,c.length]);let C=pe(Tc,{build:i,forceHover:p,index:d?.index,total:d?.total,ratio:o,captionPlace:r});return ze(Er,{children:[e?pe("div",{ref:u,[Fc]:"",className:"block w-full text-left",children:C}):pe("button",{ref:u,[Fc]:"",type:"button","aria-label":`Open ${i.car||"build"} on ${i.wheel||"wheel"}`,onClick:()=>{h(0),g(!0)},className:"block w-full cursor-pointer text-left focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2",children:C}),x&&(()=>{let S=c[I]??i.imageSrc??"",P=()=>h(b=>(b-1+c.length)%c.length),T=()=>h(b=>(b+1)%c.length);return pe("div",{role:"dialog","aria-modal":"true","aria-label":`${i.car} on ${i.wheel}`,onClick:()=>g(!1),className:"fixed inset-0 z-[100] flex items-center justify-center p-6 backdrop-blur-[8px] max-[700px]:p-3",style:{background:"color-mix(in oklab, var(--bg) 78%, transparent)"},children:ze("div",{onClick:b=>b.stopPropagation(),className:"relative grid w-[min(1800px,100%)] max-h-[calc(100vh-48px)] grid-cols-[1.4fr_1fr] overflow-hidden border border-line bg-bg max-[1100px]:grid-cols-1 max-[1100px]:overflow-auto",style:{boxShadow:"0 60px 120px -20px rgba(0,0,0,0.7)"},children:[pe("button",{type:"button",onClick:()=>g(!1),"aria-label":"Close popup",className:"absolute right-[24px] top-[24px] z-[5] flex h-[56px] w-[56px] items-center justify-center border border-line font-mono text-[length:var(--size-label,21px)] text-fg-dim transition-colors hover:border-accent hover:text-fg",style:{background:"color-mix(in oklab, var(--bg) 70%, transparent)"},children:"\u2715"}),ze("div",{className:"relative flex min-h-[690px] items-center justify-center overflow-hidden bg-surface-2 max-[1100px]:min-h-[450px]",children:[S&&pe("img",{src:S,alt:`${i.car} \u2014 ${I+1} of ${c.length}`,className:"block h-full max-h-[88vh] w-full object-cover"},S),c.length>1&&ze(Er,{children:[pe("button",{type:"button","aria-label":"Previous photo",onClick:P,className:"absolute left-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"\u25C1"}),pe("button",{type:"button","aria-label":"Next photo",onClick:T,className:"absolute right-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"\u25B7"}),ze("span",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 border border-fg-dim/30 bg-overlay-scrim/50 px-4 py-1.5 font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em] text-fg-dim backdrop-blur-[4px]",children:[I+1," / ",c.length]})]})]}),ze("div",{className:"flex flex-col gap-[30px] px-[60px] py-[72px] max-[1100px]:px-9 max-[1100px]:py-[54px]",children:[i.process&&pe("span",{className:"font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.3em] text-accent",children:re(i.process)}),i.wheel&&pe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:Ot(i.wheel,!1)}),i.car&&ze("div",{className:"font-heading3 text-[length:var(--size-headingSmall,27px)] leading-[1.4] text-fg",children:["on ",pe("em",{className:"font-serif font-normal italic text-accent tracking-[-0.01em]",children:re(i.car,!0)})]}),ze("dl",{className:"mt-3 grid grid-cols-[auto_1fr] gap-x-7 gap-y-[18px] border-y border-line py-[30px] font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em]",children:[i.wheel&&ze(Er,{children:[pe("dt",{className:"text-fg-dim",children:"Wheel"}),pe("dd",{className:"text-fg",children:re(i.wheel)})]}),i.process&&ze(Er,{children:[pe("dt",{className:"text-fg-dim",children:"Process"}),pe("dd",{className:"text-fg",children:re(i.process)})]}),i.finish&&ze(Er,{children:[pe("dt",{className:"text-fg-dim",children:"Finish"}),pe("dd",{className:"text-fg",children:re(i.finish)})]}),i.car&&ze(Er,{children:[pe("dt",{className:"text-fg-dim",children:"Vehicle"}),pe("dd",{className:"text-fg",children:re(i.car)})]})]}),ze("div",{className:"mt-auto flex flex-col gap-3.5 pt-6",children:[ze(Pe,{href:i.href||"/wheels",onClick:()=>g(!1),className:"group flex items-center justify-between gap-6 border border-btn bg-btn px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg",children:[pe("span",{children:"View product"}),pe("span",{className:"transition-transform group-hover:translate-x-[6px]",children:"\u2192"})]}),ze(Pe,{href:a,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[pe("span",{children:"See more builds"}),pe("span",{children:"\u2192"})]}),ze(Pe,{href:l,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[pe("span",{children:"Submit your build"}),pe("span",{children:"\u2192"})]})]})]})]})})})()]})}import{createContext as jR,useContext as JR}from"react";import{useEffect as Ec,useRef as DR,useState as yl}from"react";import{jsx as _r,jsxs as CI}from"react/jsx-runtime";var MR=.5,HR="#t=0.001";function _c({videoSrc:e,posterSrc:t,showVideo:o=!0,playbackRate:r=MR,objectPosition:n="50% 50%",quiet:a=!1}){let l=t||"",s=e||"",[i,c]=yl(!1),[f,u]=yl(!1),[d,p]=yl(!1),[x,g]=yl(!1),I=DR(null);Ec(()=>{c(!1),u(!1),p(!1)},[e,t]),Ec(()=>{if(typeof window>"u")return;let C=()=>{let S=window;S.requestIdleCallback?S.requestIdleCallback(()=>g(!0),{timeout:2e3}):setTimeout(()=>g(!0),800)};if(document.readyState==="complete"){C();return}return window.addEventListener("load",C,{once:!0}),()=>window.removeEventListener("load",C)},[]),Ec(()=>{let C=I.current;if(!C)return;let S=()=>{C.playbackRate=r};return S(),C.addEventListener("loadedmetadata",S),()=>C.removeEventListener("loadedmetadata",S)},[e,r]);let h=Zn(l);return CI("div",{className:"absolute inset-0 z-[1]",children:[_r("div",{className:"absolute inset-0",style:{background:"var(--surface)"}}),l&&(h?_r("img",{src:l,alt:"",className:"absolute inset-0 z-[2] h-full w-full object-cover",style:{display:i?"none":"block",objectPosition:n},onError:()=>c(!0)},l):_r(sl,{src:l,alt:"",fill:!0,priority:!0,sizes:"100vw",className:"z-[2] object-cover",style:{display:i?"none":"block",objectPosition:n},onError:()=>c(!0)},l)),o&&!a&&s&&x&&!f&&CI("video",{ref:I,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:n},onError:()=>u(!0),children:[Jd(s)&&_r("source",{src:s.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),_r("source",{src:s,type:"video/mp4"})]},s),o&&a&&s&&x&&!d&&(!l||i)&&_r("video",{src:`${s}${HR}`,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:n},onError:()=>p(!0)},`held:${s}`)]})}var PI=["top","middle","bottom"],kI=["left","center","right"],wI="bottom",vI="left",GR={top:"Top",middle:"Middle",bottom:"Bottom"},WR={left:"Left",center:"Center",right:"Right"};var YU="Up and down",XU="Sideways",UR={top:"flex-start",middle:"center",bottom:"flex-end"},zR={left:"flex-start",center:"center",right:"flex-end"},KR="--sf-hero-phone-y",$R="--sf-hero-phone-x";function VR(e){return PI.includes(e)?e:wI}function qR(e){return kI.includes(e)?e:vI}function TI(e,t){let o=VR(e),r=qR(t),n={};return o!==wI&&(n[KR]=UR[o]),r!==vI&&(n[$R]=zR[r]),n}function jU(){return PI.map(e=>({label:GR[e],value:e}))}function JU(){return kI.map(e=>({label:WR[e],value:e}))}var YR="#0A0A0A",XR=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function RI(e){let t=e.trim().replace(/^#/,""),o=t.length===3?t.split("").map(n=>n+n).join(""):t;if(!/^[0-9a-fA-F]{6}$/.test(o))return null;let r=Number.parseInt(o,16);return`${r>>16&255},${r>>8&255},${r&255}`}function FI(e){return e==null?!0:e!==!1}function EI(e){let t=(e?RI(e):null)??RI(YR);return`linear-gradient(180deg, ${XR.map(([r,n])=>`rgba(${t},${n}) ${r}%`).join(", ")})`}import{jsx as Fn,jsxs as QR}from"react/jsx-runtime";var Lc=jR({});function ZR({name:e,process:t,mediaType:o="video",mediaSrc:r,videoSpeed:n,poster:a,objectPosition:l,tintColor:s="#000000",tintOpacity:i=0,groups:c,editing:f=!1,themeClassName:u,themeStyle:d}){let{alignment:p="left",textureOpacity:x,textureOn:g,textureColor:I,quietVideo:h,phoneUpDown:C,phoneSideways:S}=JR(Lc),P=o==="video",T=P?$t(r):void 0,b=P?$t(a):$t(r)??$t(a),w=typeof n=="number"?n/100:1;return QR("section",{className:u?`relative h-full w-full overflow-hidden ${u}`:"relative h-full w-full overflow-hidden",style:d,"data-slide-name":e??"","data-slide-process":t??"","data-slide-media":T?"video":"still",children:[Fn(_c,{videoSrc:T,posterSrc:b,showVideo:P,playbackRate:w,objectPosition:l,quiet:h}),i>0&&Fn("div",{className:"absolute inset-0 z-[2]",style:{background:s,opacity:Math.min(Math.max(i,0),100)/100}}),FI(g)&&Fn("div",{className:"absolute inset-0 z-[2]",style:{background:EI(I),...x!==void 0?{opacity:x/100}:null}}),Fn("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",f?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{color:"var(--overlay-fg)",...TI(C,S)},children:c&&Fn(c,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}var _I=Array.from({length:3},(e,t)=>({name:`Slide ${t+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{createContext as rF,useContext as nF,useEffect as Sl,useId as aF,useMemo as lF,useState as ve}from"react";var eF=14,tF=3;function Ac(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function oF(e,t){let o=new Date(`${e}T00:00:00`);return o.setDate(o.getDate()+t),Ac(o)}async function LI(e,t,o={}){let r=o.days??eF,n=o.read??Ao.getAvailability,a=0,l=0;for(let s=0;s<r;s++){if(o.signal?.aborted)return{outcome:"unreadable"};let i=oF(t,s);try{let c=await n(e,i);if(a=0,l++,c.slots.length>0)return{outcome:"found",date:i,availability:c}}catch{if(a++,a>=tF)return{outcome:"unreadable"}}}return l===r?{outcome:"noneInWindow",days:r}:{outcome:"unreadable"}}import{jsx as cF}from"react/jsx-runtime";var AI=rF(null);function Lr(){let e=nF(AI);if(!e)throw new Error("useBookingForm must be used inside <BookingFormProvider>");return e}var Oc=[{id:"example-1",name:"Example service",durationMinutes:45,price:"80.00",description:"What this appointment includes, in a sentence."},{id:"example-2",name:"Second example",durationMinutes:30,price:"0",description:""}];function sF(e){return{timezone:"UTC",slots:[`${e}T09:00:00.000Z`,`${e}T10:30:00.000Z`,`${e}T13:00:00.000Z`].map(t=>({start:t}))}}var Nc={bookingNumber:"EXAMPLE-0000",service:"Example service",startAt:"2026-01-01T00:00:00.000Z",timezone:"UTC",customerTimezone:"",manageToken:"example"};function iF(e,t){return e&&t?.length===0}function p6({editing:e=!1,previewConfirmation:t=!1,children:o}){let r=aF(),n=lF(()=>Ac(new Date),[]),[a,l]=ve(),[s,i]=ve(""),[c,f]=ve(""),[u,d]=ve(n),[p,x]=ve(n),[g,I]=ve(!1),[h,C]=ve(null),[S,P]=ve(),[T,b]=ve(""),[w,O]=ve(""),[D,R]=ve(""),[_,G]=ve(""),[Y,M]=ve(""),[v,j]=ve(()=>Ss()),[F,E]=ve(null),[se,N]=ve(!1),[le,ge]=ve(!1),[ie,te]=ve(null),[he,de]=ve("");Sl(()=>{de(Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC")},[]),Sl(()=>{let K=!1;return Ao.listServices().then(H=>{K||(l(H.results),i(H.currency),f(He=>He||H.results[0]?.id||""))}).catch(()=>{K||l([])}),()=>{K=!0}},[]),Sl(()=>{if(g||!c)return;let K={aborted:!1};return b(""),P(void 0),te(null),C(null),N(!0),LI(c,n,{signal:K}).then(H=>{if(!K.aborted){if(H.outcome==="found"){d(H.date),x(H.date),P(H.availability);return}C(H.outcome==="noneInWindow"?`No times are available in the next ${H.days} days.`:"We couldn't load available times. Please try again.")}}).finally(()=>{K.aborted||N(!1)}),()=>{K.aborted=!0}},[g,c,n]),Sl(()=>{if(!g||!c||!u)return;let K=!1;return b(""),P(void 0),te(null),C(null),N(!0),Ao.getAvailability(c,u).then(H=>{K||(P(H),H.slots.length===0&&C("No times are available on this date."))}).catch(()=>{K||C("We couldn't load available times. Please try again.")}).finally(()=>{K||N(!1)}),()=>{K=!0}},[u,g,c]);let z=a?.find(K=>K.id===c),Ae=z?.depositAmountDue!=null,Fe=!!(!e&&!le&&z&&T&&w.trim()&&D.trim()&&!Ae);async function Oe(K){if(K.preventDefault(),!(!Fe||!z)){ge(!0),te(null);try{let H=await Ao.create({serviceId:z.id,start:T,customer:{name:w.trim(),email:D.trim(),phone:_.trim()},notes:Y.trim(),idempotencyKey:v,customerTimezone:he});E(H),j(Ss())}catch(H){te(H instanceof at&&H.status===409?"That time was just booked. Choose another available time.":"Your appointment wasn't submitted. Please check your details and try again."),H instanceof at&&H.status===409&&(b(""),Ao.getAvailability(z.id,u).then(P).catch(()=>{}))}finally{ge(!1)}}}let ne=iF(e,a);return cF(AI.Provider,{value:{fieldPrefix:r,editing:e,services:ne?Oc:a,currency:ne?"AUD":s,serviceId:ne?Oc[0].id:c,setServiceId:f,service:ne?Oc[0]:z,requiresPayment:ne?!1:Ae,date:u,earliestDate:p,setDate:d,setDateTouched:I,availability:ne?sF(u):S,loadingSlots:ne?!1:se,noSlotsMessage:h,selectedStart:ne?`${u}T09:00:00.000Z`:T,setSelectedStart:b,customerTimezone:he,name:w,setName:O,email:D,setEmail:R,phone:_,setPhone:G,notes:Y,setNotes:M,confirmation:F??(t?Nc:null),submitting:le,error:ie,canSubmit:ne?!1:Fe,handleSubmit:Oe,sample:!!ne},children:o})}import{Fragment as dF,jsx as Bc,jsxs as uF}from"react/jsx-runtime";var fF="sf-button group inline-flex items-center justify-center gap-2.5 border px-[22px] py-4 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] transition-colors",OI={primary:"border-btn bg-btn text-btn-ink hover:border-btn-2 hover:bg-btn-2",ghost:"border-current bg-transparent hover:bg-white/10"};function Cl(e){let{variant:t="primary",arrow:o,className:r,style:n,children:a,href:l,newTab:s,...i}=e,c=`${fF} ${OI[t]??OI.primary} ${r??""}`,f=uF(dF,{children:[a,o!==null&&Bc("span",{"aria-hidden":!0,className:"transition-transform group-hover:translate-x-[3px]",children:o??"\u2192"})]});return l?Bc(ll,{href:l,className:c,style:n,...s?{target:"_blank",rel:"noopener noreferrer"}:{},children:f}):Bc("button",{type:"button",className:c,style:n,...i,children:f})}import{jsx as J,jsxs as De}from"react/jsx-runtime";var En="w-full border-2 border-line bg-bg px-4 py-3.5 font-[family-name:var(--bk-value-font,var(--font-display))] text-[length:var(--bk-value-size,17px)] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent";function pF(e,t){let o=Number(e);if(o===0)return"Free";try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(o)}catch{return`${t} ${e}`}}function NI(e,t){try{return new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit",timeZone:t}).format(new Date(e))}catch{return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}}function BI(e,t){try{return new Intl.DateTimeFormat(void 0,{weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",timeZone:t,timeZoneName:"short"}).format(new Date(e))}catch{return new Date(e).toLocaleString()}}function _n({id:e,label:t,required:o,children:r}){return De("div",{className:"flex flex-col gap-2",children:[De("label",{htmlFor:e,className:"font-[family-name:var(--bk-name-font,var(--font-mono))] text-[length:var(--bk-name-size,12px)] font-semibold uppercase tracking-[0.2em] text-fg",children:[t,o?J("span",{className:"text-accent",children:" *"}):null]}),r]})}function Dc({number:e,children:t}){return De("div",{className:"mb-4 flex items-center gap-3",children:[J("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full border border-line font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,11px)] font-semibold text-fg-dim",children:e}),J("h3",{className:"font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,12px)] font-semibold uppercase tracking-[0.2em] text-fg",children:t})]})}function DI({eyebrow:e,heading:t,intro:o}){return De("div",{className:"mb-10 max-w-[760px]",children:[(e??"").trim()&&J("p",{className:"mb-4 font-mono text-[12px] font-semibold uppercase tracking-[0.24em] text-accent",children:e}),(t??"").trim()&&J("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.98] tracking-[-0.025em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:t}),(o??"").trim()&&J("p",{className:"mt-5 max-w-[660px] font-display text-[17px] leading-[1.65] text-fg-dim",children:o})]})}function MI({style:e}={}){let{fieldPrefix:t,services:o,currency:r,serviceId:n,setServiceId:a,requiresPayment:l,date:s,earliestDate:i,setDate:c,setDateTouched:f,availability:u,loadingSlots:d,noSlotsMessage:p,selectedStart:x,setSelectedStart:g,customerTimezone:I}=Lr();return o?De("div",{className:"flex flex-col gap-9",style:e,children:[De("div",{children:[J(Dc,{number:"01",children:"Choose a service"}),J("div",{className:"grid gap-3 sm:grid-cols-2",children:o.map(h=>{let C=h.id===n;return De("button",{type:"button","aria-pressed":C,onClick:()=>a(h.id),className:`min-h-11 border p-4 text-left transition-colors ${C?"border-accent bg-accent/10":"border-line bg-bg hover:border-fg-dim"}`,children:[J("span",{className:"block font-[family-name:var(--bk-name-font,var(--font-display))] text-[length:var(--bk-name-size,18px)] font-medium text-fg",children:h.name}),De("span",{className:"mt-1 block font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,11px)] uppercase tracking-[0.14em] text-fg-dim",children:[h.durationMinutes," min \xB7 ",pF(h.price,r)]}),h.description&&J("span",{className:"mt-3 block font-[family-name:var(--bk-note-font,var(--font-display))] text-[length:var(--bk-note-size,14px)] leading-[1.5] text-fg-dim",children:h.description})]},h.id)})}),l&&J("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.14em] text-alert",role:"alert",children:"This service requires an upfront payment and cannot be booked through this form yet."})]}),De("div",{children:[J(Dc,{number:"02",children:"Choose a date and time"}),J(_n,{id:`${t}-date`,label:"Date",required:!0,children:J("input",{id:`${t}-date`,type:"date",min:i,value:s,onChange:h=>{f(!0),c(h.target.value)},className:En,required:!0})}),J("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3 min-[1200px]:grid-cols-4",role:"group","aria-label":"Available appointment times",children:d?J("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",children:"Loading times\u2026"}):u?.slots.length?u.slots.map(h=>De("button",{type:"button","aria-pressed":x===h.start,onClick:()=>g(h.start),className:`min-h-11 border px-3 py-2 font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,12px)] font-semibold uppercase tracking-[0.12em] transition-colors ${x===h.start?"border-accent bg-accent text-bg":"border-line bg-bg text-fg hover:border-accent"}`,children:[J("span",{className:"block",children:NI(h.start,I||u.timezone)}),I&&I!==u.timezone&&De("span",{className:"mt-0.5 block text-[9px] font-normal tracking-[0.08em] opacity-70",children:[NI(h.start,u.timezone)," business"]})]},h.start)):p?J("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",role:"status",children:p}):null}),u?.timezone&&De("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,10px)] uppercase tracking-[0.16em] text-fg-dim",children:["Times shown in ",I||u.timezone,I&&I!==u.timezone?` \xB7 business timezone ${u.timezone}`:""]})]})]}):null}function HI({buttonLabel:e,style:t}){let{fieldPrefix:o,editing:r,name:n,setName:a,email:l,setEmail:s,phone:i,setPhone:c,notes:f,setNotes:u,submitting:d,error:p,canSubmit:x}=Lr();return De("div",{className:"sf-card border border-line bg-bg p-5 min-[640px]:p-7",style:t,children:[J(Dc,{number:"03",children:"Your details"}),De("div",{className:"flex flex-col gap-4",children:[J(_n,{id:`${o}-name`,label:"Name",required:!0,children:J("input",{id:`${o}-name`,type:"text",autoComplete:"name",value:n,onChange:g=>a(g.target.value),className:En,required:!0})}),J(_n,{id:`${o}-email`,label:"Email",required:!0,children:J("input",{id:`${o}-email`,type:"email",inputMode:"email",autoComplete:"email",value:l,onChange:g=>s(g.target.value),className:En,required:!0})}),J(_n,{id:`${o}-phone`,label:"Phone",children:J("input",{id:`${o}-phone`,type:"tel",inputMode:"tel",autoComplete:"tel",value:i,onChange:g=>c(g.target.value),className:En})}),J(_n,{id:`${o}-notes`,label:"What would you like to cover?",children:J("textarea",{id:`${o}-notes`,rows:4,value:f,onChange:g=>u(g.target.value),className:`${En} resize-y`})})]}),p&&J("p",{className:"mt-4 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.16em] text-alert",role:"alert",children:p}),J(Cl,{type:r?"button":"submit",disabled:!x,arrow:null,className:"mt-6 w-full disabled:cursor-not-allowed disabled:opacity-50",children:d?"Submitting\u2026":(e??"").trim()||"Book appointment"})]})}function GI({successMessage:e}){let{confirmation:t,customerTimezone:o}=Lr();return t?De("div",{className:"sf-card max-w-[760px] border border-line bg-bg p-6 min-[640px]:p-9",role:"status",children:[De("p",{className:"font-mono text-[12px] font-semibold uppercase tracking-[0.22em] text-accent",children:["Request received \xB7 ",t.bookingNumber]}),J("h3",{className:"mt-4 font-display text-[28px] font-medium uppercase text-fg",children:t.service}),J("p",{className:"mt-2 font-display text-[17px] text-fg-dim",children:BI(t.startAt,t.customerTimezone||o||t.timezone)}),t.customerTimezone&&t.timezone!==t.customerTimezone&&De("p",{className:"mt-1 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:["Business time: ",BI(t.startAt,t.timezone)]}),(e??"").trim()&&J("p",{className:"mt-5 max-w-[620px] font-serif text-[18px] italic leading-[1.6] text-fg-dim",children:e}),J(Cl,{href:`/book/${encodeURIComponent(t.manageToken)}`,newTab:t!==Nc,variant:"ghost",className:"mt-7",children:"Manage booking"})]}):null}var mF=["step","name","value","note"],w6={step:"Step",name:"Name",value:"Value",note:"Note"},xF={step:"styleStep",name:"styleName",value:"styleValue",note:"styleNote"},WI={step:{font:"--bk-step-font",size:"--bk-step-size"},name:{font:"--bk-name-font",size:"--bk-name-size"},value:{font:"--bk-value-font",size:"--bk-value-size"},note:{font:"--bk-note-font",size:"--bk-note-size"}};function gF(e){return typeof e=="string"&&Kt.includes(e)?e:null}var IF={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:900};function UI(e,t){let o={};for(let r of mF){let n=gF(e[xF[r]]);if(!n)continue;let a=So({role:n},IF,t);a.fontFamily&&(o[WI[r].font]=a.fontFamily),a.fontSize&&(o[WI[r].size]=a.fontSize)}return o}import{jsx as Ar}from"react/jsx-runtime";var zI=["head","booking","details","confirm"],KI={head:"Head",booking:"Booking",details:"Your details",confirm:"Confirmation"};function hF({region:e,eyebrow:t,heading:o,intro:r,buttonLabel:n,successMessage:a,...l}){let{confirmation:s,services:i}=Lr(),c=UI(l);return e==="head"?Ar("div",{className:"min-[960px]:col-span-2",style:c,children:Ar(DI,{eyebrow:t,heading:o,intro:r})}):e==="confirm"?s?Ar("div",{className:"min-[960px]:col-span-2",style:c,children:Ar(GI,{successMessage:a})}):null:s||!i||i.length===0?null:e==="booking"?Ar(MI,{style:c}):e==="details"?Ar(HI,{buttonLabel:n,style:c}):null}import{useEffect as $I,useState as $o}from"react";import{jsx as Or,jsxs as yF}from"react/jsx-runtime";function VI(e,t){let[o,r]=$o(void 0),[n,a]=$o(0);return $I(()=>{if(t!==void 0)return;if(!e){r(null);return}let l=!1;return Rt.getForm(e).then(s=>{l||r(s)}).catch(()=>{l||r(null)}),()=>{l=!0}},[t,e,n]),$I(()=>{if(t===void 0)return Il(()=>a(l=>l+1))},[t]),t!==void 0?t:o}var bF="Something went wrong \u2014 your submission wasn't sent. Please try again.";function qI(e,t="Thanks \u2014 we've received your submission."){return e.successMessage?.trim()||t}function YI({form:e,formSlug:t,editing:o=!1}){let[r,n]=$o({}),[a,l]=$o(""),[s,i]=$o(!1),[c,f]=$o(!1),[u,d]=$o(null);async function p(x){if(x.preventDefault(),!(o||s||!e||!t)){i(!0),d(null);try{let g=e.fields.map(I=>({fieldKey:I.key,value:r[I.key]??""}));await Rt.submitForm(t,{answers:g,...a?{company:a}:{}}),f(!0)}catch{d(bF)}finally{i(!1)}}}return{valueOf:x=>r[x]??"",set:(x,g)=>n(I=>({...I,[x]:g})),honeypot:a,setHoneypot:l,submitting:s,done:c,error:u,handleSubmit:p}}function XI({value:e,onChange:t}){return Or("input",{type:"text",name:"company",tabIndex:-1,autoComplete:"off","aria-hidden":"true",className:"hidden",value:e,onChange:o=>t(o.target.value)})}function Mc({field:e,value:t,onChange:o,className:r,rows:n=5,placeholder:a}){let l=a??e.placeholder;return e.type==="textarea"?Or("textarea",{required:e.required,rows:n,value:t,placeholder:l,onChange:s=>o(s.target.value),className:r}):e.type==="select"?yF("select",{required:e.required,value:t,onChange:s=>o(s.target.value),className:r,children:[Or("option",{value:"",children:l||"Select\u2026"}),e.options.map(s=>Or("option",{value:s,children:s},s))]}):e.type==="checkbox"?Or("input",{type:"checkbox",required:e.required,checked:t==="true",onChange:s=>o(s.target.checked?"true":""),className:r}):Or("input",{type:e.type==="email"?"email":e.type==="tel"?"tel":"text",required:e.required,value:t,placeholder:l,onChange:s=>o(s.target.value),className:r})}var Hc="solid",SF=[{label:"Solid",value:"solid"},{label:"Outlined",value:"outlined"}];function jI(e){return Xe(SF,Hc,e)}var Gc="sf-secnum-outline",JI="font-display text-[length:var(--size-headingMedium,clamp(48px,6vw,96px))] font-medium leading-[0.8] tracking-[-0.02em]",ZI=`@supports (-webkit-text-stroke: 1px currentColor){.${Gc}{color:var(--surface-2);-webkit-text-stroke:1px var(--line)}}`;import{jsx as CF}from"react/jsx-runtime";function Wc(){return CF("span",{className:"block h-px w-[30px] bg-current"})}import{jsx as Uc,jsxs as vF}from"react/jsx-runtime";function PF(e,t){return`font-mono text-[length:var(--size-label,${e}px)] uppercase tracking-[0.3em] text-accent`}var kF="inline-block w-fit bg-accent px-3.5 py-1.5 font-mono text-[length:var(--size-label,12px)] font-semibold uppercase tracking-[0.16em] text-bg",wF="flex items-center gap-3.5 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em] opacity-80 max-[800px]:text-[length:var(--size-label,12px)] max-[800px]:tracking-[0.25em]";function Zt({text:e,look:t="plain",size:o=13,scaled:r=!0,className:n="",classNameAfter:a=""}){if(t==="line")return vF("div",{className:[n,wF,a].filter(Boolean).join(" "),children:[Uc(Wc,{}),Uc("span",{children:re(e)})]});let l=t==="filled"?kF:PF(o,r);return Uc("span",{className:[n,l,a].filter(Boolean).join(" "),children:re(e)})}import{Fragment as TF,jsx as fe,jsxs as pt}from"react/jsx-runtime";var Ln=(e,t=!1)=>typeof e=="string"?Ot(e,t):e,Nr=(e,t=!1)=>typeof e=="string"?re(e,t):e;function zc({num:e,title:t,link:o,logo:r,description:n,accent:a,accentNum:l,numStyle:s=Hc,look:i="standard",titleAccent:c,accentTracking:f="-0.02em",spaceBelow:u,rowGap:d,descriptionSize:p,className:x="",eyebrowLook:g=Pc}){let I=u??(i==="editorial"?"mb-[60px]":"");if(i==="editorial"){let b=!!t||!!c;return pt("header",{className:`${I} grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-8 max-[1100px]:grid-cols-1 max-[1100px]:gap-3.5 ${x}`.trim(),children:[e&&(typeof e=="string"?fe(Zt,{text:e,className:"pb-2"}):fe("span",{className:"pb-2",children:e})),b&&pt("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5.5vw,80px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:[t,c&&pt(TF,{children:[" ",fe("em",{className:"font-serif font-normal italic text-accent",style:{letterSpacing:f},children:c})]})]}),n&&fe("p",{className:"max-w-[360px] pb-1 text-right font-display text-[length:var(--size-body,14px)] leading-[1.5] text-fg-dim max-[1100px]:max-w-full max-[1100px]:text-left",children:n})]})}if(i==="simple"){let b=`${I} ${x}`.trim();return pt("div",{className:b||void 0,children:[e&&(typeof e=="string"?fe(Zt,{text:e,look:g,className:"mb-4 block"}):fe("span",{className:"mb-4 block",children:e})),t&&fe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:Ln(t)})]})}if(i==="statement"){let b=`${I} ${x}`.trim();return pt("div",{className:b||void 0,children:[e&&(typeof e=="string"?fe(Zt,{text:e,look:g,className:"mb-4 block"}):fe("span",{className:"mb-4 block",children:e})),t&&fe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,72px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em] text-fg",children:Ln(t,!0)})]})}if(i==="natural"){let b=`flex max-w-[680px] flex-col ${d??"gap-5"} ${I} ${x}`.replace(/\s+/g," ").trim();return pt("div",{className:b,children:[e&&(typeof e=="string"?fe(Zt,{text:e,look:g}):fe("span",{children:e})),t&&fe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium leading-[1.05] tracking-[-0.03em] max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:Ln(t)}),n&&fe("p",{className:`${p??"text-[length:var(--size-body,16px)]"} leading-[1.6] opacity-85`,children:n})]})}if(i==="essay"){let b=`${I} ${x}`.trim();return pt("div",{className:b||void 0,children:[e&&(typeof e=="string"?fe(Zt,{text:e,look:g,className:"mb-4 block"}):fe("span",{className:"mb-4 block",children:e})),t&&fe("h2",{className:"font-heading2 text-[length:var(--sf-heading-max,var(--size-headingMedium,38px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.02em] text-fg max-[800px]:text-[length:var(--size-headingSmall,28px)]",children:Ln(t)})]})}let h=!!n||!!o,C=!!t,S=jI(s)==="outlined",P="font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em]",T=null;if(e)if(S)T=fe("span",{className:`${JI} text-fg-dim ${Gc}`,children:Nr(e)});else if(l&&!a&&typeof e=="string"){let b=e.indexOf("/"),w=b===-1?e:e.slice(0,b),O=b===-1?"":e.slice(b);T=pt("span",{className:P,children:[fe("span",{className:"text-accent",children:Nr(w)}),O&&fe("span",{className:"text-fg-dim",children:Nr(O)})]})}else T=fe("span",{className:`${P} ${a?"text-accent":"text-fg-dim"}`,children:Nr(e)});return pt("div",{className:"mb-16 grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-6 max-[800px]:mb-9 max-[800px]:grid-cols-1 max-[800px]:gap-3 max-[800px]:pb-5",children:[S&&e&&fe("style",{children:ZI}),pt("div",{className:"flex flex-col items-start gap-3",children:[r?.src&&fe("img",{src:Yd(r.src),alt:r.alt,className:"h-8 w-auto object-contain"}),T]}),C&&fe("h2",{className:a?"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,5vw,64px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.95] tracking-[-0.025em]":"font-heading2 text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.03em] whitespace-pre-line max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))] max-[800px]:leading-[1]",children:Ln(t)}),h&&pt("div",{className:"flex flex-col items-end gap-3 max-[800px]:items-start",children:[n&&fe("p",{className:"max-w-[340px] font-display text-[length:var(--size-body,14px)] leading-[1.5] text-fg-dim text-right max-[800px]:max-w-full max-[800px]:text-left",children:Nr(n)}),o&&pt(ll,{href:o.href,className:"inline-flex items-center gap-2 whitespace-nowrap font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg",children:[Nr(o.text),fe("span",{"aria-hidden":!0,children:"\u2192"})]})]})]})}import{jsx as mt,jsxs as An}from"react/jsx-runtime";function RF(e){return e.type==="textarea"||e.type==="select"||e.type==="checkbox"}function oz({eyebrow:e,title:t}){return An("div",{className:"flex flex-col gap-4",children:[e&&mt(Zt,{text:e,scaled:!1}),t&&mt("h2",{className:"font-display text-[min(clamp(40px,5vw,72px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:Ot(t,!0)})]})}function QI({body:e,buttonLabel:t,consent:o,form:r,submission:n,showForm:a,resolving:l,editing:s}){return An("div",{className:"flex flex-col gap-7",children:[e&&el(e).map((i,c)=>mt("p",{className:"max-w-[480px] font-display text-[16px] leading-[1.6] text-fg-dim",children:re(i)},c)),a&&(r?n.done?mt("p",{role:"status",className:"max-w-[480px] font-[family-name:var(--sb-thanks-font,var(--font-serif))] text-[length:var(--sb-thanks-size,17px)] italic leading-[1.6] text-fg-dim",children:qI(r)}):An("form",{className:"grid grid-cols-2 gap-2",onSubmit:n.handleSubmit,children:[r.fields.map(i=>{let c=["border border-line bg-transparent px-4 py-3.5 font-[family-name:var(--sb-field-font,var(--font-mono))] text-[length:var(--sb-field-size,14px)] tracking-[0.1em] text-fg outline-none focus:border-accent",RF(i)?"col-span-2":""].join(" ");return i.type==="checkbox"?An("label",{className:"col-span-2 flex items-start gap-3 font-[family-name:var(--sb-tick-font,var(--font-mono))] text-[length:var(--sb-tick-size,12px)] uppercase tracking-[0.18em] text-fg-dim",children:[mt(Mc,{field:i,value:n.valueOf(i.key),onChange:f=>n.set(i.key,f),className:"mt-0.5 size-4 accent-accent"}),An("span",{children:[i.label,i.required?mt("span",{className:"text-accent",children:" *"}):null]})]},i.key):mt(Mc,{field:i,value:n.valueOf(i.key),onChange:f=>n.set(i.key,f),rows:4,placeholder:i.placeholder||i.label,className:i.type==="textarea"?`${c} resize-y`:c},i.key)}),mt(XI,{value:n.honeypot,onChange:n.setHoneypot}),n.error&&mt("p",{role:"alert",className:"col-span-2 font-mono text-[12px] uppercase tracking-[0.18em] text-alert",children:n.error}),t&&mt("button",{type:s?"button":"submit",disabled:n.submitting,className:"col-span-2 cursor-pointer bg-btn px-6 py-4 font-mono text-[14px] uppercase tracking-[0.32em] text-btn-ink transition-colors hover:bg-fg hover:text-bg disabled:cursor-wait disabled:opacity-60",children:n.submitting?"Sending\u2026":re(t)})]}):mt("p",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim",children:l?"Loading form\u2026":"Choose a form in the inspector, under Form \u2014 until then this form is hidden on the live page and nothing can be submitted."})),a&&o&&mt("span",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim/70",children:re(o)})]})}var FF=["field","tick","thanks"],sz={field:"Form rows",tick:"Tick label",thanks:"Thank-you message"},EF={field:"styleField",tick:"styleTick",thanks:"styleThanks"},eh={field:{font:"--sb-field-font",size:"--sb-field-size"},tick:{font:"--sb-tick-font",size:"--sb-tick-size"},thanks:{font:"--sb-thanks-font",size:"--sb-thanks-size"}};function _F(e){return typeof e=="string"&&Kt.includes(e)?e:null}var LF={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:900};function th(e,t){let o={};for(let r of FF){let n=_F(e[EF[r]]);if(!n)continue;let a=So({role:n},LF,t);a.fontFamily&&(o[eh[r].font]=a.fontFamily),a.fontSize&&(o[eh[r].size]=a.fontSize)}return o}import{jsx as Pl}from"react/jsx-runtime";var oh=["head","form"],rh={head:"Head",form:"Form"};function AF({region:e,eyebrow:t,title:o,body:r,buttonText:n,consent:a,formSlug:l,form:s,editing:i=!1,...c}){let f=VI(l,s),u=YI({form:f,formSlug:l,editing:i}),d=th(c);return e==="head"?Pl("div",{style:d,children:Pl(zc,{look:"statement",num:t,title:o})}):Pl("div",{style:d,children:Pl(QI,{body:r??"",buttonLabel:n??"",consent:a??"",form:f,submission:u,showForm:!!f||i,resolving:f===void 0,editing:i})})}var OF="ImageBlock",NF=3,kl=(e,t,o={})=>({type:e,props:{...t?.(e)??{},id:_o(e),...o}}),BF=e=>({...e?.(Le)??{},direction:"column",[Tr]:[kl(OF,e),kl(Le,e,{direction:"column",[Tr]:[kl("Heading",e),kl("Text",e)]})]}),On={AppointmentBooking:{slot:"boxes",childType:"BookingBox",addLabel:"Add box",fixed:!0,seeds:()=>zI.map(e=>({region:e,name:KI[e]})),addBlocked:()=>"A Booking Form is these three boxes. They cannot be added to or removed.",skipSeed:e=>e.layout!=="boxes"},SubmitBuild:{slot:"boxes",childType:"SubmitBox",addLabel:"Add box",fixed:!0,seeds:()=>oh.map(e=>({region:e,name:rh[e]})),addBlocked:()=>"A Submit-a-build section is these two boxes. They cannot be added to or removed.",skipSeed:e=>e.layout!=="boxes"},Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>_I.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${xo.toLowerCase()}`,seeds:()=>[],addBlocked:ca,notice:ks},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${xo.toLowerCase()}`,seeds:()=>[],addBlocked:ca,notice:ks},Collections:{slot:"cards",childType:"CollectionCard",addLabel:"Add card",seeds:()=>Array.from({length:II},()=>({collection:null}))},ProductGrid:{slot:"products",childType:"ProductRef",addLabel:"Add product",seeds:()=>[{code:""},{code:""},{code:""}],legacy:e=>Array.isArray(e.design_codes)?e.design_codes.map(t=>t?.code).filter(t=>!!t).map(t=>({code:t})):[]},GalleryB:{slot:"items",childType:"GalleryItem",addLabel:"Add image",seeds:()=>SI.map(e=>({...e})),legacy:e=>Array.isArray(e.cards)?e.cards.map(t=>({...t})):[]},ProcessSteps:{slot:"boxes",childType:Le,addLabel:`Add ${xo.toLowerCase()}`,seeds:e=>Array.from({length:NF},()=>BF(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}};function kz(e,t){let o=On[e];return o?{slot:o.slot,children:o.seeds(t).map(r=>({type:o.childType,props:{id:_o(o.childType),...r}}))}:null}var Vo=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Kc(e){return Vo(e)&&typeof e.type=="string"&&e.type!==""&&Vo(e.props)}function nh(e,t,o){if(Array.isArray(e))for(let r of e)Kc(r)?$c(r,t,o):Vo(r)&&typeof r.type=="string"&&r.type!==""&&t.add(r.type)}function wl(e,t,o){if(Array.isArray(e)){if(o.has(e))return;o.add(e);for(let r of e)Kc(r)?$c(r,t,o):wl(r,t,o);return}if(!(!Vo(e)||o.has(e))){o.add(e);for(let r of Object.values(e))wl(r,t,o)}}function $c(e,t,o){if(!o.has(e)){o.add(e),t.add(e.type);for(let r of Object.values(e.props))wl(r,t,o)}}function Vc(e){let t=new Set,o=new Set;if(Kc(e))$c(e,t,o);else if(Vo(e)){if(nh(e.content,t,o),Vo(e.zones))for(let r of Object.values(e.zones))nh(r,t,o);Vo(e.root)&&wl(e.root,t,o)}return[...t].sort()}var ah=()=>({}),lh=new Map;function DF(e){let t=lh.get(e);if(t)return t;let o=new Set,r=On[e];if(r)for(let l of r.seeds(ah))for(let s of Vc({type:r.childType,props:l}))o.add(s);let n=uI(e);if(n){let l=0;for(let s of Vc(n(ah,i=>`${i}-${l+=1}`)))o.add(s)}o.delete(e);let a=[...o].sort();return lh.set(e,a),a}function MF(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let t=$s(e),o=e.allow?new Set(e.allow):null,r=new Set(e.deny??[]),n=new Set(Object.keys(e.host??{})),a=i=>{if(r.has(i))return!1;if(n.has(i))return!0;let c=Ju(i);return!c||!t[c]?!1:o?o.has(i):!0},l=new Map,s=i=>{let c=l.get(i);if(c!==void 0)return c;l.set(i,!1);let f=a(i)&&DF(i).every(s);return l.set(i,f),f};return{sets:t,offers:s}}var HF="block-offer";function qc(e=Ye()){return e.cache(HF,()=>MF(e.blocks))}function Az(e,t=Ye()){let o=qc(t);return o?o.offers(e):!0}function Hz(e,t=0){let o=WF(e,t),r=o?qc():null;return o&&r?GF(o,r):o}function GF(e,t){if(e.spec)return t.offers(e.spec.childType)?e:null;let o=e.choices??[],r=o.filter(n=>t.offers(n.type));return r.length===o.length?e:r.length>0?{...e,choices:r}:null}function WF(e,t){let o=On[e];if(o)return{source:"section",slot:o.slot,choices:null,spec:o};let r=oI(e,t);if(r)return{source:"container",slot:r.slot,choices:r.choices,spec:null};let n=fI(e);return n?{source:"footer",slot:cI,choices:n,spec:null}:null}var Uz="Scrolling Bar",{Provider:zz,useSelection:sh}=sa("selectedHeroId");import{createContext as UF,useCallback as ih,useContext as zF,useMemo as KF,useRef as $F}from"react";import{jsx as qF}from"react/jsx-runtime";var VF=Object.fromEntries(vu.map(e=>[e,{value:"",error:null}])),ch=UF({links:Tu,rows:VF,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function qz({children:e,value:t}){let o=$F(()=>{}),r=ih(()=>o.current(),[]),n=ih(l=>{o.current=l},[]),a=KF(()=>({...t,openPanel:r,setOpenHandler:n}),[t,r,n]);return qF(ch.Provider,{value:a,children:e})}var Yz=()=>zF(ch);import{useRef as Jf,useState as Jl}from"react";import{useEasel as $r}from"efficient-easel/easel";var fh="50% 50%";var Dr=e=>e<0?0:e>100?100:Math.round(e);function Yc(e){let t=String(e??"").trim().split(/\s+/);if(t.length!==2)return{x:50,y:50};let o=a=>{let l=/^(-?\d+(?:\.\d+)?)%$/.exec(a);return l?Number(l[1]):null},r=o(t[0]),n=o(t[1]);return r===null||n===null?{x:50,y:50}:{x:Dr(r),y:Dr(n)}}function Br(e,t){return`${Dr(e)}% ${Dr(t)}%`}function dh(e,t,o=!1){let r=o?10:1,{x:n,y:a}=Yc(e);switch(t){case"ArrowLeft":return Br(n-r,a);case"ArrowRight":return Br(n+r,a);case"ArrowUp":return Br(n,a-r);case"ArrowDown":return Br(n,a+r);default:return null}}function uh(e,t,o){return!(e.width>0)||!(e.height>0)?{x:50,y:50}:{x:Dr((t-e.left)/e.width*100),y:Dr((o-e.top)/e.height*100)}}import{useCallback as JF,useEffect as ZF,useRef as QF,useState as eE}from"react";import{useEasel as tE}from"efficient-easel/easel";import{SettingsAction as oE}from"efficient-easel/panel";function Xc(e){return typeof e=="number"&&Number.isFinite(e)}function Qz(e,t){if(!Xc(e))return;let o=Xn(so(e));if(Object.keys(o).length===0)return;let r=o[vl];if(typeof r!="string")return o;let n=Mr(t)?Hr(r,xt(t)??[]):r;return{...o,[YF]:n}}var YF="--sf-section-radius",vl="--sf-card-radius",ct=["tl","tr","br","bl"];function xt(e){if(!Array.isArray(e))return null;let t=e.filter(o=>ct.includes(o));return ct.filter(o=>t.includes(o))}function Mr(e){let t=xt(e);return t!==null&&t.length<ct.length}function Hr(e,t){return ct.map(o=>t.includes(o)?e:"0").join(" ")}var wo="Which corners",Gr=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];function Tl(e){let t=o=>e.includes(o);if(e.length===ct.length)return"All four";if(e.length===0)return"None";if(e.length===1)return Gr.find(o=>o.value===e[0])?.label??"1 corner";if(e.length===2){if(t("tl")&&t("tr"))return"Top two";if(t("bl")&&t("br"))return"Bottom two";if(t("tl")&&t("bl"))return"Left two";if(t("tr")&&t("br"))return"Right two"}return`${e.length} corners`}var XF="--sf-card-box-radius",jF="--sf-site-card-radius",r3="sf-section-bleeds";function Nn(e){return typeof e=="number"&&Number.isFinite(e)}function n3(e,t){if(!Nn(e))return;let o=Xn(so(e))[vl];if(typeof o!="string")return;let r=Mr(t)?Hr(o,xt(t)??[]):o;return{[XF]:r}}function a3(e){let t=e[vl];return typeof t=="string"?{[jF]:t}:{}}function ph(e,t){let o=e.find(a=>a?.props?.id===t);if(!o)return[...e];let r=o.props?.cardCorners,n=o.props?.cardCornerSides;return e.map(a=>a?.props?.id===t?a:{...a,props:{...a.props,cardCorners:r,cardCornerSides:n}})}function mh(e,t,o){let r=o?.zone??"",n=r.lastIndexOf(":"),a=n>0?r.slice(0,n):"",l=n>0?r.slice(n+1):"",s=a?Md(e,t,a):null,i=s&&Array.isArray(s.item.props[l])?s.item.props[l]:[],c=o?.index??-1,f=c>=0?i[c]:void 0,u=f?.props?.id?String(f.props.id):"",d=Math.max(i.length-1,0);return!s||!u?{can:!1,reason:"unreachable",others:0}:i.length<=1?{can:!1,reason:"alone",others:d}:Nn(f?.props?.cardCorners)?{can:!0,others:d,zone:s.zone,index:s.index,data:{...s.item,props:{...s.item.props,[l]:ph(i,u)}}}:{can:!1,reason:"unset",others:d}}function xh(e){if(!e.can)return e.reason==="alone"?"This is the only card in the section.":e.reason==="unset"?"Set this card's corners first.":"This card is not in a section that can share corners.";let t=e.others;return`Gives the other ${t===1?"card":`${t} cards`} this card's Corners and Which corners.`}function gh(e){return`Applied to ${e} ${e===1?"card":"cards"}`}function Ih(e,t){e.can&&t(e.zone,e.index,e.data)}import{jsx as hh}from"react/jsx-runtime";var rE=2200,nE="apply-corners-to-siblings",aE="Apply to all cards";function lE({plan:e,doneCount:t,onPress:o}){return hh(oE,{id:nE,label:aE,note:xh(e),disabled:!e.can,done:t!==null,doneLabel:gh(t??0),onPress:o})}function jc(){let{appState:e,config:t}=tE(i=>i),o=Fu(),[r,n]=eE(null),a=QF(null);ZF(()=>()=>{a.current&&clearTimeout(a.current)},[]);let l=mh(t,e.data.content??[],e.ui.itemSelector),s=JF(()=>{Ih(l,o.replaceComponent),l.can&&(n(l.others),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>n(null),rE))},[l,o]);return hh(lE,{plan:l,doneCount:r,onPress:s})}import{jsx as Bn,jsxs as bh}from"react/jsx-runtime";function Rl({label:e,onClear:t,what:o="override"}){return Bn("button",{type:"button",className:"sf-part-mark",title:`Clear ${o}`,"aria-label":`Clear ${o}: ${e}`,onClick:t,children:Bn(sE,{})})}function sE(){return bh("svg",{width:"12",height:"12",viewBox:"0 0 16 16","aria-hidden":"true",children:[Bn("circle",{className:"sf-part-mark-dot",cx:"8",cy:"8",r:"3",fill:"currentColor"}),bh("g",{className:"sf-part-mark-arrow",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",children:[Bn("path",{d:"M13 8a5 5 0 1 1-1.6-3.7"}),Bn("path",{d:"M13 2.5V5h-2.6"})]})]})}var yh=1,Sh="Corners";function iE(e){return so(e)}function C3(e,t){let o=iE(e);if(o===null)return null;let r=`${o}px`;return{borderRadius:Mr(t)?Hr(r,xt(t)??[]):r}}import{createContext as fE,useContext as dE,useMemo as uE}from"react";var cE=["vehicle","process","size","lugs","finish","price"],Fl={vehicle:"My Car",process:"Process",size:"Size",lugs:"Lugs",finish:"Finish",price:"Price"};function Ch(e){if(!e)return Fl;let t={...Fl};for(let o of cE){let r=e[o];if(typeof r!="string")continue;let n=r.trim();n&&(t[o]=n)}return t}import{jsx as pE}from"react/jsx-runtime";var Ph=fE(Fl);function T3({labels:e,children:t}){let o=uE(()=>Ch(e),[e]);return pE(Ph.Provider,{value:o,children:t})}function Jc(){return dE(Ph)}var Bt={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]]}},Zc=Object.keys(Bt),wh=[2,3,4,6];function vh(e){return typeof e!="string"||e===""?null:Bt[e]??null}function kh(e,t){return t?6/e.acrossPhone:12/e.across}var mE="sf-wall--";function xE(e){return`${mE}${e}`}function E3(e){let t=Bt[e],o=`.${xE(e)}`,r=[],n=(a,l)=>{let s=[],i=a.length;a.forEach(([c,f],u)=>{s.push(`${o} > :nth-child(${i}n+${u+1}){grid-column:span ${c};grid-row:span ${f}}`)});for(let c=1;c<i;c+=1)s.push(`${o}:has(> :nth-child(${i}n+${c}):last-child) > :nth-last-child(-n+${c}){grid-column:span ${l};grid-row:span 1}`);return s};return r.push(`${o}{grid-template-columns:repeat(12,minmax(0,1fr))}`),r.push(...n(t.desktop,kh(t,!1))),r.push("@media (max-width:800px){"),r.push(`${o}{grid-template-columns:repeat(6,minmax(0,1fr))}`),r.push(...n(t.phone,kh(t,!0))),r.push("}"),r.join("")}var El=12,Th=1,gE=3;var IE=3;function Qc(e,t,o){let r=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(r)?Math.min(o,Math.max(t,Math.trunc(r))):null}function hE(e){return Qc(e,1,El)??IE}function A3(e,t){let o=Qc(e,Th,gE);return o??(hE(t)===4?2:Th)}function O3(e){return e==null||e===""?null:Qc(e,1,El)}var N3="data-sf-span";function B3(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if(vh(e.props?.layout))return!1;let t=e.props?.columns;return t!=null&&t!==""}return!1}import{AlignLeftIcon as jL,AlignSeparateIcon as JL,AnimationIcon as Vb,BackgroundIcon as ZL,CartIcon as QL,ColumnWidthsIcon as qb,ColumnsIcon as eA,CornerIcon as Yb,DirectionDownIcon as tA,DirectionLeftIcon as oA,DirectionRightIcon as rA,DirectionUpIcon as nA,DollarIcon as aA,FinishIcon as lA,GapIcon as Xb,GridIcon as sA,GroundIcon as iA,HashIcon as jb,ImageIcon as cA,LayoutIcon as fA,ListIcon as dA,LocationIcon as Xf,PaddingBottomIcon as uA,PaddingLeftIcon as pA,PaddingRightIcon as mA,PaddingTopIcon as xA,PageIcon as Jb,PhoneIcon as gA,PlacementIcon as IA,ProductSizeIcon as hA,RotateIcon as bA,SquareIcon as yA,StylesIcon as SA,TextLinesIcon as CA,WidthIcon as PA,WrapIcon as kA}from"efficient-easel/icons";import{TitleIcon as bE,ButtonIcon as yE,DollarIcon as SE,HashIcon as CE,LinkIcon as PE,NoteIcon as kE,TagIcon as wE,TextLinesIcon as vE}from"efficient-easel/icons";import{Fragment as Dt,jsx as Z,jsxs as Mt}from"react/jsx-runtime";var Rh={body:vE,button:yE,link:PE,label:wE,number:CE,price:SE,note:kE,title:bE},Fh={eyebrow:Mt(Dt,{children:[Z("path",{d:"M5 6.5h5"}),Z("path",{d:"M5 12.5h14"}),Z("path",{d:"M5 18h11"})]}),heading:Mt(Dt,{children:[Z("path",{d:"M6.5 5v14"}),Z("path",{d:"M17.5 5v14"}),Z("path",{d:"M6.5 12h11"})]}),intro:Mt(Dt,{children:[Z("path",{d:"M4 5.5v13"}),Z("path",{d:"M8 7.5h12"}),Z("path",{d:"M8 12h12"}),Z("path",{d:"M8 16.5h8"})]}),value:Mt(Dt,{children:[Z("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),Z("path",{d:"M6.5 12h7"})]}),name:Mt(Dt,{children:[Z("path",{d:"M6 3.5v17"}),Z("path",{d:"M6 5h11.5l-2.6 3.6L17.5 12H6z"})]}),date:Mt(Dt,{children:[Z("rect",{x:"4",y:"5.5",width:"16",height:"15",rx:"2"}),Z("path",{d:"M4 10.5h16"}),Z("path",{d:"M9 3.2v4.4"}),Z("path",{d:"M15 3.2v4.4"})]}),caption:Mt(Dt,{children:[Z("rect",{x:"3.5",y:"4.5",width:"17",height:"11",rx:"2"}),Z("path",{d:"M3.5 12.8l4.2-3.2 3.6 2.8 3.4-2.4 5.8 4"}),Z("path",{d:"M6.5 19.5h11"})]}),quote:Mt(Dt,{children:[Z("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),Z("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Mt(Dt,{children:[Z("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),Z("path",{d:"M8 9.5h8"}),Z("path",{d:"M12 9.5v5"})]}),meta:Mt(Dt,{children:[Z("path",{d:"M4 7h16"}),Z("path",{d:"M4 14h3.5"}),Z("path",{d:"M10.5 14h3"}),Z("path",{d:"M17 14h3"})]})};function ef({noun:e,size:t=14,strokeWidth:o=1.8,className:r,style:n}){let a=Rh[e];return a?Z("span",{className:r,style:{display:"inline-flex",...n},"aria-hidden":"true",children:Z(a,{size:t})}):Z("svg",{className:r,style:n,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:Fh[e]})}var H3=Object.keys(Rh);var G3=Object.keys(Fh);var TE="#ffffff",RE=/^#[0-9a-fA-F]{6}$/;function tf(e){return FE(e)?e:TE}function FE(e){return typeof e=="string"&&RE.test(e)}function z3(e){return{"--bg":tf(e)}}var EE=["fade","rise","scale"],of="none",Eh=[{label:"None",value:of},{label:"Fade",value:"fade"},{label:"Rise",value:"rise"},{label:"Scale",value:"scale"}];function V3(e){return EE.includes(e)?e:null}var _h="data-sf-anim",Dn="data-sf-anim-state";function q3(e){let t=()=>{};if(typeof IntersectionObserver>"u"||!e.getAttribute(_h))return t;let o=window.innerHeight||document.documentElement.clientHeight;if(e.getBoundingClientRect().top<o)return t;e.setAttribute(Dn,"armed");let r=new IntersectionObserver(n=>{for(let a of n)if(a.isIntersecting){r.disconnect(),_E(e);break}},{threshold:0});return r.observe(e),()=>{r.disconnect(),e.removeAttribute(Dn)}}function _E(e){if(!e.getAttribute(_h))return;e.removeAttribute(Dn),e.offsetWidth,e.setAttribute(Dn,"play");let t=o=>{o.target===e&&(e.removeAttribute(Dn),e.removeEventListener("animationend",t))};e.addEventListener("animationend",t)}var Y3=Wd;function nf(e,t){let o=e?.content;if(!Array.isArray(o))return null;for(let r of o){if(!r||typeof r!="object")continue;let n=r.props;if(n?.id===t)return null;if(rf(r,t,0))return n??{}}return null}function rf(e,t,o){if(o>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(n=>rf(n,t,o+1));let r=e.props;return r&&typeof r=="object"&&r.id===t?!0:Object.values(e).some(n=>rf(n,t,o+1))}import{SettingsCorners as Zb,SettingsField as be,SettingsGroupHead as wA,SettingsGroupSub as vA,SettingsPlacement as TA,SettingsSegmented as RA,SettingsSwitch as Qb}from"efficient-easel/panel";import{ListField as FA}from"efficient-easel/fields";import{useContext as NE,useEffect as Oh,useRef as Nl,useState as Bl}from"react";import{useEffect as Lh,useMemo as _l,useRef as LE,useState as af}from"react";import{jsx as Ht,jsxs as Ll}from"react/jsx-runtime";function AE(e,t){let o=t.trim().toLowerCase(),r=o?e.filter(l=>l.label.toLowerCase().includes(o)):[...e],n=[],a;for(let l of r)l.group&&l.group!==a&&n.push({type:"group",label:l.group,count:r.filter(s=>s.group===l.group).length}),a=l.group,n.push({type:"option",option:l});return n}function Al({label:e,options:t,fallback:o,value:r,onChange:n,placeholder:a,bare:l=!1}){let[s,i]=af(!1),[c,f]=af(""),[u,d]=af(0),p=LE(null),x=r??"",g=_l(()=>t.find(b=>b.value===x)??t.find(b=>b.value===o)??null,[t,x,o]),I=_l(()=>AE(t,c),[t,c]),h=_l(()=>I.filter(b=>b.type==="option").map(b=>b.option),[I]),C=_l(()=>t.some(b=>b.thumb!==void 0),[t]);Lh(()=>{if(!s)return;let b=w=>{p.current&&!p.current.contains(w.target)&&(i(!1),f(""))};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[s]),Lh(()=>{d(b=>b>=h.length?0:b)},[h.length]);let S=b=>{n(b.value),i(!1),f("")},P=b=>{b.key==="Escape"?(i(!1),f("")):b.key==="ArrowDown"?(b.preventDefault(),i(!0),d(w=>Math.min(w+1,Math.max(h.length-1,0)))):b.key==="ArrowUp"?(b.preventDefault(),d(w=>Math.max(w-1,0))):b.key==="Enter"&&s&&h[u]&&(b.preventDefault(),S(h[u]))},T=-1;return Ll("div",{className:l?"sf-combo":"sf-field sf-combo",ref:p,children:[!l&&Ht("div",{className:"sf-field-label",children:e}),Ll("div",{className:"sf-combo-control",children:[Ht("input",{type:"text",className:"sf-combo-input",role:"combobox",...l?{"aria-label":e}:{},"aria-expanded":s,"aria-autocomplete":"list",value:s?c:g?.label??"",placeholder:a??"Search\u2026",onChange:b=>{f(b.target.value),i(!0),d(0)},onFocus:()=>{i(!0),f("")},onClick:()=>i(!0),onKeyDown:P}),Ht("span",{className:"sf-combo-caret","aria-hidden":"true",children:"\u25BE"})]}),s&&Ht("ul",{className:"sf-combo-menu",role:"listbox",children:h.length===0?Ht("li",{className:"sf-combo-empty",children:"No matches"}):I.map(b=>{if(b.type==="group")return Ll("li",{className:"sf-combo-group",role:"presentation",children:[b.label,Ht("span",{className:"sf-combo-group-count",children:b.count})]},`group:${b.label}`);let w=b.option,O=++T;return Ll("li",{role:"option","aria-selected":w.value===x,className:"sf-combo-option"+(O===u?" is-active":"")+(w.value===x?" is-selected":""),onMouseDown:D=>{D.preventDefault(),S(w)},onMouseEnter:()=>d(O),children:[C&&Ht("span",{className:"sf-combo-thumb","aria-hidden":"true",children:w.thumb?Ht("img",{src:w.thumb,alt:"",loading:"lazy"}):null}),Ht("span",{className:"sf-combo-option-label",children:w.label}),w.meta!==void 0&&Ht("span",{className:"sf-combo-meta",children:w.meta})]},w.value||"__none__")})})]})}var Mn=class extends Error{constructor(o){super("The storefront forms list could not be loaded.");this.cause=o;this.name="FormsUnavailableError"}},Ol=null,lf=null,sf=null;function OE(){Ol=null,lf=null,sf=null}function Ah(e=!1){let t=dr(),o=Lo();return(e||!Ol||lf===null&&t!==null||sf!==o)&&(lf=t,sf=o,Ol=(t?oe.listForms(t,{siteId:o}):Promise.reject(new Mn)).catch(r=>{throw OE(),r instanceof Mn?r:new Mn(r)})),Ol}import{jsx as Te,jsxs as kt}from"react/jsx-runtime";var Nh="__create-a-new-form__";function BE({value:e,forms:t,loadFailed:o,emptyLabel:r="No form yet"}){let n=t??[],a=e?n.some(u=>u.slug===e):!0,l=t===null&&!o,s={value:"",label:l?"Loading\u2026":o?"Forms couldn\u2019t be loaded":r},i=e&&!a?[{value:e,label:l||o?e:`${e} \u2014 no form with this name`}]:[],c=n.map(u=>({value:u.slug,label:u.is_active?u.title:`${u.title} (switched off)`})),f=l?[]:[{value:Nh,label:"Create a new form\u2026"}];return[s,...i,...c,...f]}function DE(e){return e===Nh?{action:"create"}:{action:"store",slug:e}}function ME({value:e,pickedId:t,forms:o}){if(!e||!t||o.some(n=>n.slug===e))return null;let r=o.find(n=>n.id===t);return r&&r.slug&&r.slug!==e?r.slug:null}function HE(e){let t=["Goes to Storefront \u2192 Forms"],o=(e.notify_email??"").trim();return o&&t.push(`Emails a copy to ${o}`),e.mailing_list_name&&t.push(e.subscribe_mode==="checkbox"?`Joins the \u201C${e.mailing_list_name}\u201D audience, but only when the consent box is ticked`:`Joins the \u201C${e.mailing_list_name}\u201D audience`),e.kind==="account_signup"&&t.push(e.signup_customer_type==="importer"?"Creates a wholesale account":"Creates a retail account"),t}function cf({value:e,onChange:t,label:o="Form",emptyLabel:r}){let n=fo(),a=NE(Po),l=a?a.capabilities.hasForms:!0,[s,i]=Bl(null),[c,f]=Bl(!1),[u,d]=Bl(!1),[p,x]=Bl(!1),g=Nl(!0),I=Nl(e);I.current=e;let h=Nl(t);h.current=t;let C=Nl(null),S=(R=!1)=>Ah(R).then(_=>{if(g.current){i(_),f(!1);let G=ME({value:I.current,pickedId:C.current,forms:_});G&&h.current(G)}return _},()=>(g.current&&f(!0),[]));Oh(()=>(g.current=!0,l&&S(),()=>{g.current=!1}),[l]),Oh(()=>l?Il(()=>{S(!0)}):void 0,[l]);let T=e?(s??[]).find(R=>R.slug===e)??null:null;T?C.current=T.id:e||(C.current=null);let b=!!e&&!T&&s!==null&&!c,w=BE({value:e,forms:s,loadFailed:c,emptyLabel:r}),O=async()=>{d(!0),x(!1);try{let R=await Jg(n,{mode:"create"}),_=await S(!0);if(!g.current)return;if(R.status==="timeout"){x(!0);return}if(R.status!=="saved")return;let{form:G}=R;G.slug!==I.current&&h.current(G.slug),_.some(Y=>Y.id===G.id)||S(!0)}finally{g.current&&d(!1)}},D=R=>{let _=DE(R);_.action==="create"?O():(x(!1),t(_.slug))};return l?kt("div",{className:"sf-formpicker",children:[Te(Al,{label:o,options:w,fallback:"",value:e??"",onChange:D,placeholder:"Search forms\u2026"}),p&&Te("p",{className:"sf-formsummary-warn",children:"That didn\u2019t come back \u2014 pick the form from the list, or try again."}),T?kt("div",{className:"sf-blogsource sf-formsummary",children:[kt("div",{children:[Te("div",{className:"sf-formsummary-caption",children:T.fields.length===1?"1 field":`${T.fields.length} fields`}),T.fields.length?Te("ol",{className:"sf-formsummary-fields",children:T.fields.map((R,_)=>Te("li",{children:R.label},R.key||`${R.label}-${_}`))}):Te("p",{className:"sf-blogsource-hint",children:"This form has no fields yet, so there is nothing for a visitor to fill in."})]}),kt("div",{children:[Te("div",{className:"sf-formsummary-caption",children:"Where the answers go"}),Te("ul",{className:"sf-formsummary-fields",children:HE(T).map(R=>Te("li",{children:R},R))})]}),!T.is_active&&Te("p",{className:"sf-formsummary-warn",children:"This form is switched off, so it won\u2019t appear on the published page. Turn it back on in Storefront \u2192 Forms."}),kt("div",{className:"sf-formsummary-actions",children:[Te("button",{type:"button",className:"sf-blogsource-btn",onClick:()=>jg(n,T.id),children:"Edit form \u270E"}),Te("button",{type:"button",className:"sf-blogsource-btn",disabled:u,onClick:()=>{O()},children:"New form +"})]}),Te("p",{className:"sf-blogsource-hint",children:"The questions, the button text and the thank-you message all come from Storefront \u2192 Forms. Edit them there \u2014 this section updates to match."})]}):kt("div",{className:"sf-blogsource sf-formsummary",children:[c?kt("p",{className:"sf-blogsource-hint",children:["This website\u2019s forms couldn\u2019t be loaded, so there is nothing to choose from yet.",e?` This section still points at \u201C${e}\u201D, and that is unchanged.`:""]}):b&&kt("p",{className:"sf-formsummary-warn",children:["This section points at \u201C",e,"\u201D, and this website has no form with that name. Pick one from the list above, or leave it \u2014 nothing has been changed."]}),kt("div",{className:"sf-formsummary-actions",children:[c&&Te("button",{type:"button",className:"sf-blogsource-btn",disabled:u,onClick:()=>{S(!0)},children:"Try again"}),Te("button",{type:"button",className:"sf-blogsource-btn",disabled:u,onClick:()=>{O()},children:"New form +"})]}),!c&&Te("p",{className:"sf-blogsource-hint",children:"Pick a form to show here, or build a new one. Forms are made once in Storefront \u2192 Forms and can be shown on any number of pages."})]})]}):Te("div",{className:"sf-formpicker",children:Te("div",{className:"sf-blogsource sf-formsummary",children:kt("div",{children:[Te("div",{className:"sf-formsummary-caption",children:o}),kt("p",{className:"sf-blogsource-hint",children:["Forms aren\u2019t available in this editor, so there is nothing to choose here.",e?` This section still points at \u201C${e}\u201D, and that is unchanged.`:""]})]})})})}import{ColourPicker as WE}from"efficient-easel/pick";import{typedHex as GE}from"efficient-easel/pick";function Bh(e){let t=new Set,o=[];return Qr(e).themes.forEach((r,n)=>{let a=[[`Theme ${n+1} main color`,r.accent],[`Theme ${n+1} text color`,r.text],[`Theme ${n+1} background`,r.background]];for(let[l,s]of a){let i=s?GE(s):null;!i||t.has(i)||(t.add(i),o.push({name:l,value:i}))}}),o}import{jsx as Dh}from"react/jsx-runtime";function Qt({value:e,onChange:t,label:o,id:r,caption:n,ariaLabel:a}){return Dh(UE,{value:e,onChange:t,label:a??o,id:r,caption:n})}function UE({value:e,onChange:t,label:o,id:r,caption:n}){let{theme:a}=uo();return Dh(WE,{value:e,onChange:t,label:o,id:r,caption:n,theme:Bh(a)})}import{useEffect as zE,useState as KE}from"react";import{MarkBar as $E,markSelection as VE,useCaretEdit as qE}from"efficient-easel/copy";import{RevertIcon as YE}from"efficient-easel/icons";import{Fragment as Dl,jsx as Ke,jsxs as Ml}from"react/jsx-runtime";function XE({style:e}){let t=o=>Ke("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o});switch(e){case"bold":return t(Ke("path",{d:"M7 5h6.5a3.5 3.5 0 0 1 0 7H7zm0 7h7.5a3.5 3.5 0 0 1 0 7H7z"}));case"italic":return t(Ml(Dl,{children:[Ke("line",{x1:"10",y1:"5",x2:"19",y2:"5"}),Ke("line",{x1:"5",y1:"19",x2:"14",y2:"19"}),Ke("line",{x1:"14",y1:"5",x2:"10",y2:"19"})]}));case"strike":return t(Ml(Dl,{children:[Ke("path",{d:"M16.5 6.5A4.2 4.2 0 0 0 12.7 4.7C10 4.7 8.4 6 8.4 7.9c0 1.6 1.2 2.5 3.4 3.1"}),Ke("path",{d:"M7.6 17.4A4.4 4.4 0 0 0 11.7 19.3c2.8 0 4.5-1.4 4.5-3.4 0-1-.4-1.8-1.2-2.4"}),Ke("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}));case"highlight":return t(Ml(Dl,{children:[Ke("path",{d:"M14.5 4.5l5 5-8 8H6.5v-5z"}),Ke("line",{x1:"4",y1:"21",x2:"20",y2:"21"})]}));case"quiet":return t(Ml(Dl,{children:[Ke("path",{d:"M12 4.5l5.5 7.5L12 19.5 6.5 12z"}),Ke("line",{x1:"9.4",y1:"12",x2:"14.6",y2:"12"})]}));default:return null}}var jE=["bold","italic","strike","highlight"],JE=Object.fromEntries(jE.map(e=>[e,Ke(XE,{style:e},e)])),Mh="Clear formatting";function ZE(e,t,o){return VE(e,t,o,gx)}function QE(e){let[t,o]=KE(null);return zE(()=>{let r=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!r)return;let n=()=>{let a=e.current;if(!a||r.activeElement!==a)return;let l=a.selectionStart??a.value.length,s=a.selectionEnd??l;o(i=>i&&i.start===l&&i.end===s?i:{start:l,end:s})};return r.addEventListener("selectionchange",n),()=>r.removeEventListener("selectionchange",n)},[e]),[t,o]}function e_({target:e,value:t,onChange:o,disabled:r=!1,label:n="Formatting"}){let a=qE({target:e,onChange:o}),[l,s]=QE(e),i=d=>a(p=>{let x=ZE(t,d,p);return s({start:x.selectionStart,end:x.selectionEnd}),x}),c=mx(),f={};if(l)for(let d of c)f[d.style]=Ix(t,l.start,l.end,d.style);let u=jt(t);return Ke($E,{tools:c,onApply:i,pressed:f,disabled:r,glyphs:JE,ariaLabel:n,actions:Ke("button",{type:"button",className:"sf-markup-btn sf-markup-clear",onMouseDown:d=>d.preventDefault(),onClick:()=>o(u),disabled:r||u===t,title:Mh,"aria-label":Mh,children:Ke(YE,{size:14})})})}var ff=e_;import{jsx as o_}from"react/jsx-runtime";var t_="data-sf-no-control";function Hh(){return o_("span",{[t_]:"",hidden:!0})}var Gh="__noControl";function TK(e){return e?.[Gh]??null}function Hl(e,t){return{...e,[Gh]:t}}import{jsx as qo}from"react/jsx-runtime";function r_(e){return e==="mobile"?"mobile":"desktop"}var n_={desktop:null,tablet:"Tablet uses the desktop settings.",mobile:"Showing the phone settings for this section."},a_="data-sf-device-hidden";function Wh(){return qo("span",{hidden:!0,[a_]:""})}function l_({tier:e,render:t,...o}){let r=yc();return r_(r)===e?qo(t,{...o}):qo(Wh,{})}var Uh="__device";function df(e){return e?.[Uh]??null}function LK(e){return df(e)?.inner??e}function wt(e,t){let o=t.render,r=n=>qo(l_,{tier:e,render:o,...n});return{...t,[Uh]:{tier:e,inner:t},render:r}}function s_(){let e=n_[yc()];return e?qo("div",{className:"sf-device-scope",children:e}):qo(Wh,{})}function AK(){return Hl({type:"custom",render:()=>qo(s_,{})},"always")}function Hn(e){return`${e}Phone`}function Gl(e,t,o){return typeof e=="number"?e:typeof t=="number"?t:o}import{createContext as i_,useContext as c_}from"react";import{Fragment as d_,jsx as uf}from"react/jsx-runtime";var zh=i_(!1);function GK({children:e}){return uf(zh.Provider,{value:!0,children:e})}function f_(){return c_(zh)}function Kh({name:e,children:t}){return!f_()||!e||Sn(e)?uf(d_,{children:t}):uf(Hh,{})}var pf="Enter",u_="Escape",p_=/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)$/,m_=/(px|%)$/i;function x_(e,t,o,r){let n=e.trim().replace(/\s+/g,"").replace(m_,"");if(!p_.test(n))return null;let a=Number(n);if(!Number.isFinite(a))return null;let l=Math.min(o,Math.max(t,a));if(!(r>0))return l;let s=t+Math.round((l-t)/r)*r,i=Math.min(o,Math.max(t,s));return Number(i.toFixed(4))}function mf(e,t,o,r,n){return e===pf?{handled:!0,editing:!1,commit:x_(t,o,r,n)}:e===u_?{handled:!0,editing:!1,commit:null}:{handled:!1,editing:!0,commit:null}}import{useRef as Vh,useState as h_}from"react";import{ChevronIcon as g_}from"efficient-easel/icons";import{jsx as Gt,jsxs as $h}from"react/jsx-runtime";function xf({styleKey:e,label:t,icon:o,value:r,sampleStyle:n,open:a,onToggle:l,saved:s=!1,children:i}){return $h("div",{"data-sf-style-row":e,className:`sf-style-row${a?" is-open":""}`,children:[$h("button",{type:"button",className:"sf-style-head","aria-expanded":a,onClick:l,children:[Gt("span",{className:"sf-style-caret","aria-hidden":"true",children:Gt(g_,{size:13})}),o?Gt("span",{className:"es-field-icon",children:o}):null,Gt("span",{className:"sf-style-name",children:t}),r!=null?Gt("span",{className:"sf-style-sample",style:n,title:typeof r=="string"?r:void 0,children:r}):null,Gt("span",{className:`sf-style-slot${s?" is-saved":""}`,children:Gt(I_,{})})]}),a&&Gt("div",{className:"sf-style-body",children:i})]})}function I_(){return Gt("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:Gt("polyline",{points:"20 6 9 17 4 12"})})}import{Fragment as b_,jsx as Wt,jsxs as gf}from"react/jsx-runtime";function If({label:e,value:t,onChange:o,image:r}){let[n,a]=h_(!1),l=Vh(null),s=Vh(!1),{x:i,y:c}=Yc(t),f=(g,I)=>{let h=l.current?.getBoundingClientRect();if(!h)return;let C=uh(h,g,I);o(Br(C.x,C.y))},u=g=>{let I=dh(t,g.key,g.shiftKey);I!==null&&(g.preventDefault(),o(I))},d=g=>{g.currentTarget.setPointerCapture?.(g.pointerId),s.current=!0,f(g.clientX,g.clientY)},p=g=>{s.current&&f(g.clientX,g.clientY)},x=()=>{s.current=!1};return Wt(xf,{styleKey:"imageFocal",label:e,value:t,sampleStyle:{fontSize:11,fontVariantNumeric:"tabular-nums"},open:n,onToggle:()=>a(g=>!g),children:n?Wt("div",{className:"sf-focus","data-sf-focusing":"",children:r?gf(b_,{children:[Wt("button",{type:"button",className:"sf-focus-canvas","aria-label":`${e}: ${t}. Use the arrow keys to move the point.`,onKeyDown:u,onPointerDown:d,onPointerMove:p,onPointerUp:x,onPointerCancel:x,onLostPointerCapture:x,children:gf("span",{className:"sf-focus-pane",ref:l,children:[Wt("img",{className:"sf-focus-img",src:r,alt:"",draggable:!1}),Wt("span",{className:"sf-focus-cross sf-focus-cross--h",style:{top:`${c}%`}}),Wt("span",{className:"sf-focus-cross sf-focus-cross--v",style:{left:`${i}%`}}),Wt("span",{className:"sf-focus-marker",style:{left:`${i}%`,top:`${c}%`}})]})}),gf("div",{className:"sf-focus-bar",children:[Wt("span",{className:"sf-focus-hint",children:"Press the picture, or nudge the point with the arrow keys."}),Wt("button",{type:"button",className:"sf-image-btn",onClick:()=>a(!1),children:"Done"})]})]}):Wt("p",{className:"sf-field-hint",children:"Choose a background image first \u2014 there\u2019s nothing to focus yet."})}):null})}import{SettingsField as Xh}from"efficient-easel/panel";import{ImageIcon as jh,PlayIcon as Jh}from"efficient-easel/icons";import{ImageBox as y_}from"efficient-easel/pick";import{useContext as S_,useState as Zh}from"react";import{FileIntakeAlert as C_,useFileIntake as P_}from"efficient-shell/file-intake";var qh={"PATCH /api/activity/note-media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/activity/notes/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/auth/entities/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_on_dark:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_square:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/auth/me/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PATCH /api/auth/users/{id}/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PATCH /api/bug-reports/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"PATCH /api/employee-documents/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issue-files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/carton-groups/{group_id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/pallets/{pallet_id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/update_status/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/platform/brand-catalog/brands/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/products/brands/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/products/design-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/products/dfm-log-files/{id}/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"PATCH /api/products/moulds/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/products/project-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/products/proposals/{id}/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"PATCH /api/products/weight-logs/{id}/":{image:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"},photo:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/purchase-invoices/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/purchase-orders/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/qc-reports/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/recruitment/candidates/{id}/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"PATCH /api/reimbursements/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/rnd/images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/sales-claims/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/storefront/header-settings/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/storefront/sites/{id}/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/activity/note-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/activity/notes/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/auth/entities/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_on_dark:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_square:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/auth/users/{id}/reset-password/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"POST /api/bank-statements/{id}/import_csv/":{file:{accept:".csv,text/csv,text/plain,application/vnd.ms-excel",hint:"CSV",max_bytes:5242880,max_files:1,policy:"csv_import"}},"POST /api/bank-statements/{id}/preview_csv/":{file:{accept:".csv,text/csv,text/plain,application/vnd.ms-excel",hint:"CSV",max_bytes:5242880,max_files:1,policy:"csv_import"}},"POST /api/bug-reports/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"POST /api/bug-reports/{id}/bookmark/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"POST /api/bug-reports/{id}/thread/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"POST /api/careers/assessments/{token}/snapshots/":{image:{accept:"image/*",max_bytes:409600,max_files:1,policy:"proctoring_snapshot"}},"POST /api/careers/jobs/{slug}/apply/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/chat/conversations/{id}/thread/":{files:{accept:"*",max_bytes:26214400,max_files:10,policy:"chat_files"}},"POST /api/chat/public/conversations/{id}/thread/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"chat_image",reencoded_image:!0}},"POST /api/customer-portal/conversations/{id}/thread/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"chat_image",reencoded_image:!0}},"POST /api/customer-portal/warranty-claim-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/dealer-portal/wheel-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/employee-documents/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issue-files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/bulk_update_status/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/actual_packing/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/carton-groups/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/generate-label/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/pallets/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/refresh-tracking/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/regenerate-label/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/regenerate_invoice/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/update_loaded/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/platform/brand-catalog/brands/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/assign-owner/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/publish/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/resync/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/unpublish/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/feedback/reports/{id}/thread/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"}},"POST /api/products/brands/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/products/brands/{id}/generate-box-pns/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/products/design-images/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/products/dfm-log-files/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"POST /api/products/moulds/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/products/project-images/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/products/proposals/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"POST /api/products/proposals/{id}/approve-project/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"POST /api/products/weight-logs/":{image:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"},photo:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/purchase-invoices/capture/":{file:{accept:"application/pdf,image/jpeg,image/png",hint:"PDF \xB7 JPG \xB7 PNG",max_bytes:15728640,max_files:1,policy:"bill_capture"}},"POST /api/purchase-invoices/files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/purchase-orders/files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/qc-reports/media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/recruitment/candidates/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/analyze-cv/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/hire/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/move-stage/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/reinstate/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/reject/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/withdraw/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/reimbursements/files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/rnd/images/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/rnd/{id}/upload_image/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/sales-claims/media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/sales/contacts/import-csv/":{file:{accept:".csv,text/csv,text/plain,application/vnd.ms-excel",hint:"CSV",max_bytes:5242880,max_files:1,policy:"csv_import"}},"POST /api/sales/contacts/{id}/avatar/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"POST /api/shop-portal/return-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/storefront/media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 SVG \xB7 WEBP \xB7 MP4",max_bytes:268435456,max_files:1,policy:"storefront_media"}},"POST /api/storefront/media/ingest/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 SVG \xB7 WEBP \xB7 MP4",max_bytes:268435456,max_files:1,policy:"storefront_media"}},"POST /api/storefront/sites/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/storefront/sites/{id}/address/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/storefront/sites/{id}/duplicate/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/supplier-portal/dfm-log-files/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"POST /api/utility/mail/send/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"mail_attachments"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"mail_attachments"}},"PUT /api/activity/note-media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/activity/notes/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/auth/entities/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_on_dark:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_square:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PUT /api/auth/me/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PUT /api/auth/users/{id}/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PUT /api/bug-reports/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"PUT /api/employee-documents/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/goods-issue-files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/goods-issues/{id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/products/brands/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PUT /api/products/design-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/products/dfm-log-files/{id}/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"PUT /api/products/moulds/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/products/project-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/products/proposals/{id}/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"PUT /api/products/weight-logs/{id}/":{image:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"},photo:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/purchase-invoices/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/purchase-orders/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/qc-reports/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/recruitment/candidates/{id}/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"PUT /api/reimbursements/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/rnd/images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/sales-claims/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/storefront/header-settings/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PUT /api/storefront/sites/{id}/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"PUT /api/storefront/sites/{id}/countries/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"PUT /api/storefront/sites/{id}/currencies/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"PUT /api/storefront/sites/{id}/part-prices/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}}};function Yh(e,t){let o=qh[e][t];return{maxSizeBytes:o.max_bytes,maxFiles:o.max_files,accept:o.accept==="*"||o.accept==="*/*"?void 0:o.accept,acceptHint:o.hint}}import{jsx as vt,jsxs as Qh}from"react/jsx-runtime";var k_=Yh("POST /api/storefront/media/","file");function hf({value:e,onChange:t,label:o,accept:r,placeholder:n}){let a=fo(),[l,s]=Zh(!1),[i,c]=Zh(null),f=r.startsWith("video"),u=S_(Po),d=P_({accept:r,maxSizeBytes:k_.maxSizeBytes,acceptHint:f?"videos only":"images only",multiple:!1,disabled:l,onAccept:([x])=>{c(null),s(!0),Us(a,{accept:r,title:o,file:x}).then(g=>{g&&t(g.url)}).catch(()=>c("Couldn\u2019t open the media picker \u2014 please try again.")).finally(()=>s(!1))}}),p=()=>(d.clearRejections(),c(null),Us(a,{accept:r,title:o}).then(x=>x?.url??null));return u&&!u.capabilities.mediaEditing?vt(Xh,{label:o,icon:f?vt(Jh,{}):vt(jh,{}),children:Qh("div",{className:"sf-image-slot-inert",children:["Templates don\u2019t store ",f?"videos":"images"," \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."]})}):Qh("div",{children:[vt(Xh,{label:o,icon:f?vt(Jh,{}):vt(jh,{}),children:vt("div",{className:`sf-image-drop${d.dragOver?" is-dragover":""}`,...d.zoneProps,children:vt(y_,{value:e,onChange:t,label:o,kind:f?"video":"image",placeholder:n,openLibrary:l?void 0:p})})}),l&&vt("div",{className:"sf-image-status",role:"status",children:"Opening the picker\u2026"}),i&&vt("div",{className:"sf-image-status sf-image-status--error",role:"alert",children:i}),vt(C_,{rejections:d.rejections,className:"sf-image-status sf-image-status--error"})]})}import{useEffect as w_,useId as v_,useRef as eb,useState as T_}from"react";import{jsx as Yo,jsxs as bf}from"react/jsx-runtime";function yf({label:e,options:t,value:o,onChange:r,emptyLabel:n="None"}){let[a,l]=T_(!1),s=eb(null),i=eb(null),c=v_(),f=Array.isArray(o)?o:[];w_(()=>{if(!a)return;let p=x=>{s.current&&!s.current.contains(x.target)&&l(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[a]);let u=(p,x)=>{let g=t.map(I=>I.value).filter(I=>I===p?x:f.includes(I));r(g)},d=t.filter(p=>f.includes(p.value)).map(p=>p.label).join(", ");return bf("div",{className:"sf-field sf-multi",ref:s,children:[Yo("div",{className:"sf-field-label",id:`${c}-label`,children:e}),bf("button",{ref:i,type:"button",className:"sf-multi-btn","aria-expanded":a,"aria-controls":c,"aria-labelledby":`${c}-label ${c}-value`,onClick:()=>l(p=>!p),onKeyDown:p=>{p.key==="Escape"&&a&&(p.preventDefault(),l(!1))},children:[Yo("span",{id:`${c}-value`,className:`sf-multi-value${d?"":" is-empty"}`,children:d||n}),Yo("span",{className:"sf-multi-caret","aria-hidden":"true",children:"\u25BE"})]}),a&&Yo("div",{className:"sf-multi-menu",id:c,role:"group","aria-labelledby":`${c}-label`,onKeyDown:p=>{p.key==="Escape"&&(p.preventDefault(),l(!1),i.current?.focus())},children:t.map(p=>bf("label",{className:"sf-multi-option",children:[Yo("input",{type:"checkbox",checked:f.includes(p.value),onChange:x=>u(p.value,x.target.checked)}),Yo("span",{children:p.label}),p.note?Yo("span",{className:"sf-note","aria-hidden":"true",children:p.note}):null]},p.value))})]})}import{useCallback as Y_,useContext as X_,useEffect as j_,useId as fb,useRef as ib,useState as cb}from"react";import{ThemeIcon as J_}from"efficient-easel/icons";import{SettingsField as Z_}from"efficient-easel/panel";import{SettingsField as Pf,SettingsGroupSub as O_}from"efficient-easel/panel";import{SettingsField as R_}from"efficient-easel/panel";import{AccentIcon as F_}from"efficient-easel/icons";import{jsx as Xo,jsxs as tb}from"react/jsx-runtime";function Sf(e){return no(e).background}function E_(e){let t=ao(e.accent,Sf(e));return t===null?null:{ratio:t,grade:nr(t)}}function __(e){let t=Sf(e),o=ao(e.accent,t);return o===null?[]:Bd(e.accent).filter(r=>{let n=ao(r,t);return n!==null&&n>o&&nr(n)==="good"})}var L_={good:"Easy to read","large-only":rr["large-only"],hard:rr.hard};function Cf({value:e,onChange:t}){let o=E_(e),r=o?.grade,n=o&&o.grade!=="good"?__(e):[];return Xo(R_,{label:"Main color",icon:Xo(F_,{}),hint:o?L_[o.grade]:void 0,action:Xo(Qt,{value:e.accent,onChange:a=>t({...e,accent:a}),label:"Main color"}),children:n.length>0?Xo("div",{className:"w-full min-w-0",children:tb("div",{className:"sf-readability",children:[Xo("p",{className:"sf-readability-advice",children:A_(r,!0)}),Xo("div",{className:"sf-readability-suggestions",children:n.map(a=>{let l=ao(a,Sf(e));return tb("button",{type:"button",className:"sf-readability-suggestion",onClick:()=>t({...e,accent:a}),title:`Use ${a.toUpperCase()}`,children:[Xo("span",{className:"sf-readability-chip",style:{background:a},"aria-hidden":!0}),l?`${l.toFixed(1)}:1`:a.toUpperCase()]},a)})})]})}):null})}function A_(e,t){return e?e==="good"?"This color reads clearly on your pages.":t?"This color is hard to read on this theme's page. The buttons below are the same hue, darkened.":"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.":"Pick a color to see how it reads."}import{ButtonIcon as N_,GroundIcon as B_,LayoutIcon as D_,SquareIcon as M_,TextSmallIcon as H_,TypeIcon as ob}from"efficient-easel/icons";import{Fragment as K_,jsx as U,jsxs as vo}from"react/jsx-runtime";var Gn=e=>`Theme ${e+1}`;function rb({colors:e}){let t=no(e),o=ds(e)??t.accent;return vo("span",{className:"sf-theme-page",style:{background:t.background,color:t.text},"aria-hidden":!0,children:[U("span",{className:"sf-theme-eyebrow",style:{color:t.muted},children:"label"}),vo("span",{className:"sf-theme-headline",children:["Heading ",U("span",{style:{color:t.accent},children:"accent"})]}),U("span",{className:"sf-theme-body",children:"body text"}),vo("span",{className:"sf-theme-row",children:[U("span",{className:"sf-theme-btn",style:{background:o,color:us(e,t.accent)},children:"button"}),U("span",{className:"sf-theme-mini",style:{background:t.surface,borderColor:t.line},children:"card"})]})]})}var kf={"Text color":U(ob,{}),"Label color":U(H_,{}),Background:U(B_,{}),"Panels & cards":U(D_,{}),Borders:U(M_,{}),"Button color":U(N_,{}),"Button text color":U(ob,{})};function G_({label:e,colorKey:t,value:o,onChange:r,idPrefix:n="sf-theme-ink"}){let a=`${n}-${t}`;return U(Pf,{label:e,icon:kf[e],htmlFor:a,action:U(Qt,{id:a,label:e,value:o,onChange:l=>r(t,l)})})}function W_({value:e,accent:t,onChange:o,idPrefix:r="sf-theme-ink"}){let n=`${r}-button`,a=/^#[0-9a-fA-F]{6}$/.test(e??""),l=a?e:t;return U(Pf,{label:"Button color",icon:kf["Button color"],htmlFor:n,action:U(Qt,{id:n,label:"Button color",value:l,caption:a?l:"Main",onChange:o})})}function U_({colors:e,accent:t,onChange:o,idPrefix:r="sf-theme-ink"}){let n=`${r}-button-ink`,a=Dd(e),l=us(e,t),s=ds(e)??t,i=nr(ao(l,s)??0);return U(Pf,{label:"Button text color",icon:kf["Button text color"],hint:a&&i!=="good"?`${rr[i]} on the button`:void 0,htmlFor:n,action:U(Qt,{id:n,label:"Button text color",value:l,caption:a?l:"Auto",onChange:o})})}var z_=[{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 wf({colors:e,onChange:t,idPrefix:o}){let r=no(e);return U(K_,{children:z_.map(n=>"colour"in n?U(Cf,{value:e,onChange:t},"colour"):"group"in n?U(O_,{title:n.group},n.group):"button"in n?U(W_,{value:e.button,accent:r.accent,onChange:a=>t({...e,button:a}),idPrefix:o},"button"):"buttonInk"in n?U(U_,{colors:e,accent:r.accent,onChange:a=>t({...e,buttonInk:a}),idPrefix:o},"buttonInk"):U(G_,{label:n.label,colorKey:n.key,value:r[n.key],onChange:(a,l)=>t({...e,[a]:l}),idPrefix:o},n.key))})}function nb({index:e,colors:t,selected:o,role:r="radio",open:n,editable:a=!0,onPick:l,onEdit:s,onChangeColors:i}){let c=no(t),f=Gn(e),u=e<fs.length&&!t.brandInk?fs[e]:null,d=nr(ao(c.text,c.background)??0),p=u?JSON.stringify(t)!==JSON.stringify(u):!1,x=n!==void 0;return vo("div",{className:`sf-theme-card${o?" is-selected":""}`,children:[U("button",{type:"button",role:r,"aria-checked":r==="radio"?o:void 0,"aria-selected":r==="option"?o:void 0,"aria-label":f,className:"sf-theme-pick",onClick:l,children:U(rb,{colors:t})}),vo("div",{className:"sf-theme-foot",children:[U("span",{className:"sf-theme-name",children:f}),d!=="good"&&U("span",{className:"sf-theme-warn",children:rr[d]}),a&&s&&U("button",{type:"button",className:`sf-theme-edit${n?" is-open":""}`,"aria-expanded":x?n:void 0,"aria-controls":x?`sf-theme-colours-${e}`:void 0,"aria-label":`${n?"Done":"Edit"} ${f}`,onClick:s,children:n?"Done":"Edit"})]}),n&&vo("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[U(wf,{colors:t,onChange:g=>i?.(g)}),u&&U("button",{type:"button",className:"sf-theme-reset",disabled:!p,onClick:()=>i?.({...u}),children:p?`Reset ${f} to the preset`:"Not changed"})]})]})}function ab({colors:e,name:t,nameId:o,open:r,menuId:n,labelId:a,buttonRef:l,onClick:s,onKeyDown:i,onEdit:c}){return vo("div",{className:"sf-secttheme-btn",children:[U("button",{ref:l,type:"button",className:"sf-theme-pick","aria-expanded":r,"aria-controls":n,"aria-labelledby":`${a} ${o}`,onClick:s,onKeyDown:i,children:e?U(rb,{colors:e}):U("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),vo("div",{className:"sf-theme-foot",children:[U("span",{id:o,className:"sf-theme-name",children:t}),c&&U("button",{type:"button",className:"sf-theme-edit","aria-label":`Edit ${t}`,onClick:c,children:"Edit"}),U("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:s,children:U("span",{className:"sf-multi-caret",children:"\u25BE"})})]})]})}import{useCallback as vf,useEffect as $_,useRef as Wl}from"react";function lb(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function V_(e,t=oe.updateThemeSettings){let{themeFromDocument:o,token:r,siteId:n,patch:a}=e,l=lb({themeFromDocument:o,token:r});if(l)return l;if(Object.keys(a).length===0)return{status:"skipped",reason:"empty"};try{return await t(a,r,n??void 0),{status:"saved"}}catch(s){return{status:"failed",error:s}}}function sb({themeFromDocument:e,tokenRef:t,siteId:o,onResult:r}){let n=Wl(null),a=Wl({}),l=Wl(r);l.current=r;let s=Wl(null),i=vf(u=>{if(u.status==="skipped"){let d=`skipped:${u.reason}`;if(s.current===d)return;s.current=d}else s.current=null;l.current?.(u)},[]),c=vf(async()=>{n.current&&(clearTimeout(n.current),n.current=null);let u=a.current;a.current={};let d=await V_({themeFromDocument:e,token:t?.current,siteId:o,patch:u});return i(d),d},[e,t,o,i]),f=vf((u,d=!1)=>{let p=lb({themeFromDocument:e,token:t?.current});if(p){i(p);return}a.current={...a.current,...u},n.current&&clearTimeout(n.current),d?c():n.current=setTimeout(()=>{c()},500)},[e,t,c,i]);return $_(()=>()=>{c()},[c]),{persist:f,flush:c}}import{Fragment as nL,jsx as Re,jsxs as jo}from"react/jsx-runtime";var Q_="Follow the page",G8="Follow the slideshow",eL=e=>`Editing ${e} changes it everywhere.`;function tL({colors:e}){if(!e)return Re("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let t=no(e);return jo("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[Re("i",{style:{background:t.background}}),Re("i",{className:"sf-secttheme-chip-accent",style:{background:t.accent}})]})}function oL({themes:e,value:t,onPick:o,onEdit:r,menuId:n,followLabel:a}){return jo("div",{className:"sf-multi-menu sf-secttheme-menu",id:n,role:"listbox",children:[a!==void 0&&jo(nL,{children:[jo("button",{type:"button",role:"option","aria-selected":t===null,className:`sf-secttheme-item${t===null?" is-active":""}`,onClick:()=>o(-1),children:[Re(tL,{}),Re("span",{className:"sf-secttheme-name",children:a})]}),Re("div",{className:"sf-secttheme-sep",role:"presentation"})]}),t!==null&&e[t]&&Re("p",{className:"sf-secttheme-oncard",role:"presentation",children:`${Gn(t)} is on this section`}),e.map((l,s)=>s===t?null:Re(nb,{role:"option",index:s,colors:l,selected:!1,onPick:()=>o(s),onEdit:()=>r(s)},s))]})}function rL({index:e,colors:t,onChange:o,onDone:r}){let n=Gn(e),a=fb();return jo("div",{className:"sf-secttheme-sheet",children:[jo("div",{className:"sf-secttheme-sheet-head",children:[Re("span",{children:n}),Re("button",{type:"button",className:"sf-secttheme-done",onClick:r,children:"Done"})]}),Re("div",{className:"sf-secttheme-rows",children:Re(wf,{colors:t,onChange:o,idPrefix:a})}),Re("p",{className:"sf-secttheme-warn",children:eL(n)})]})}function Tf({value:e,onChange:t,followLabel:o}){let{theme:r,setTheme:n}=uo(),a=Qr(r),l=X_(Po),s=l?.tokenRef,i=l?.siteId??null,c=!l?.capabilities?.hasSiteTheme,{persist:f,flush:u}=sb({themeFromDocument:c,tokenRef:s,siteId:i}),d=Qr(a),p=d.themes,x=Ud(e),g=x!==null?p[x]:void 0,I=g??(p.length?Nd(d):void 0),[h,C]=cb(!1),[S,P]=cb(null),T=ib(null),b=ib(null),w=fb(),O=Y_(()=>{C(!1),P(null)},[]);j_(()=>{if(!h&&S===null)return;let _=G=>{T.current&&!T.current.contains(G.target)&&(u(),O())};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[h,S,O,u]);let D=_=>{t(_),O()},R=_=>{if(S===null)return;let G=p.map((M,v)=>v===S?_:M),Y={...d,themes:G};n(Y),f({selected_preset:Y.selected,theme_presets:Y.themes})};return jo("div",{className:"sf-secttheme",ref:T,children:[Re(Z_,{label:"Theme",icon:Re(J_,{}),labelId:`${w}-label`,children:Re(ab,{colors:I,onEdit:x!==null?()=>{P(x),C(!1)}:void 0,name:g?Gn(x):o??Q_,nameId:`${w}-value`,labelId:`${w}-label`,open:h,menuId:w,buttonRef:b,onClick:()=>{P(null),C(_=>!_)},onKeyDown:_=>{_.key==="Escape"&&(h||S!==null)&&(_.preventDefault(),O())}})}),h&&S===null&&Re("div",{onKeyDown:_=>{_.key==="Escape"&&(_.preventDefault(),O(),b.current?.focus())},children:Re(oL,{themes:p,value:x,onPick:D,onEdit:_=>{P(_),C(!1)},menuId:w,followLabel:o})}),S!==null&&p[S]&&Re(rL,{index:S,colors:p[S],onChange:R,onDone:()=>{u(),O(),b.current?.focus()}})]})}import{SettingsField as dL}from"efficient-easel/panel";import{LinkIcon as uL}from"efficient-easel/icons";import{useEffect as hb,useRef as pL,useState as zl}from"react";var Rf=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"custom",label:"Custom URL"}];function Ff(e){return e.offersCommerce&&e.offersService?Rf:Rf.filter(t=>!t.needs||(t.needs==="commerce"?e.offersCommerce:e.offersService))}function Jo(e){return e===dt?"/":`/${e}`}function Ef(e){return`/journal/${e}`}function _f(e){return`/wheels/${e}`}function Ul(e,t){return`${Jo(e)}#${t}`}function db(e){return Sa(e)}function aL(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function Lf(...e){let t=new Set,o=[];for(let r of e)for(let n of r?.content??[]){let a=aL(n?.props?.anchor);if(!a)continue;let l=db(a);!l||t.has(l)||(t.add(l),o.push({slug:l,name:a}))}return o}var ub="/wheels";var Y8=[bo,...Object.entries(yt).filter(([e])=>e!=="tyreSizes").map(([,e])=>e)];function Q8(){return ub}function lL(e){return(e.layout?.content??[]).some(o=>o?.type===zo)}function pb(e){return e.filter(lL).map(t=>Jo(t.slug))}function Af(e){let t=e.indexOf("#"),o=t===-1?"":e.slice(t),r=t===-1?e:e.slice(0,t),n=r.indexOf("?");return{path:n===-1?r:r.slice(0,n),params:new URLSearchParams(n===-1?"":r.slice(n+1)),hash:o}}function mb(e){return Af(e).path}function xb(e){return Af(e).params.get(bo)||null}function gb(e,t){let{path:o,params:r,hash:n}=Af(e);t?r.set(bo,t):r.delete(bo);let a=r.toString();return`${o}${a?`?${a}`:""}${n}`}function Ib(e,t){if(!e)return"page";if(e.startsWith("/journal/"))return"blog";if(e.startsWith("/wheels/"))return"product";if(e.includes("#")){let o=e.slice(0,e.indexOf("#"));if(o===""||o==="/"||t.includes(o))return"anchor"}return e==="/"||t.includes(e)?"page":"custom"}import{SettingsField as sL}from"efficient-easel/panel";import{CategoryIcon as iL}from"efficient-easel/icons";import{Fragment as cL,jsx as Wr,jsxs as fL}from"react/jsx-runtime";function Of({value:e,onChange:t}){let o=xb(e),r=o&&!ho.some(n=>n===o)?o:null;return Wr(sL,{label:"Product type",icon:Wr(iL,{}),hint:Wr(cL,{children:"The same page can sit in the menu more than once, each entry opening it on a different type."}),children:fL("select",{value:o??"",onChange:n=>t(gb(e,n.target.value||null)),"aria-label":"Product type this link opens the listing on",children:[Wr("option",{value:"",children:Lm}),ho.map(n=>Wr("option",{value:n,children:Do[n]},n)),r&&Wr("option",{value:r,children:`${r} (unavailable)`})]})})}import{jsx as gt,jsxs as Kl}from"react/jsx-runtime";function bb(e){let t=new Map;return(o="")=>{let r=dr(),n=t.get(o);if(!n||n.token===null&&r!==null){let a=r?e(r,o).catch(()=>[]):Promise.resolve([]);return t.set(o,{promise:a,token:r}),a}return n.promise}}var mL=bb((e,t)=>oe.listPages(e,t||void 0)),xL=bb((e,t)=>oe.listBlogPosts(e,{visibleOnly:!0,siteId:t||void 0}));function Nf(e,t){return e&&!t.some(o=>o.value===e)?[{value:e,label:`${e} (unavailable)`},...t]:t}function Bf({value:e,onChange:t,label:o="Link"}){let r=typeof e=="string"?e:"",{siteId:n,capabilities:a}=eI(),{offersCommerce:l,offersService:s}=a,i=Ff({offersCommerce:l,offersService:s}),[c,f]=zl([]),[u,d]=zl([]),[p,x]=zl([]),[g,I]=zl(null),h=pL(!0);hb(()=>(h.current=!0,()=>{h.current=!1}),[]),hb(()=>{let v=!0;return mL(n??void 0).then(j=>v&&h.current&&f(j)),s&&xL(n??void 0).then(j=>v&&h.current&&d(j)),l&&No().then(j=>v&&h.current&&x(j)),()=>{v=!1}},[n,l,s]);let C=c.map(v=>Jo(v.slug)),S=g??Ib(r,C),P=i.some(v=>v.value===S)?S:"custom",T=l&&P==="page"&&pb(c).includes(mb(r)),b=v=>{I(v),v!=="custom"&&t("")},w=c.filter(v=>!on(v.slug)),O=Nf(r,w.map(v=>({value:Jo(v.slug),label:rn(v)}))),D=Nf(r,u.map(v=>({value:Ef(v.slug),label:v.title||v.slug}))),R=Nf(r,p.map(v=>({value:_f(v.slug),label:v.name}))),_=(v,j)=>Kl("select",{value:r,onChange:F=>t(F.target.value),children:[gt("option",{value:"",children:j}),v.map((F,E)=>gt("option",{value:F.value,children:F.label},`${F.value}:${E}`))]}),G=w.map(v=>({page:v,anchors:Lf(v.layout)})).filter(v=>v.anchors.length>0),Y=G.flatMap(v=>v.anchors.map(j=>Ul(v.page.slug,j.slug))),M=Kl("select",{value:r,onChange:v=>t(v.target.value),children:[gt("option",{value:"",children:G.length?"Select a section\u2026":"No section anchors yet"}),r&&!Y.includes(r)&>("option",{value:r,children:`${r} (unavailable)`}),G.map(v=>gt("optgroup",{label:rn(v.page),children:v.anchors.map(j=>{let F=Ul(v.page.slug,j.slug);return gt("option",{value:F,children:j.name},F)})},v.page.id))]});return Kl("div",{children:[gt(dL,{label:o,icon:gt(uL,{}),children:Kl("div",{className:"sf-linkstack",children:[gt("select",{"aria-label":"Link type",value:P,onChange:v=>b(v.target.value),children:i.map(v=>gt("option",{value:v.value,children:v.label},v.value))}),P==="page"&&_(O,"Select a page\u2026"),P==="anchor"&&M,P==="blog"&&_(D,"Select a blog post\u2026"),P==="product"&&_(R,"Select a product\u2026"),P==="custom"&>("input",{type:"text",value:r,placeholder:"Link (e.g. /wheels or https://\u2026)",onChange:v=>t(v.target.value)})]})}),T&>(Of,{value:r,onChange:t})]})}var Tt={min:10,max:200,step:10};function yb(e,t){let o=typeof e=="number"?e:void 0,r=typeof t=="number"?t:void 0;if(!(o===void 0&&r===void 0))return{paddingTop:o,paddingBottom:r}}var gL="sf-pad-top-phone",IL="sf-pad-bottom-phone",hL="--sf-pad-t-phone",bL="--sf-pad-b-phone",yL="sf-pad-left-phone",SL="sf-pad-right-phone",CL="--sf-pad-l-phone",PL="--sf-pad-r-phone";function S$(e,t,o,r,n,a,l,s){let i=yb(e,t)??{},c={},f=["sf-section-pad"];typeof o=="number"&&(f.push(gL),c[hL]=`${o}px`),typeof r=="number"&&(f.push(IL),c[bL]=`${r}px`);let u={};return typeof n=="number"&&(u.paddingLeft=n),typeof a=="number"&&(u.paddingRight=a),typeof l=="number"&&(f.push(yL),c[CL]=`${l}px`),typeof s=="number"&&(f.push(SL),c[PL]=`${s}px`),f.length===1&&yb(e,t)===void 0&&!Object.keys(u).length?null:{className:f.join(" "),style:{...i,...u,...c}}}var Sb=e=>typeof e=="number"?e:void 0;function Cb(e,t,o){let r=Sb(e)??o,n=Sb(t);return r===void 0?n:n===void 0?r:r+n}function C$(e,t={}){return{top:Cb(e.padTop,e.sectionPaddingTop,t.top),bottom:Cb(e.padBottom,e.sectionPaddingBottom,t.bottom)}}var kL=["auto","fixed","screen"],wL=["px","%"];var vL="var(--sf-header-h, 88px)",Df={min:40,max:2e3,step:10,fallback:600},Mf={min:10,max:200,step:5,fallback:100},TL="sf-section-minh",Pb={base:"--sf-section-minh",small:"--sf-section-minh-s"},wb=e=>typeof e=="string"&&kL.includes(e),RL=e=>typeof e=="string"&&wL.includes(e);function $l(e){let t=wb(e.sectionHeightMode)?e.sectionHeightMode:"auto",o=t==="screen"?"%":RL(e.sectionHeightUnit)?e.sectionHeightUnit:"px",r=t==="screen"?Mf.fallback:Df.fallback,n=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:r;return{mode:t,value:n,unit:o}}function vb(e){let{mode:t,value:o,unit:r}=$l(e);if(t==="auto")return;if(t==="fixed"&&r==="px")return[`${o}px`,null];let n=o/100,a=l=>t==="screen"?`(100${l} - ${vL})`:`100${l}`;return[`calc(${a("vh")} * ${n})`,`calc(${a("svh")} * ${n})`]}function FL(e){let t=vb(e);if(!t)return;let[o,r]=t;return{display:"grid",[Pb.base]:o,...r?{[Pb.small]:r}:{}}}var k$=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),Ur="Height",EL="sf-section-minh-phone",kb={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function Hf(e){return wb(e.sectionHeightModePhone)}function w$(e){return $l({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function _L(e){let t=FL(e),o=Hf(e)?vb({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone}):void 0;if(!t&&!o)return null;let r=[TL],n={...t??{}};return o&&(r.push(EL),n[kb.base]=o[0],o[1]&&(n[kb.small]=o[1])),{className:r.join(" "),style:n}}function v$(e){return _L(e)!==null}var R$=["desktop","tablet","mobile"],zr={desktop:"Desktop",tablet:"Tablet",mobile:"Mobile"},LL=720,AL=1100;function F$(e){return e>=AL?"desktop":e>=LL?"tablet":"mobile"}var OL=["column","row","tabs"],Tb="Direction",NL={column:"Stacked",row:"One row",tabs:"Tabs"},Rb={Flex:OL,HeroGroup:["column","row"]},BL={Flex:"row",HeroGroup:"column"},DL={column:"flex-col",row:"flex-row",tabs:"flex-col"};function Vl(e,t){return Rb[e].includes(t)?t:BL[e]}function _$(e,t){return DL[Vl(e,t)]}function Fb(e){return Rb[e].map(t=>({label:NL[t],value:t}))}var Gf=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],Lb=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Stretch",value:"stretch"}],Ab="Wrap",Wf=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],Eb={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},_b={start:"items-start",center:"items-center",stretch:"items-stretch"};function A$(e,t){let o=typeof e=="string"&&e in Eb?Eb[e]:"",r=typeof t=="string"&&t in _b?_b[t]:"";return[o,r].filter(Boolean).join(" ")}function O$(e){return e===!0||e==="wrap"?"flex-wrap":""}var Uf="Block widths",ql=[{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]}],Wn="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",ML={equal:Wn,bigLeft:`${Wn} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${Wn} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${Wn} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${Wn} [&>*:last-child]:min-[800px]:grow-[3]`};function N$(e){return typeof e=="string"?ML[e]??"":""}var Ob="Columns on phone",zf=1,Nb=3,HL={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 B$(e){let t=Number(e);return HL[t]??"max-[800px]:flex-col"}var Bb="Block spacing",Kf=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],GL="sf-box-gap-only";function D$(e){return e==="gap"?GL:""}var Db=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],Mb={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Yl="var(--section-bg)",Xl="inherit";function H$(e,t){return e===Xl?Yl:e===void 0?t:e}function Hb(e,t){return e===Xl?!0:e===void 0&&t===Yl}var Gb="inherit",jl="fixed",Wb=e=>typeof e!="number"&&e!==jl,WL="var(--sf-heading-max, 9999px)";function W$(e,t,o,r){if(typeof e=="number")return`${e}px`;if(e===jl)return t;let n=r?`var(--size-${r}, ${t})`:t;return o==="heading"?`min(${n}, ${WL})`:n}var UL=["contained","page","full"],Ub=["full","page"],zb={full:"Full width",page:"Content width"},$f="inherit",zL=e=>typeof e=="string"&&UL.includes(e),KL=e=>e===$f;function Vf(e,t){let o=typeof e.pageWidth=="number"?e.pageWidth:Qn.default;return KL(e.widthMode)?{mode:"full",pageWidth:o,inherited:!0}:e.widthMode==="contained"?{mode:"page",pageWidth:o,inherited:!1}:zL(e.widthMode)?{mode:e.widthMode,pageWidth:o,inherited:!1}:e.contained===!0?{mode:"page",pageWidth:o,inherited:!1}:typeof e.fullWidth=="boolean"?{mode:e.fullWidth?"full":"page",pageWidth:o,inherited:!1}:e.contained===!1?{mode:"full",pageWidth:o,inherited:!1}:{mode:t,pageWidth:o,inherited:t==="full"}}function qf(e){return Vf(e,"page").mode==="full"}import{createContext as $L,useContext as VL}from"react";import{jsx as XL}from"react/jsx-runtime";var qL=2,YL=qL+1,Kb=$L(2);function V$({tier:e,children:t}){return XL(Kb.Provider,{value:e,children:t})}function Yf(e){let t=VL(Kb);return YL+Math.max(0,e-t)}import{withStyleKind as EA}from"efficient-easel/style-clipboard";import{Fragment as eo,jsx as m,jsxs as Ce}from"react/jsx-runtime";function Un(e){for(let[t,o]of Object.entries(e))o&&typeof o=="object"&&!qr(o)&&EA(o,`section:${t}`);return e}function ey(){return null}function _A(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return m(ey,{},e)}function LA(e){return e.type===ey}function Zl(e){return LA(e)?void 0:e}function Ro({inherited:e,source:t,detail:o,onReset:r,onOptOut:n,optOutTitle:a,label:l}){if(e){let i=o?`Following the ${t.toLowerCase()} setting \u2014 ${o}`:`Following the ${t.toLowerCase()} setting`;if(!n)return Ce("span",{className:"sf-inherit",title:o?i:void 0,children:["Inherits \xB7 ",t]});let c=`${i}. ${a??`Click to keep ${l} at this section's own size instead`}`;return Ce("button",{type:"button",className:"sf-inherit sf-inherit--following",onClick:n,title:c,"aria-label":c,children:["Inherits \xB7 ",t,m("span",{className:"sf-inherit-revert","aria-hidden":"true",children:"\u21F1"})]})}let s=`Reset ${l} to follow the ${t.toLowerCase()} setting${o?` (${o})`:""}`;return Ce("button",{type:"button",className:"sf-inherit sf-inherit--over",onClick:r,title:s,"aria-label":s,children:["Overridden",m("span",{className:"sf-inherit-revert","aria-hidden":"true",children:"\u21BA"})]})}function AA(){let{appState:e}=$r(n=>n),t=e.data.root?.props??{},{mode:o,pageWidth:r}=Vf(t,"full");return o==="page"?`Page width \u2014 ${r}px`:o==="contained"?"Page width \u2014 Contained":"Page width \u2014 Full"}function OA(){let{blockGap:e}=uo();return e===null?"Site block gap \u2014 not set, so this container keeps its own spacing":`Site block gap \u2014 ${e}px`}function NA({inherited:e,onReset:t,label:o}){return m(Ro,{inherited:e,source:"Site",detail:OA(),onReset:t,label:o})}function BA({inherited:e,onReset:t,label:o}){return m(Ro,{inherited:e,source:"Page",detail:AA(),onReset:t,label:o})}function DA(){return Ce("svg",{className:"sf-field-type",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,"aria-hidden":"true",children:[m("polyline",{points:"4 7 4 4 20 4 20 7"}),m("line",{x1:"9",x2:"15",y1:"20",y2:"20"}),m("line",{x1:"12",x2:"12",y1:"4",y2:"20"})]})}function Qo({value:e,onChange:t,label:o,placeholder:r,hint:n,multiline:a,hideable:l=!0,markup:s=!0}){let{text:i,hidden:c}=Jt(e),f=Jf(null),u=Jf(null),d=g=>t(l?{text:g,hidden:c}:g),p=()=>t({text:i,hidden:!c});return Ce("div",{className:`sf-field${l&&c?" is-hidden":""}`,children:[Ce("div",{className:"sf-field-head",children:[m(DA,{}),m("span",{className:"sf-field-label sf-field-label--inline",children:o}),l&&m("button",{type:"button",className:"sf-field-eye","aria-pressed":c,"aria-label":c?`Show ${o} on the slide`:`Hide ${o} on the slide`,title:c?`Show ${o} on the slide`:`Hide ${o} on the slide`,onClick:p,children:c?m(en,{name:"eye-off",size:14}):m(en,{name:"eye",size:14})})]}),Ce("div",{className:"sf-copybox",children:[s&&m(ff,{target:a?u:f,value:i,onChange:d}),a?m("textarea",{ref:u,value:i,placeholder:r,onChange:g=>d(g.target.value)}):m("input",{ref:f,type:"text",value:i,placeholder:r,onChange:g=>d(g.target.value)})]}),n&&m("p",{className:`sf-field-hint${UA(n)?" sf-field-hint--while-typing":""}`,children:n})]})}function oq(e,t){return{...e,[yn]:t}}function rq(e){let t=e[_e];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[_e]:{...t,offPage:!0}}}function nq(e){return!e||typeof e!="object"?!1:e[_e]?.offPage===!0}function aq(e){let t=e[_e];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[_e]:{...t,identifier:!0}}}function ty(e){return!e||typeof e!="object"?!1:e[_e]?.identifier===!0}var MA=new Set(Go),Vr=(e,t)=>{let o={...t,[_e]:e};if(!MA.has(e.control))return o;let r=t.render;return{...Hl(o,"authored-copy"),render:n=>m(Kh,{name:n.name,children:r(n)})}},lq="Everything else on this block comes from the linked post. Unlink it to edit by hand.",HA="Select a word, then press the highlighter.",GA="A short name so a link can jump straight to this section, like yoursite.com/page#about.",WA=new Set([HA]),UA=e=>WA.has(e);function sq(e,t,o){return Vr({control:"text",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o})})}function iq(e,t,o){return Vr({control:"textarea",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,multiline:!0})})}function zA(e,t,o){return Vr({control:"plainText",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,hideable:!1,markup:!1})})}function cq(e,t,o){return Vr({control:"copyText",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,hideable:!1})})}function fq(e){return{type:"custom",[bn]:{label:e},render:({value:t,onChange:o})=>m(Bf,{value:Sr(t),onChange:o,label:e})}}function dq(e,t,o){return Vr({control:"plainTextarea",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,multiline:!0,hideable:!1})})}var uq={Content:CA,Style:SA,Layout:fA,Animation:Vb};function pq(e,t){return e.includes("Content")?t!=="Content":null}function KA({label:e}){return m(wA,{title:e,level:Yf(1)})}function $A({level:e,label:t}){return e===1?m(KA,{label:t}):m(VA,{label:t})}var Zf="__fold";function qr(e){return e?.[Zf]??null}function oy(e,t){return{type:"custom",[Zf]:{label:e,level:t},render:()=>m($A,{level:t,label:e})}}function ft(e){return oy(e,2)}function mq(e){return{type:"custom",render:()=>m(ry,{text:e})}}function ry({text:e}){return m("p",{className:"sf-note",children:e})}function xq(e){return oy(e,1)}function gq(e){return qr(e)!==null&&e?.tabs!==void 0}var $b=new Map;function Ql(e,t){let o=`${e}\0${t?t.join(""):""}`,r=$b.get(o)??{type:"custom",tabs:t,[Zf]:{label:e,level:1},bucket:e,marker:!0,render:()=>m(eo,{})};return $b.set(o,r),r}function VA({label:e}){return m(vA,{title:e,level:Yf(2)})}function ny({swatches:e,current:t,onPick:o,names:r}){let n=e.find(l=>l.toLowerCase()===t.toLowerCase()),a=(n?r?.[n]:void 0)??t;return Ce("div",{className:"sf-swatches",children:[e.map(l=>{let s=r?.[l]??l;return m("button",{type:"button","aria-pressed":t.toLowerCase()===l.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===l.toLowerCase()?"is-active":""}`,style:{background:l},onClick:()=>o(l),"aria-label":s,title:s},l)}),m("span",{className:"sf-swatch-hex",children:a})]})}function Iq(e,t){return{type:"custom",render:({value:o,onChange:r})=>{let n=Hb(o,t);return m(be,{label:e,icon:m(ZL,{}),action:m(Ro,{inherited:n,source:"Theme",detail:"the theme's section background",onReset:()=>r(Xl),label:e}),children:ny({swatches:Db,current:n?Yl:o??t??"",onPick:r,names:Mb})})}}}function qA(e,t){return{type:"custom",render:({value:o,onChange:r})=>{let n=o,a=yp(n,t);return m(be,{label:e,icon:m(iA,{}),action:m(Ro,{inherited:a,source:"Theme",detail:"the theme's image stage",onReset:()=>r(fn),label:e}),children:ny({swatches:Ip,current:a?Et:Pa(n,t),onPick:r,names:hp})})}}}function ay(e=o=>o,t){return Un({_gSectionTheme:ft(Gd),sectionAccent:{type:"custom",render:({value:o,onChange:r})=>m(Tf,{value:e(o),onChange:r,followLabel:t})}})}function er({min:e,max:t,step:o,value:r,onChange:n,suffix:a="",readout:l=!0,notch:s,ariaLabel:i,disabled:c=!1}){let f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return Ce("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:[m("input",{type:"range",min:e,max:t,step:o,value:r,"aria-label":i,disabled:c||void 0,onChange:u=>n(Number(u.target.value))}),l&&m(YA,{value:r,min:e,max:t,step:o,suffix:a,ariaLabel:i,onChange:n})]})}function YA({value:e,min:t,max:o,step:r,onChange:n,suffix:a="",ariaLabel:l,children:s}){let[i,c]=Jl(null),f=u=>{u.editing||c(null),u.commit!==null&&u.commit!==e&&n(u.commit)};return i===null?m("button",{type:"button",className:"sf-slider-val",title:"Click to type a value","aria-label":l?`${l}: type a value`:"Type a value",onClick:()=>c(String(e)),children:s??Ce(eo,{children:[e,a]})}):m("input",{autoFocus:!0,type:"text",inputMode:"decimal",className:"sf-slider-val sf-slider-typed",value:i,"aria-label":l,onChange:u=>c(u.target.value),onFocus:u=>u.currentTarget.select(),onKeyDown:u=>{let d=mf(u.key,i,t,o,r);d.handled&&(u.preventDefault(),u.stopPropagation(),f(d))},onBlur:()=>f(mf(pf,i,t,o,r))})}function Kr(e,t,o,r,n,a,l="",s){return{type:"custom",render:i=>m(be,{label:e,icon:Zl(t),action:s?s("storedValue"in i?i.storedValue:i.value,i.onChange):void 0,children:er({min:o,max:r,step:n,value:typeof i.value=="number"?i.value:a,suffix:l,onChange:i.onChange})})}}function ly({min:e,max:t,step:o,px:r,label:n,onChange:a,disabled:l=!1}){let{cornerRadiusPx:s}=uo();return m(eo,{children:er({min:e,max:t,step:o,value:r??(typeof s=="number"?s:e),readout:!1,ariaLabel:n,disabled:l,onChange:a})})}function zn(e,t){let{min:o,max:r,step:n=1,unsetLabel:a="Not set",hint:l,restAtSite:s=!1,restTrack:i,unsetMark:c}=t;return{type:"custom",render:({value:f,onChange:u})=>{let d=typeof f=="number"?f:null,p=d===null;return m(be,{label:e,value:p?c?"":a:`${d}px`,changed:!p,action:p?c??null:m(Rl,{label:e,what:"change",onClear:()=>u(null)}),hint:l,children:i?i({min:o,max:r,step:n,px:d,label:e,onChange:u}):s?m(ly,{min:o,max:r,step:n,px:d,label:e,onChange:u}):er({min:o,max:r,step:n,value:d??o,readout:!1,ariaLabel:e,onChange:u})})}}}function hq(e){let t=Kr("Gap",m(Xb,{}),go.min,go.max,go.step,ka[e],"px",(o,r)=>m(NA,{inherited:!Zs(e,o),onReset:()=>r(void 0),label:"Gap"}));return{type:"custom",[wp]:e,render:o=>t.render({...o,value:Js(e,o.value,o.field?.siteGap),storedValue:o.value,onChange:r=>o.onChange(r)})}}function XA(){return{type:"custom",render:({value:e,onChange:t})=>{let r=xt(e)??[...ct],n=r.length===ct.length;return m(be,{label:wo,icon:m(Yb,{}),value:Tl(r),changed:!n,action:n?null:m(Rl,{label:wo,what:"change",onClear:()=>t(null)}),hint:"Corners left off stay square. The row above sets how round the others are.",children:m(QA,{value:r,onChange:a=>{let l=xt(a)??[];t(l.length===ct.length?null:l)}})})}}}function jA(){return zn("Corners",{min:lo,max:Eo,unsetLabel:"Inherits \xB7 Site",restTrack:e=>m(JA,{...e}),hint:m(ZA,{})})}var sy="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function Qf(){return qf(es())}function JA(e){return m(ly,{...e,disabled:Qf()})}function ZA(){return m(eo,{children:Qf()?sy:"Follows Site styles \u25B8 Basics \u25B8 Corners until you set a number here."})}function QA({value:e,onChange:t}){let o=Qf();return m(Zb,{label:wo,value:e,corners:o?Gr.map(r=>({...r,disabled:!0,title:sy})):Gr,onChange:t})}function iy(){return Un({_gShape:ft("Shape"),sectionCorners:jA(),sectionCornerSides:XA()})}function cy(){return{_gMotion:ft("Motion"),sectionAnimation:od("Entrance",m(Vb,{}),[...Eh],of)}}function ed(){let e=null;try{let{appState:t,selectedItem:o}=$r(n=>n),r=o?.props?.id?String(o.props.id):void 0;e=r?nf(t?.data,r):null}catch{e=null}return e!==null&&qf(e)}function fy(e){let{cornerRadiusPx:t}=uo(),o=ed(),r=typeof t=="number"?t:e,n=null;try{let{appState:l,selectedItem:s}=$r(c=>c),i=s?.props?.id?String(s.props.id):void 0;n=i?nf(l?.data,i):null}catch{n=null}if(o||!n)return r;let a=n.sectionCorners;return Xc(a)?a:r}function e0({min:e,max:t,step:o,px:r,label:n,onChange:a}){let l=fy(e);return m(eo,{children:er({min:e,max:t,step:o,value:r??l,readout:!1,ariaLabel:n,onChange:a})})}function t0({label:e}){let t=ed(),o=fy(lo);return m(Ro,{inherited:!0,source:t?"Site":"Section",detail:`${t?"Site":"Section"} \u2014 ${o}px`,onReset:()=>{},label:e})}function o0(){return m(eo,{children:ed()?"The section is full width, so this card follows Site styles \u25B8 Basics \u25B8 Corners.":"Follows the section's Corners until you set a number here."})}function r0(){return zn("Corners",{min:lo,max:Eo,unsetLabel:"Inherits \xB7 Section",unsetMark:m(t0,{label:"Corners"}),restTrack:e=>m(e0,{...e}),hint:m(o0,{})})}function n0({value:e,onChange:t}){return m(Zb,{label:wo,value:e,corners:Gr,onChange:t})}function a0({unset:e}){return m(eo,{children:e?"Set a number above first \u2014 there is nothing to shape yet.":"Corners left off stay square. The row above sets how round the others are."})}function l0(){return{type:"custom",render:({value:e,onChange:t})=>{let r=xt(e)??[...ct],n=r.length===ct.length;return m(be,{label:wo,icon:m(Yb,{}),value:Tl(r),changed:!n,action:n?null:m(Rl,{label:wo,what:"change",onClear:()=>t(null)}),hint:m(a0,{unset:!Nn(e)}),children:m(n0,{value:r,onChange:a=>{let l=xt(a)??[];t(l.length===ct.length?null:l)}})})}}}function s0(){return{type:"custom",render:()=>m(jc,{})}}function bq(){return{_gShape:ft("Shape"),cardCorners:r0(),cardCornerSides:l0(),cardCornersApplyAll:s0()}}function yq(){return To("Justify",m(JL,{}),Gf,Gf[0].value)}function Sq(){return To("Item alignment",m(jL,{}),Lb,"stretch")}function Cq(){return To(Ab,m(kA,{}),Wf,Wf[0].value)}function Pq(){return{type:"custom",render:({value:e,onChange:t})=>{let o=ql.find(r=>r.value===e)??ql[0];return m(be,{label:Uf,icon:m(qb,{}),value:o.label,children:m("div",{className:"sf-gallery-layouts",role:"group","aria-label":Uf,children:ql.map(r=>m("button",{type:"button","aria-pressed":o.value===r.value,"aria-label":r.label,title:r.label,onClick:()=>t(r.value),children:m("span",{className:"sf-gallery-pic",children:i0(r.weights).map((n,a)=>m("i",{style:{gridColumn:`span ${n}`}},a))})},r.value))})})}}}function i0(e){if(!e)return[3,4];let t=e.reduce((o,r)=>o+r,0);return e.map(o=>Math.round(o/t*12))}function kq(){return To(Bb,m(Xb,{}),Kf,Kf[0].value)}function wq(){return Kr(Ob,m(gA,{}),zf,Nb,1,zf)}function vq(e){let t=od(Tb,_A("`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)."),Fb(e),Vl(e,void 0));return{type:"custom",render:o=>t.render({...o,value:Vl(e,o.value),onChange:r=>o.onChange(r)})}}function Tq(e,t,o,r,n,a){return{type:"custom",render:({value:l,onChange:s})=>m(be,{label:e,icon:m(ef,{noun:a}),action:m(Ro,{inherited:Wb(l),source:"Text",detail:"Website settings \u2192 Text",onReset:()=>s(Gb),onOptOut:()=>s(jl),optOutTitle:`Click to keep ${e} at this section's own built-in size instead`,label:e}),children:er({min:t,max:o,step:r,value:typeof l=="number"?l:n,suffix:"px",onChange:s})})}}function Rq(){return{_gCellWidth:ft("Cell width"),gridSpan:To("Positions",m(qb,{}),[{label:"Auto",value:""},...Array.from({length:El},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function es(){let e=null;try{e=$r(t=>t).selectedItem}catch{e=null}return e?.props??{}}function c0({min:e,max:t,step:o,px:r,label:n,onChange:a,desktopKey:l,fallback:s}){let i=es()[l],c=Gl(void 0,i,s);return m(eo,{children:er({min:e,max:t,step:o,value:Gl(r,i,s),readout:!1,ariaLabel:n,notch:c,onChange:a})})}function f0({label:e,desktopKey:t,fallback:o}){let r=es()[t],n=Gl(void 0,r,o);return m(Ro,{inherited:!0,source:zr.desktop,detail:`${zr.desktop} \u2014 ${n}px`,onReset:()=>{},label:e})}function d0(e){return zn(e.label,{min:e.min,max:e.max,step:e.step,unsetLabel:`Inherits \xB7 ${zr.desktop}`,unsetMark:m(f0,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>m(c0,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function dy(e={}){let t=e.keys?.top??"sectionPaddingTop",o=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,n=I=>r?I:`Padding ${I.toLowerCase()}`,a=I=>Kr(n("Top"),m(xA,{}),Tt.min,Tt.max,Tt.step,I,"px"),l=(I,h,C,S=Tt)=>wt("mobile",d0({label:n(I),desktopKey:h,min:S.min,max:S.max,step:S.step,fallback:C})),s=e.top??Tt.min,i=e.bottom??Tt.min,c="sectionPaddingLeft",f="sectionPaddingRight",u=e.sideBounds??Tt,d=e.side??u.min,p=e.sidePhone??d,x=e.phone===!0,g=I=>x?wt("desktop",I):I;return Un({...r?{_gSpacing:ft("Padding")}:{},[t]:g(a(s)),...x?{[Hn(t)]:l("Top",t,s)}:{},...e.only==="top"?{}:{[o]:g(Kr(n("Bottom"),m(uA,{}),Tt.min,Tt.max,Tt.step,i,"px")),...x?{[Hn(o)]:l("Bottom",o,i)}:{}},...e.sides?{[c]:g(Kr(n("Left"),m(pA,{}),u.min,u.max,u.step,d,"px")),...x?{[Hn(c)]:l("Left",c,p,u)}:{},[f]:g(Kr(n("Right"),m(mA,{}),u.min,u.max,u.step,d,"px")),...x?{[Hn(f)]:l("Right",f,p,u)}:{}}:{}})}var u0={contained:"Contained",page:"Page",full:"Full"},jf="Width";function uy(e,t=Ub,o=!0){let r=t.map(n=>({label:zb[n]??u0[n],value:n}));return Un({...o?{_gWidth:ft(jf)}:{},widthMode:{type:"custom",render:({onChange:n,field:a})=>m(be,{label:"Width",icon:m(PA,{}),action:o?m(BA,{inherited:a?.inherited??!1,onReset:()=>n($f),label:jf}):void 0,children:td({options:r,value:a?.currentValue||e,onChange:n,ariaLabel:jf})})}})}function py(){let e=r=>({type:"custom",render:({value:n,onChange:a})=>Ce("div",{className:"sf-field",children:[r?Ce("div",{className:"sf-field-head",children:[m("span",{className:"sf-field-label sf-field-label--inline",children:Ur}),r(a)]}):null,m("div",{children:td({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(n)?n:"auto",onChange:a,ariaLabel:Ur})})]})}),t=()=>({type:"custom",render:({value:r,onChange:n,field:a})=>{let l=a?.unit==="%"?"%":"px",s=l==="%"?Mf:Df;return m("div",{className:"sf-field",children:er({min:s.min,max:s.max,step:s.step,value:typeof r=="number"?r:s.fallback,suffix:l,ariaLabel:Ur,onChange:n})})}}),o=()=>od("Unit",m(jb,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return Un({_gHeight:ft(Ur),sectionHeightMode:wt("desktop",e()),sectionHeightValue:wt("desktop",t()),sectionHeightUnit:wt("desktop",o()),sectionHeightModePhone:wt("mobile",e(r=>m(p0,{onClear:()=>r(void 0)}))),sectionHeightValuePhone:wt("mobile",t()),sectionHeightUnitPhone:wt("mobile",o())})}function p0({onClear:e}){let t=es(),o=Hf(t),r=$l(t),n=`${zr.desktop} \u2014 ${r.mode==="auto"?"Auto":`${r.value}${r.unit}`}`;return m(Ro,{inherited:!o,source:zr.desktop,detail:n,onReset:e,label:Ur})}function my(){return{_gAnchor:ft("Anchor"),anchor:zA("Anchor name","e.g. about",GA)}}function Zo(e,t,o){return{type:"custom",render:({value:r,onChange:n,id:a,name:l})=>{let s=typeof r=="boolean"?r:t,i=`${a??l??e}-label`;return m(be,{label:e,labelId:i,icon:o,action:m(Qb,{checked:s,onChange:n,ariaLabelledBy:i})})}}}function Fq(){return{type:"custom",render:({value:e,onChange:t,id:o,name:r})=>{let n=`${String(o??r??"pageBackground")}-colour`;return m(be,{label:"Background",icon:m(Jb,{}),htmlFor:n,action:m(Qt,{id:n,label:"Background",value:tf(e),onChange:t})})}}}function m0({facet:e,fallback:t,value:o,onChange:r,fieldId:n}){let l=Jc()[e],s=typeof o=="boolean"?o:t,i=`${n}-label`;return m(be,{label:l,labelId:i,action:m(Qb,{checked:s,onChange:r,ariaLabelledBy:i})})}function Eq(e,t){return{type:"custom",render:({value:o,onChange:r,id:n,name:a})=>m(m0,{facet:e,fallback:t,value:o,onChange:r,fieldId:String(n??a??e)})}}function _q(e,t){return{type:"custom",render:()=>m(x0,{facets:e,rest:t})}}function x0({facets:e,rest:t}){let o=Jc(),r=e.map(a=>o[a]),n=r.length>1?`${r.slice(0,-1).join(", ")} and ${r[r.length-1]}`:r.join("");return m(ry,{text:`${n} ${t}`})}function Lq(e,t){return{type:"custom",render:({value:o,onChange:r})=>Ce("div",{className:"sf-field sf-field--row",children:[m("span",{className:"sf-field-label sf-field-label--inline",children:e}),Qt({value:o||t,onChange:r,label:e})]})}}var g0=[{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 xy({label:e,value:t,onChange:o,points:r=g0}){return m(TA,{label:e,value:t,points:r,onChange:o})}function Aq(e,t=fh,o="mediaImage"){return{type:"custom",render:({value:r,onChange:n})=>m("div",{className:"sf-field",children:m(I0,{label:e,value:r||t,onChange:n,imageProp:o})})}}function I0({label:e,value:t,onChange:o,imageProp:r}){let{selectedItem:n}=$r(l=>l),a=n?.props?.[r];return m(If,{label:e,value:t,onChange:o,image:typeof a=="string"?a:void 0})}var h0=Ps([]);function Oq(e,{stacking:t,fallback:o=ia}){return{type:"custom",render:({value:r,onChange:n})=>{let a=bt.includes(r)?r:o;return t?m(b0,{label:e,value:a,onChange:n}):gy({label:e,value:a,onChange:n,points:h0})}}}function b0({label:e,value:t,onChange:o}){let{appState:r,selectedItem:n}=$r(s=>s),a=n?.props?.id?String(n.props.id):void 0,l=a?ws(r?.data,a):[];return gy({label:e,value:t,onChange:o,points:Ps(l,a)})}function gy({label:e,value:t,onChange:o,points:r}){let n=r.find(a=>a.disabled);return m(be,{label:e,icon:m(IA,{}),hint:n?n.title:void 0,children:xy({label:e,value:po(t),onChange:o,points:r})})}var Nq={top:m(nA,{}),right:m(rA,{}),bottom:m(tA,{}),left:m(oA,{})};function Bq(e,t,o,r,n,a){let l=f=>t.find(u=>u.value===f),s=f=>({value:f,label:"",disabled:!0,title:r}),i=f=>{let u=t.find(p=>p.cell===f);if(!u)return s(`missing-${f}`);let d=a?.[f];return d?{value:u.value,label:u.label,icon:d}:{value:u.value,label:u.label}},c=[s("corner-top-left"),i("top"),s("corner-top-right"),i("left"),s("centre"),i("right"),s("corner-bottom-left"),i("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:u})=>{let d=t.some(p=>p.value===f)?f:o;return m(be,{label:e,icon:n,value:l(d)?.label??"",children:xy({label:e,value:d,onChange:u,points:c})})}}}function To(e,t,o,r,n){return{type:"custom",options:o,fallback:r,render:({value:a,onChange:l,field:s})=>{let i=s.options??o,c=s.fallback??r,f=i.some(u=>u.value===a)?a:c;return m(be,{label:e,icon:Zl(t),children:Ce("select",{value:f,onChange:u=>l(u.target.value),children:[n?m("option",{disabled:!0,value:"",children:n}):null,i.map(u=>m("option",{value:u.value,children:u.label},u.value))]})})}}}function Dq(e,t,o){return{type:"custom",options:t,render:({value:r,onChange:n,field:a})=>m(yf,{label:e,options:a.options??t,value:Array.isArray(r)?r:[],onChange:n,...o?{emptyLabel:o}:{}})}}function Mq(e,t){return{type:"custom",render:({value:o,onChange:r})=>m(cf,{value:o,onChange:r,...e?{label:e}:{},...t?{emptyLabel:t}:{}})}}function Hq(e,t={}){return{type:"custom",render:({value:o,onChange:r})=>{let n={value:o,onChange:r,...t};return m(e,{...n})}}}function td({options:e,value:t,onChange:o,ariaLabel:r,disabled:n=!1}){return m(RA,{options:e.map(a=>({id:a.value,label:a.label,title:a.title})),value:t,onChange:o,ariaLabel:r,disabled:n})}var Gq=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function od(e,t,o,r){let n=o.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:l,field:s})=>m(be,{label:e,icon:Zl(t),children:td({options:n,value:n.some(i=>i.value===a)?a:a||s?.currentValue||r,onChange:l,ariaLabel:e})})}}var y0="__media";function Wq(e,t,o){return{type:"custom",[y0]:!0,render:({value:r,onChange:n})=>m(hf,{value:r||"",onChange:n,label:e,accept:t,placeholder:o})}}function Uq({value:e,onChange:t,label:o}){let r=e||{},n=!!r.pending,a=n?"var(--fg-dim, #888)":r.ok?"#1d9e75":"#d85a30",l=(s,i)=>t({...r,[s]:i===""?void 0:Number(i)});return Ce(be,{label:o,icon:m(Xf,{}),children:[m("button",{type:"button",disabled:n,onClick:()=>t({...r,pending:!0,ok:!1,status:"Finding\u2026"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:n?"default":"pointer",opacity:n?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:n?"Finding\u2026":"Find coordinates"}),r.status&&m("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:r.status}),m("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:"Coordinates from OpenStreetMap"}),m("button",{type:"button",onClick:()=>t({...r,manual:!r.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:r.manual?"Hide manual coordinates":"Enter coordinates manually"}),r.manual&&Ce("div",{style:{marginTop:8,display:"grid",gap:8},children:[m(be,{label:"Latitude",icon:m(Xf,{}),children:m("input",{type:"number",step:"any",placeholder:"e.g. 34.0990198",value:typeof r.lat=="number"?r.lat:"",onChange:s=>l("lat",s.target.value)})}),m(be,{label:"Longitude",icon:m(Xf,{}),children:m("input",{type:"number",step:"any",placeholder:"e.g. -117.9842833",value:typeof r.lng=="number"?r.lng:"",onChange:s=>l("lng",s.target.value)})})]})]})}function zq({items:e,placeholder:t,onChange:o,markup:r=!1}){let n=Jf(null),[a,l]=Jl(null),s=u=>u.map(d=>({text:d?.text??""})),i=(u,d)=>o(C0(e,u,d)),c=u=>{let d=P0(a,u);d===null&&(n.current=null),l(d),o(s(e.filter((p,x)=>x!==u)))},f=()=>o([...s(e),{text:""}]);return Ce("div",{className:"sf-textlist",children:[r&&m(ff,{target:n,value:S0(e,a),onChange:u=>i(a??-1,u),disabled:a===null,label:a===null?"Formatting \u2014 click a row first":`Formatting \u2014 row ${a+1}`}),e.map((u,d)=>Ce("div",{className:`sf-textlist-row${r&&a===d?" is-marking":""}`,children:[m("input",{type:"text",value:u?.text??"",placeholder:t,onChange:p=>i(d,p.target.value),onFocus:p=>{n.current=p.currentTarget,l(d)}}),m("button",{type:"button",className:"sf-textlist-x",onClick:()=>c(d),"aria-label":"Remove item",title:"Remove item",children:"\xD7"})]},d)),m("button",{type:"button",className:"sf-textlist-add",onClick:f,children:"+ Add item"})]})}function S0(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function C0(e,t,o){let r=e.map(n=>({text:n?.text??""}));return t===null||t<0||t>=e.length?r:r.map((n,a)=>a===t?{text:o}:n)}function P0(e,t){return e===null?null:t>e?e:null}var Kq={label:"Ticker items",icon:m(dA,{})};function $q(e,t,o,r){return{type:"custom",[_e]:{control:"textList",label:e,placeholder:o,itemKey:"text",rendering:r},render:({value:n,onChange:a})=>m(k0,{label:e,icon:Zl(t),items:Array.isArray(n)?n:[],placeholder:o,onChange:a,markup:r==="markup"})}}function k0({label:e,icon:t,items:o,placeholder:r,onChange:n,markup:a=!1}){let[l,s]=Jl(null),i=c=>c.map(f=>({text:f?.text??""}));return m(FA,{label:e,icon:t,noun:"line",items:o,onChange:c=>n(i(c)),newItem:()=>({text:""}),itemName:(c,f)=>`Line ${f+1}`,summary:c=>jt(c?.text??"")||r,open:l,onOpen:s,renderItem:(c,f,u)=>m(Qo,{value:c?.text??"",onChange:d=>u({text:typeof d=="string"?d:d?.text??""}),label:`${e} \u2014 line ${f+1}`,placeholder:r,hideable:!1,markup:a})})}function Vq(e,t){let o=`${e.label} \u2014 row ${t+1}`;return Vr({control:"plainText",label:o,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:o,placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Iy(e){return{_gCards:ft("Cards"),coverIndex:To("Cover image",m(cA,{}),rm,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:qA("Image background",_t),cardImage:w0(),spinOnHover:Zo("Rotate on hover",e?.spinDefault??!0,m(bA,{}))}}function hy(){return{outline:To("Card outline",m(yA,{}),oi,Io),indexBadge:To("Card number",m(jb,{}),ti,pr),showBadge:Zo("Product badge",!0,m(ef,{noun:"tag"}))}}function by(e){let t=e?.bottomDefault??!0;return{_gShowOnCard:ft("Show on a card"),showCardPrice:Zo("Price",!0,m(aA,{})),showCardFinishes:Zo("Finish swatches",!0,m(lA,{})),showCardSizes:Zo("Sizes",t,m(hA,{})),showCardBuy:Zo("Buy button",t,m(QL,{})),showCardPage:Zo("Page button",t,m(Jb,{}))}}function w0(){return zn("Card image",{min:lo,max:Eo,step:Sp,hint:"Rounds the picture. The card's own corner is in Site styles."})}function qq(){return zn(Sh,{min:lo,max:Eo,step:yh,unsetLabel:"Square",hint:"Rounds the picture. Left alone it stays square."})}function Yq(){return{type:"custom",render:({value:e,onChange:t})=>m(v0,{value:typeof e=="string"?e:"",onChange:t})}}function v0({value:e,onChange:t}){let[o,r]=Jl(null),n=Zc.filter(l=>o===null||Bt[l].across===o),a=e&&e in Bt?Bt[e]:null;return Ce(eo,{children:[m(be,{label:"Photos in a row",icon:m(eA,{}),children:Ce("div",{className:"sf-gallery-filter",children:[m("button",{type:"button","aria-pressed":o===null,onClick:()=>r(null),children:"All"}),wh.map(l=>m("button",{type:"button","aria-pressed":o===l,onClick:()=>r(l),children:l},l))]})}),m(be,{label:"Layout",icon:m(sA,{}),value:a?a.label:"Not chosen",hint:`${n.length} of ${Zc.length} layouts`,children:m("div",{className:"sf-gallery-layouts",children:n.map(l=>m("button",{type:"button","aria-pressed":e===l,"aria-label":Bt[l].label,title:Bt[l].label,onClick:()=>t(e===l?"":l),children:m("span",{className:"sf-gallery-pic",children:Bt[l].desktop.map(([s,i],c)=>m("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${i}`}},c))})},l))})})]})}function T0(e,t){let o=Sr(e.props.name);if(o)return o;let r=Sr(e.props.altName);if(r)return r;let n=e.props.collection?.name;if(n)return n;let a=e.props.source?.title;if(a)return a;let l=e.props.code;return l?t?.(l)??l:""}function e9(e,t,o){return jt(T0(e,o))||t(e.type)}function t9(e){if(!e)return null;for(let t of["name","altName"])if(ty(e[t]))return t;return null}function o9(e,t){return Sr(e.props?.name).trim()||t}import{SETTINGS_BUCKETS as R0}from"efficient-easel/panel";var Yr=R0,$e={Content:"_sContent",Style:"_sStyle",Layout:"_sLayout",Animation:"_sAnimation"},s9=[$e.Layout,...Object.keys(dy({phone:!0})),...Object.keys(uy("full")),...Object.keys(py()),...Object.keys(my())],i9=[$e.Style,...Object.keys(ay())],c9=[$e.Style,...Object.keys(iy())],f9=[$e.Animation,...Object.keys(cy())],F0=Object.keys(Iy()),E0=new Set(["cardImage","imageBackground"]),d9=[$e.Style,...F0.filter(e=>e.startsWith("_g")||E0.has(e))],u9=Object.keys(hy()),p9=Object.keys(by({bottomDefault:!0})),_0="Editor only \u2014 not shown live",yy={"Archive link":"Content",Article:"Content",Boxes:"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","Opening filter":"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","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",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":"Style",Gallery:"Style",Image:"Style","Image column":"Style",Images:"Style",Logo:"Style",Media:"Style","Background image":"Style",Color:"Style","Image tint":"Style",Style:"Style",Shape:"Style",Texture:"Style","Text style":"Style",Motion:"Animation",Animation:"Animation",Anchor:"Layout",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Layout",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[_0]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Layout","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:"Layout",Height:"Layout"},Sy={"AlloyWheelsListing._gCards":"Style","ProductGrid._gCards":"Style"};function L0(e,t,o){return Sy[`${e}.${t}`]??yy[o]}var A0={"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)","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)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","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)"};function m9(e){let t=new Set(Object.values($e));for(let[o,r]of Object.entries(e))if(!t.has(o)&&qr(r)?.level===1)return 1;return 2}function O0(e){let t=`${e}.`;return Object.keys(A0).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function N0(e,t){let o=df(e),r=ft(t);return o?wt(o.tier,r):r}function x9(e,t){let o=[],r=new Set(O0(t)),n=new Set,a=null;for(let[d,p]of Object.entries(e)){let x=qr(p);if(!x){a||o.push(a={bucket:"Content",entries:[]}),a.entries.push([d,p]);continue}if(r.has(d)){let h=yy[x.label];if(x.level!==2||!h||x.label!==h)throw new Error(`${t}.${d}: RETIRED (lib/puck/field-groups.ts) lists this sub-heading as one whose name duplicates its bucket, but it is a level-${x.level} "${x.label}" header in the ${h??"(unclassified)"} bucket. Only a level-2 header whose label IS its bucket's name may be retired \u2014 anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);n.add(d),o.push(a={bucket:h,entries:[]});continue}let g=L0(t,d,x.label);if(!g)throw new Error(`${t}.${d}: the inspector group "${x.label}" is not classified in LABEL_BUCKET (lib/puck/field-groups.ts), so there is no way to say which of ${Yr.join(" / ")} its controls belong under. Classify it \u2014 an unclassified group silently lands wherever it was declared, which is the whole bug.`);let I=d===$e[g]&&x.level===1;if(!I&&d===$e[g])throw new Error(`${t}.${d}: that key is reserved for the ${g} bucket header, but this field is a level-${x.level} "${x.label}" header, so it cannot serve as one. Rename the section's own field.`);o.push(a={bucket:g,entries:[[d,I||x.level===2?p:N0(p,x.label)]],isBucketHeader:I})}let l=new Set(Object.entries(e).filter(([,d])=>qr(d)).map(([d])=>d)),s=Object.keys(Sy).filter(d=>d.startsWith(`${t}.`)).filter(d=>!l.has(d.slice(t.length+1)));if(s.length)throw new Error(`${t}: KEY_BUCKET (lib/puck/field-groups.ts) lists ${JSON.stringify(s)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key \u2014 an override that quietly matches nothing is worse than no override.`);let c=o.some(d=>d.isBucketHeader)?[]:[...r].filter(d=>!n.has(d));if(c.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(c)}, but this section has no such fold header${c.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section \u2014 a list that quietly matches nothing is worse than no list.`);for(let d of Yr){let p=$e[d];if(p in e&&!o.some(x=>x.isBucketHeader&&x.entries[0]?.[0]===p))throw new Error(`${t}.${p} is reserved for the ${d} bucket header but is not a level-1 "${d}" fold header. Rename the section's own field.`)}let f=Yr.filter(d=>o.some(p=>p.bucket===d)),u={};for(let d of Yr){let p=o.filter(I=>I.bucket===d);if(!p.length)continue;let x=p.findIndex(I=>I.isBucketHeader);x>0&&p.unshift(...p.splice(x,1));let g=Ql(d,d===f[0]?f:null);x<0&&(u[$e[d]]=g);for(let I of p)for(let[h,C]of I.entries)u[h]=I.isBucketHeader&&h===$e[d]?g:C}return u}function g9(e){return $e.Content in e?e:{[$e.Content]:Ql("Content",null),...e}}function I9(e){return Yr.some(t=>$e[t]in e)}function h9(e){let t=Yr.filter(r=>$e[r]in e);if(t.length===0)return e;let o={...e};for(let r of t)o[$e[r]]=Ql(r,r===t[0]?t:null);return o}var{Provider:S9,useSelection:C9}=sa("selectedPartId");import{createContext as B0,useContext as D0,useMemo as M0,useState as H0}from"react";import{jsx as W0}from"react/jsx-runtime";var G0={partStyle:null,setPartStyle:()=>{}},Cy=B0(G0);function w9({children:e}){let[t,o]=H0(null),r=M0(()=>({partStyle:t,setPartStyle:o}),[t]);return W0(Cy.Provider,{value:r,children:e})}function v9(){return D0(Cy)}import{useCallback as Xr,useEffect as jr,useId as SO,useRef as to,useState as Vn}from"react";var Py="data-puck-overlay-portal";function ts(e){return e.setAttribute(Py,"true"),()=>e.removeAttribute(Py)}var rd="small",nd="dot",U0=[{label:"Small",value:"small"},{label:"Display",value:"display"}],z0=[{label:"Dot \u25CF",value:"dot"},{label:"Cross \u2715",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle \u25BC",value:"triangle"},{label:"None",value:"none"}],ky={dot:"\u25CF",cross:"\u2715",slash:"/",triangle:"\u25BC",none:""},K0={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-[800px]:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-[800px]:text-[length:var(--size-headingMedium,28px)]"},$0={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function wy(e){return Xe(U0,rd,e)}function vy(e){return Xe(z0,nd,e)}function Ty(e){return K0[e]}function Ry(e,t){return $0[e][t]}var ad="left",V0=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],q0={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function Fy(e){return Xe(V0,ad,e)}function Ey(e){return e==="up"||e==="down"}function _y(e,t){return`${q0[e]} ${t}s linear infinite`}import{jsx as Kn,jsxs as Ly}from"react/jsx-runtime";var Y0={"themed-band":"text-fg/70","themed-section":"text-fg-dim","dark-media":"text-overlay-fg/70"};function ld({items:e,separator:t=nd,size:o=rd,durationSec:r=50,scroll:n=ad,backdrop:a="themed-band",className:l}){let s=wy(o),i=Fy(n),c=vy(t),f=`text-accent ${Ry(s,c)}`.trim(),u=ky[c],d=u===""?Kn("span",{}):Kn("span",{className:f,children:u}),p=Ey(i),x=p?"inline-flex flex-col items-center gap-[60px] pb-[60px] max-[800px]:gap-8 max-[800px]:pb-8":"inline-flex items-center gap-[60px] pr-[60px] max-[800px]:gap-8 max-[800px]:pr-8",g=p?"inline-flex flex-col items-center gap-[60px] max-[800px]:gap-8":"inline-flex items-center gap-[60px] max-[800px]:gap-8",I=h=>Kn("span",{className:x,children:e.map((C,S)=>{let P=typeof C=="string"?C:C.text,T=typeof C=="object"&&C.gold;return Ly("span",{className:g,children:[Kn("span",{className:T?"text-accent":void 0,children:re(P)}),d]},S)})},h);return Kn("div",{className:`overflow-hidden ${l??""}`,children:Ly("div",{className:`flex ${p?"flex-col ":""}whitespace-nowrap ${Ty(s)} ${Y0[a]}`,style:{animation:_y(i,r)},children:[I("a"),I("b")]})})}var X0={"top-left":"left-0 top-[120px]","top-center":"left-1/2 top-[120px] -translate-x-1/2","top-right":"right-0 top-[120px]",left:"left-0 top-1/2 -translate-y-1/2",center:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",right:"right-0 top-1/2 -translate-y-1/2","bottom-left":"left-0 bottom-[120px]","bottom-center":"left-1/2 bottom-[120px] -translate-x-1/2","bottom-right":"right-0 bottom-[120px]"},j0=`calc(${nu} - ${hs}*2)`,Ay=`var(${au},${hs})`,W9=`pointer-events-none absolute inset-y-0 left-[${Ay}] right-[${Ay}] z-[6] mx-auto max-w-[var(${lu},${j0.replace(/ /g,"_")})]`;function os(e,t){return`pointer-events-auto absolute ${X0[e]} z-[6] sf-hero-overlay-rail flex ${t}`}function Oy(e){return bt.includes(e)?e:null}var J0="bottom-right",Z0=["outline","solid","square","bare"],Q0="outline",$9={outline:"Outline",solid:"Solid",square:"Square",bare:"Bare"},V9=!1,Ny=["prev","next"],By={prev:"Previous slide",next:"Next slide"};function eO(e){return Z0.includes(e)?e:Q0}function tO(e){return Oy(e)??J0}var oO="flex-row items-center gap-2";function Dy(e){return os(tO(e),oO)}var rO={outline:"grid h-10 w-10 cursor-pointer place-items-center rounded-full border border-overlay-chrome/60 text-overlay-fg transition-colors hover:border-overlay-chrome hover:bg-overlay-scrim/30",solid:"grid h-10 w-10 cursor-pointer place-items-center rounded-full border border-overlay-chrome bg-overlay-chrome text-overlay-scrim transition-colors hover:bg-overlay-chrome/85",square:"grid h-10 w-10 cursor-pointer place-items-center rounded-md border border-overlay-chrome/60 text-overlay-fg transition-colors hover:border-overlay-chrome hover:bg-overlay-scrim/30",bare:"grid h-10 w-10 cursor-pointer place-items-center text-overlay-fg transition-colors hover:text-overlay-chrome"};function My(e){return rO[eO(e)]}function Hy(e){return e.shown===!0&&(e.count??0)>1}function rs(e,t,o){if(o<=1)return t;let r=Math.min(Math.max(t,0),o-1);return e==="prev"?(r-1+o)%o:(r+1)%o}import{jsx as sd}from"react/jsx-runtime";function id({shape:e,placement:t,ref:o}){let r=My(e);return sd("div",{ref:o,className:Dy(t),style:{color:"var(--overlay-fg)"},children:Ny.map(n=>sd("button",{type:"button","data-hero-nav":n,"aria-label":By[n],className:r,children:sd(en,{name:"chevron-right",size:18,rounded:!0,style:n==="prev"?{rotate:"180deg"}:void 0})},n))})}var nO=bt;var aO="top-right",lO=["cards","dots","numbers","bar","tabs"],sO=["cards","dots","numbers","bar"],Gy="cards",e7={cards:"Cards",dots:"Dots",numbers:"Numbers",bar:"Bar",tabs:"Tabs"},t7=!0;function ns(e){return lO.includes(e)?e:Gy}function Wy(e){return sO.includes(e)?e:Gy}function iO(e){return nO.includes(e)?e:aO}var Uy={cards:"flex-col gap-2.5",dots:"flex-row items-center gap-2",numbers:"flex-col gap-2",bar:"h-0.5 w-[34%] max-w-[420px] gap-px overflow-hidden rounded-full",tabs:"flex-row items-stretch w-full overflow-x-auto"};function zy(e,t){return os(iO(t),Uy[ns(e)])}function Ky(e){return`flex ${Uy[ns(e)]}`}function $y(e){return e.shown!==!1&&(e.count??0)>1}function cO(e){return{name:e.dataset.slideName||"",process:e.dataset.slideProcess||"",video:e.dataset.slideMedia==="video"}}function fO(e,t){return e===t?!0:e.length!==t.length?!1:e.every((o,r)=>o.name===t[r].name&&o.process===t[r].process&&o.video===t[r].video)}function Vy(e,t){let o=Array.from(t,cO);return fO(e,o)?e:o}import{Fragment as $n,jsx as Me,jsxs as cd}from"react/jsx-runtime";function fd({slides:e,active:t,shape:o,placement:r,ref:n,tone:a="media",label:l}){let s=ns(o),i=a==="surface"?{"--overlay-fg":"var(--fg)","--overlay-chrome":"var(--fg)","--overlay-scrim":"var(--surface-2)"}:void 0;return cd("aside",{ref:n,"aria-label":l??"Featured slides",className:a==="surface"?Ky(s):zy(s,r),style:{color:"var(--overlay-fg)",...i},children:[s==="cards"&&Me(dO,{slides:e,active:t}),s==="dots"&&Me(uO,{count:e.length,active:t}),s==="numbers"&&Me(pO,{count:e.length,active:t}),s==="bar"&&Me(mO,{count:e.length,active:t}),s==="tabs"&&Me(xO,{slides:e,active:t})]})}function dO({slides:e,active:t}){return cd($n,{children:[Me("span",{className:"mb-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.28em] text-overlay-chrome/55",children:"Reel \xB7 pick a slide"}),e.map((o,r)=>{let n=r===t;return cd("button",{type:"button","data-idx":r,"aria-pressed":n,"aria-label":`Go to ${o.name||`slide ${r+1}`}`,className:["group flex w-[170px] cursor-pointer flex-col items-start gap-0.5 border bg-overlay-scrim/55 px-3 py-2.5 text-left transition-all motion-reduce:transition-none max-[1100px]:w-[140px]",n?"border-accent bg-overlay-scrim/70":"border-overlay-chrome/15 hover:border-overlay-chrome/45 hover:bg-overlay-scrim/70"].join(" "),children:[Me("span",{className:["font-display text-[length:var(--size-body,13px)] font-medium uppercase leading-tight tracking-[-0.01em]",n?"text-accent":"text-overlay-fg"].join(" "),children:o.name||`Slide ${r+1}`}),Me("span",{className:"font-mono text-[length:var(--size-label,9px)] uppercase tracking-[0.2em] text-overlay-chrome/55",children:n?"\u25B6 Now playing":o.process||" "})]},r)})]})}function uO({count:e,active:t}){return Me($n,{children:Array.from({length:e},(o,r)=>Me("button",{type:"button","data-idx":r,"aria-pressed":r===t,"aria-label":`Go to slide ${r+1}`,className:`h-2 cursor-pointer rounded-full transition-all motion-reduce:transition-none ${r===t?"w-5 bg-accent":"w-2 bg-overlay-chrome/45 hover:bg-overlay-chrome/70"}`},r))})}function pO({count:e,active:t}){return Me($n,{children:Array.from({length:e},(o,r)=>Me("button",{type:"button","data-idx":r,"aria-pressed":r===t,"aria-label":`Go to slide ${r+1}`,className:`cursor-pointer font-mono text-[length:var(--size-label,11px)] leading-none tracking-[0.06em] transition-colors ${r===t?"text-overlay-fg":"text-overlay-chrome/45 hover:text-overlay-chrome/80"}`,children:String(r+1).padStart(2,"0")},r))})}function mO({count:e,active:t}){return Me($n,{children:Array.from({length:e},(o,r)=>Me("button",{type:"button","data-idx":r,"aria-pressed":r===t,"aria-label":`Go to slide ${r+1}`,className:`h-full flex-1 cursor-pointer transition-colors ${r<=t?"bg-overlay-fg":"bg-overlay-chrome/25"}`},r))})}function xO({slides:e,active:t}){return Me($n,{children:e.map((o,r)=>{let n=r===t;return Me("button",{type:"button","data-idx":r,"aria-pressed":n,className:["flex min-w-[140px] flex-1 cursor-pointer items-end px-6 py-7 text-left transition-colors",r>0?"border-l border-overlay-chrome/15":"",n?"bg-overlay-scrim/70":"hover:bg-overlay-scrim/40"].join(" "),children:Me("span",{className:["font-heading3 text-[length:var(--size-headingSmall,24px)] font-medium uppercase leading-tight tracking-[-0.02em]",n?"text-overlay-fg":"text-overlay-chrome/55"].join(" "),children:o.name})},r)})})}import{useEffect as gO,useState as IO}from"react";var qy="(prefers-reduced-motion: reduce)";function hO(){return globalThis.window?.matchMedia?.(qy)?.matches??!1}function s7(){return hO()?"auto":"smooth"}function Yy(){let[e,t]=IO(!1);return gO(()=>{let o=globalThis.window?.matchMedia?.(qy);if(!o||(t(o.matches),typeof o.addEventListener!="function"))return;let r=n=>t(n.matches);return o.addEventListener("change",r),()=>o.removeEventListener("change",r)},[]),e}var Xy={min:40,max:100,step:5,fallback:100,unit:"vh"};function dd(e){return`${typeof e=="number"?e:Xy.fallback}${Xy.unit}`}function jy(...e){return e.some(t=>typeof t=="number")}var bO=40;function yO(e,t){return Math.abs(e)<=bO||Math.abs(e)<=Math.abs(t)?null:e<0?"next":"prev"}function Jy(e,t,o,r){let n=yO(e,t);return n?rs(n,o,r):o}function Zy(e){return(e.count??0)>1&&e.editing!==!0}function Qy(e){return e.editing!==!0?!1:(e.slides??[])[e.shown??0]?.video===!0}function eS(e){return e.editing!==!0?!1:!(e.playing===!0&&e.controlShown===!0)}import{jsx as Ut,jsxs as as}from"react/jsx-runtime";var CO=`
|
|
1
|
+
import{$b as la,Aa as zd,Ab as mu,Bb as xu,Cb as oa,Da as ms,Db as cr,Eb as ra,F as lo,Fb as na,G as Eo,Gb as aa,Ha as Kd,Hb as gu,I as so,Ia as Kt,Ib as Iu,J as Xn,Jb as hu,Ka as ar,Kb as bu,Nb as Xe,Nc as vu,Oc as en,Pb as co,Ra as et,Sa as ru,Ta as Qn,Ub as yu,Va as nu,_a as hs,bb as au,cc as Su,db as lu,dc as Cu,eb as su,ec as Pu,f as fs,fd as ys,g as Qr,gd as Tu,hc as ku,id as Ru,j as Bd,k as no,kb as Pe,kc as wu,l as ao,lb as io,m as rr,n as nr,na as Hd,o as Dd,ob as ir,pb as iu,qa as Lo,qb as cu,r as ds,ra as ps,rb as fu,rd as Fu,sa as jn,sb as bs,sd as sa,t as Md,ta as Gd,tb as du,u as us,ub as uu,ud as uo,vb as ea,wb as ta,wd as Ss,xa as Wd,ya as Ud,zb as pu}from"./chunk-764WH3TY.js";import{A as _o,E as at,F as Qd,G as lr,H as eu,J as tu,P as Rt,Q as Ao,R as ou,S as sr,T as oe,e as xs,i as $d,j as gs,l as Vd,m as qd,n as Ye,o as Is,p as Yd,r as Jn,s as Xd,t as jd,u as Jd,v as Zn,w as $t,y as Zd}from"./chunk-4MT74TMP.js";import{b as fo}from"./chunk-UBYBQ3KR.js";import{useMemo as PS}from"react";import{useEasel as kS}from"efficient-easel/easel";function Eu(e={}){let{dispatch:t}=kS(r=>r),o=e.readOnly===!0;return PS(()=>{let r=(a,l,s)=>{let i=Lo(l);return o||t({type:"insert",componentType:l,destinationZone:a,destinationIndex:s,id:i}),i},n=(a,l,s)=>{o||t({type:"replace",destinationZone:a,destinationIndex:l,data:s})};return{insertComponent:r,insertSection:(a,l)=>r(Gd,a,l),replaceComponent:n,seedChild:(a,l,s,i)=>{let c=r(a,s,l);n(a,l,{type:s,props:{id:c,...i}})},insertNode:(a,l,s)=>{let i=r(a,s.type,l);return n(a,l,{type:s.type,props:{...s.props,id:i}}),i},removeComponent:(a,l)=>{o||t({type:"remove",index:l,zone:a})},reorderComponent:(a,l,s)=>{o||t({type:"reorder",sourceIndex:l,destinationIndex:s,destinationZone:a})},duplicateComponent:(a,l)=>{o||t({type:"duplicate",sourceIndex:l,sourceZone:a})},select:a=>t({type:"setUi",ui:{itemSelector:a}}),setDocument:a=>{o||t({type:"setData",data:a})},commitDocument:a=>{o||t({type:"setData",data:()=>a,recordHistory:!0})}}},[t,o])}var bt=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],ia="bottom-left";var tn={"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 wS(e){let t=bt.indexOf(po(e));return{band:Math.floor(t/3),column:["start","center","end"][t%3]}}function vS(e){return 1+wS(e).band*6}function cN(e){return vS(e)+1}function po(e){return bt.includes(e)?e:ia}function fN(e){let t=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-40,Math.min(40,Math.round(t)))}function dN(e,t=60){let o=typeof e=="number"&&Number.isFinite(e)?e:t;return Math.max(30,Math.min(100,Math.round(o)))}function Cs(e,t){let o=po(t);return e.filter(r=>po(r?.props?.placement)===o).length}function Lu(e){return`${tn[po(e)]} already holds 4 boxes. Move one somewhere else first.`}function Ps(e,t){let o=e.filter(r=>r?.props?.id!==t);return bt.map(r=>{let n=Cs(o,r)>=4,a=tn[r];return n?{value:r,label:a,disabled:!0,title:Lu(r)}:{value:r,label:a}})}function ca(e,t){let o=t===void 0?ia:po(t?.props?.placement);return Cs(e,o)>=4?Lu(o):null}var _u="HeroGroup";function uN(e){let t=new Map,o=!1,r=e.filter(n=>{let a=po(n?.props?.placement),l=(t.get(a)??0)+1;return t.set(a,l),l<=4?!0:(o=!0,!1)});return o?r:e}function TS(e){return bt.map(t=>{let o=Cs(e,t);return{anchor:t,total:o,hidden:o-4}}).filter(t=>t.hidden>0)}function ks(e){let t=TS(e);return t.length===0?null:t.map(({anchor:o,total:r,hidden:n})=>{let a=tn[o],l=n===1?"1 is not shown":`${n} are not shown`;return`${a} holds ${r} boxes. The published page draws the first 4, so ${l}. ${n===1?"Move it":"Move them"} somewhere else.`}).join(" ")}function pN(e,t){let o=t;if(o?.type!==_u)return null;let r=o.props?.id===void 0?"":String(o.props.id);return r?ca(ws(e,r),o):null}function ws(e,t){let o=Au(e,t);return o&&o.ownerType===FS?o.siblings:[]}function mN(e,t){let o=Au(e,t);return o?o.ancestorTypes.filter(r=>r===_u).length:RS}var RS=1,FS="HeroSlide";function Au(e,t){let o=n=>Array.isArray(n)&&n.length>0&&n.every(a=>!!a&&typeof a=="object"&&typeof a.type=="string"),r=(n,a,l)=>{if(a>12||!n||typeof n!="object")return null;if(o(n)){if(n.some(s=>s?.props?.id===t))return{siblings:n,ownerType:l.at(-1)??null,ancestorTypes:l};for(let s of n){let i=s.type,c=r(s,a+1,[...l,String(i)]);if(c)return c}return null}for(let s of Object.values(n)){let i=r(s,a+1,l);if(i)return i}return null};return r(e,0,[])}var lt="site-footer";var gN=lt,IN={desktop:!0,tablet:!0,mobile:!0},hN={desktop:!1,tablet:!1,mobile:!1},vs=1,Ou=6,bN=Array.from({length:Ou-vs+1},(e,t)=>vs+t),fa={desktop:6,tablet:3,mobile:2},ES={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}},Oo=e=>Math.min(Math.max(Math.round(e),vs),Ou);function yN(e){if(typeof e=="number")return ES[Oo(e)]??{desktop:Oo(e),tablet:Oo(e),mobile:Oo(e)};if(e&&typeof e=="object"){let t=e;return{desktop:Oo(t.desktop??fa.desktop),tablet:Oo(t.tablet??fa.tablet),mobile:Oo(t.mobile??fa.mobile)}}return{...fa}}function LS(e){let t=e?.content;return Array.isArray(t)?t.find(r=>!!r&&typeof r=="object"&&r.type==="Footer")??null:null}function SN(e){let t=e?.content;return Array.isArray(t)?t.find(r=>!!r&&typeof r=="object"&&r.type===_S)??LS(e):null}var _S="SiteFooter",AS="SiteHeader";function CN(e){let t=e?.content;return Array.isArray(t)?t.find(r=>!!r&&typeof r=="object"&&r.type===AS)??null:null}function je(e,t){if(typeof e=="string")return e||t;if(e&&typeof e=="object"&&"text"in e){let o=e.text;return typeof o=="string"&&o?o:t}return t}function Nu(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}function Bu(e,t){return typeof e=="boolean"?e:t}function da(e,t){if(!Array.isArray(e))return t;let o=e.map(r=>typeof r=="string"?r:je(r?.text,"")).map(r=>r.trim()).filter(Boolean);return o.length?o:t}var ua="cart-drawer",vN="cart-drawer";var OS={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 TN(e,t){return t===0?e.subtitleEmpty:t===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(t))}function RN(e){let t=e??{},o=OS;return{kickerBadge:je(t.kickerBadge,o.kickerBadge),kickerText:je(t.kickerText,o.kickerText),titleLead:je(t.titleLead,o.titleLead),titleAccent:je(t.titleAccent,o.titleAccent),subtitleEmpty:je(t.subtitleEmpty,o.subtitleEmpty),subtitleOne:je(t.subtitleOne,o.subtitleOne),subtitleMany:je(t.subtitleMany,o.subtitleMany),leadTimeValue:je(t.leadTimeValue,o.leadTimeValue),shipsToFallback:je(t.shipsToFallback,o.shipsToFallback),promises:da(t.promises,o.promises),emptyKicker:je(t.emptyKicker,o.emptyKicker),emptyBody:je(t.emptyBody,o.emptyBody)}}var NS=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],LN={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"},BS={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"},_N={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 DS(e){return typeof e=="string"&&Kt.includes(e)?e:null}function Du(e){let t={};for(let o of NS){let r=DS(e[BS[o]]);r&&(t[o]=r)}return t}var Fs="subscribe-popup",MN="subscribe-popup";var MS=[Fs,lt,ua];function on(e){return MS.includes(e)}var HS=["delay","scroll","exit"],GS=["all","chosen"],WS=["visit","days","never"],US=["right","left"],zS={min:0,max:60},KS={min:10,max:90},$S={min:1,max:90},Rs={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:!1,autoOpenDelaySec:15,formSlug:"",trigger:"delay",scrollPercent:50,showOn:"all",showOnPages:[],hideAfter:"days",hideDays:7,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},xe=je,VS=Nu,Mu=Bu,Gu=da;function pa(e,t,o){return typeof t=="string"&&e.includes(t)?t:o}function Ts(e,t,o){let r=VS(e,o);return Math.min(t.max,Math.max(t.min,Math.round(r)))}function qS(e){return typeof e.hideAfter=="string"?pa(WS,e.hideAfter,Rs.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Rs.hideAfter}function YS(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t.trim():"").filter(Boolean).map(t=>t.startsWith("/")?t:`/${t}`):[]}function Hu(e,t){if(e==null)return t;let o=r=>r.trim()?r:"";if(typeof e=="string")return o(e);if(typeof e=="object"&&"text"in e){let r=e.text;return typeof r=="string"?o(r):""}return t}function XS(e,t){return Array.isArray(e)?Gu(e,[]):t}function jS(e,t){return Array.isArray(e)?e.map(o=>{let r=o??{};return{label:xe(r.label,""),value:xe(r.value,"")}}).filter(o=>o.label||o.value):t}function HN(e){let t=e??{},o=Rs;return{metaLabel:xe(t.metaLabel,o.metaLabel),issueLabel:Hu(t.issueLabel,o.issueLabel),issueNumber:Hu(t.issueNumber,o.issueNumber),kicker:xe(t.kicker,o.kicker),heading:xe(t.heading,o.heading),deck:xe(t.deck,o.deck),stats:jS(t.stats,o.stats),formLabel:xe(t.formLabel,o.formLabel),formHeading:xe(t.formHeading,o.formHeading),formIntro:xe(t.formIntro,o.formIntro),firstNameLabel:xe(t.firstNameLabel,o.firstNameLabel),firstNamePlaceholder:xe(t.firstNamePlaceholder,o.firstNamePlaceholder),emailLabel:xe(t.emailLabel,o.emailLabel),emailPlaceholder:xe(t.emailPlaceholder,o.emailPlaceholder),interestsLabel:xe(t.interestsLabel,o.interestsLabel),interests:Gu(t.interests,o.interests),frequencyLabel:xe(t.frequencyLabel,o.frequencyLabel),frequencies:XS(t.frequencies,o.frequencies),submitText:xe(t.submitText,o.submitText),finePrint:xe(t.finePrint,o.finePrint),dismissText:xe(t.dismissText,o.dismissText),emailInvalidText:xe(t.emailInvalidText,o.emailInvalidText),submitErrorText:xe(t.submitErrorText,o.submitErrorText),successHeading:xe(t.successHeading,o.successHeading),successBody:xe(t.successBody,o.successBody),keepBrowsingText:xe(t.keepBrowsingText,o.keepBrowsingText),formSlug:typeof t.formSlug=="string"?t.formSlug.trim():o.formSlug,autoOpen:Mu(t.autoOpen,o.autoOpen),autoOpenDelaySec:Ts(t.autoOpenDelaySec,zS,o.autoOpenDelaySec),trigger:pa(HS,t.trigger,o.trigger),scrollPercent:Ts(t.scrollPercent,KS,o.scrollPercent),showOn:pa(GS,t.showOn,o.showOn),showOnPages:YS(t.showOnPages),hideAfter:qS(t),hideDays:Ts(t.hideDays,$S,o.hideDays),formSide:pa(US,t.formSide,o.formSide),valuePanelOnPhone:Mu(t.valuePanelOnPhone,o.valuePanelOnPhone),sectionAccent:t.sectionAccent,sectionCorners:t.sectionCorners,sectionCornerSides:t.sectionCornerSides,textStyles:Du(t)}}var mo=class extends Error{constructor(t,o,r={}){super(o??JS[t],r.cause===void 0?void 0:{cause:r.cause}),this.name="WebsiteBackendError",this.kind=t,this.conflict=r.conflict,this.holder=r.holder}},JS={unauthorized:"The editor's sign-in was refused.","changed-elsewhere":"This page was changed somewhere else.","lock-taken":"Somebody else is editing this page.","not-found":"This no longer exists.",invalid:"The request was refused.",unavailable:"The server could not be reached."};function ma(e,t){if(!e||typeof e!="object")return!1;let o=e;return o.name!=="WebsiteBackendError"||typeof o.kind!="string"?!1:t===void 0||o.kind===t}import{readLockHolder as gC}from"efficient-easel/edit-lock";var Ls="/api/storefront/section-templates/",Es=e=>`${Ls}${encodeURIComponent(e)}/`,_s=e=>e.node!=null;function xa(e){if(!_s(e))throw new Error(`Section template ${e.id} has no design`);return e}var Os=(e,t)=>e instanceof at&&e.status===t;function ZS(e){return{list:()=>sr(`${Ls}?no_page=true`,{token:e()}).then(t=>Array.isArray(t)?t:t.results??[]),get:t=>sr(Es(t),{token:e()}).catch(o=>{if(Os(o,404))return null;throw o}),create:t=>sr(Ls,{method:"POST",token:e(),body:JSON.stringify(t)}),patch:(t,o)=>sr(Es(t),{method:"PATCH",token:e(),body:JSON.stringify(o)}),remove:t=>sr(Es(t),{method:"DELETE",token:e()})}}var As="sf:section-templates",Wu=`${As}.imported`,QS="Untitled section",eC=160,ga=e=>(typeof e=="string"?e.trim().slice(0,eC):"")||QS;function tC(e){try{let t=JSON.parse(e);return Array.isArray(t)?t.filter(o=>{let r=o?.node;return typeof o?.id=="string"&&typeof r?.type=="string"}):[]}catch{return[]}}async function oC(e,t=xs){let o={created:0,seeded:0,left:0,skipped:0,kept:!1},r=t.getItem(As);if(r===null)return o;for(let n of tC(r))try{let a=await e.get(n.id);if(a)a.node==null?(await e.patch(n.id,{node:n.node}),o.seeded+=1):o.left+=1;else try{await e.create({id:n.id,name:ga(n.name),node:n.node}),o.created+=1}catch(l){if(!Os(l,400))throw l;o.skipped+=1}}catch{return{...o,kept:!0}}return t.setItem(Wu,r),t.getItem(Wu)===r&&t.removeItem(As),o}var Ia=class{constructor(t,o=xs){this.readToken=t;this.storage=o;this.imported=null;this.http=ZS(t)}ready(){return this.imported?this.imported:this.readToken()?(this.imported=oC(this.http,this.storage).catch(()=>{}),this.imported):Promise.resolve()}async list(){return await this.ready(),(await this.http.list()).filter(_s)}async get(t){return await this.ready(),this.http.get(t)}async ensure(t,o,r){await this.ready();let n=async l=>l?_s(l)?l:xa(await this.http.patch(t,{node:r})):null,a=await n(await this.http.get(t));if(a)return a;try{return xa(await this.http.create({id:t,name:ga(o),node:r}))}catch(l){if(Os(l,400)){let s=await n(await this.http.get(t));if(s)return s}throw l}}async save(t,o){return await this.ready(),xa(await this.http.create({name:ga(t),node:o}))}async update(t,o){return await this.ready(),xa(await this.http.patch(t,{node:o}))}async rename(t,o){return await this.ready(),this.http.patch(t,{name:ga(o)})}async remove(t){await this.ready(),await this.http.remove(t)}};var dt="homepage";var rC="product",nC="tyre";var aC="productType",lC={[rC]:"alloy-wheel",[nC]:"tyre"},sC=["alloy-wheel","tyre"];function VN(e,t){return iC(t)??lC[e]??null}function iC(e){let t=e?.[aC];return typeof t=="string"&&sC.includes(t)?t:null}var cC=["home","products","gallery","about","contact"],fC=e=>{let t=e.slug.trim().toLowerCase(),o=(e.title??"").trim().toLowerCase(),r=cC.findIndex(n=>n===t||n===o);return r===-1?Number.POSITIVE_INFINITY:r},Uu=e=>e.map((t,o)=>({page:t,idx:o,rank:fC(t)})).sort((t,o)=>t.rank-o.rank||t.idx-o.idx).map(t=>t.page);var $u="Popups",zu="Site",dC="Main Pages",uC="Dynamic Pages",pC="dynamic",mC="dynamic";function xC(e){return e.kind===mC}var Vu={[Fs]:{label:"Site popup",group:$u},[lt]:{label:"Footer",group:zu},[ua]:{label:"Cart drawer",group:zu}};function rn(e){return Vu[e.slug]?.label||e.title||e.slug}function Ns(e){let t=e.group?.trim();return t||null}function Ku(e,t){let o=new Map;for(let r of e){let n=t(r),a=o.get(n);a?a.push(r):o.set(n,[r])}return o}function qu(e){let t=Uu(e),o=[],r=t.filter(s=>!on(s.slug)),n=r.filter(s=>!Ns(s));n.length&&o.push({key:"top",group:null,pages:n});let a=r.filter(s=>Ns(s));for(let[s,i]of Ku(a,c=>Ns(c)))o.push({key:`folder:${s}`,group:s,pages:i});let l=t.filter(s=>on(s.slug));for(let[s,i]of Ku(l,c=>Vu[c.slug]?.group??$u))o.push({key:`system:${s}`,group:s,pages:i});return o}function tB(e){let t=[],o=[];for(let r of e){if(xC(r)){o.push(r);continue}let n=r.groupKey??(r.group?`folder:${r.group}`:"top"),a=t[t.length-1];a&&a.key===n?a.rows.push(r):t.push({key:n,label:r.group??dC,rows:[r]})}if(o.length){let r=t.findIndex(n=>n.key.startsWith("system:"));t.splice(r===-1?t.length:r,0,{key:pC,label:uC,rows:o})}return t}var an="page_changed_elsewhere",nn=e=>e.layout_updated_at??e.updated_at??null;function IC(e){if(!e||typeof e!="object")return null;let t=e;return t.code!==an?null:{savedBy:typeof t.saved_by=="string"?t.saved_by:"",savedByYou:t.saved_by_you===!0,secondsAgo:typeof t.seconds_ago=="number"?t.seconds_ago:0}}function hC(e){return e===401||e===403?"unauthorized":e===404?"not-found":e===lr||e>=500?"unavailable":"invalid"}function bC(e){if(!(e instanceof at))return e;if(e.status===409){let t=IC(e.data);if(t)return new mo("changed-elsewhere",e.message,{conflict:t,cause:e});let o=gC(e.data);if(o)return new mo("lock-taken",e.message,{holder:o,cause:e})}return new mo(hC(e.status),e.message,{cause:e})}var yC={group:"Template pages",groupKey:"template"},Yu=e=>({id:e.id,slug:e.slug,label:e.title||e.slug,...yC,draft:!1});function ju(e){let t=async s=>{let i=e.token();if(!i)throw new mo("unauthorized","The editor has no sign-in yet.");try{return await s(i)}catch(c){throw bC(c)}},o={list:s=>t(async i=>{let c=await oe.listPages(i,s?.siteId);return qu(c.filter(f=>f.slug!==lt)).flatMap(f=>f.pages.map(u=>({id:u.id,slug:u.slug,label:rn(u),group:f.group,groupKey:f.key,draft:!u.is_published,kind:u.kind??null})))}),load:s=>t(async i=>{let c="id"in s?s.id:(await oe.findPageBySlug(s.slug,i,s.siteId))?.id,f=c?await oe.getPageById(c,i):null;return f?{id:f.id,layout:f.layout,kind:f.kind,version:nn(f)}:null}),save:(s,i,c)=>{let{version:f}=c;return f?t(async u=>({version:nn(await oe.saveLayout(s,i.layout,u,f,c.clientId||void 0))})):Promise.reject(new Error("Refusing to save this page: the editor does not know which version it is replacing. Reload the page and try again."))},version:s=>t(i=>oe.getPageById(s,i).then(nn)),publish:(s,i)=>t(async c=>({version:nn(await oe.publishPage(s,c,i?.version))}))},r=s=>({list:()=>t(async i=>(await oe.listTemplatePages(s,i)).map(Yu)),load:i=>t(async c=>{let f=x=>"id"in i?x.id===i.id:x.slug===i.slug,u=x=>({id:x.id,layout:x.layout,version:null}),d=await oe.listTemplatePages(s,c);if(d.length)return u(d.find(f)??d[0]);let p=await oe.getTemplate(s,c).catch(()=>null);try{return u(await oe.createTemplatePage(s,{slug:dt,title:"Home",layout:p?.layout??{}},c))}catch{let x=await oe.listTemplatePages(s,c),g=x.find(f)??x[0];return g?u(g):null}}),save:(i,c)=>t(async f=>(await oe.saveTemplatePageLayout(i,c.layout,f),{version:null})),create:i=>t(async c=>Yu(await oe.createTemplatePage(s,{slug:i.slug,title:i.title,layout:i.layout},c))),remove:i=>t(c=>oe.deleteTemplatePage(i,c))}),n=s=>{let i=s?.siteId??e.siteId();if(!i)throw new mo("not-found","This editor is not connected to a website.");return i},a=s=>({name:s.name,slug:s.slug,mapsApiKey:s.maps_api_key,mapsMapId:s.maps_map_id}),l={pages:o,lock:{claim:(s,i,c)=>t(async f=>({heartbeatSeconds:(await oe.claimPageEditLock(s,f,i,c)).heartbeat_seconds})),release:s=>t(i=>oe.releasePageEditLock(s,i))},site:{get:s=>t(async i=>a(await oe.getSite(n(s),i))),update:(s,i)=>t(async c=>a(await oe.updateSite(n(i),s.mapsApiKey===void 0?{}:{maps_api_key:s.mapsApiKey},c)))},media:{resolve:jd},sectionTemplates:new Ia(e.token),templates:{get:s=>t(async i=>{let c=await oe.getTemplate(s,i);return{id:c.id,name:c.name}}),pages:r}};return l[$d]=!0,l}var Xu=new WeakMap;function ln(e=Ye()){if(e.hostBackend)return e.hostBackend;let t=Xu.get(e);return t||(t=ju({token:()=>e.auth.token,siteId:()=>e.siteId()}),Xu.set(e,t)),t}function uB(e={}){return ju({token:()=>Ye().auth.token,siteId:()=>e.siteId??Ye().siteId()})}var Ju=["general","commerce","service"],fr=[{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:"BrandStrip",label:"Brand Strip",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:"TimelineTrack",label:"Milestone 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"},{type:"KeyFeatures",label:"Key Features",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:"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 mB(){return Object.fromEntries(fr.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var SC={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.',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."},xB=["Grid"],gB=Array.from(new Set([...fr.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(SC)])),IB=Object.fromEntries(fr.flatMap(e=>e.sections.map(t=>[t.type,t.label]))),CC={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"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"},ha={...CC,...Object.fromEntries(fr.flatMap(e=>e.sections.map(t=>[t.type,t.set])))};function Zu(e){return Object.prototype.hasOwnProperty.call(ha,e)?ha[e]:void 0}function Bs(e){return Object.keys(ha).filter(t=>ha[t]===e).sort()}var hB=Bs("general"),bB=Bs("commerce"),yB=Bs("service"),PC="Flex",xo="Box",SB=`${xo}es`;function kC(e){return e==="section"?"Blank section":xo}function CB(e,t,o){return e===PC?kC(t):o}import{createContext as wC,useContext as vC,useEffect as TC}from"react";import{jsx as RC}from"react/jsx-runtime";var Qu=wC(null);function vB({session:e,children:t}){return Is(e),TC(()=>(Is(e),()=>Yd(e)),[e]),RC(Qu.Provider,{value:e,children:t})}function ba(){return vC(Qu)??Ye()}var Ds="sf-editor-footer-return";function FB(e){if(!(typeof window>"u"))try{window.sessionStorage.setItem(Ds,e)}catch{}}function Ms(){if(typeof window>"u")return null;try{return window.sessionStorage.getItem(Ds)}catch{return null}}function Hs(){if(!(typeof window>"u"))try{window.sessionStorage.removeItem(Ds)}catch{}}import{accessForNewDocument as FC}from"efficient-easel/edit-lock";function ep(e){return e.failed?"error":e.pending?"saving":e.saved?"saved":"idle"}function _B(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function tp(e,t){t.resetAutosave(),t.setVersion(null),t.setSaveConflict(null),t.setAccess(FC(e))}import{useEffect as EC,useState as LC}from"react";function dr(){return Ye().auth.token}function op({fetch:e,keyBy:t}){let o=null,r=null,n=null;return(a=!1)=>{let l=dr(),s=t?t():null;return(a||!o||r===null&&l!==null||n!==s)&&(r=l,n=s,o=l?e(l,s).catch(()=>[]):Promise.resolve([])),o}}var ya=op({fetch:(e,t)=>oe.listProducts(e,{siteId:t,kinds:["alloy-wheel","tyre"]}),keyBy:_o}),No=(e=!1)=>ya(e).then(t=>t.filter(o=>o.kind==="alloy-wheel"));function rp(e){let[t,o]=LC(null);return EC(()=>{let r=!1;return e().then(n=>{r||o(n)}),()=>{r=!0}},[e]),t}function UB(){return rp(No)}function zB(){return rp(ya)}import{createContext as _C,useContext as AC,useEffect as OC,useSyncExternalStore as NC}from"react";import{jsx as HC}from"react/jsx-runtime";var np=_C(null),sn=null;function VB({panel:e,children:t}){return sn=e,OC(()=>(sn=e,()=>{sn===e&&(sn=null,ip(Ft?.request.requestId??"",null))}),[e]),HC(np.Provider,{value:e,children:t})}function qB(){return AC(np)}function ap(){return sn!==null}var Ft=null,Gs=new Set,lp=()=>{for(let e of[...Gs])e()};function sp(e){return new Promise(t=>{let o=Ft;Ft={request:e,resolve:t},lp(),o?.resolve(null)})}function ip(e,t){if(!Ft||Ft.request.requestId!==e)return;let{resolve:o}=Ft;Ft=null,lp(),o(t)}function YB(){Ft&&ip(Ft.request.requestId,null)}function BC(e){return Gs.add(e),()=>{Gs.delete(e)}}var DC=()=>Ft?.request??null,MC=()=>null;function XB(){return NC(BC,DC,MC)}var Ws=new Map,cp=0;function GC(){return cp+=1,`mp-${typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():String(cp)}`}function Us(e,t){if(!e.connected)return Promise.resolve(null);let o=GC();return ap()?sp({requestId:o,accept:t.accept,title:t.title,file:t.file??null}):new Promise(r=>{Ws.set(o,r),e.send("storefront-editor:open-media-picker",{requestId:o,accept:t.accept,title:t.title,...t.file?{file:t.file}:{}})})}function zs(e,t){let o=Ws.get(e);o&&(Ws.delete(e),o(t))}var WC={"Logos.logosPerRow":"columns","HeroSlide.tintOpacity":"overlay","Split.textBgTint":"overlay"};function UC(e){return Array.isArray(e)&&e.length>0&&e.every(t=>!!t&&typeof t=="object"&&typeof t.type=="string")}function Ks(e){let t=e.props,o=!1;if(e.type&&t)for(let[r,n]of Object.entries(WC)){let a=r.indexOf("."),l=r.slice(0,a),s=r.slice(a+1);if(l!==e.type||!(s in t))continue;let i=t[s],c={...t};delete c[s],(!(n in c)||c[n]===void 0)&&(c[n]=i),t=c,o=!0}if(t){let r=t;for(let[n,a]of Object.entries(t)){if(!UC(a))continue;let l=a.map(Ks);l.some((s,i)=>s!==a[i])&&(r===t&&(r={...t}),r[n]=l,o=!0)}t=r}return o?{...e,props:t}:e}function fp(e){let t=e;if(!t||typeof t!="object")return e;let o=!1,r={...e};if(Array.isArray(t.content)){let n=t.content.map(Ks);n.some((a,l)=>a!==t.content[l])&&(r.content=n,o=!0)}if(t.zones&&typeof t.zones=="object"){let n=!1,a=Object.fromEntries(Object.entries(t.zones).map(([l,s])=>{if(!Array.isArray(s))return[l,s];let i=s.map(Ks);return i.some((c,f)=>c!==s[f])&&(n=!0),[l,i]}));n&&(r.zones=a,o=!0)}return o?r:e}import{createContext as wT,useCallback as we,useContext as vT,useEffect as ut,useMemo as bc,useRef as ot,useState as Ct}from"react";var zC={general:!0,commerce:!0,service:!0};function $s(e){let t=e?.sets;return t?Object.fromEntries(Ju.map(o=>[o,t.includes(o)])):zC}function cn(e=Ye()){return $s(e.blocks)}function dp(e,t){let o=t?{siteId:t}:void 0;return{resolve:r=>e.load({slug:r,...o}),saveLayout:(r,n,a,l)=>e.save(r,{layout:n},{version:a,clientId:l??""}),rereadVersion:e.version?r=>e.version(r):void 0,publish:e.publish?(r,n)=>e.publish(r,n?{version:n}:void 0):void 0,listPages:()=>e.list(o),createPage:e.create?r=>e.create({...r,...o}):void 0,deletePage:e.remove?r=>e.remove(r):void 0}}function up(e,t=ln(),o=cn()){let r=gs(t),n=e?{siteId:e}:void 0,a=r?!!e:!0,l=t.site.update;return{capabilities:{canPublish:!!t.pages.publish,hasSiteSettings:r,hasSiteTheme:r,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!t.pages.create,canDeletePagesInline:!!t.pages.remove,hasEditLock:!!t.lock,hasEditGuard:!0,hasPinnedChrome:r&&o.commerce&&o.service,explainsSiteSettings:!1,hasSiteRecord:a,canEditSiteRecord:a&&!!l,hasPreviewLink:r||!!t.preview,hasCatalog:r&&o.commerce,hasForms:r&&o.service,offersCommerce:o.commerce,offersService:o.service},...dp(t.pages,e),lock:t.lock,site:a?()=>t.site.get(n):void 0,updateSite:a&&l?s=>l(s,n):void 0,previewHref:t.preview?s=>t.preview.href(s):void 0}}function pp(e,t=ln(),o=cn()){let r=gs(t),n=t.templates,a=n?n.pages(e):{list:()=>Promise.reject(new Error(Vs)),load:()=>Promise.reject(new Error(Vs)),save:()=>Promise.reject(new Error(Vs))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!a.create,canDeletePagesInline:!!a.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:r&&o.commerce&&o.service,explainsSiteSettings:r,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:r&&o.commerce,hasForms:r&&o.service,offersCommerce:o.commerce,offersService:o.service},...dp(a,void 0),publish:void 0,templateName:n?()=>n.get(e).then(l=>l.name):void 0}}var Vs="This editor's backend has no website templates.";import{EDIT_LOCK_TAKEN as KC}from"efficient-easel/edit-lock";var $C={unauthorized:401,"changed-elsewhere":409,"lock-taken":409,"not-found":404,invalid:400,unavailable:lr};function qs(e){if(e instanceof at)return{status:e.status,data:e.data};if(!ma(e))return null;if(e.cause instanceof at)return{status:e.cause.status,data:e.cause.data};let t=$C[e.kind];return e.kind==="changed-elsewhere"?{status:t,data:{code:an,saved_by:e.conflict?.savedBy??"",saved_by_you:e.conflict?.savedByYou===!0,seconds_ago:e.conflict?.secondsAgo??0}}:e.kind==="lock-taken"?{status:t,data:{code:KC,holder_name:e.holder?.name??"",seconds_since_seen:e.holder?.secondsSinceSeen??0,seconds_since_held:e.holder?.secondsSinceHeld??0}}:{status:t,data:null}}function mp(e){return qs(e)?.status===401}import{Fragment as VC}from"react";function Sa(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}import{jsx as qC,jsxs as YC}from"react/jsx-runtime";var Ca=["FusionForge\xAE","Precision Forged","Monoblock Cast"];function Ys(e){return Sa(e)}function xp(e){let t=e.split("\xAE");return t.length===1?e:t.map((o,r)=>YC(VC,{children:[o,r<t.length-1&&qC(ru,{})]},r))}var gp=Ca.map((e,t)=>({key:e,num:String(t+1).padStart(2,"0"),title:xp(e)}));function Xs(e){if(e.length===0)return[...Ca];let t=new Set(e.map(o=>o.process));return Ca.filter(o=>t.has(o))}function Ip(e){return Xs(e).map((t,o)=>({key:t,num:String(o+1).padStart(2,"0"),title:xp(t)}))}var I1=Object.fromEntries(Ca.map(e=>[e,Ys(e)]));var hp=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],bp={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Et="var(--wheel-stage)",Lt="transparent",fn="inherit";function Pa(e,t){return e===fn?Et:e==null?t:e===!0?Et:e===!1?Lt:e}function y1(e){return typeof e=="string"&&e!==fn?e:Et}function yp(e){return e!==Lt&&e!=="none"&&e!==""}function Sp(e,t){return e===fn||e===!0?!0:e==null?t===Et:!1}import{useEffect as Ag,useId as Qv,useMemo as wr}from"react";var Cp=1;function XC(e){return so(e)}function Pp(e){let t=XC(e);return t===null?{}:{"--sf-card-image-radius":`${t}px`}}var vp="sf.gapContainer",go={min:-32,max:64,step:2},Tp={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},ka={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},jC=new Set(["Events","GalleryB"]);function Js(e,t,o){if(typeof t=="number"&&Number.isFinite(t)&&t>=go.min)return t;if(typeof t=="string"){let r=Tp[e]?.[t];if(typeof r=="number")return r}return typeof o=="number"&&Number.isFinite(o)?o:ka[e]}var JC="sf-gap-overlap",ZC="--sf-gap-overlap",Rp="--sf-block-gap",QC="--sf-block-gap-rem",js={min:0,max:go.max,step:go.step};function eP(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.min(Math.max(Math.round(e),js.min),js.max);return t-t%js.step}function k1(e){let t=eP(e);return t===null?{}:{[Rp]:`${t}px`,[QC]:`${t/16}rem`}}var kp="sf-gap-zone",wp="--sf-gap-len";function Zs(e,t){return typeof t=="number"&&Number.isFinite(t)&&t>=go.min?!0:typeof t=="string"&&typeof Tp[e]?.[t]=="number"}var tP={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function Fp(e,t,o){if(!Zs(e,t)){let n=`${ka[e]}px`,a=jC.has(e)?`var(--sf-card-gap, ${n})`:n;return{className:` ${kp}`,style:{[wp]:`var(${Rp}, ${a})`}}}let r=Js(e,t);return r>=0?{className:` ${kp}`,style:{[wp]:`${r}px`}}:{className:` ${JC} ${tP[o]}`,style:{gap:"0px",[ZC]:`${-r/2}px`}}}import{useMemo as bk,useState as yk}from"react";function oP(e){return(e.components??[]).reduce((o,r)=>o+r.wheels,0)>4}function T1(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(oP)}var rP=150,nP="Front + rear",Ep="L/R pair",Lp="Not handed",aP="L/R";function lP(e){return e.et==null||e.rearEt==null?0:Math.abs(e.rearEt-e.et)}function sP(e){return lP(e)>=rP}function R1(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(sP)}function ur(e){return e.directional===!0}function _p(e){return e.rearWidth!=null||e.rearEt!=null&&e.rearEt!==e.et}function Ap(e){return{twoObjects:cP(e),handed:e.handed??!1,staggered:!1}}function Op(e){let t=[e.twoObjects?nP:"",e.handed?aP:""].filter(Boolean);return t.length?t.join(" \xB7 "):null}function Np(e){return e.handed}function iP(e){return new Set((e.components??[]).map(t=>t.partNumber)).size>1}function F1(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(iP)}function cP(e){return(e.setWheelCount??0)>4}var fP=new Set(["boltPattern"]);function E1(e,t){return e&&fP.has(t)}function dP(e){return typeof e=="number"?String(e):""}function Bp(e){let t=dP(e);return t&&`${t} LUG`}function Qs(e){let t=e.spec?.lugs;return typeof t=="number"?t:null}function Dp(e){let t=new Set;for(let o of e){let r=Qs(o);r!==null&&t.add(r)}return[...t].sort((o,r)=>o-r)}function Be(e){return Number.isInteger(e)?String(e):String(Number(e.toFixed(2)))}function Mp(e,t){return e===t?`ET ${e}`:`ET ${e}\u2013${t}`}function Hp(e,t){return e===t?`${Be(e)}"`:`${Be(e)}"\u2013${Be(t)}"`}function A1(e){return e==="\u2014"?e:`${e}"`}function uP(e){return e.length===0?null:{min:Math.min(...e),max:Math.max(...e)}}function wa(e){let t=uP(e);return t?Hp(t.min,t.max):null}function Gp(e){let t=new Set;for(let o of e)for(let r of o.sizes??[])typeof r=="number"&&t.add(r);return[...t].sort((o,r)=>o-r)}var Wp=5,Kp=.2;function $p(e){if(!e)return{holes:null,circles:[]};let t=e.replace(/\([^)]*\)?/g," ").trim(),o=t.match(/^\s*(\d+)\s*[x×*]\s*(.+)$/i),r=o?Number(o[1]):null,a=(o?o[2]:t).split(/[-/,]/).map(l=>Number(l.trim().replace(/[^\d.]/g,""))).filter(l=>Number.isFinite(l)&&l>0);return{holes:r,circles:a}}function ei(e){if(!e||e.length<2)return null;let[t,o]=e;return!Number.isFinite(t)||!Number.isFinite(o)?null:[Math.min(t,o),Math.max(t,o)]}function G1(e){if(!e)return null;let t=$p(e.pcd||e.boltPattern);if(t.holes===null||t.circles.length===0)return null;let o=t.circles[0],r=ei(e.etRange),n=r?[r[0]-Wp,r[1]+Wp]:null;return{holes:t.holes,circle:o,centreBore:typeof e.centreBore=="number"&&e.centreBore>0?e.centreBore:null,etRange:n}}function pP(e,t){return Math.abs(e-t)<=Kp}function Vp(e,t,o){let r=$p(e);return(r.holes??t)!==o.holes?!1:r.circles.some(a=>pP(a,o.circle))}function qp(e,t){return t.centreBore===null?!0:e+Kp>=t.centreBore}function mP(e,t){return e[0]<=t[1]&&e[1]>=t[0]}function va(e,t){let o=`${t.holes}\xD7${t.circle}`;return e.pcds.length===0?{key:"unverifiable",wheel:"",vehicle:o}:e.pcds.some(r=>Vp(r,e.lugs,t))?t.etRange!==null&&e.etRange!==null&&!mP(e.etRange,t.etRange)?{key:"et",wheel:Ta(e.etRange),vehicle:Ta(t.etRange)}:e.centreBores.length>0&&!e.centreBores.some(r=>qp(r,t))?{key:"bore",wheel:`${e.centreBores.join(" / ")} mm`,vehicle:`${t.centreBore} mm`}:null:{key:"pcd",wheel:e.pcds.join(" / "),vehicle:o}}function Yp(e){return{pcds:e.spec?.pcds??[],lugs:e.spec?.lugs??null,etRange:ei(e.spec?.etRange),centreBores:e.spec?.centreBores??[]}}function Xp(e){let t=e.et,o=e.rearEt??e.et;return{pcds:e.boltPattern?[e.boltPattern]:[],lugs:null,etRange:t==null||o==null?null:[Math.min(t,o),Math.max(t,o)],centreBores:e.centreBore==null?[]:[e.centreBore]}}function jp(e,t){let o=va(e,t);return o===null||o.key!=="et"?o:va(e,{...t,etRange:null})}function W1(e,t){return va(Yp(e),t)}function U1(e,t){return va(Xp(e),t)}function xP(e,t){return jp(Xp(e),t)===null}function Jp(e,t){return t?e.filter(o=>xP(o,t)):[...e]}function gP(e,t){return jp(Yp(e),t)===null}function Zp(e,t){return t?e.filter(o=>gP(o,t)):e}var Up=1;function IP(e,t){let o=e.spec?.pcds??[],r=e.spec?.centreBores??[],n=ei(e.spec?.etRange);if(!t)return{pcds:o,etRange:n,centreBores:r};let a=e.spec?.lugs??null,l=o.filter(i=>Vp(i,a,t)),s=r.filter(i=>qp(i,t));return{pcds:l.length>0?l:o,etRange:n,centreBores:s.length>0?s:r}}function Ta(e){return Mp(e[0],e[1])}function zp(e){let t=e.slice(0,Up).join(" / "),o=e.length-Up;return o>0?`${t} +${o}`:t}var z1="\xB7";function Qp(e){return[{fieldKey:"diameter",text:wa(e.sizes)},{fieldKey:"holes",text:Bp(e.spec?.lugs)}].filter(t=>!!t.text)}function K1(e,t){let{pcds:o,etRange:r,centreBores:n}=IP(e,t),a=[];return o.length>0&&a.push({fieldKey:"pcd",text:`PCD ${zp(o)}`}),r!==null&&a.push({fieldKey:"et",text:Ta(r)}),n.length>0&&a.push({fieldKey:"center_bore",text:`C/B ${zp(n)} mm`}),a}function hP(e){return e?[{key:"pcd",name:"Bolt pattern",value:`${e.holes}\xD7${e.circle}`},{key:"bore",name:"Hub bore",value:e.centreBore!==null?`${e.centreBore} mm bore`:null},{key:"et",name:"Offset",value:e.etRange!==null?Ta(e.etRange):null}]:[]}function $1(e){return hP(e).map(t=>t.value).filter(t=>t!==null).join(" \xB7 ")}var pr="off",Io="none",ti=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],oi=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function em(e){return Xe(ti,pr,e)}function Y1(e){return Xe(oi,Io,e)}var Ra="sf-card-index",dn="sf-card-index",tm="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",bP={plain:`counter(${dn})`,padded:`counter(${dn}, decimal-leading-zero)`,numero:`"N\xB0" counter(${dn}, decimal-leading-zero)`};function om(e,t){return t==="off"?"":`.${e}{counter-reset:${dn}}.${e} .${Ra}{counter-increment:${dn}}.${e} .${Ra}::before{content:${bP[t]}}`}function rm(e){return e==="hairline"?"border border-line hover:border-accent":""}var nm=[{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"}];function j1(e){let t=typeof e=="number"?e:Number.parseInt(String(e??""),10);return!Number.isFinite(t)||t<1||t>5?1:Math.trunc(t)}function yP(e,t){if(!e||!t||!Number.isFinite(t)||t<=0)return null;let o=e.lugRenderings?.[String(t)];if(!Array.isArray(o))return null;let r=o.filter(n=>typeof n=="string"&&n.length>0);return r.length>0?r:null}function SP({carRenderings:e,renderings:t,coverIndex:o,shownFinishName:r,defaultFinishName:n,shownSrc:a}){if(e&&e.length>0){let s=Math.min(Math.max(o,1)-1,e.length-1);return e[s]??a}if(o<=1||!t||t.length===0||!n||r!==n)return a;let l=Math.min(o-1,t.length-1);return t[l]??a}function am({overrideSrc:e,hookSrc:t,failed:o}){return e&&!o.has(e)?e:t&&t!==e&&!o.has(t)?t:null}function lm(e,t,o,r,n){let a=o===void 0?void 0:e.finishes?.find(l=>l.name===o);return SP({carRenderings:yP(a,n),renderings:e.defaultFinishRenderings,coverIndex:t,shownFinishName:o,defaultFinishName:e.defaultFinish,shownSrc:r})}function mr(e,t){return e.length===0?e:e.filter(o=>o.kind===void 0||o.kind===t)}function sm(e,t){if(t.length===0)return e;let o=xr(t);return Fa(e.filter(r=>o(r.fieldKey)),r=>r.fieldKey,t,"cardOrder")}function im(e,t){let o=t==="filter"?"filterOrder":"cardOrder",r=new Map;for(let n of e){let a=n[o];if(typeof a!="number"||!Number.isFinite(a))continue;let l=r.get(n.fieldKey);(l===void 0||a<l)&&r.set(n.fieldKey,a)}return n=>n?r.get(n):void 0}function CP(e){return La(e,"spec")}function Z1(e){return La(e,"fitment")}function Q1(e,t){if(t.length===0)return e;let o=CP(t),r=e.filter(n=>o(n.fieldKey));return Fa(r,n=>n.fieldKey,t,"specOrder")}function Fa(e,t,o,r){let n=new Map;for(let i of o){let c=i[r];typeof c=="number"&&n.set(i.fieldKey,c)}if(n.size===0)return e;let a=[],l=[];e.forEach((i,c)=>{let f=t(i);f&&(a.push(c),l.push({item:i,index:c,order:n.get(f)}))}),l.sort((i,c)=>i.order!==void 0&&c.order!==void 0?i.order-c.order||i.index-c.index:i.order!==void 0?-1:c.order!==void 0?1:i.index-c.index);let s=[...e];return a.forEach((i,c)=>{s[i]=l[c].item}),s.every((i,c)=>i===e[c])?e:s}function xr(e){return La(e,"card")}function cm(e){return La(e,"filter")}var Ea="collection";function ri(e,t){return{tyreSizes:{},brands:{"alloy-wheel":"brand",tyre:"brand"},finishes:{"alloy-wheel":"wheel_finish_ref"},diameters:{"alloy-wheel":"diameter",tyre:"rim_diameter"},collections:{"alloy-wheel":Ea},pcds:{"alloy-wheel":"pcd"},tyreTypes:{tyre:"tire_type"},speedRatings:{tyre:"speed_rating"}}[e]?.[t]}function La(e,t){let o=new Set(e.filter(r=>r[t]===!1).map(r=>r.fieldKey));return r=>!r||!o.has(r)}import{Fragment as PP,jsx as fm,jsxs as kP}from"react/jsx-runtime";function ni(e,t){return!e&&!t?null:kP(PP,{children:[e&&fm("span",{className:"text-fg",children:e}),e&&t?fm("span",{className:"mx-[6px] text-fg-dim",children:"\xB7"}):null,t]})}function ai(e,t){let o=xr(t);return e.kind||e.brand&&o("brand")?!0:e.process&&o(Ea)}function dm({kindLabel:e,brand:t,process:o},r){if(!ai({kind:!!e,brand:!!t,process:!!o},r))return null;let n=xr(r);return ni(e,n("brand")?t:null)??(n(Ea)?o:null)}import{jsx as li,jsxs as wP}from"react/jsx-runtime";function si({finishes:e,availability:t,selectedIdx:o,hoverIdx:r,activeFinish:n,onSelect:a,onHover:l,showLabel:s=!0,className:i}){return wP("div",{className:["mt-4",i].filter(Boolean).join(" "),children:[li("div",{className:"flex flex-wrap items-center gap-2",onMouseLeave:()=>l(null),onClick:c=>c.preventDefault(),children:e.map((c,f)=>{if(!t[f])return null;let u=f===o,d=r===f&&r!==o;return li("button",{type:"button",title:c.name,"aria-label":c.name,"aria-pressed":u,onMouseEnter:()=>l(f),onFocus:()=>l(f),onBlur:()=>l(null),onClick:p=>{p.preventDefault(),p.stopPropagation(),a(f)},className:["h-4 w-4 shrink-0 rounded-full transition-all",u?"ring-2 ring-accent ring-offset-2 ring-offset-surface":d?"ring-1 ring-fg ring-offset-2 ring-offset-surface":"ring-1 ring-fg/30 ring-offset-1 ring-offset-surface"].join(" "),style:{background:c.color,border:"1px solid var(--swatch-border)"}},c.name)})}),s&&n&&li("div",{className:"mt-2 truncate font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:n.name})]})}import{useEffect as vP,useMemo as TP,useState as ii}from"react";import{jsx as um}from"react/jsx-runtime";function _a(e,t,o){let[r,n]=ii(()=>{let I=o?e.findIndex(h=>h.name===o):-1;return I>=0?I:0}),[a,l]=ii(null),[s,i]=ii(()=>e.map(()=>!0)),c=I=>{i(h=>{if(h[I]===!1)return h;let C=[...h];return C[I]=!1,C})},f=TP(()=>s.map((I,h)=>I?h:-1).filter(I=>I!==-1),[s]);vP(()=>{if(f.length===0){r!==-1&&n(-1),a!==null&&l(null);return}r>=0&&!f.includes(r)&&n(f[0]),a!==null&&!f.includes(a)&&l(null)},[f,r,a]);let u=a??r,d=u>=0?e[u]:void 0,p=d?.src??t,x=f.length>=2,g=e.length>0?um("div",{className:"hidden","aria-hidden":!0,children:e.map((I,h)=>um(io,{src:I.src,alt:"",width:16,height:16,loading:"eager",onError:()=>c(h)},I.src))}):null;return{selectedIdx:r,setSelectedIdx:n,hoverIdx:a,setHoverIdx:l,availability:s,finish:d,shownSrc:p,showSwatches:x,probes:g}}import{useState as RP}from"react";import{jsx as gr,jsxs as pm}from"react/jsx-runtime";function ci({src:e,alt:t=""}){let[o,r]=RP(!1),n=e||"";return gr("div",{className:"relative aspect-square overflow-hidden bg-bg",children:pm("div",{className:"absolute inset-0 flex items-center justify-center transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)] group-hover:rotate-[60deg]",children:[gr("div",{className:"absolute inset-0 z-[1] flex items-center justify-center",children:pm("div",{className:"relative flex h-[70%] w-[70%] items-center justify-center rounded-full border-2",style:{borderColor:"var(--accent)"},children:[gr("div",{className:"absolute inset-[10%] rounded-full border",style:{borderColor:"var(--accent)",opacity:.4}}),gr("div",{className:"absolute left-1/2 top-1/2 h-[18%] w-[18%] -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{borderColor:"var(--accent)"}}),gr("div",{className:"absolute left-1/2 top-1/2 h-[6%] w-[6%] -translate-x-1/2 -translate-y-1/2 rounded-full",style:{background:"var(--accent)"}})]})}),n&&gr("img",{src:n,alt:t,className:"absolute inset-0 z-[2] h-full w-full object-contain",style:{display:o?"none":"block"},onError:()=>r(!0)})]})})}import{createContext as FP,useContext as EP,useMemo as LP}from"react";import{jsx as AP}from"react/jsx-runtime";var mm=[],_P={imageBackgroundFill:Et,spinOnHover:!0,coverIndex:1,indexBadge:pr,outline:Io,showBadge:!0,fieldUsage:mm,reserveEyebrow:!1,showCardPrice:!0,showCardFinishes:!0,showCardSizes:!1,showCardBuy:!1,showCardPage:!1},xm=FP(_P);function gm({imageBackgroundFill:e,spinOnHover:t,coverIndex:o=1,indexBadge:r=pr,outline:n=Io,showBadge:a=!0,fieldUsage:l=mm,reserveEyebrow:s=!1,showCardPrice:i=!0,showCardFinishes:c=!0,showCardSizes:f=!1,showCardBuy:u=!1,showCardPage:d=!1,children:p}){let x=LP(()=>({imageBackgroundFill:e,spinOnHover:t,coverIndex:o,indexBadge:r,outline:n,showBadge:a,fieldUsage:l,reserveEyebrow:s,showCardPrice:i,showCardFinishes:c,showCardSizes:f,showCardBuy:u,showCardPage:d}),[e,t,o,r,n,a,l,s,i,c,f,u,d]);return AP(xm.Provider,{value:x,children:p})}function Im(){return EP(xm)}import{useCallback as vm,useEffect as pi,useMemo as Ba,useRef as mi,useState as Tm}from"react";import{useEffect as OP,useState as hm}from"react";var fi=new Map;function NP(e){let t=fi.get(e);if(t)return t;let o=Rt.getWheel(e).catch(r=>{throw fi.delete(e),r});return fi.set(e,o),o}function bm(e,t){let[o,r]=hm("idle"),[n,a]=hm(null);return OP(()=>{if(!t)return;let l=!1;return r("loading"),NP(e).then(s=>{l||(a(s),r("ready"))}).catch(()=>{l||r("error")}),()=>{l=!0}},[e,t]),{state:o,wheel:n}}function ym(e,t){return t.length===0?-1:e.findIndex(o=>t.includes(o.family))}function Sm(e){if(e.diameter==null||e.width==null)return e.size;let t=e.rearWidth!=null?`${Be(e.width)}/${Be(e.rearWidth)}`:Be(e.width);return`${e.diameter}" \xD7 ${t}`}function Aa(e){return e.et==null?null:e.rearEt!=null&&e.rearEt!==e.et?`${e.et}/${e.rearEt}`:String(e.et)}function di(e){return e.diameter==null||e.width==null?JSON.stringify([e.size]):JSON.stringify([e.kind,e.diameter,e.width,e.rearWidth??null])}function Cm(e){return e.diameter==null||e.width==null?e.size:`${e.diameter}" ${e.kind}`}function Pm(e){return e.diameter==null||e.width==null?"":e.rearWidth!=null?`${Be(e.width)} front / ${Be(e.rearWidth)} rear`:`${Be(e.width)} all round`}function wD(e){if(e.diameter==null||e.width==null)return e.size;let t=(o,r)=>`${e.diameter} \xD7 ${Be(o)}${r!=null?` ET ${r}`:""}`;return _p(e)?`${t(e.width,e.et)} front \xB7 ${t(e.rearWidth??e.width,e.rearEt)} rear`:t(e.width,e.et)}function ui(e,t){return t?e.filter(o=>o.finishName===t):[]}var BP="dually";function Oa(e){let t=e.components.reduce((n,a)=>n+a.wheels,0)||4,o=e.kind,r=[o==="staggered"?"Staggered":o===BP?"Dually":"",ur(e)?"L/R":""].filter(Boolean);return r.length?`${r.join(" ")} set of ${t}`:`Set of ${t}`}function DP(e,t){return[...new Set(e.filter(o=>!t||o.finishName===t).map(o=>o.size))]}function Na(e,t,o){if(!(!t||!o))return e.find(r=>r.finishName===t&&r.size===o)}function un(e){return e!=null&&e.inStock===!1}function km(e,t){return t?e.filter(o=>o.finishName===t&&un(o)):[]}function wm(e,t,o){return t.findIndex((r,n)=>o[n]!==!1&&DP(e,r).length>0)}var MP=[];function Rm(e,t=MP){let o=Ba(()=>e.finishes.filter(Jn),[e.finishes]),r=o.length>0,n=_a(o,e.coverImage??null,e.defaultFinish??void 0),[a,l]=Tm(!1),s=vm(()=>{r&&l(!0)},[r]),{state:i,wheel:c}=bm(e.slug,a),f=Ba(()=>c?.variants??[],[c]),u=n.selectedIdx>=0?o[n.selectedIdx]?.name??null:null,[d,p]=Tm(null),{setSelectedIdx:x}=n,g=mi(!1),I=vm(R=>{g.current=!0,x(R)},[x]),h=t.join(","),C=mi(null);pi(()=>{if(C.current===h)return;C.current=h;let R=ym(o,t);R<0||(g.current=!0,x(R))},[h,t,o,x]);let S=mi(!1);pi(()=>{if(S.current||g.current||f.length===0||!u||(S.current=!0,ui(f,u).length>0))return;let R=wm(f,o.map(L=>L.name),n.availability);R>=0&&x(R)},[f,u,o,n.availability,x]);let P=Ba(()=>ui(f,u),[f,u]);pi(()=>{p(R=>R&&P.some(L=>L.size===R)?R:P.length===1?P[0].size:null)},[P]);let T=Na(f,u,d),b=un(T),w=T!=null&&!b,O=!r||i==="error"||i==="ready"&&P.length===0,D=Ba(()=>km(f,u),[f,u]);return{...n,setSelectedIdx:I,finishes:o,arm:s,detailState:i,confirmedFinishName:u,sizeOptions:P,size:d,setSize:p,selectedVariant:T,outOfStock:b,outOfStockVariants:D,canAdd:w,unsellable:O}}import{useEffect as xk,useState as gk}from"react";var qt=["width","profile","rim"],Fm={width:"Width",profile:"Profile",rim:"Rim"},HP=/^\s*(\d{2,3})\s*\/\s*(\d{2,3})\s*[A-Za-z]*\s*(\d{2}(?:\.\d+)?)\s*$/,GP={width:[100,500],profile:[20,100],rim:[10,30]};function Yt(e){let t=HP.exec(e??"");if(!t)return null;let o={width:Number(t[1]),profile:Number(t[2]),rim:Number(t[3])};return qt.every(n=>{let[a,l]=GP[n];return o[n]>=a&&o[n]<=l})?o:null}function Vt(e){if(e.width==null)return"";if(e.profile==null)return String(e.width);let t=`${e.width}/${e.profile}`;return e.rim==null?t:`${t} R${e.rim}`}function Em(e){return[Vt({width:e.width}),Vt({width:e.width,profile:e.profile}),Vt(e)]}var ho=["alloy-wheel","tyre"],Lm=["alloy-wheel"],Do={"alloy-wheel":"Alloy wheels",tyre:"Tyres"},_m="All products",Am="All product types";function Om(e){return e.length===1&&e[0]==="alloy-wheel"?{one:"wheel",many:"wheels"}:e.length===1&&e[0]==="tyre"?{one:"tyre",many:"tyres"}:{one:"product",many:"products"}}var GD=ho.map(e=>({value:e,label:Do[e]}));function pn(e){return e==null?[...Lm]:Array.isArray(e)?ho.filter(t=>e.includes(t)):[...Lm]}var Je=e=>e;function ke(e){return Je(e).kind==="tyre"?"tyre":"alloy-wheel"}function WD(e,t){return e.filter(o=>t.includes(ke(o)))}function UD(e){return Je(e).slug??""}function xi(e){return Je(e).name??""}function Da(e){return Je(e).brand??""}function zD(e){let t=new Set;for(let o of e)if(t.add(Da(o)),t.size>1)return!0;return!1}function WP(e){return Je(e).process??""}function KD(e){let t=new Set;for(let o of e)if(t.add(WP(o)),t.size>1)return!0;return!1}function Mo(e){return Je(e).prices??void 0}function gi(e){return Je(e).inStock!==!1}function Nm(e){let t=Je(e),o=ke(e)==="tyre"?t.rimDiameters:t.sizes;return Array.isArray(o)?o.filter(r=>typeof r=="number"&&Number.isFinite(r)):[]}function Ii(e){return ke(e)!=="tyre"&&Je(e).badge==="new"}function hi(e){return ke(e)==="tyre"?[]:(Je(e).finishes??[]).filter(t=>typeof t?.family=="string").map(t=>({family:t.family,color:t.color??null}))}function Bm(e){return hi(e).map(t=>t.family)}function Dm(e){if(ke(e)==="tyre")return[];let t=Je(e),o=t.categories;return o&&o.length>0?o:t.process?[t.process]:[]}function Mm(e){return ke(e)==="tyre"?[]:Je(e).spec?.pcds??[]}function Hm(e){return ke(e)!=="tyre"?[]:Je(e).tyreTypes??[]}function Gm(e){return ke(e)!=="tyre"?[]:Je(e).speedRatings??[]}function Ma(e){if(ke(e)!=="tyre")return[];let t=Je(e).sizes;return Array.isArray(t)?t.map(o=>Yt(typeof o=="string"?o:null)).filter(o=>o!==null):[]}var UP={recommended:"Recommended","price-asc":"Price \xB7 low to high","price-desc":"Price \xB7 high to low",new:"Newest",name:"Name A\u2013Z"},Wm=Object.keys(UP);function Um(e){return Xe(Wm,"recommended",e)}function zP(e){return Wm.filter(t=>t!=="recommended"||e.length<=1)}function ZD(e,t){let o=Um(e);return zP(t).includes(o)?o:"name"}var mn=["tyreSizes","brands","finishes","diameters","collections","pcds","tyreTypes","speedRatings"],KP={tyreSizes:["tyre"],brands:["alloy-wheel","tyre"],finishes:["alloy-wheel"],diameters:["alloy-wheel","tyre"],collections:["alloy-wheel"],pcds:["alloy-wheel"],tyreTypes:["tyre"],speedRatings:["tyre"]},$P={diameters:"tyreSizes"};function zm(e){if(e.length===0)return[];let t=mn.filter(o=>e.every(r=>KP[o].includes(r)));return t.filter(o=>{let r=$P[o];return!r||!t.includes(r)})}function QD(e,t){return t&&e.includes(t)?[t]:[...e]}function Km(e){let t=new Set;for(let o of e)t.add(ke(o));return[...t]}var VP={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function qP(e){return`${YP(e.width)}\xD7${e.diameter}`}function $m(e){return(e.sizePairs??[]).map(qP)}function YP(e){return Be(e)}function xn(e,t,o,r=null){if(r!=="kind"&&t.kind&&ke(e)!==t.kind)return!1;for(let n of mn){if(r===n)continue;let a=t[n];if(a.length===0)continue;let l=a.map(String);if(!Vm(e,n).some(s=>l.includes(s)))return!1}return!(r!=="price"&&!ra(Mo(e),o,null,t.priceMax)||r!=="inStock"&&t.inStockOnly&&!gi(e))}function eM(e,t,o){return e.filter(r=>gi(r)&&xn(r,t,o,"inStock")).length}function XP(e,t,o){let r=[...e],n=(l,s)=>xi(l).localeCompare(xi(s)),a=Km(e).length>1;switch(t){case"price-asc":return r.sort((l,s)=>cr(Mo(l),Mo(s),o,"asc"));case"price-desc":return r.sort((l,s)=>cr(Mo(l),Mo(s),o,"desc"));case"name":return r.sort(n);case"new":return r.sort((l,s)=>{let i=(Ii(s)?1:0)-(Ii(l)?1:0);return i!==0||!a?i:n(l,s)});default:return r}}function tM(e,t,o){return XP(e.filter(r=>xn(r,t,o)),t.sort,o)}function oM(e){return mn.some(t=>e[t].length>0)||e.priceMax!=null||e.inStockOnly||e.kind!=null}var jP={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size \xB7 diameter",collections:"Collection",pcds:"PCD \xB7 fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function Vm(e,t){switch(t){case"tyreSizes":return[...new Set(Ma(e).flatMap(Em))];case"brands":return Da(e)?[Da(e)]:[];case"finishes":return Bm(e);case"diameters":return Nm(e).map(String);case"collections":return Dm(e);case"pcds":return Mm(e);case"tyreTypes":return Hm(e);case"speedRatings":return Gm(e)}}function JP(e){let t=new Map;for(let o of e)for(let r of hi(o))r.color&&!t.has(r.family)&&t.set(r.family,r.color);return t}function ZP(e,t,o,r=Km(e),n=[]){let a=c=>ek(c,r,n),l=JP(e),s=zm(r).filter(c=>c!=="tyreSizes").filter(a).map(c=>{let f=t[c].map(String),u=new Set,d=new Map,p=new Map;for(let g of e){let I=Vm(g,c);for(let h of I)u.add(h);for(let h of new Set(I))p.set(h,(p.get(h)??0)+1);if(xn(g,t,o,c))for(let h of new Set(I))d.set(h,(d.get(h)??0)+1)}let x=[...u].map(g=>({value:g,label:c==="diameters"?`${g}\u2033`:g,count:d.get(g)??0,checked:f.includes(g),swatch:c==="finishes"?l.get(g)??null:null})).sort((g,I)=>{if(c==="diameters")return Number(g.value)-Number(I.value);let h=(p.get(I.value)??0)-(p.get(g.value)??0);return h!==0?h:g.value.localeCompare(I.value)});return{key:c,label:jP[c],options:x}}).filter(c=>c.options.length>qm),i=[];for(let c of s){let f=tk(c.key,r,n);f!==void 0&&i.push({fieldKey:c.key,filterOrder:f})}return[...Fa(s,c=>c.key,i,"filterOrder")]}var qm=1;function QP(e){return e.showCollection===!1?["collections"]:[]}function ek(e,t,o){return t.length===0||o.length===0?!0:t.some(r=>cm(mr(o,r))(ri(e,r)))}function tk(e,t,o){if(o.length===0)return;let r;for(let n of t){let a=im(mr(o,n),"filter")(ri(e,n));a!==void 0&&(r===void 0||a<r)&&(r=a)}return r}function ok(e){let t=new Set;for(let o of e)for(let r of Ma(o))t.add(Vt(r));return t.size}function rM(e,t){return zm(t).includes("tyreSizes")?ok(e)>qm:!1}function Ym(e){let t=Yt(e);if(t)return t;let[o,r]=e.split("/");return{width:o?Number(o):void 0,profile:r?Number(r):void 0}}function rk(e,t,o){return qt.slice(0,qt.indexOf(o)).every(r=>{let n=t[r];return n==null||e[r]===n})}function nM(e,t,o){let r=Ym(t.tyreSizes[0]??""),n=new Set(e.filter(a=>xn(a,t,o,"tyreSizes")));return qt.map(a=>{let l=new Map;for(let i of e){let c=Ma(i).filter(f=>rk(f,r,a));for(let f of new Set(c.map(u=>u[a])))l.has(f)||l.set(f,0),n.has(i)&&l.set(f,(l.get(f)??0)+1)}let s=[...l.keys()].sort((i,c)=>i-c).map(i=>({value:i,label:a==="rim"?`R${i}`:String(i),count:l.get(i)??0}));return{part:a,label:Fm[a],value:r[a]??null,options:s}})}function aM(e,t,o,r){let n={...Ym(t)},a=qt.indexOf(o);n[o]=r??void 0;for(let l of qt.slice(a+1))n[l]!=null&&e.some(c=>qt.slice(0,qt.indexOf(l)+1).every(f=>n[f]==null||c[f]===n[f]))||(n[l]=void 0);return Vt(n)}function lM(e,t,o,r){if(t.length<2)return[];let n=e.filter(a=>xn(a,o,r,"kind"));return[{kind:null,label:_m,count:n.length,checked:o.kind===null},...t.map(a=>({kind:a,label:Do[a],count:n.filter(l=>ke(l)===a).length,checked:o.kind===a}))]}function sM(e,t){if(e.length===0)return null;let o=e.map(a=>oa(Mo(a),t)).filter(a=>a!==null);if(o.length===0)return null;let r=Math.floor(Math.min(...o)),n=Math.ceil(Math.max(...o));return n>r?{min:r,max:n}:null}function iM(e,t,o){let r=[];e.kind&&r.push({key:"kind",value:e.kind,label:Do[e.kind]}),e.inStockOnly&&r.push({key:"inStock",value:"",label:"In stock"});for(let n of mn)for(let a of e[n]){let l=String(a);r.push({key:n,value:l,label:n==="diameters"?`${l}\u2033`:n==="pcds"?`PCD ${l}`:l})}return e.priceMax!=null&&r.push({key:"price",value:"",label:`Up to ${o(e.priceMax,t)}`}),r}var yt={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},bo="type",Xm="maxPrice",jm="inStock",Jm="sort",Zm="page";function cM(e){let t=a=>e.getAll(a).flatMap(l=>l.split(",")).filter(Boolean),o=Number(e.get(Xm)),r=Number(e.get(Zm)),n=e.get(bo);return{tyreSizes:t(yt.tyreSizes),brands:t(yt.brands),finishes:t(yt.finishes),diameters:t(yt.diameters).map(Number).filter(Number.isFinite),collections:t(yt.collections),pcds:t(yt.pcds),tyreTypes:t(yt.tyreTypes),speedRatings:t(yt.speedRatings),priceMax:Number.isFinite(o)&&o>0?o:null,inStockOnly:e.get(jm)==="1",kind:ho.find(a=>a===n)??null,sort:Um(e.get(Jm)),page:Number.isFinite(r)&&r>=1?Math.floor(r):1}}function fM(e){let t=new URLSearchParams;for(let o of mn){let r=e[o];r.length>0&&t.set(yt[o],r.join(","))}return e.priceMax!=null&&t.set(Xm,String(e.priceMax)),e.inStockOnly&&t.set(jm,"1"),e.kind&&t.set(bo,e.kind),e.sort!=="recommended"&&t.set(Jm,e.sort),e.page>1&&t.set(Zm,String(e.page)),t}function dM(e,t){if(e<=7)return Array.from({length:e},(a,l)=>l+1);let o=[1],r=Math.max(2,t-1),n=Math.min(e-1,t+1);r>2&&o.push(null);for(let a=r;a<=n;a++)o.push(a);return n<e-1&&o.push(null),o.push(e),o}function uM(e,t,o){let r=e.length,n=Math.max(1,Math.floor(o)),a=Math.max(1,Math.ceil(r/n)),l=Math.min(Math.max(1,Math.floor(t)),a),s=(l-1)*n;return{items:e.slice(s,s+n),page:l,pageCount:a,total:r,from:r===0?0:s+1,to:Math.min(s+n,r)}}function hr(e){let t=e.lastIndexOf(" ");return t===-1?{lead:"",accent:e}:{lead:e.slice(0,t+1),accent:e.slice(t+1)}}import{Fragment as nk}from"react";import{Fragment as bi,jsx as St,jsxs as _t}from"react/jsx-runtime";var Ha="mt-3 flex h-[26px] items-center gap-1",Ga="flex min-w-0 items-center gap-1 overflow-hidden",Wa="shrink-0 border border-line px-1.5 py-0.5 font-mono text-[length:var(--size-label,11px)] tracking-[0.08em] text-fg-dim",gn="border px-1.5 py-0.5 font-mono text-[length:var(--size-label,11px)] tracking-[0.08em] whitespace-nowrap",Ua=`${gn} border-accent/60 text-accent`,ak=e=>`calc((100% - ${e}px) / 2)`,lk=2,sk=28,Qm=e=>lk+2*sk+(e?10:0);var ik=16;var ck="whitespace-nowrap",fk=e=>typeof e=="string"?e:e.text;function ex(e,t="\xB7"){return e.map((o,r)=>{let n=fk(o),a=typeof o!="string"&&o.accent;return _t(nk,{children:[St("span",{className:`${ck}${a?" text-accent":""}`,children:r<e.length-1?`${n} ${t}`:n}),r<e.length-1?" ":null]},n)})}var za="mt-3 flex flex-col gap-2",br="cursor-pointer bg-btn px-4 py-2.5 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-btn-ink transition-colors hover:bg-fg",Ka="border border-btn px-4 py-2.5 text-center font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-btn transition-colors hover:bg-btn hover:text-btn-ink",dk="border px-2 py-1 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.3em]",yi="absolute right-[18px] top-[18px] z-10";function Si({tone:e,className:t,children:o}){return St("span",{className:[t,dk,e==="solid"?"border-accent bg-accent text-bg":"border-accent text-accent"].filter(Boolean).join(" "),children:o})}function In({variant:e="catalog",wide:t=!1,href:o,identityLink:r=!1,outline:n="none",imageBackgroundFill:a=Lt,containerProps:l,probes:s,indexBadge:i,badges:c,image:f,imageSecond:u,plate:d,eyebrow:p,reserveEyebrow:x=!1,name:g,spec:I,was:h,price:C,metaLine:S,swatches:P,showPrice:T=!0,reserveSwatches:b=!0,extras:w}){let O=e==="catalog",D=yp(a),R=D&&a===Et,L=R?"bg-[var(--wheel-stage)] p-[5px]":D?"p-[5px]":"",G=D&&!R?{backgroundColor:a}:{},Y=(he,de)=>St("figure",{className:`m-0 aspect-square [flex:0_0_auto] max-w-full max-[800px]:w-[252px] ${de}`,style:{width:ak(Qm(D))},children:he}),M=O?_t("div",{className:t?`relative mt-2 mb-5 flex items-center justify-center [&_img]:object-top max-[800px]:flex-col ${L}`:`relative mt-2 mb-5 flex aspect-square items-center justify-center overflow-hidden [&_img]:object-top ${L}`,style:t?{...G,borderRadius:10,columnGap:Qm(D),rowGap:ik}:{...G,borderRadius:"var(--sf-card-image-radius, 10px)"},children:[t?_t(bi,{children:[Y(f,"max-[800px]:-translate-x-[38px]"),Y(u??f,"max-[800px]:translate-x-[38px]")]}):f,d]}):_t("div",{className:"relative mb-[18px] aspect-square overflow-hidden bg-bg p-[30px] [&_img]:object-top",style:{borderRadius:"var(--sf-card-image-radius, 10px)"},children:[f,d]}),v=`font-mono text-[length:var(--size-label,12px)] uppercase text-accent ${O?"tracking-[0.3em]":"tracking-[0.25em]"}`,j=p?St("div",{className:v,children:p}):O&&x?St("div",{"aria-hidden":!0,className:v,children:"\xA0"}):null,F=St("div",{className:O?"mt-2 h-[60px] overflow-hidden break-words font-heading3 text-[length:var(--size-headingSmall,30px)] font-medium uppercase leading-none tracking-[-0.02em]":"mt-[6px] font-heading3 text-[length:var(--size-headingSmall,22px)] font-medium tracking-[-0.02em]",children:g}),E=St("div",{className:O?"mt-2 h-[38px] overflow-hidden font-mono text-[length:var(--size-label,13px)] leading-[19px] tracking-[0.14em] text-fg-dim":"mt-[4px] font-mono text-[length:var(--size-label,13px)] tracking-[0.1em] text-fg-dim",children:I}),se=T?_t("div",{className:"mt-2 font-mono text-[length:var(--size-label,13px)]",children:[h&&St("span",{className:"mr-2 text-fg-dim line-through",children:h}),C]}):null,N=T&&S?St("div",{className:"mt-[2px] font-mono text-[length:var(--size-label,11px)] tracking-[0.08em] text-fg-dim",children:S}):null,le=O&&!P?b?St("div",{"aria-hidden":!0,className:"mt-4 h-4"}):null:P,ge=[O?"sf-card sf-card-fill group relative flex min-h-[460px] flex-col bg-[var(--card-bg)] px-7 pt-8 pb-7 transition-colors duration-200 hover:bg-[var(--card-bg-hover)]":"sf-card sf-card-fill group relative block bg-[var(--card-bg)] p-5 transition-colors duration-300 hover:bg-[var(--card-bg-hover)]",rm(n),t?"col-span-2 max-[800px]:col-span-1 @max-[720px]:col-span-1":""].filter(Boolean).join(" "),ie=_t(bi,{children:[M,j,F]}),te=_t(bi,{children:[E,se,N,le,w]});return o?r?_t("article",{...l,className:ge,children:[s,i,c,St(Pe,{href:o,className:"flex flex-col",children:ie}),te]}):_t(Pe,{href:o,className:ge,children:[s,i,c,ie,te]}):_t("article",{...l,className:ge,children:[s,i,c,ie,te]})}import{useId as ax,useRef as mk,useState as Pi}from"react";import{useEffect as Ci}from"react";function tx({active:e,onDismiss:t,focusRef:o,lockScroll:r=!0}){Ci(()=>{if(!e)return;let n=a=>{a.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),Ci(()=>{if(!e||!r)return;let n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e,r]),Ci(()=>{e&&o?.current?.focus()},[e,o])}import{useCallback as rx,useRef as uk,useState as pk}from"react";function PM({email:e,firstName:t,interests:o,frequency:r},n){return{email:e.trim(),firstName:t?.trim()||void 0,interests:o&&o.length?o:void 0,frequency:r||void 0,source:n}}var ox={popup:"shop_popup",subscribeSection:"subscribe_section",subscribeBlogsSection:"subscribe_blogs_section",footerSignup:"footer_signup",stockAlertOptIn:"stock_alert_optin"};function nx(){let[e,t]=pk("idle"),o=uk(!1),r=rx(()=>{o.current=!1,t("idle")},[]),n=rx(async({partNumbers:a,email:l,productSlug:s,subscribeToOffers:i=!1,dryRun:c=!1})=>{if(o.current)return;let f=l.trim();if(!yu(f)){t("invalid");return}o.current=!0,t("sending");try{if(!c)for(let u of a)await Rt.createStockAlert({partNumber:u,email:f,productSlug:s})}catch{o.current=!1,t("error");return}if(i&&!c)try{await Rt.createNewsletterSubscription({email:f,source:ox.stockAlertOptIn})}catch{}o.current=!1,t("sent")},[]);return{status:e,submit:n,reset:r}}import{jsx as ae,jsxs as Ge}from"react/jsx-runtime";function ki({wheelName:e,productSlug:t,finishName:o,variants:r,initialSize:n,onClose:a,editing:l=!1}){let s=ax(),i=ax(),c=mk(null),{currency:f}=co(),u=nx(),[d,p]=Pi(()=>n??r[0]?.size??""),[x,g]=Pi(""),[I,h]=Pi(!1);tx({active:!0,onDismiss:a,focusRef:c});let C=r.find(w=>w.size===d)??r[0];if(!C)return null;let S=u.status==="sent",P=u.status==="sending",T=u.status==="invalid"?"Please enter a valid email address.":u.status==="error"?"Couldn't save that \u2014 please try again.":null;function b(){C&&u.submit({partNumbers:C.components.map(w=>w.partNumber),email:x,productSlug:t,subscribeToOffers:I,dryRun:l})}return ae("div",{role:"dialog","aria-modal":"true","aria-labelledby":s,onClick:w=>{w.target===w.currentTarget&&a()},className:"fixed inset-0 z-[90] flex items-center justify-center overflow-y-auto p-6 backdrop-blur-[6px]",style:{background:"color-mix(in oklab, var(--bg) 78%, transparent)"},children:Ge("div",{ref:c,tabIndex:-1,className:"relative w-[420px] max-w-full border-2 border-accent bg-surface text-left shadow-[0_24px_60px_rgba(0,0,0,0.55)] outline-none",children:[ae("button",{type:"button",onClick:a,"aria-label":"Close",className:"absolute right-[10px] top-[10px] z-[2] flex h-9 w-9 cursor-pointer items-center justify-center text-fg-dim transition-colors hover:text-accent",children:ae("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:ae("path",{d:"M6 6l12 12M18 6 6 18"})})}),S?Ge("div",{className:"px-6 py-8 text-center",children:[ae("span",{className:"mx-auto mb-4 grid h-16 w-16 place-items-center rounded-full border-[1.5px] border-accent bg-accent/15",children:ae("svg",{width:"30",height:"30",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2.5","aria-hidden":!0,children:ae("path",{d:"M20 6 9 17l-5-5"})})}),ae("h3",{id:s,className:"font-display text-[22px] font-medium uppercase leading-tight tracking-[-0.02em]",children:"You're on the list"}),Ge("p",{className:"mx-auto mt-2 max-w-[34ch] text-[13px] leading-[1.6] text-fg-dim",children:["We'll alert ",ae("strong",{className:"font-normal text-fg",children:x.trim()})," as soon as the ",et(e)," in ",C.size," is back. Keep an eye on your inbox."]}),ae("button",{type:"button",onClick:a,className:"mt-6 w-full cursor-pointer border border-line px-4 py-3 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-fg transition-colors hover:border-accent hover:text-accent",children:"Continue browsing"})]}):Ge("form",{className:"p-6",noValidate:!0,onSubmit:w=>{w.preventDefault(),b()},children:[Ge("div",{className:"mb-2 flex items-center gap-3",children:[ae("span",{className:"grid h-11 w-11 flex-none place-items-center border-[1.5px] border-accent bg-accent/15",children:Ge("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2","aria-hidden":!0,children:[ae("path",{d:"M18 8a6 6 0 1 0-12 0c0 7-3 9-3 9h18s-3-2-3-9"}),ae("path",{d:"M13.7 21a2 2 0 0 1-3.4 0"})]})}),Ge("div",{children:[ae("div",{className:"font-mono text-[10px] uppercase tracking-[0.3em] text-accent",children:"Back-in-stock alert"}),ae("h3",{id:s,className:"mt-0.5 font-display text-[22px] font-medium uppercase leading-tight tracking-[-0.02em]",children:"Notify me"})]})]}),Ge("p",{className:"mb-5 text-[13px] leading-[1.6] text-fg-dim",children:["We'll email you the moment the"," ",ae("strong",{className:"font-normal text-fg",children:et(e)}),o?` in ${o}`:""," ","is back in stock. No spam \u2014 one alert, then we're done."]}),Ge("fieldset",{className:"mb-4 border-0 p-0",children:[ae("legend",{className:"mb-2 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:"Which fitment?"}),ae("div",{className:"flex flex-wrap gap-2",children:r.map(w=>{let O=w.size===C.size;return Ge("button",{type:"button","aria-pressed":O,onClick:()=>p(w.size),className:["flex min-w-[calc(50%-4px)] flex-1 cursor-pointer flex-col items-start gap-0.5 border-[1.5px] px-3 py-2.5 text-left transition-colors",O?"border-accent bg-accent/15":"border-line hover:border-accent/60"].join(" "),children:[ae("span",{className:"font-mono text-[12px] font-bold tracking-[0.08em] text-fg",children:w.size}),ae("span",{className:"font-mono text-[10px] tracking-[0.08em] text-fg-dim",children:(()=>{let D=Iu(w.components,f);return D.setTotal!=null?pu(D.setTotal,f):mu})()})]},w.size)})})]}),Ge("div",{className:"mb-4",children:[ae("label",{htmlFor:i,className:"mb-2 block font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:"Email address"}),ae("input",{id:i,type:"email",value:x,onChange:w=>{g(w.target.value),(u.status==="invalid"||u.status==="error")&&u.reset()},placeholder:"you@example.com",disabled:P,className:"w-full border-2 border-line bg-bg px-3.5 py-3 font-display text-[15px] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent disabled:opacity-60"})]}),Ge("label",{className:"mb-5 flex cursor-pointer items-start gap-2.5 text-[12px] leading-[1.5] text-fg-dim",children:[ae("input",{type:"checkbox",checked:I,onChange:w=>h(w.target.checked),className:"mt-0.5 h-[18px] w-[18px] flex-none cursor-pointer accent-[var(--accent)]"}),ae("span",{children:"Also send me fitment tips and occasional offers for my vehicle."})]}),Ge("button",{type:"submit",disabled:P,className:"flex h-[50px] w-full cursor-pointer items-center justify-center gap-2 bg-btn px-4 font-mono text-[12px] font-bold uppercase tracking-[0.24em] text-btn-ink transition-colors hover:bg-fg disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-btn",children:[Ge("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[ae("path",{d:"m22 2-7 20-4-9-9-4Z"}),ae("path",{d:"M22 2 11 13"})]}),P?"Sending\u2026":"Notify me when available"]}),T&&ae("p",{role:"alert",className:"mt-2.5 text-[12px] leading-[1.5]",style:{color:"var(--alert)"},children:T}),Ge("div",{className:"mt-3 flex items-center justify-center gap-1.5 text-[11px] text-fg-dim",children:[Ge("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[ae("rect",{x:"3",y:"11",width:"18",height:"11",rx:"1"}),ae("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),"We never share your details."]})]})]})})}import{Fragment as hk,jsx as Xt,jsxs as $a}from"react/jsx-runtime";var wi=3;function Ik({wheel:e,sel:t,price:o,editing:r,detailReady:n}){let{add:a,open:l,warmCatalog:s}=la();xk(()=>{r||s()},[r,s]);function i(){let c=t.selectedVariant;!c||!t.canAdd||o.priced&&(r||(a({id:`${e.slug}|${c.finishName}|${c.size}|quick`,slug:e.slug,name:hr(e.name),process:e.process,positionNo:"01",config:[{label:c.size},{label:c.finishName,gold:!0},{label:Oa(c)}],finishName:c.finishName,size:c.size,components:c.components,qty:1}),l()))}return Xt("button",{type:"button",onClick:i,[ta]:"",disabled:!t.canAdd,className:t.canAdd?br:n?"cursor-not-allowed border border-dashed border-accent/50 px-4 py-2.5 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-accent/70":`${br} opacity-80`,children:n&&!t.canAdd?"Select a size":"Add to basket"})}function lx({wheel:e,sel:t,price:o,editing:r,show:n,href:a}){let[l,s]=gk(!1),i=$m(e),c=i.length>0?i:e.sizes.map(S=>`${S}\u2033`),f=t.detailState==="ready",u=t.unsellable,d=S=>["cursor-pointer transition-colors",gn,S?"border-accent bg-accent text-bg":"border-accent/60 text-accent hover:border-accent hover:bg-accent/10"].join(" "),p=f&&!u?t.sizeOptions.length:c.length,x=Math.max(0,p-wi),g=n.sizes?$a("div",{className:Ha,children:[Xt("div",{className:Ga,children:f&&!u?t.sizeOptions.slice(0,wi).map(S=>Xt("button",{type:"button",title:S.size,"aria-label":S.size,"aria-pressed":t.size===S.size,onClick:()=>t.setSize(S.size),className:d(t.size===S.size),children:Sm(S)},S.size)):u?Xt("span",{className:"truncate font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.16em] text-fg-dim",children:"Options on the product page"}):c.slice(0,wi).map(S=>Xt("span",{className:Ua,children:S},S))}),!u&&x>0&&$a("span",{className:Wa,children:["+",x]})]}):null,I=n.buy&&!u?t.outOfStock?Xt("button",{type:"button",onClick:()=>s(!0),className:br,children:"Notify me when back"}):o.priced?Xt(Ik,{wheel:e,sel:t,price:o,editing:r,detailReady:f}):null:null,h=n.page?Xt(Pe,{href:a,className:Ka,children:"Open product page"}):null,C=I||h?$a("div",{className:za,children:[I,h]}):null;return{extras:g||C?$a(hk,{children:[g,C]}):null,dialog:l?Xt(ki,{wheelName:e.name,productSlug:e.slug,finishName:t.confirmedFinishName,variants:t.outOfStockVariants,initialSize:t.selectedVariant?.size,onClose:()=>s(!1),editing:r}):null}}import{Fragment as sx,jsx as yo,jsxs as ix}from"react/jsx-runtime";function hn({wheel:e,variant:t="compact",defaultFinish:o}){let r=t==="catalog",n=bk(()=>e.finishes.filter(Jn),[e.finishes]),a=e.coverImage??null,{currency:l}=co(),{imageBackgroundFill:s,spinOnHover:i,coverIndex:c,indexBadge:f,outline:u,showBadge:d,fieldUsage:p,reserveEyebrow:x,showCardPrice:g,showCardFinishes:I,showCardSizes:h,showCardBuy:C,showCardPage:S}=Im(),P=r&&(h||C||S),T=na(e.prices[l],e.msrpPrices?.[l]),b=aa(T,l,"from "),w=gu(T,l),O=Ap(e),D=Np(O),R=Op(O),L=sm([...Qp(e).map(Ne=>({fieldKey:Ne.fieldKey,field:Ne.text})),...R?[{field:{text:R,accent:!0}}]:[]],p).map(Ne=>Ne.field),{selectedIdx:G,setSelectedIdx:Y,hoverIdx:M,setHoverIdx:v,availability:j,finish:F,shownSrc:E,showSwatches:se,probes:N}=_a(n,a,o??e.defaultFinish??void 0),le=lm(e,c,F?.name,E),ge="h-full w-full",ie=i?`transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)] ${r?"group-hover:rotate-[72deg]":"group-hover:rotate-[60deg]"}`:"",[te,he]=yk(()=>new Set),de=Ne=>he(Ve=>Ve.has(Ne)?Ve:new Set(Ve).add(Ne)),z=am({overrideSrc:le,hookSrc:E,failed:te}),Ae=z?yo(io,{src:z,alt:F?`${e.name} \u2014 ${F.name}`:e.name,width:1e3,height:1e3,sizes:"(max-width: 640px) 90vw, (max-width: 1024px) 45vw, 300px",className:`block object-contain ${ie} ${ge}`,draggable:!1,onError:()=>de(z)},z):yo(ci,{imageLabel:e.name}),Fe=r&&d&&e.badge?yo(Si,{className:yi,tone:e.badge==="new"?"solid":"outline",children:e.badge==="new"?"New":"Bestseller"}):null,Oe=R&&r?yo(Si,{className:yi,tone:"outline",children:R}):Fe,ne=dm({kindLabel:null,brand:null,process:e.process?et(e.process):null},p),K=D?ix(sx,{children:[ne,yo("span",{className:`${ne?"ml-2":""} inline-block bg-accent px-1.5 py-[2px] align-middle font-mono text-[10px] font-bold uppercase tracking-[0.18em] text-bg`,children:"Set"})]}):ne,H=f!=="off"?yo("span",{"aria-hidden":!0,className:`${Ra} ${tm}`}):null,He=Rm(e),Ze=hu(e,He.selectedVariant,l,1),It=lx({wheel:e,sel:He,price:Ze,href:`/wheels/${e.slug}`,show:{sizes:P&&h,buy:P&&C,page:P&&S}}),oo=I&&se?yo(si,{finishes:n,availability:j,selectedIdx:G,hoverIdx:M,activeFinish:F,onSelect:Y,onHover:v,showLabel:!1}):null;return ix(sx,{children:[yo(In,{variant:t,wide:D&&r,href:`/wheels/${e.slug}`,outline:u,imageBackgroundFill:s,probes:N,reserveEyebrow:x,indexBadge:H,badges:Oe,image:Ae,imageSecond:void 0,eyebrow:K,name:et(e.name),spec:ex(L),was:D?void 0:w,price:D?T.priced?b:xu:P?bu(Ze,l):b,metaLine:D?"the set":void 0,swatches:oo,reserveSwatches:I,showPrice:g,identityLink:P,extras:It.extras}),It.dialog]})}import{Fragment as Xx}from"react";import{applyMark as R2,markupTools as F2,MARKUP_TOOLS as E2,COPY_FIELD_TOOLS as L2,STOREFRONT_MARKUP as _2,tokenizeInline as A2,stripInline as O2,isSafeLinkHref as N2}from"efficient-easel/markup";import{applyMark as Sk,markedAt as Ck,markupTools as Pk,MARKUP_TOOLS as kk,parseMarkup as wk,STOREFRONT_MARKUP as vk,tokenizeInline as k2}from"efficient-easel/markup";var Va=["highlight","strong","quiet"],Ho={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},At={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},cx=Object.fromEntries(Va.map(e=>[At[e].kind,e])),fx="data-sf-ws",b2=["accent","text","labels"],y2={accent:"Accent",text:"Text",labels:"Labels"},yr={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"};var vi={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},S2={highlight:{...vi},strong:{...vi},quiet:{...vi}};var ux=Va.map(e=>({open:At[e].delimiter,close:At[e].delimiter,kind:At[e].kind})),px=[{style:At.highlight.kind,label:Ho.highlight,title:`${Ho.highlight} word style`},{style:At.strong.kind,label:Ho.strong,title:`${Ho.strong} word style`},{style:At.quiet.kind,label:Ho.quiet,title:`${Ho.quiet} word style`}],Tk=new Set(ux.map(e=>e.open)),mx=[...vk.filter(e=>!Tk.has(e.open)),...ux];function Ti(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function Ri(e){return wk(typeof e=="string"?e:"",mx)}var Rk=["quiet"],dx=[...kk.map(e=>e.style).filter(e=>!Rk.includes(e)),...px.map(e=>e.style)].filter(e=>mx.some(t=>t.kind===e));function xx(){return[...Pk(dx),...px].filter(e=>dx.includes(e.style))}var gx=Object.fromEntries(Va.map(e=>[At[e].kind,At[e].delimiter]));function Ix(e,t,o,r){let n=gx[r];if(!n)return Sk(e,t,o,r);let a=e.slice(t,o),l=e.slice(Math.max(0,t-n.length),t),s=e.slice(o,o+n.length);if(l===n&&s===n)return{text:e.slice(0,t-n.length)+a+e.slice(o+n.length),selectionStart:t-n.length,selectionEnd:t-n.length+a.length};let i=a||"styled text";return{text:e.slice(0,t)+n+i+n+e.slice(o),selectionStart:t+n.length,selectionEnd:t+n.length+i.length}}function hx(e,t,o,r){let n=gx[r];return n?t>=n.length&&e.slice(t-n.length,t)===n&&e.slice(o,o+n.length)===n:Ck(e,t,o,r)}function jt(e){return Ri(e).map(t=>Ti(t)+bx(t.children)).join(`
|
|
3
|
+
`)}function bx(e){return e.map(t=>t.kind==="text"?t.text:bx(t.children)).join("")}function Fi(e,t){return t?`${e}[${t.index}].${t.rowKey}`:e}function Ei(e){let t=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return t?{key:t[1],row:{index:Number(t[2]),rowKey:t[3]}}:{key:e,row:null}}var Le="__text",bn="__link",yn="__scaffold";function Jt(e){return e&&typeof e=="object"?{text:e.text??"",hidden:!!e.hidden}:{text:typeof e=="string"?e:"",hidden:!1}}function Sr(e){return Jt(e).text}var yx={text:"scalar",textarea:"scalar",plainText:"scalar",copyText:"scalar",plainTextarea:"scalar",textList:"list"},Go=Object.entries(yx).filter(([,e])=>e==="scalar").map(([e])=>e);var Sx={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},Cx={Events:["posts"],SubscribeBlogs:["posts"]};var Fk=["anchor"],Ek=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function Sn(e){return Fk.includes(e)||Ek.test(e)}var Lk={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:[]}},BrandStrip:{picks:{verb:"reference"}},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"}}};Lk.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var U2=Object.fromEntries(Object.entries(Sx).map(([e,t])=>[e,Object.keys(t)])),z2=Object.fromEntries(Object.entries(Cx).map(([e,t])=>[e,[...t]]));var _k=Go,Ak=["text","textarea"];function Ok(e){return!e||typeof e!="object"?null:e[Le]?.control??null}function Px(e){let t=Ok(e);return t&&_k.includes(t)?t:null}function qa(e){return Jt(e).text}function Li(e,t,o){return Ak.includes(e)?{text:o,hidden:Jt(t).hidden}:o}function Y2(e,t,o,r){return qa(e[t])===r?null:{...e,[t]:Li(o,e[t],r)}}function Nk(e){if(!(!e||typeof e!="object"))return e[Le]}function Bk(e){if(!e||typeof e!="object")return null;let t=e.arrayFields;return t&&typeof t=="object"?t:null}function kx(e,t){if(!Array.isArray(t))return[];let o=Nk(e),r=[];if(o?.control==="textList"){let a=o.itemKey??"text";return t.forEach((l,s)=>{let i=l?.[a];typeof i=="string"&&i&&r.push({row:{index:s,rowKey:a},text:i})}),r}let n=Bk(e);return n?(t.forEach((a,l)=>{for(let[s,i]of Object.entries(n)){if(!Px(i))continue;let c=qa(a?.[s]);c&&r.push({row:{index:l,rowKey:s},text:c})}}),r):[]}function Dk(e,t){if(Array.isArray(e))return e[t.index]?.[t.rowKey]}function Mk(e,t,o,r){let n=e[t];return!Array.isArray(n)||o.index<0||o.index>=n.length?null:{...e,[t]:n.map((a,l)=>l===o.index?{...a,[o.rowKey]:r}:a)}}function Z2(e,t,o,r,n){let a=Dk(e[t],o);return qa(a)===n?null:Mk(e,t,o,Li(r,a,n))}function Q2(e,t){return t?`${e} \xB7 row ${t.index+1}`:e}var iH="data-sf-part",cH="data-sf-part-selected",fH="data-sf-part-kind",_i="::",wx=2;function dH(e,t){return`${e}${_i}${t??""}`}function Xa(e){let t=e.indexOf(_i);return t<=0?null:{nodeId:e.slice(0,t),propKey:e.slice(t+_i.length)||null}}function uH(e,t){if(!e)return!1;let o=Xa(e);return!!o?.propKey&&o.nodeId===t}function Cr(e){return jt(e).replace(/\s+/gu,"")}function Ya(e,t,o){let r=e[Le];if(r){if(r.control==="textList"){let a=r.itemKey??"text";if(!Array.isArray(t))return;for(let l of t){let s=l?.[a];typeof s=="string"&&o.push(s)}return}let{text:n}=Jt(t);n?o.push(n):r.placeholder&&o.push(r.placeholder);return}if(!e[bn]){if(e.type==="text"||e.type==="textarea"){typeof t=="string"&&t&&o.push(t);return}if(e.arrayFields&&Array.isArray(t)){for(let n of t)for(let[a,l]of Object.entries(e.arrayFields))Ya(l,n?.[a],o);return}if(e.objectFields&&t&&typeof t=="object")for(let[n,a]of Object.entries(e.objectFields))Ya(a,t[n],o)}}function pH(e){if(!e||typeof e!="object")return!1;let t=e;return t[bn]?!1:!!t[Le]||t.type==="text"||t.type==="textarea"}function vx(e,t){let o=e[Le];return o?.label?o.label:typeof e.label=="string"?e.label:t}function Hk(e){let t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function mH(e,t){if(!e)return[];let o=[];for(let[r,n]of Object.entries(e)){if(!n||typeof n!="object"||Sn(r))continue;let a=n,l=[];Ya(a,t?.[r],l),!l.length&&a[yn]!==void 0&&Ya(a,a[yn],l);let s=vx(a,r),i=new Set;for(let{row:u,text:d}of kx(a,t?.[r])){let p=Cr(d);p.length<wx||(i.add(p),o.push({key:r,label:s,texts:[p],row:u}))}let c=new Set(i),f=[];for(let u of l){let d=Cr(u);d.length<wx||c.has(d)||(c.add(d),f.push(d))}f.length&&o.push({key:r,label:s,texts:f})}return o}var Gk=Go;function Tx(e,t){if(!t||typeof t!="object"||Sn(e))return null;let o=t[Le];return!o||!Gk.includes(o.control)?null:o}function xH(e,t){let o=Tx(e,t);return o!==null&&o.identifier!==!0}function gH(e,t){if(!e)return[];let o=[];for(let[r,n]of Object.entries(e)){let a=Tx(r,n);if(!a)continue;let{text:l,hidden:s}=Jt(t?.[r]),i=l||a.placeholder||"",c=jt(i).replace(/\s+/gu," ").trim();o.push({key:r,label:Hk(vx(n,r)),preview:c,offPage:a.offPage===!0,identifier:a.identifier===!0,hidden:!!s})}return o}var Ni="_partStyles",Mi="data-sf-part-styled",Wk=["none","upper","lower"],Uk=[400,500,600,700],zk=["left","center","right"],Kk=9,$k=144,Vk=-5,qk=10,Yk=0,Xk=64,jk=2,Jk=200,ja=900,Zk=10,Rx={size:{min:Kk,max:$k,step:1},padding:{min:Yk,max:Xk,step:jk},width:{min:Jk,max:ja,step:Zk}},Qk=.05,ew=.01,tw=["line","letter"],Bi={none:"none",upper:"uppercase",lower:"lowercase"};function Cn(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function _x(e){return Cn(e?.[Ni])??{}}function ow(e,t){let o=_x(e);return Object.hasOwn(o,t)?Cn(o[t])??{}:{}}function Ax(e,t,o){let r={..._x(e)};if(rw(o).length?r[t]=o:delete r[t],!Object.keys(r).length){let{[Ni]:n,...a}=e;return a}return{...e,[Ni]:r}}function rw(e){return Object.entries(e).filter(([,t])=>t!==void 0)}function nw(e){return tw.includes(e)}var Fx=(e,t,o)=>Math.min(o,Math.max(t,e));function aw(e,t){if(nw(e)){let o=Math.round(Number(t));return!Number.isFinite(o)||o===0?null:Fx(o,Vk,qk)}if(Object.hasOwn(Rx,e)){let{min:o,max:r}=Rx[e],n=Math.round(Number(t));return Number.isFinite(n)?Fx(n,o,r):null}return e==="role"?Kt.includes(String(t))?t:null:t}var lw=[["font","role"]];function sw(e){let t=[];for(let[o,r]of lw)o===e?t.push(r):r===e&&t.push(o);return t}function CH(e,t,o,r){let n={...ow(e,t)},a=r==null?null:aw(o,r);if(a===null)delete n[o];else{n[o]=a;for(let l of sw(o))delete n[l]}return Ax(e,t,n)}function PH(e,t){return Ax(e,t,{})}function iw(e){for(let t of Wk)if(Bi[t]===e)return t;return"none"}function cw(e){return!e||!Object.hasOwn(Bi,e)?"":Bi[e]}var fw={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 dw(e){let t=e.role;return t&&Kt.includes(t)?t:null}var uw={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 So(e,t,o){let r=dw(e),n=e.size?`${e.size}px`:r?o?.has(ar[r])?`var(--size-${ar[r]})`:uw[ar[r]]??"":"";return{fontFamily:e.font?gw(e.font):r?`var(${fw[r]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:n,minWidth:n?"0":"",overflowWrap:n?"break-word":"",lineHeight:e.line?String(Ja(t.lineRatio+e.line*Qk,3)):"",letterSpacing:e.letter?`${Ja(t.letterEm+e.letter*ew,4)}em`:"",textTransform:cw(e.case),textAlign:e.align??"",paddingTop:Ai(e.padding),paddingBottom:Ai(e.padding),maxWidth:Ai(e.width),color:pw(e.color)}}var pw=e=>e===void 0||e===""?"":Object.hasOwn(yr,e)?yr[e]:Ox.test(e)?e:"",Ox=/^#[0-9a-fA-F]{6}$/;function Nx(e){return Ox.test(e)}var Ai=e=>e===void 0?"":`${e}px`,Ja=(e,t)=>Number(e.toFixed(t));function kH(e,t){let o=Number.parseFloat(e.fontSize)||16,r=Number.parseFloat(e.lineHeight),n=Number.parseFloat(e.letterSpacing),a=Number.parseFloat(e.paddingTop),l=Number.parseFloat(e.maxWidth);return{fontKey:t,sizePx:o,weight:mw(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?Ja(r/o,3):1.2,letterEm:Number.isFinite(n)?Ja(n/o,4):0,align:xw(e.textAlign),case:iw(e.textTransform),paddingPx:Number.isFinite(a)?Math.round(a):0,widthPx:Number.isFinite(l)&&l<ja?Math.round(l):ja}}function mw(e){return Number.isFinite(e)?Uk.reduce((t,o)=>Math.abs(o-e)<Math.abs(t-e)?o:t):400}function xw(e){for(let t of zk)if(t===e)return t;return e==="end"?"right":"left"}function wH(e,t){let o=Ex(e);if(!o)return"";for(let r of ms)if(Ex(t(r.cssVar))===o)return r.key;return""}var Ex=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function gw(e){let t=Kd(e);return t?`var(${t.cssVar})`:""}function vH(e,t,o,r){return!t||Xa(t)?.nodeId!==e?null:o.find(a=>r(a.getAttribute("class")))??o[0]??null}function Iw(e){let t=new Set,o=e;if(typeof window>"u"||!o?.ownerDocument)return t;let r=window.getComputedStyle(o);for(let n of hw)r.getPropertyValue(`--size-${n}`).trim()&&t.add(n);return t}var hw=["headingLarge","headingMedium","headingSmall","accent","body","label"];function TH(e,t,o=()=>Pn,r=a=>a,n=Sw){let a=0;for(let{element:l,partId:s}of e){let i=Xa(s)?.propKey;if(!i)continue;let c=r(i),f=Object.hasOwn(t,c)?Cn(t[c])??{}:{},u=!!f.line||!!f.letter,d=So(f,u?o(l):Pn,Iw(l)),p=Oi.some(I=>l.style[I]),x=!1;for(let[I,h]of Object.entries(d))l.style[I]=h,h&&(x=!0);if(p||Oi.some(I=>d[I]))for(let I of bw(l,n))for(let h of Oi)I.style[h]=d[h]??"";x&&(a+=1)}return a}function bw(e,t){let o=Cr(e.textContent??""),r=[],n=e;for(let a=0;a<yw&&t(n);a+=1){let l=n.parentElement;if(!l||Cr(l.textContent??"")!==o)break;r.push(l),n=l}return r}var yw=8;function Sw(e){let t=e;return typeof window>"u"||!t?.ownerDocument?!1:window.getComputedStyle(t).display==="inline"}var Pn={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:ja},Cw=Object.keys(So({},Pn)),Di=new Set(["color","overflowWrap"]),Oi=Cw.filter(e=>!Di.has(e));function Bx(e,t,o,r=n=>n){let n=new Map;for(let s of e){let i=Fi(s.key,s.row);for(let c of s.texts){let f=n.get(c);f?(f.keys.add(s.key),f.partKeys.add(i)):n.set(c,{keys:new Set([s.key]),partKeys:new Set([i])})}}let a=new Map;for(let s of Object.keys(t)){if(!Pw(s))continue;let i=Cn(t[s])??{},c=So(i,Pn);Object.values(c).some(Boolean)&&a.set(s,{stamp:Lx(o,s),declarations:c})}let l=new Map;for(let[s,{keys:i,partKeys:c}]of n){let f=c.size===1?[...c][0]:i.size===1?[...i][0]:null;if(!f)continue;let u=r(f);if(!Object.hasOwn(t,u))continue;let d=Cn(t[u])??{},p=So(d,Pn);Object.values(p).some(Boolean)&&l.set(s,{stamp:Lx(o,f),declarations:p})}return l.size||a.size?{rules:l,kindRules:a,drawn:new Set(n.keys())}:null}function Pw(e){return e.startsWith("@")}function Dx(e,t){return e?.kindRules.get(t)??null}function Lx(e,t){let o=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${o(e)}~${o(t)}`}function Mx(e){let t=[],o=new Set,r=n=>{let{stamp:a,declarations:l}=n;if(o.has(a))return;o.add(a);let s=Object.entries(l).filter(([,d])=>d!==""),i=d=>d.map(([p,x])=>`${kw(p)}: ${x}`).join("; "),c=`[${Mi}="${a}"]`,f=s.filter(([d])=>!Di.has(d)),u=s.filter(([d])=>Di.has(d));f.length&&t.push(`${c}, *:has(> ${c}) { ${i(f)} }`),u.length&&t.push(`${c} { ${i(u)} }`)};for(let n of e.rules.values())r(n);for(let n of e.kindRules.values())r(n);return t.join(`
|
|
4
|
+
`)}var kw=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function Hx(e,t){if(!e)return null;let o=Cr(t),r=e.rules.get(o);if(r)return r;if(o.length<ww||e.drawn.has(o))return null;let n=null;for(let[a,l]of e.rules)if(a.includes(o)){if(n&&n.stamp!==l.stamp)return null;n=l}return n}var ww=8;import{createContext as Kx,useContext as Hi,useId as Rw,useMemo as Fw}from"react";var kn="@name",Gx="@body",Wx="@value",EH={[kn]:"Name",[Gx]:"Body",[Wx]:"Value"},vw={TimelineTrack:{"entries.date":kn,"entries.title":kn,"entries.blurb":Gx},Footprint:{"offices.city":kn},Stats:{"items.label":kn,"items.value":Wx}};function Tw(e){let{key:t,row:o}=Ei(e);return o?`${t}.${o.rowKey}`:null}function Ux(e,t){if(!e)return t;let o=Tw(t);return o?vw[e]?.[o]??t:t}import{Fragment as zx,jsx as Za,jsxs as Ew}from"react/jsx-runtime";var Gi=Kx(null),$x=Kx(null);function BH({needles:e,styles:t,type:o,children:r}){let n=Rw(),a=JSON.stringify([n,e,t,o]),l=Fw(()=>Bx(e,t,n,s=>Ux(o,s)),[a]);return l?Ew(zx,{children:[Za("style",{"data-sf-part-styles":"",dangerouslySetInnerHTML:{__html:Mx(l)}}),Za(Gi.Provider,{value:l,children:r})]}):Za(zx,{children:r})}function Vx(e){let t=Hi(Gi),o=Hi($x),r=Hx(t,e);return r&&r.stamp!==o?r:null}function DH(e){return Dx(Hi(Gi),e)}function qx({stamp:e,children:t}){return Za($x.Provider,{value:e,children:t})}import{Fragment as Lw,jsx as Wi}from"react/jsx-runtime";function Pr({value:e,children:t}){let o=Vx(e);return o?Wi(qx,{stamp:o.stamp,children:Wi("span",{[Mi]:o.stamp,children:t})}):Wi(Lw,{children:t})}import{jsx as ue,jsxs as Ui}from"react/jsx-runtime";function re(e,t=!1){let o=Hw(t),r=Ri(e);if(r.length===1){let[a]=r,l=Ti(a),s=l?Dw(l,a.children):a.children;return ue(Pr,{value:e,children:Qa(s,o)})}let n=[];return r.forEach((a,l)=>{if(a.bullet){n.push(ue("span",{"data-sf-bullet":"",className:_w,children:Qa(a.children,o)},l));return}if(a.number!=null){n.push(Ui("span",{"data-sf-number":a.number,className:Aw,children:[Ui("span",{className:Ow,children:[a.number,"."]}),Qa(a.children,o)]},l));return}l>0&&!Nw(r[l-1])&&n.push(ue("br",{},`br${l}`)),n.push(ue(Xx,{children:Qa(a.children,o)},l))}),ue(Pr,{value:e,children:n})}var _w="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['\xB7']",Aw="relative block pl-[2em]",Ow="absolute left-0 w-[1.6em] text-right tabular-nums";function Nw(e){return e.bullet||e.number!=null}var Bw="text-accent underline underline-offset-[0.18em]";function Dw(e,t){let[o,...r]=t;return o?.kind==="text"?[{kind:"text",text:`${e}${o.text}`},...r]:[{kind:"text",text:e},...t]}function Mw(e){if(e)return Nx(e)?e:Object.hasOwn(yr,e)?yr[e]:void 0}function Qa(e,t){let o=[],r=!1;return e.forEach((n,a)=>{if(n.kind==="text"){o.push(ue("span",{children:et(n.text)},a)),r=!0;return}r||o.push(ue("span",{},`e${a}`)),o.push(jx(n,a,t)),r=!1}),r||o.push(ue("span",{},"end")),o}function Yx(e,t){return e.length===1&&e[0].kind==="text"?et(e[0].text):e.map((o,r)=>o.kind==="text"?ue(Xx,{children:et(o.text)},r):jx(o,r,t))}function Hw(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function jH(e){return ue(Pr,{value:e,children:ue("span",{children:e})})}function jx(e,t,o){if(e.kind==="link")return ue("a",{href:e.href,className:Bw,children:Yx(e.children,o)},t);let r=Yx(e.children,o),n=cx[e.kind];if(n)return ue("span",{[fx]:n,children:r},t);switch(e.kind){case"underline":return ue("u",{children:r},t);case"sup":return ue("sup",{children:r},t);case"sub":return ue("sub",{children:r},t);case"color":{let a=Mw(e.color);return a?ue("span",{style:{color:a},children:r},t):ue("span",{children:r},t)}case"accent":case"highlight":return ue("em",{className:o,children:r},t);case"bold":return ue("strong",{className:"font-semibold",children:r},t);case"italic":return ue("em",{className:"italic",children:r},t);case"strike":return ue("s",{className:"line-through",children:r},t);default:return ue("span",{children:r},t)}}function Ot(e,t=!0){let o=e.split(`
|
|
5
|
+
`);return ue(Pr,{value:e,children:o.map((r,n)=>Ui("span",{children:[re(r,t),n<o.length-1?ue("br",{}):null]},n))})}function el(e){return e.split(/\n\s*\n/).map(t=>t.trim()).filter(Boolean)}import{jsxs as Jx}from"react/jsx-runtime";function zi({text:e,linkText:t,linkHref:o}){let r=(t??"").trim(),n=(o??"").trim(),a=!!r&&!!n;return!e&&!a?null:Jx("p",{className:"mt-5 font-mono text-[length:var(--size-label,13px)] tracking-[0.06em] text-fg-dim",children:[e?re(e):null,e&&a?" ":null,a&&Jx(Pe,{href:n,className:"text-accent transition-colors hover:text-fg",children:[re(r)," \u2192"]})]})}import{createContext as Gw,useCallback as Zx,useContext as Ww,useEffect as Uw,useId as zw,useMemo as Kw,useRef as $w,useState as Vw}from"react";import{jsx as qw}from"react/jsx-runtime";var Qx=Gw(null);function nG({reason:e,children:t}){let[o,r]=Vw([]),n=$w(null),a=Zx(c=>{r(f=>f.includes(c)?f:[...f,c])},[]),l=Zx(c=>{r(f=>f.filter(u=>u!==c))},[]),s=e==="none-configured",i=Kw(()=>({noCurrencyConfigured:s,live:o,firstRendered:n,join:a,leave:l}),[s,o,a,l]);return qw(Qx.Provider,{value:i,children:t})}function eg(e){let t=Ww(Qx),o=zw(),r=!!e&&!!t?.noCurrencyConfigured;r&&t&&t.firstRendered.current===null&&(t.firstRendered.current=o);let n=t?.join,a=t?.leave;return Uw(()=>{if(!(!r||!n||!a))return n(o),()=>a(o)},[r,n,a,o]),!r||!t?!1:(t.live.length>0?t.live[0]:t.firstRendered.current)===o}import{jsx as Xw}from"react/jsx-runtime";var Yw="This website has no currency yet. Add one in Settings and these cards will price. Only you can see this line.";function Ki({editing:e}){return eg(e)?Xw(zi,{text:Yw}):null}import{createContext as jw,useContext as Jw,useEffect as Zw,useState as tg}from"react";import{jsx as tl}from"react/jsx-runtime";var og=jw({wheels:[],loading:!1});function rg({children:e}){let[t,o]=tg([]),[r,n]=tg(!0);return Zw(()=>{let a=!1;return No().then(l=>{a||(o(l),n(!1))}).catch(()=>{a||n(!1)}),()=>{a=!0}},[]),tl(og.Provider,{value:{wheels:t,loading:r},children:e})}function Qw({code:e,finish:t,wheel:o}){let{wheels:r,loading:n}=Jw(og),a=o??(e?r.find(l=>l.slug===e):void 0);return a?tl(hn,{wheel:a,variant:"catalog",defaultFinish:t},t??""):tl("div",{className:"sf-card flex aspect-square w-full items-center justify-center bg-surface-2 p-4 text-center",children:tl("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:n?"Loading\u2026":e||"Set a design code"})})}import{createContext as ov,useCallback as tt,useContext as rv,useEffect as nv,useMemo as av,useRef as sg,useState as kr}from"react";var bG={default:"Sort \xB7 Featured",new:"Newest","price-asc":"Price \xB7 Low","price-desc":"Price \xB7 High",name:"Name A\u2013Z"},ol={process:null,size:null,lugs:null,finish:null,priceMin:null,priceMax:null,sort:"default"};function ev(e,t,o){return!(t.process&&e.process!==t.process||t.size&&!e.sizes.includes(t.size)||t.lugs!=null&&Qs(e)!==t.lugs||t.finish&&!e.finishes.some(r=>r.family===t.finish)||!ra(e.prices,o,t.priceMin,t.priceMax))}function tv(e,t,o){return[...e].sort((r,n)=>{switch(t){case"price-asc":return cr(r.prices,n.prices,o,"asc");case"price-desc":return cr(r.prices,n.prices,o,"desc");case"name":return r.name.localeCompare(n.name);case"new":return(n.badge==="new"?1:0)-(r.badge==="new"?1:0);default:return 0}})}function ng(e,t,o,r=null){let n=Zp(e,r);return tv(n.filter(a=>ev(a,t,o)),t.sort,o)}import{jsx as sv}from"react/jsx-runtime";var ig={fit:null,name:"",resolving:!1,unresolved:!1};function lv(e,t){return e.fit===t.fit&&e.name===t.name&&e.resolving===t.resolving&&e.unresolved===t.unresolved}var st=()=>{},cg=ov({filters:ol,setProcess:st,setSize:st,setLugs:st,setFinish:st,setPriceMin:st,setPriceMax:st,setSort:st,clearAll:st,reportCount:st,total:0,reportLugs:st,lugOptions:[],reportSizes:st,sizeOptions:[],reportFinishes:st,finishOptions:[],optionsReported:!1,scrollProcess:null,vehicle:ig,publishVehicle:st}),rl="data-catalog-collection",ag=(e,t)=>e-t;function lg(e,t){return e.length===t.length&&e.every((o,r)=>o===t[r])}function $i(e){let t=sg(new Map),[o,r]=kr([]),n=tt((a,l)=>{let s=t.current.get(a);if(s&&lg(s,l))return;t.current.set(a,l);let i=new Set;for(let f of t.current.values())for(let u of f)i.add(u);let c=[...i].sort(e);r(f=>lg(f,c)?f:c)},[e]);return[o,n]}function kG({children:e,initial:t}){let[o,r]=kr(t??ol),n=tt(F=>r(E=>({...E,process:F})),[]),a=tt(F=>r(E=>({...E,size:F})),[]),l=tt(F=>r(E=>({...E,lugs:F})),[]),s=tt(F=>r(E=>({...E,finish:F})),[]),i=tt(F=>r(E=>({...E,priceMin:F})),[]),c=tt(F=>r(E=>({...E,priceMax:F})),[]),f=tt(F=>r(E=>({...E,sort:F})),[]),u=tt(()=>r(F=>({...ol,sort:F.sort})),[]),[d,p]=kr(ig),x=tt(F=>{p(E=>lv(E,F)?E:F)},[]),g=sg(new Map),[I,h]=kr(0),C=tt((F,E)=>{if(g.current.get(F)===E)return;g.current.set(F,E);let N=0;for(let le of g.current.values())N+=le;h(N)},[]),[S,P]=$i(ag),[T,b]=$i(ag),[w,O]=$i(Cu),[D,R]=kr(!1),L=tt((F,E)=>{R(!0),P(F,E)},[P]),G=tt((F,E)=>{R(!0),b(F,E)},[b]),Y=tt((F,E)=>{R(!0),O(F,E)},[O]),[M,v]=kr(null);nv(()=>{let E=0,se=()=>{E=0;let le=null,ge=document.querySelectorAll(`[${rl}]`);for(let ie of ge){let te=ie.getBoundingClientRect();if(te.top<=140&&te.bottom>140){le=ie.getAttribute(rl)??null;break}}v(le)},N=()=>{E||(E=requestAnimationFrame(se))};return se(),window.addEventListener("scroll",N,{passive:!0}),window.addEventListener("resize",N),()=>{window.removeEventListener("scroll",N),window.removeEventListener("resize",N),E&&cancelAnimationFrame(E)}},[]);let j=av(()=>({filters:o,setProcess:n,setSize:a,setLugs:l,setFinish:s,setPriceMin:i,setPriceMax:c,setSort:f,clearAll:u,reportCount:C,total:I,reportLugs:L,lugOptions:S,reportSizes:G,sizeOptions:T,reportFinishes:Y,finishOptions:w,optionsReported:D,scrollProcess:M,vehicle:d,publishVehicle:x}),[o,n,a,l,s,i,c,f,u,C,I,L,S,G,T,Y,w,D,M,d,x]);return sv(cg.Provider,{value:j,children:e})}function fg(){return rv(cg)}function iv(e){if(!e.includes("_"))return e;let t=e.replace(/^_+/,""),o=e.slice(0,e.length-t.length),[r,...n]=t.split("_");return o+r+n.map(a=>a.slice(0,1).toUpperCase()+a.slice(1)).join("")}function Vi(e){if(Array.isArray(e))return e.map(Vi);if(e&&typeof e=="object"){let t={};for(let[o,r]of Object.entries(e))t[iv(o)]=Vi(r);return t}return e}function cv(e){return Vi(e)}function nl(e){return e.map(t=>ke(t)==="tyre"?t:cv(t))}import{useCallback as $v,useEffect as Vv,useMemo as qv,useState as _g}from"react";import{useState as fv}from"react";import{jsx as qi}from"react/jsx-runtime";function Yi({brand:e,logo:t}){let[o,r]=fv(!1),n=(e??"").trim();if(!n)return null;let a=o?void 0:$t(t??void 0);return qi("div",{className:"sf-card-plate absolute inset-x-0 bottom-0 flex h-1/4 items-center justify-center bg-[var(--card-bg)] px-4 transition-colors duration-200 group-hover:bg-[var(--card-bg-hover)]",children:a?qi("img",{src:a,alt:n,className:"max-h-[52%] max-w-[78%] object-contain",draggable:!1,onError:()=>r(!0)}):qi("span",{className:"truncate font-display text-[length:var(--size-body,18px)] font-medium uppercase leading-none tracking-[-0.01em] text-fg",children:n})})}import{useEffect as Iv,useState as hv}from"react";import{createContext as dv,lazy as uv,Suspense as pv,useContext as mv}from"react";import{jsx as al}from"react/jsx-runtime";var xv={Link:Pe,Image:io},gv=dv(xv);function dg(){return mv(gv)}function ll(e){let{Link:t}=dg();return al(t,{...e})}function sl(e){let{Image:t}=dg();return al(t,{...e})}function BG(e){let t=uv(e);return function(r){return al(pv,{fallback:null,children:al(t,{...r})})}}import{jsx as Xi,jsxs as bv}from"react/jsx-runtime";function Wo({fallback:e,className:t,src:o,alt:r="",objectPosition:n,objectFit:a="cover",sizes:l="100vw",priority:s=!1,deferFetch:i=!1,showBackground:c=!0,treatment:f}){let[u,d]=hv(!1),p=o||"";Iv(()=>{d(!1)},[p]);let x=Zn(p),g=!p||u;return bv("div",{className:`relative h-full w-full overflow-hidden ${t??""}`,children:[Xi("div",{className:"absolute inset-0 flex items-center justify-center",style:c?{background:"var(--surface)"}:void 0,children:g?e:null}),p&&(x?Xi("img",{src:p,alt:r,decoding:"async",...i?{loading:"lazy"}:{},className:`absolute inset-0 h-full w-full${f?.className?` ${f.className}`:""}`,style:{display:u?"none":"block",objectFit:a,...n?{objectPosition:n}:{},...f?.style??{}},onError:()=>d(!0)}):Xi(sl,{src:p,alt:r,fill:!0,sizes:l,priority:s,...f?.className?{className:f.className}:{},style:{display:u?"none":"block",objectFit:a,...n?{objectPosition:n}:{},...f?.style??{}},onError:()=>d(!0)}))]})}import{useId as Tv}from"react";var yv=25.4,wn=400,cl=152,Sv=58,ug=cl*Math.cos(Sv*Math.PI/180),Cv=14,Pv=wn/2,kv={sectionWidth:225,aspectRatio:60,rimDiameter:17};function mg(e){let t=Yt(e);return t?{sectionWidth:t.width,aspectRatio:t.profile,rimDiameter:t.rim}:kv}function xg(e){let t=e.rimDiameter*yv/2,o=t+e.sectionWidth*e.aspectRatio/100,r=cl*(e.sectionWidth/o),n=t/o;return{cy:Pv,rx:ug,ry:cl,cxf:wn/2-r/2-Cv,dx:r,rimRx:ug*n,rimRy:cl*n}}var X=e=>e.toFixed(1);function fl(e,t,o,r=!1){let n=e.cxf+t*e.dx,[a,l]=r?[e.cy+e.ry,e.cy-e.ry]:[e.cy-e.ry,e.cy+e.ry];return`M${X(n)} ${X(a)} A${X(e.rx)} ${X(e.ry)} 0 0 ${o} ${X(n)} ${X(l)}`}function ji(e,t,o){let r=e.cxf+t*e.dx,n=e.cxf+o*e.dx,a=e.cy-e.ry,l=e.cy+e.ry;return`M${X(r)} ${X(a)} L${X(n)} ${X(a)} A${X(e.rx)} ${X(e.ry)} 0 0 1 ${X(n)} ${X(l)} L${X(r)} ${X(l)} A${X(e.rx)} ${X(e.ry)} 0 0 0 ${X(r)} ${X(a)} Z`}function il(e,t,o){let r=o*Math.PI;return[e.cxf+t*e.dx+e.rx*Math.sin(r),e.cy-e.ry*Math.cos(r)]}function gg(e,t,o,r,n){let[a,l]=il(e,t,r),[s,i]=il(e,t,n),[c,f]=il(e,o,n),[u,d]=il(e,o,r);return`M${X(a)} ${X(l)} A${X(e.rx)} ${X(e.ry)} 0 0 1 ${X(s)} ${X(i)} L${X(c)} ${X(f)} A${X(e.rx)} ${X(e.ry)} 0 0 0 ${X(u)} ${X(d)} L${X(a)} ${X(l)} Z`}var pg=[{f:[0,.215]},{f:[.245,.485]},{f:[.515,.755]},{f:[.785,1]}],wv={COM:[{f:[0,.115]},{f:[.145,.26]},{f:[.29,.405]},{f:[.435,.55]},{f:[.58,.695]},{f:[.725,.84]},{f:[.87,1]}],P:[{f:[0,.17],blocks:{count:9,gap:.34}},{f:[.2,.38]},{f:[.42,.58]},{f:[.62,.8]},{f:[.83,1],blocks:{count:9,gap:.34,phase:.5}}],HP:[{f:[0,.3]},{f:[.34,.52]},{f:[.56,.7]},{f:[.74,1],blocks:{count:16,gap:.18}}],UHP:[{f:[0,.34]},{f:[.4,.56]},{f:[.62,1]}],SUV:[{f:[0,.16],blocks:{count:7,gap:.4}},{f:[.2,.36],blocks:{count:11,gap:.26,phase:.5}},{f:[.4,.6]},{f:[.64,.8],blocks:{count:11,gap:.26,phase:.5}},{f:[.84,1],blocks:{count:7,gap:.4}}],LT:[{f:[0,.22],blocks:{count:11,gap:.26}},{f:[.26,.48],blocks:{count:11,gap:.26,phase:.5}},{f:[.52,.74],blocks:{count:11,gap:.26}},{f:[.78,1],blocks:{count:11,gap:.26,phase:.5}}],AT:[{f:[0,.23],blocks:{count:6,gap:.46}},{f:[.29,.5],blocks:{count:6,gap:.46,phase:.5}},{f:[.56,.77],blocks:{count:6,gap:.46}},{f:[.83,1],blocks:{count:6,gap:.46,phase:.5}}],MT:[{f:[0,.29],blocks:{count:4,gap:.58}},{f:[.36,.64],blocks:{count:4,gap:.58,phase:.5}},{f:[.71,1],blocks:{count:4,gap:.58}}]},vv=[["ultra high performance","UHP"],["uhp","UHP"],["high performance","HP"],["hp","HP"],["performance","HP"],["sport","HP"],["mud terrain","MT"],["mud","MT"],["mt","MT"],["all terrain","AT"],["at","AT"],["light truck","LT"],["lt","LT"],["commercial","COM"],["com","COM"],["van","COM"],["cargo","COM"],["suv","SUV"],["4x4","SUV"],["crossover","SUV"],["cuv","SUV"],["passenger","P"],["touring","P"],["highway","P"],["p","P"]];function Ig(e){let t=` ${(e??"").toLowerCase().replace(/[^a-z0-9]+/g," ").trim()} `;if(t.trim()==="")return pg;for(let[o,r]of vv)if(t.includes(` ${o} `))return wv[r];return pg}var $G="Illustrations are drawn to each tyre's listed size and represent its category; supplier photography replaces them where available.";import{Fragment as vn,jsx as V,jsxs as Nt}from"react/jsx-runtime";var it={rib:.2,grooveWall:.16,shoulder:.22,silhouette:.26,relief:[.26,.15,.11],lettering:.1,dishFill:.06,dishEdge:.3,spoke:.3,hubFill:.16,hubEdge:.34},Rv=[.8,.52,.24],hg=.4,bg=.88,yg=.3,Sg=5,Cg=.3,Pg=.84,Fv=7,Q=e=>Math.round(e*10)/10;function Ji({size:e,type:t,className:o}){let r=Tv().replace(/[^a-zA-Z0-9]/g,""),n={tread:`${r}-tread`,wall:`${r}-wall`,rim:`${r}-rim`,shadow:`${r}-shadow`,crown:`${r}-crown`},a=xg(mg(e)),l=ji(a,0,1),s=e?`${e} tyre illustration`:"Tyre illustration";return Nt("svg",{"data-tyre-placeholder":"",viewBox:`0 0 ${wn} ${wn}`,role:"img","aria-label":s,fill:"none",className:o??"block h-full w-full",children:[V("title",{children:s}),Nt("defs",{children:[V(Lv,{id:n}),V("clipPath",{id:n.crown,children:V("path",{d:l})})]}),V("ellipse",{cx:Q(a.cxf+a.dx/2),cy:Q(a.cy+a.ry-4),rx:Q(a.dx*1.5),ry:16,fill:`url(#${n.shadow})`}),V(_v,{g:a,id:n}),V(Av,{g:a,id:n}),V("path",{d:l,fill:`url(#${n.tread})`}),V("g",{clipPath:`url(#${n.crown})`,children:Ig(t).map(i=>V(Ev,{g:a,column:i},i.f[0]))}),V("path",{d:fl(a,0,0,!0),stroke:"currentColor",strokeOpacity:it.shoulder,strokeWidth:1.2}),V("path",{d:fl(a,1,1),stroke:"currentColor",strokeOpacity:it.silhouette,strokeWidth:1.4})]})}function Ev({g:e,column:t}){let[o,r]=t.f;if(!t.blocks)return Nt(vn,{children:[V("path",{d:ji(e,o,r),fill:"currentColor",fillOpacity:it.rib}),V("path",{d:fl(e,o,1),stroke:"currentColor",strokeOpacity:it.grooveWall,strokeWidth:1})]});let{count:n,gap:a,phase:l=0}=t.blocks,s=1/n,i=[];for(let c=-1;c<=n;c+=1){let f=Math.max((c+l+a/2)*s,0),u=Math.min((c+l+1-a/2)*s,1);u-f>s*.15&&i.push([f,u])}return V(vn,{children:i.map(([c,f])=>V("path",{d:gg(e,o,r,c,f),fill:"currentColor",fillOpacity:it.rib,stroke:"currentColor",strokeOpacity:it.grooveWall,strokeWidth:1},c))})}function Lv({id:e}){return Nt(vn,{children:[Nt("linearGradient",{id:e.tread,x1:"0",y1:"0",x2:"1",y2:"0",children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.07}),V("stop",{offset:"0.14",stopColor:"currentColor",stopOpacity:.24}),V("stop",{offset:"0.45",stopColor:"currentColor",stopOpacity:.18}),V("stop",{offset:"0.84",stopColor:"currentColor",stopOpacity:.1}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.05})]}),Nt("linearGradient",{id:e.wall,x1:"0.15",y1:"0",x2:"0.9",y2:"1",children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.28}),V("stop",{offset:"0.45",stopColor:"currentColor",stopOpacity:.17}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.08})]}),Nt("linearGradient",{id:e.rim,x1:"0.1",y1:"0",x2:"0.9",y2:"1",children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.46}),V("stop",{offset:"0.5",stopColor:"currentColor",stopOpacity:.26}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.12})]}),Nt("radialGradient",{id:e.shadow,children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.22}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:0})]})]})}function _v({g:e,id:t}){let o=e.rimRy/e.ry,r=a=>o+(1-o)*a,n=Math.max(6,(e.ry-e.rimRy)*.3);return Nt(vn,{children:[V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rx),ry:Q(e.ry),fill:`url(#${t.wall})`}),Rv.map((a,l)=>{let s=r(a);return V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rx*s),ry:Q(e.ry*s),stroke:"currentColor",strokeOpacity:it.relief[l],strokeWidth:1},a)}),V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rx*r(hg)),ry:Q(e.ry*r(hg)),stroke:"currentColor",strokeOpacity:it.lettering,strokeWidth:Q(n)})]})}function Av({g:e,id:t}){let o=Array.from({length:Sg},(r,n)=>{let a=(n*(360/Sg)-90)*Math.PI/180;return{x1:e.cxf+e.rimRx*Cg*Math.cos(a),y1:e.cy+e.rimRy*Cg*Math.sin(a),x2:e.cxf+e.rimRx*Pg*Math.cos(a),y2:e.cy+e.rimRy*Pg*Math.sin(a)}});return Nt(vn,{children:[V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rimRx),ry:Q(e.rimRy),fill:`url(#${t.rim})`}),V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rimRx*bg),ry:Q(e.rimRy*bg),fill:"currentColor",fillOpacity:it.dishFill,stroke:"currentColor",strokeOpacity:it.dishEdge,strokeWidth:1}),o.map((r,n)=>V("line",{x1:Q(r.x1),y1:Q(r.y1),x2:Q(r.x2),y2:Q(r.y2),stroke:"currentColor",strokeOpacity:it.spoke,strokeWidth:Fv,strokeLinecap:"round"},n)),V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rimRx*yg),ry:Q(e.rimRy*yg),fill:"currentColor",fillOpacity:it.hubFill,stroke:"currentColor",strokeOpacity:it.hubEdge,strokeWidth:1})]})}import{jsx as Zi}from"react/jsx-runtime";function Qi({image:e,size:t,type:o,sizes:r,priority:n=!1,className:a="aspect-square",showBackground:l=!0}){return Zi("div",{className:`text-fg ${a}`,style:{padding:"var(--sf-tyre-image-inset, 0)"},children:Zi(Wo,{label:t||"Tyre",src:$t(e??void 0),alt:t?`${t} tyre`:"Tyre",objectFit:"contain",sizes:r,priority:n,showBackground:l,fallback:Zi(Ji,{size:t,type:o,className:"block h-full w-full p-3"})})})}import{useEffect as Ov,useState as kg}from"react";var ec=new Map;function Nv(e){let t=ec.get(e);if(t)return t;let o=Rt.getTyre(e).catch(r=>{throw ec.delete(e),r});return ec.set(e,o),o}function wg(e,t){let[o,r]=kg("idle"),[n,a]=kg(null);return Ov(()=>{if(!t||!e)return;let l=!1;return r("loading"),Nv(e).then(s=>{l||(a(s),r("ready"))}).catch(()=>{l||r("error")}),()=>{l=!0}},[e,t]),{state:o,tyre:n}}function s4(e){if(!e||e.year===null)return null;let{make:t,model:o,year:r,modification:n}=e;return!t||!o||!n?null:{make:t,model:o,year:r,modification:n}}function Bv(e,t){let o=new URLSearchParams({make:t.make,model:t.model,year:String(t.year),modification:t.modification});return`/api/v1/tyres/${encodeURIComponent(e)}/fitment?${o.toString()}`}function dl(e,t=""){return{vehicle:{...e,region:t},status:"unknown",oemSizes:[],variants:[]}}function Dv(e,t){if(typeof t!="object"||t===null)return dl(e);let o=t,r=typeof o.vehicle=="object"&&o.vehicle!==null?o.vehicle:{},n=typeof r.region=="string"?r.region:"",a=o.status;if(a!=="fits"&&a!=="doesNotFit")return dl(e,n);let l=Array.isArray(o.variants)?o.variants.filter(s=>typeof s=="object"&&s!==null&&typeof s.sku=="string"&&typeof s.fits=="boolean"):[];return l.length===0?dl(e,n):{vehicle:{make:typeof r.make=="string"?r.make:e.make,model:typeof r.model=="string"?r.model:e.model,year:typeof r.year=="number"?r.year:e.year,modification:typeof r.modification=="string"?r.modification:e.modification,region:n},status:a,oemSizes:Array.isArray(o.oemSizes)?o.oemSizes.filter(s=>typeof s=="string"):[],variants:l.map(s=>({sku:s.sku,size:typeof s.size=="string"?s.size:"",fits:s.fits}))}}async function i4(e,t){try{let o=await eu(Bv(e,t),{baseUrl:tu});return Dv(t,o)}catch{return dl(t)}}function c4(e){if(!e)return[];let t=[];for(let o of[...e.frontTyres,...e.rearTyres]){let r=Yt(o);if(!r)continue;let n=Vt(r);t.includes(n)||t.push(n)}return t}function f4(e,t){if(t.length===0)return null;for(let o of e){let r=Yt(o);if(!r)continue;let n=Vt(r);if(t.includes(n))return n}return null}function Mv(e,t){if(!e||e.status==="unknown")return"unknown";let o=e.variants.find(r=>r.sku===t);return o?o.fits?"fits":"doesNotFit":"unknown"}var Hv="/tyres";function ul(e){return e?`${Hv}/${e}`:null}function tc(e,t){return fu({partNumber:e.sku,prices:e.prices},t)}var Gv="Tyre";function pl(e,t,o,r){return{id:`${e.slug}|${t.sku}|${o.unit}|${o.spares>0?"spare":"no-spare"}`,slug:e.slug,name:hr(e.name),process:e.brand||Gv,positionNo:"01",config:[{label:t.size},{label:ea(o)}],finishName:"",size:t.size,components:tc(t,o),qty:r,href:ul(e.slug)??void 0,kind:"tyre",sku:t.sku,pack:o}}function I4(e){return e.kind==="tyre"}function vg(e,t){let o=e.prices?.[t];return typeof o!="number"||!Number.isFinite(o)||o<=0?!1:e.inStock}var Tg="handed",Rg="plain";function w4(e){let t=e.variants??[],o=e.finishes.map(d=>({value:d.name,label:d.name,swatch:d.color}));function r(d){let p=[];for(let x of t){let g=d(x);!g||p.some(I=>I.value===g.value)||p.push(g)}return p}let n=r(d=>({value:di(d),label:Cm(d),note:Pm(d)})),a=r(d=>d.boltPattern?{value:d.boltPattern,label:d.boltPattern}:null),l=r(d=>{let p=Aa(d);return p===null?null:{value:p,label:`ET ${p}`}}),s=r(d=>d.centreBore==null?null:{value:Be(d.centreBore),label:`${Be(d.centreBore)} mm`}),i=r(d=>({value:ur(d)?Tg:Rg,label:ur(d)?Ep:Lp})),c=t.map(d=>({id:`${d.finishName}|${d.size}`,options:{finish:d.finishName,size:di(d),variantSize:d.size,...d.boltPattern?{boltPattern:d.boltPattern}:{},...Aa(d)!==null?{et:Aa(d)}:{},...d.centreBore==null?{}:{centreBore:Be(d.centreBore)},pairing:ur(d)?Tg:Rg},inStock:!un(d),image:null,components:d.components})),u=((e.defaultFinish?o.find(d=>d.value===e.defaultFinish):void 0)??o[0])?.value;return{kind:"alloy-wheel",source:e,slug:e.slug,name:e.name,eyebrow:e.process,badge:e.badge==="new"?"New 2026":e.badge?"Bestseller":"",href:`/wheels/${e.slug}`,crumbs:[{label:"Home",href:"/"},{label:"Wheels",href:"/wheels"},{label:e.process,href:"/wheels"},{label:e.name}],cover:e.coverImage??null,inStock:e.inStock===!0,mediaGroups:e.mediaGroups,optionFields:[{key:"finish",label:"Finish",prompt:"Select a finish",role:"resolves",display:"swatch",defaultValue:u},{key:"size",label:"Size",prompt:"Select a size",role:"resolves",display:"pill",empty:{text:"This wheel isn't available to order online in this finish.",linkText:"Contact us about it \u2192",href:"/contact"}},{key:"boltPattern",label:"Bolt pattern",prompt:"Select a bolt pattern",role:"describes",display:"pill"},{key:"et",label:"Offset",prompt:"Select an offset",role:"describes",display:"pill"},{key:"centreBore",label:"Centre bore",prompt:"Select a centre bore",role:"describes",display:"pill"},{key:"pairing",label:"Wheels",prompt:"Select a pairing",role:"describes",display:"pill"}],optionValues:{finish:o,size:n,boltPattern:a,et:l,centreBore:s,pairing:i},parts:c,anchorPrices:e.prices,anchorMsrpPrices:e.msrpPrices??{}}}function v4(e,t){if(e.kind!=="alloy-wheel"||t===null)return e;let o=new Set(Jp(e.source.variants??[],t));if(o.size===0)return e;let r=e.parts.filter(s=>{let i=ml(e.source,s);return i!==null&&o.has(i)});if(r.length===0||r.length===e.parts.length)return e;let n=(s,i)=>new Set(s.map(c=>c.options[i]).filter(c=>c!==void 0)),a={},l=[];for(let s of e.optionFields){let i=n(e.parts,s.key),c=n(r,s.key),f=(e.optionValues[s.key]??[]).filter(d=>c.has(d.value)||!i.has(d.value));a[s.key]=f;let u=s.defaultValue!==void 0&&!f.some(d=>d.value===s.defaultValue)?f[0]?.value:s.defaultValue;l.push(u===s.defaultValue?s:{...s,defaultValue:u})}return{...e,optionFields:l,optionValues:a,parts:r}}function ml(e,t){return t?Na(e.variants??[],t.options.finish,t.options.variantSize)??null:null}function T4(e,t){return e.finishes.find(o=>o.name===t)??e.finishes[0]??Su}function O4(e){return e.kind==="tyre"?"advisory":"required"}var oc={choice:cu,qty:1};function Wv(e,t){if(e.kind!=="alloy-wheel")return`Set of ${4}`;let o=ml(e.source,t);return o?Oa(o):`Set of ${4}`}var Fg=(e,t)=>e===1?t:`${e} \xD7 ${t}`;function Eg(e){return e.unit==="set"?{label:`Add a spare \u2014 ${ir+1} instead of ${ir}`}:null}var Tn={howMany:"How many wheels",oneSet:"One set",oneSetPlusSpare:"One set + 1 spare",whichSide:"Which side is the spare?",left:"Left",right:"Right"};function Uv(e,t){return t.unit!=="set"||du(e)===null?null:{counts:[{value:ir,label:Tn.oneSet},{value:ir+iu,label:Tn.oneSetPlusSpare}],side:t.spares>0?{label:Tn.whichSide,options:[{value:"left",label:Tn.left},{value:"right",label:Tn.right}]}:null}}function zv(e,t,o){if(e.kind==="tyre")return{packs:[{value:"set",label:`A set of ${ir}`},{value:"single",label:"Just one"}],extra:Eg(o.choice),spareCounts:[],spareSide:null,components:t?tc({sku:t.id,prices:t.components[0].prices},o.choice):[],quantityLabel:Fg(o.qty,ea(o.choice))};let r=t?Uv(t.components,o.choice):null;return{packs:[],extra:r?null:Eg(o.choice),spareCounts:r?.counts??[],spareSide:r?.side??null,components:t?bs(t.components,o.choice):[],quantityLabel:Fg(o.qty,uu(Wv(e,t),o.choice))}}function N4(e,t,o,r,n){if(!t)return null;if(e.kind==="tyre"){let f=(e.source.variants??[]).find(u=>u.sku===t.id);return f?pl(e.source,f,r.choice,r.qty):null}let a=e.source,l=ml(a,t);if(!l)return null;let s=t.options.finish??"",i=l.size,c=r.choice.spares>0;return{id:`${a.slug}|${s}|${i}|${n.fitmentKey}${c?"|spare":""}`,slug:a.slug,name:hr(a.name),process:a.process,positionNo:"01",config:[{label:i},{label:s,gold:!0},{label:n.fitmentLabel},{label:zv(e,t,r).quantityLabel}],finishName:s,size:i,components:bs(t.components,r.choice),qty:r.qty,...c?{pack:r.choice}:{}}}function Lg(e,t){let o=t.trim(),r=e.trim();return!r||!Kv(o,r)?o:o.slice(r.length).replace(/^[^\p{L}\p{N}]+/u,"")||o}function Kv(e,t){if(e.length<t.length||e.slice(0,t.length).toLowerCase()!==t.toLowerCase())return!1;let o=e[t.length];return o===void 0||!/[\p{L}\p{N}]/u.test(o)}import{Fragment as Jv,jsx as Co,jsxs as Rn}from"react/jsx-runtime";var Yv="from ",Xv=2,jv=[];function rc({brand:e,brandLogo:t,brandPlate:o=!0,kindLabel:r=null,showBrand:n=!0,name:a,slug:l,sizes:s,fitSize:i=null,rimDiameters:c,prices:f,image:u,currency:d,editing:p=!1,fieldUsage:x=jv}){let g=xr(x),{add:I,open:h,warmCatalog:C}=la();Vv(()=>{p||C("tyre")},[p,C]);let{currency:S}=co(),P=na(oa(f,d),null),T=aa(P,d,Yv),b=[s.length>0?`${s.length} ${s.length===1?"size":"sizes"}`:null,g("rim_diameter")?wa(c):null].filter(Boolean).join(" \xB7 "),w=ul(l),[O,D]=_g(!1),R=$v(()=>{l&&D(!0)},[l]),{state:L,tyre:G}=wg(l??null,O),Y=qv(()=>G?.variants??[],[G]),[M,v]=_g(null),j=Y.length===1?Y[0].size:null,F=M??j,E=Y.find(z=>z.size===F),se=E!=null&&vg(E,S),N=L==="ready",le=!w||L==="error"||N&&Y.length===0;function ge(){!G||!E||!se||p||(I(pl(G,E,oc.choice,oc.qty)),h())}let ie=N&&Y.length>0?Y.map(z=>z.size):s,te=ie.slice(0,Xv),he=ie.length-te.length,de=z=>["cursor-pointer transition-colors",gn,z?"border-accent bg-accent text-bg":"border-accent/60 text-accent hover:border-accent hover:bg-accent/10"].join(" ");return Co(In,{href:w,identityLink:!0,containerProps:{onPointerEnter:R,onTouchStart:R,onFocusCapture:R},image:Co(Qi,{image:u,className:"h-full w-full",sizes:"(max-width: 640px) 90vw, (max-width: 1024px) 45vw, 280px",showBackground:!1}),plate:o?Co(Yi,{brand:e,logo:t}):null,eyebrow:ni(r,n&&g("brand")&&e||null),name:Lg(e??"",a),spec:b,price:T,metaLine:P.priced?"each":null,extras:Rn(Jv,{children:[i&&Rn("p",{className:"font-mono text-[length:var(--size-label,11px)] font-medium uppercase tracking-[0.14em] text-green",children:["Fits \xB7 ",i]}),Rn("div",{className:Ha,children:[Co("div",{className:Ga,children:te.map(z=>N&&Y.length>0?Co("button",{type:"button",title:z,"aria-label":z,"aria-pressed":F===z,onClick:()=>v(z),className:de(F===z),children:z},z):Co("span",{className:Ua,children:z},z))}),he>0&&Rn("span",{className:Wa,children:["+",he]})]}),Rn("div",{className:za,children:[!le&&P.priced&&Co("button",{type:"button",onClick:ge,[ta]:"",disabled:N&&!se,className:se||!N?`${br}${se?"":" opacity-80"}`:"cursor-not-allowed border border-dashed border-accent/50 px-4 py-2.5 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-accent/70",children:N&&!se?"Select a size":"Add to basket"}),w&&Co(Pe,{href:w,className:Ka,children:"Open product page"})]})]})})}import{jsx as Zv}from"react/jsx-runtime";function nc({item:e,currency:t,kindLabel:o=null,showBrand:r=!0,fitSize:n=null,editing:a=!1,fieldUsage:l}){return Zv(rc,{brand:e.brand,brandLogo:e.brandLogo,kindLabel:o,showBrand:r,name:e.name,slug:e.slug,sizes:e.sizes,fitSize:n,rimDiameters:e.rimDiameters,prices:e.prices,image:e.coverImage,currency:t,editing:a,fieldUsage:l})}import{Fragment as oT,jsx as We,jsxs as Uo}from"react/jsx-runtime";var Og={1:"grid-cols-1",2:"grid-cols-2 max-[800px]:grid-cols-1",3:"grid-cols-3 max-[800px]:grid-cols-1",4:"grid-cols-4 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",5:"grid-cols-5 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",6:"grid-cols-6 max-[1100px]:grid-cols-3 max-[800px]:grid-cols-1"},Ng=[{value:"para",label:"Paragraph size \u2014 13px",cls:"font-mono font-normal uppercase tracking-[0.22em] text-[length:var(--size-label,13px)]"},{value:"sm",label:"Small \u2014 40px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,40px)] max-[800px]:text-[length:var(--size-headingMedium,28px)]"},{value:"md",label:"Medium \u2014 48px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,48px)] max-[800px]:text-[length:var(--size-headingMedium,32px)]"},{value:"lg",label:"Large \u2014 56px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,56px)] max-[800px]:text-[length:var(--size-headingMedium,36px)]"},{value:"xl",label:"Extra large \u2014 64px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,64px)] max-[800px]:text-[length:var(--size-headingMedium,40px)]"}],ac="lg";function eT(e){return(Ng.find(t=>t.value===e)??Ng.find(t=>t.value===ac)).cls}function tT({num:e,catalog:t,kinds:o,title:r,titleSize:n,padTop:a,description:l,link:s,products:i,source:c,columns:f,limit:u,editing:d,capWidth:p,imageBackground:x,spinOnHover:g,coverIndex:I,indexBadge:h,outline:C,showBadge:S,fieldUsage:P,showCardPrice:T,showCardFinishes:b,showCardSizes:w,showCardBuy:O,showCardPage:D,cardImage:R,gap:L}){let G=wr(()=>P?mr(P,"alloy-wheel"):void 0,[P]),Y=wr(()=>P?mr(P,"tyre"):void 0,[P]),M=`pg-${Qv().replace(/:/g,"")}`,v=Og[Math.min(6,Math.max(1,f??4))]??Og[4],j=typeof u=="number"&&u>0,F=typeof p=="number",E=wr(()=>{let Ee=t??c?.wheels??null;return Ee?nl(Ee):null},[t,c]),se=c?.process,N=!!se,{filters:le,reportCount:ge,reportLugs:ie,reportSizes:te,reportFinishes:he,vehicle:de}=fg(),{currency:z}=co(),Ae=N&&!!le.process&&le.process!==se,Fe=wr(()=>E?N?ng(E,le,z,de.fit):E:null,[E,N,le,z,de.fit]);Ag(()=>{if(N)return ge(M,Ae?0:Fe?.length??0),()=>ge(M,0)},[N,Ae,Fe,ge,M]);let Oe=wr(()=>{let Ee=(Fe??[]).filter(B=>ke(B)!=="tyre");if(Ee.length===0)return!1;let A=Ee.some(B=>!!B.process);return Ee.some(B=>!!B.setWords)||ai({kind:!1,brand:!1,process:A},G??[])},[Fe,G]),ne=wr(()=>({lugs:Dp(E??[]),sizes:Gp(E??[]),finishes:Pu(E??[])}),[E]);Ag(()=>(ie(M,ne.lugs),te(M,ne.sizes),he(M,ne.finishes),()=>{ie(M,[]),te(M,[]),he(M,[])}),[ne,ie,te,he,M]);let K=Fp("ProductGrid",L,"both"),H=`${M} grid${K.className} bg-[var(--catalog-grid-bg)] ${v}`,He=Fe?Fe.length>0?We("div",{className:H,style:K.style,children:Fe.map((Ee,A)=>ke(Ee)==="tyre"?We(nc,{item:Ee,currency:z,editing:d,fieldUsage:Y},`tyre:${Ee.slug}-${A}`):We(hn,{wheel:Ee,variant:"catalog"},`${Ee.slug}-${A}`))}):d?We("div",{className:"flex min-h-[320px] items-center justify-center rounded bg-surface-2 p-4 text-center",children:Uo("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:["No products in \u201C",c?.name,"\u201D yet"]})}):null:We(i,{className:H,style:K.style,minEmptyHeight:320}),Ze=Fe?Fe.length:null,It=Om(pn(o)),Ne=e||r||l||s?Uo("div",{className:`${wu} sticky top-[var(--sf-header-h,88px)] z-30 mb-[18px] flex items-center justify-between gap-4 max-[800px]:flex-wrap max-[800px]:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${F?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-[800px]:-mx-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]"}`,children:[Uo("div",{className:"flex min-w-0 items-end gap-[21px]",children:[e&&We("span",{className:"font-mono text-[length:var(--size-label,13px)] leading-none uppercase tracking-[0.22em] text-fg-dim",children:re(e)}),r&&We("h2",{className:`${eT(n)} leading-none text-fg max-[800px]:leading-[1] [&>span]:block`,children:Ot(r,!1)})]}),(l||s||Ze!==null)&&Uo("div",{className:"flex items-center gap-5 max-[800px]:gap-3",children:[l&&We("span",{className:"max-w-[340px] truncate font-display text-[length:var(--size-body,13px)] leading-[1.4] text-fg-dim max-[800px]:hidden",children:re(l)}),s&&Uo(Pe,{href:s.href,className:"inline-flex items-center gap-2 whitespace-nowrap font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg",children:[re(s.text),We("span",{"aria-hidden":!0,children:"\u2192"})]}),Ze!==null&&Uo("span",{className:"whitespace-nowrap font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:[Ze," ",Ze===1?It.one:It.many]})]})]}):null,Ve=typeof a=="number"?a:120,ht=em(h),rt=om(M,ht),zt=Uo(oT,{children:[j&&We("style",{children:`.${M} > *:nth-child(n+${u+1}){display:none}`}),rt&&We("style",{children:rt}),Ne,He,We(Ki,{editing:d})]});if(Ae)return null;let tr=We("section",{...N?{[rl]:se}:{},className:"relative z-[2] bg-bg px-[var(--sf-site-gutter,40px)] pt-[var(--pg-pt)] pb-[120px] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:pt-[70px] max-[800px]:pb-[70px]",style:{"--pg-pt":`${Ve}px`,...Pp(R)},children:F?We("div",{style:nu(!1,p)??void 0,children:zt}):zt}),Jr=d&&!E?We(rg,{children:tr}):tr;return We(gm,{imageBackgroundFill:Pa(x,Lt),spinOnHover:g??!0,coverIndex:I??1,indexBadge:ht,outline:C??Io,showBadge:S??!0,fieldUsage:G,reserveEyebrow:Oe,showCardPrice:T??!0,showCardFinishes:b??!0,showCardSizes:w??!1,showCardBuy:O??!1,showCardPage:D??!1,children:Jr})}var lc="wheels",rT="collection:",nT=60;function aT(e){let t=e?.props?.source;return e?.type==="ProductGrid"&&!!t?.process}function lT(e){return e.some(t=>t?.type==="CatalogFilterBar"||aT(t))}function sT(){return{type:"CatalogFilterBar",props:{id:"CatalogFilterBar-wheels-seed",showProcess:!0,showLugs:!0,showPrice:!0,showCount:!0,showSort:!0}}}function iT(e,t){let o=Ys(e);return{type:"ProductGrid",props:{id:`ProductGrid-wheels-${o}`,dynamic:!1,num:t,title:e,titleSize:ac,padTop:100,description:"",linkText:"Explore the collection",linkHref:`/wheels/collections/${o}`,columns:4,showAll:!0,limit:8,imageBackground:Lt,spinOnHover:!0,source:{slug:`${rT}${o}`,name:e,process:e,wheels:[]},fullWidth:!0,pageWidth:Qn.default,products:[]}}}function cT(e){let t=e?Ip(e):gp;return[sT(),...t.map(o=>iT(o.key,o.num))]}function Bg(e,t,o){if(e!==lc)return t;let r=t?.content??[];if(lT(r))return t;let n=cT(o),a=r.findIndex(s=>s?.type===jn),l=a===-1?[...r,...n]:[...r.slice(0,a),...n,...r.slice(a)];return{...t,content:l}}function Dg(e,t,o={}){let r=e?.content??[],n=o.scopeToCatalog?Xs(t):null,a=r.map(l=>{let s=l?.props?.source;if(l?.type==="CatalogFilterBar"&&n)return{...l,props:{...l.props,processOptions:n}};if(l?.type!=="ProductGrid"||!s?.process)return l;if(n&&!n.includes(s.process))return null;if(o.onlyEmpty&&(s.wheels?.length??0)>0)return l;let i=t.filter(c=>c.process===s.process).slice(0,nT);return{...l,props:{...l.props,source:{...s,wheels:i}}}}).filter(l=>l!==null);return{...e,content:a}}var fT="__all__",G5="All products";function Mg(e){return e?.slug===fT}var zo="AlloyWheelsListing",dT="ProductGrid",Hg="catalog",uT="CatalogFilterBar",xl="fieldUsage";function vr(e){return e?.type===dT&&Mg(e.props?.source)}function sc(e){return e?.type===uT}function pT(e){return e?.type===zo||vr(e)||sc(e)}function mT(e){let t=e.content??[],o=e.zones??{};return[...t,...Object.values(o).flat()]}function gl(e){return e?mT(e).some(t=>t?.type===zo||vr(t)):!1}function Gg(e,t){return gT(e,o=>vr(o)?{...o,props:{...cc(o).props,[Hg]:xT(t,pn(o.props?.kinds))}}:{...o,props:{...fc(o).props,products:t}})}function ic(e){return Ug(e,pT,t=>sc(t)?Wg(t):vr(t)?cc(t):fc(t))}function Wg(e){if(!e.props||!(xl in e.props))return e;let{[xl]:t,...o}=e.props;return{...e,props:o}}function cc(e){let{[Hg]:t,[xl]:o,...r}=e.props??{};return{...e,props:r}}function xT(e,t){let o=new Set(t);return e.filter(r=>{let n=r.kind??"alloy-wheel";return o.has(n)})}function K5(e){return vr(e)?cc(e):sc(e)?Wg(e):e?.type===zo?fc(e):e}function fc(e){let{wheels:t,products:o,[xl]:r,...n}=e.props??{};return{...e,props:n}}function gT(e,t){return Ug(e,o=>o?.type===zo||vr(o),t)}function Ug(e,t,o){let r=l=>t(l)?o(l):l,n=e,a={...e};return n.content&&(a.content=n.content.map(r)),n.zones&&(a.zones=Object.fromEntries(Object.entries(n.zones).map(([l,s])=>[l,s.map(r)]))),a}import{useEffect as Kg,useRef as dc,useState as $g}from"react";var IT="data-editor-theme";function zg(e){typeof document>"u"||document.documentElement.setAttribute(IT,"light")}var hT=500,Vg={canCreatePlatformTemplate:!1};function bT(e){return!e||typeof e!="object"?Vg:{canCreatePlatformTemplate:e.canCreatePlatformTemplate===!0}}function yT(e,t={}){let o=t.session??Ye();o.auth.token=e.token,o.auth.brandId=e.brandId??null,qd(o,e.siteId),(t.stampChromeTheme??!0)&&zg(e.theme)}function qg(e){let[t,o]=$g(null),r=dc(null),[n,a]=$g(Vg),l=dc(e?.onAuth),s=dc(e?.onMessage);Kg(()=>{l.current=e?.onAuth,s.current=e?.onMessage});let i=fo(),c=ba();return Kg(()=>{let f=i.subscribe(d=>{let p=d;if(p.type==="storefront-editor:auth"&&typeof p.token=="string"&&p.token){let x=!!r.current;r.current=p.token,o(p.token),yT({...p,token:p.token},{stampChromeTheme:i.ownsDocument,session:c}),a(bT(p.can)),l.current?.(x)}else s.current?.(d)});if(i.send("storefront-editor:ready"),!c.usesBridgedToken)return f;let u=window.setInterval(()=>{r.current?window.clearInterval(u):i.send("storefront-editor:ready")},hT);return()=>{f(),window.clearInterval(u)}},[i,c]),{token:t,tokenRef:r,capabilities:n}}var uc=new Set,pc=new Set,mc=new Set;function Q5(e){return uc.add(e),()=>uc.delete(e)}function Yg(){uc.forEach(e=>e())}function eW(e){return pc.add(e),()=>pc.delete(e)}function Xg(){pc.forEach(e=>e())}function Il(e){return mc.add(e),()=>mc.delete(e)}function xc(){mc.forEach(e=>e())}var gc=new Map,ST=9e5,jg=0;function CT(){return jg+=1,`fe-${typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():String(jg)}`}function Jg(e,t){e.connected&&e.send("storefront-editor:open-form",{mode:"edit",formId:t})}function Zg(e,t){if(!e.connected)return Promise.resolve({status:"closed"});let o=CT();return new Promise(r=>{let n=setTimeout(()=>Qg(o,{status:"timeout"}),t.timeoutMs??ST);gc.set(o,a=>{clearTimeout(n),r(a)}),e.send("storefront-editor:open-form",{requestId:o,mode:t.mode,...t.formId?{formId:t.formId}:{}})})}function Qg(e,t){let o=gc.get(e);o&&(gc.delete(e),o(t))}function Ic(e,t){Qg(e,t?{status:"saved",form:t}:{status:"closed"})}function eI(e){switch(e?.type){case"storefront-editor:category-updated":return Yg(),!0;case"storefront-editor:menus-updated":return Xg(),!0;case"storefront-editor:form-saved":{let o=e;return xc(),o.requestId&&Ic(o.requestId,o.form??null),!0}case"storefront-editor:form-closed":{let o=e;return xc(),o.requestId&&Ic(o.requestId,null),!0}case"storefront-editor:media-picked":{let o=e;return o.requestId&&zs(o.requestId,o.media??null),!0}case"storefront-editor:media-pick-cancelled":{let o=e;return o.requestId&&zs(o.requestId,null),!0}default:return!1}}var PT={unauthorized:"the editor's sign-in was refused (unauthorized).","changed-elsewhere":"the page changed while it was being opened (changed-elsewhere).","lock-taken":"somebody else holds this page (lock-taken).","not-found":"this page no longer exists (not-found).",invalid:"the backend refused the request (invalid).",unavailable:"the backend could not be reached (unavailable)."};function hc(e){return ma(e)?e.cause instanceof at?hc(e.cause):`${PT[e.kind]} ${e.message}`.trim():e instanceof at?e.status===lr?`${Qd} (no response)`:e.status===401||e.status===403?`the editor's sign-in was refused (${e.status}). Reload the console and open the editor again; if it keeps happening the bridged token is not valid for this site.`:e.status===404?"this page no longer exists (404).":e.status>=500?`the server failed (${e.status}). ${e.message}`:`the server refused the request (${e.status}). ${e.message}`:e instanceof Error?`${e.name}: ${e.message}`:String(e)}import{canWriteDocument as Ko,holderOf as TT,newEaselClientId as RT,reloadIfVersionMoved as FT}from"efficient-easel/edit-lock";import{useAutosave as ET}from"efficient-easel/autosave";import{createEditLock as kT}from"efficient-easel/edit-lock";var hl=kT({readFailure:qs,conflictCode:an});import{jsx as AT}from"react/jsx-runtime";var LT={content:[],root:{},zones:{}};function _T(e,t){if(e.kind!==t.kind)return!1;if(e.kind==="template"){let r=t;return e.id===r.id&&(e.pageSlug??dt)===(r.pageSlug??dt)}let o=t;return e.slug===o.slug&&e.siteId===o.siteId}var Po=wT(null);function tI(){let e=vT(Po);if(!e)throw new Error("useStorefrontDocument must be used within StorefrontDocumentProvider");return e}function HW({target:e,children:t}){let[o,r]=Ct(e),n=fo(),a=ba(),l=bc(()=>ln(a),[a]),s=o.kind==="template",i=o.kind==="template"?o.id:null,c=o.kind==="template"?o.pageSlug??dt:o.slug,f=o.kind==="page"?o.siteId??null:null,u=bc(()=>cn(a),[a]),d=bc(()=>o.kind==="template"?pp(o.id,l,u):up(o.siteId,l,u),[l,u,o.kind,o.kind==="template"?o.id:o.siteId]),p=d.capabilities,x=o.kind==="page"?o.originSlug??null:null;ut(()=>{Vd(a,f)},[a,f]);let g=ot(o);ut(()=>{g.current=o},[o]);let{token:I,tokenRef:h,capabilities:C}=qg({onMessage:k=>{if(eI(k))return;if(k?.type==="storefront-editor:navigate"){let ye=k;ye?.target&&Ad(ye.target)}}}),S=a.usesBridgedToken?I!==null:!0,P=d.lock,T=!!l.lock,[b,w]=Ct(null),[O,D]=Ct(null),[R,L]=Ct(null),[G,Y]=Ct(null),M=ot(null),[v,j]=Ct(!1),F=ot(null),[E,se]=Ct(null),N=ot(null),[le,ge]=Ct(null),ie=ot(null);ut(()=>{ie.current=le},[le]);let[te,he]=Ct(p.hasEditLock?{kind:"checking"}:{kind:"editing"}),de=ot(te);ut(()=>{de.current=te},[te]);let z=ot(()=>Promise.resolve(!1)),Ae=we(k=>{M.current=k,j(!0)},[]),Fe=ET({save:async({id:k,data:_})=>{if(!Ko(de.current)){Ae({id:k,data:_});return}if(!await z.current(k,_)){if(!Ko(de.current)){Ae({id:k,data:_});return}throw new Error("page save did not land")}},onFailure:(k,_)=>{_===0&&n.send("storefront-editor:save-failed")}}),{state:Oe,push:ne,flush:K,pause:H,resume:He,stop:Ze,reset:It,retryNow:oo,hasPending:Ne}=Fe,Ve=ot(Oe);ut(()=>{Ve.current=Oe},[Oe]);let ht=ep(Oe),rt=we(()=>{let k=M.current;k&&(M.current=null,j(!1),ne(k))},[ne]),zt=ot("");zt.current||(zt.current=RT());let[tr,Jr]=Ct(0),Ee=ot(!1),A=e.kind==="page"&&e.slug===lt,[W,B]=Ct(e.kind==="template"||A),ce=ot(!1);ut(()=>{if(ce.current)return;ce.current=!0;let k=n.address.search();if(e.kind==="page"&&e.slug===lt){let _=Ms(),ye=_&&_!==lt?_:dt;n.address.load({kind:"page",slug:ye,siteId:e.siteId});return}if(e.kind==="template"){if(new URLSearchParams(k).get("editTemplate")==="1"){B(!1);return}n.address.load({kind:"page",slug:dt})}},[e,n]);let Ie=n.send;ut(()=>{if(!S)return;let k=!1,_=d.resolve(c),Se=p.hasCatalog&&!s&&c===lc?No().catch(()=>[]):Promise.resolve([]);return Promise.all([_,Se]).then(async([me,qe])=>{if(k)return;if(!me){if(!s&&c!==dt){n.address.load({kind:"page",slug:dt,siteId:f??void 0});return}Y(s?"Couldn\u2019t open a page in this template.":`No storefront page with slug "${c}".`);return}w(me.id),D(me.kind??null),N.current=me.version??null;let Qe=me.layout,SS=Qe&&Object.keys(Qe).length?Qe:LT,CS=fp(SS),Od=Bg(s||!p.hasCatalog?"":c,CS,qe),cs=qe.length?Dg(Od,qe,{onlyEmpty:!0}):Od;if(p.hasCatalog&&gl(cs)){let Nd=await ya().catch(()=>[]);if(k)return;if(Nd.length){L(Gg(cs,nl(Nd)));return}}L(cs)}).catch(me=>{k||(console.error("[storefront-editor] document load failed",me),Y(me instanceof ou?`\u201C${c}\u201D exists on more than one website. Open it from the site you want to edit.`:`Could not load the document \u2014 ${hc(me)}`))}),()=>{k=!0}},[S,I,s,d,c]);let ro=we(k=>new Promise(_=>{let ye=Date.now(),Se=setInterval(()=>{let me=h.current;me&&me!==k?(clearInterval(Se),_(me)):Date.now()-ye>6e3&&(clearInterval(Se),_(null))},200)}),[]),nt=we(async k=>{let _=h.current;if(!_&&a.usesBridgedToken)return{ok:!1,error:new Error("no editor token")};try{return{ok:!0,value:await k(_??"")}}catch(ye){if(mp(ye)){Ie("storefront-editor:auth-expired");let Se=_?await ro(_):null;if(Se)try{return{ok:!0,value:await k(Se)}}catch(me){return{ok:!1,error:me}}}return{ok:!1,error:ye}}},[Ie,ro,a]),Zr=we(async k=>{let _=h.current?await nt(k):{ok:!1,error:new Error("no editor token")};return _.ok||Ie("storefront-editor:save-failed"),_.ok},[Ie,nt]),Yn=we(async(k,_,ye=!1)=>{if(!Ko(de.current)||ie.current)return!1;let Se=await nt(()=>d.saveLayout(k,_,N.current,zt.current));if(Se.ok)return N.current=Se.value.version??N.current,!0;let me=hl.readLockTaken(Se.error);if(me){let Qe={kind:"takenover",holder:me};return de.current=Qe,he(Qe),!1}let qe=hl.readSaveConflict(Se.error);if(qe){if(qe.savedByYou&&!ye&&d.rereadVersion){let Qe=await nt(()=>d.rereadVersion(k));if(Qe.ok&&Qe.value)return N.current=Qe.value,z.current(k,_,!0)}Ze(),ie.current=qe,ge(qe)}return!1},[d,nt,Ze]);ut(()=>{z.current=Yn},[Yn]);let uS=we(k=>{if(Ie("storefront-editor:dirty"),!b)return;let _=gl(k)?ic(k):k;if(F.current=_,!Ko(de.current)){Ae({id:b,data:_});return}ne({id:b,data:_})},[b,Ie,Ae,ne]),or=we(async()=>(Ko(de.current)&&rt(),await K()&&M.current==null),[rt,K]),Ld=ot(or);ut(()=>{Ld.current=or},[or]);let ss=ot(nt);ut(()=>{ss.current=nt},[nt]);let is=we(()=>{n.address.reload()},[n]),_d=ot(()=>Promise.resolve(!1));ut(()=>{_d.current=()=>{let k=d.rereadVersion;return!b||!k?Promise.resolve(!1):FT({ours:N.current,stored:async()=>{let _=await ss.current(()=>k(b));return _.ok?_.value:null},hasPending:()=>M.current!=null||Ne(),reload:is})}},[d,b,Ne,is]),ut(()=>{if(!P||!b||!S)return;let k=!1,_=null,ye=zt.current,Se=hl.makeClaimBeat({claim:async qe=>{let Qe=await ss.current(()=>P.claim(b,ye,qe));if(Qe.ok)return{heartbeat_seconds:Qe.value.heartbeatSeconds};throw Qe.error},cancelled:()=>k,currentAccess:()=>de.current,heldWrite:()=>({pending:M.current!=null||Ne(),autoSaveEnabled:!Ve.current.paused,saveConflict:ie.current!=null}),setAccess:qe=>{de.current=qe,he(qe)},releaseHeldWrite:()=>{Ld.current()},startHeartbeat:qe=>{_=setInterval(()=>{Se(!1)},qe)},stopHeartbeat:()=>{_&&(clearInterval(_),_=null)},reloadIfMoved:()=>{_d.current()}}),me=Ee.current;return Ee.current=!1,me||he({kind:"checking"}),Se(me),()=>{k=!0,_&&clearInterval(_),P.release(b,ye).catch(()=>{})}},[b,P,S,I,tr]);let pS=we(()=>{!P||!b||(Ee.current=!0,Jr(k=>k+1))},[b,P]),mS=we(()=>{he(k=>{let _=k.kind==="blocked"||k.kind==="takenover"?k.holder:null;return _?{kind:"readonly",holder:_}:k})},[]),xS=we(()=>{Ve.current.paused?(Ko(de.current)&&rt(),He()):H()},[rt,H,He]),gS=we(()=>{oo()},[oo]),Fo=we(k=>{if(F.current=null,tp(k.kind!=="template"&&T,{resetAutosave:()=>{It(),M.current=null,j(!1)},setVersion:_=>{N.current=_},setSaveConflict:ge,setAccess:he}),k.kind==="page"){let _=Ms();k.slug!==lt&&k.slug!==_&&Hs()}else Hs();r(k),w(null),D(null),L(null),Y(null),n.address.show(k),k.kind==="page"&&k.slug!==lt&&n.send("storefront-editor:navigated",{target:k})},[It,n,T]),Ad=we(k=>{if(_T(k,g.current))return;let _=M.current!=null;if(!_&&!Ne()){Fo(k);return}let ye=Ve.current;if(_||ye.paused||ye.failed||ye.stopped){se(k);return}K().then(Se=>{Se?Fo(k):se(k)})},[Fo,Ne,K]),IS=we(()=>se(null),[]),hS=we(()=>{se(k=>(k&&Fo(k),null))},[Fo]),bS=we(async()=>{let k=E;if(!k)return;await or()&&(se(null),Fo(k))},[E,or,Fo]),yS=we(async k=>{if(!b||!Ko(de.current)||ie.current)return;let _=gl(k)?ic(k):k;if(!await Yn(b,_)){ie.current||Ie("storefront-editor:save-failed");return}let Se=d.publish;if(!p.canPublish||!Se){Ie("storefront-editor:saved");return}let me=await nt(()=>Se(b,N.current??void 0));if(!me.ok){Ie("storefront-editor:save-failed");return}N.current=me.value.version??N.current,Ie("storefront-editor:published")},[b,d,p.canPublish,Ie,Yn,nt]);return AT(Po.Provider,{value:{target:o,adapter:d,capabilities:p,templateId:i,currentSlug:c,currentKind:O,siteId:f,ready:S,token:I,tokenRef:h,notifyParent:Ie,bridgeCapabilities:C,runAuthed:Zr,docId:b,data:R,getLiveData:()=>F.current??R,footerOriginSlug:x,error:G,redirecting:W,saveStatus:ht,saveState:Oe,autoSaveEnabled:!Oe.paused,autoSaveStoppedByConflict:Oe.stopped,hasUnsavedEdits:Oe.pending||v,toggleAutoSave:xS,retrySave:gS,onChange:uS,flushSave:or,onPublish:yS,access:te,readOnly:TT(te)!==null,takeOverEditing:pS,viewReadOnly:mS,saveConflict:le,reloadFromServer:is,navigate:Ad,pendingNav:E,cancelPendingNav:IS,discardAndNavigate:hS,saveAndNavigate:bS},children:t})}import{createContext as OT,useContext as NT}from"react";var BT=OT("desktop"),yc=()=>NT(BT);var Tr="content",_e="Flex",DT="Text & media",MT="Layout & structure",HT=[{type:"Eyebrow",label:"Eyebrow"},{type:"Heading",label:"Heading"},{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"}].map(e=>({...e,group:DT})),GT=(fr.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:MT})),oI=[...HT,...GT],Sc=[{type:"Eyebrow",label:"Eyebrow"},{type:"Heading",label:"Heading"},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"ButtonBlock",label:"Button"},{type:"HeroGroup",label:xo}],$W=Sc.map(e=>e.type),WT=1,UT=Sc.filter(e=>e.type!=="HeroGroup");function zT(e){return e<WT?Sc:UT}var KT={Flex:{slot:Tr,choices:()=>oI},Grid:{slot:Tr,choices:()=>oI},HeroGroup:{slot:Tr,choices:zT}};function rI(e,t=0){let o=KT[e];return o?{slot:o.slot,choices:o.choices(t)}:null}var bl="SiteHeader",Cc="SiteFooter",nI="sections",qW=[bl,Cc],YW=e=>e===bl||e===Cc,XW=e=>`${e}:${nI}`;function jW(e,t,o=[]){return{type:e,props:{id:t,[nI]:o}}}var $T=new Set(["Footer",bl,Cc]);function JW(e){let t=new Set,o=!1,r=e.filter(n=>{let a=n?.type??"";return a==="Header"?(o=!0,!1):$T.has(a)?t.has(a)?(o=!0,!1):(t.add(a),!0):!0});return o?r:e}function ZW(e,t){return e.some(o=>o?.type===t.type)?e:t.type===bl?[t,...e]:[...e,t]}import{createContext as VT,useCallback as qT,useContext as YT,useState as XT}from"react";import{jsx as jT}from"react/jsx-runtime";var aI={enabled:!0,title:"",subtitle:"",greeting:""},lI=VT({chat:aI,setChat:()=>{},selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function oU({children:e,chat:t=aI,onChatChange:o}){let[r,n]=XT(!1),a=qT(i=>o?.(i),[o]),{select:l,setSelectHandler:s}=Fu();return jT(lI.Provider,{value:{chat:t,setChat:a,selected:r,setSelected:n,select:l,setSelectHandler:s},children:e})}var rU=()=>YT(lI);import{BlockBannerIcon as JT,BlockBoxIcon as ZT,BlockButtonIcon as QT,BlockDividerIcon as sI,BlockFooterIcon as iI,BlockHeadingIcon as eR,BlockProductIcon as tR,BlockSocialIcon as oR,BlockTextIcon as rR,ChatIcon as nR,GridIcon as aR,ImageIcon as lR,PageIcon as sR}from"efficient-easel/icons";import{Fragment as $,jsx as y,jsxs as q}from"react/jsx-runtime";var iR={header:q($,{children:[y("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),y("path",{d:"M3 9.5h18"})]}),website:q($,{children:[y("circle",{cx:"12",cy:"12",r:"9"}),y("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:q($,{children:[y("circle",{cx:"6",cy:"12",r:"2.5"}),y("circle",{cx:"18",cy:"6",r:"2.5"}),y("circle",{cx:"18",cy:"18",r:"2.5"}),y("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:q($,{children:[y("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),y("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:q($,{children:[y("path",{d:"M4 15.5h6M4 18h4"}),y("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:y("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:q($,{children:[y("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),y("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:y("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:q($,{children:[y("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),y("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:q($,{children:[y("circle",{cx:"11",cy:"11",r:"6"}),y("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:vu,CountrySwitchBlock:q($,{children:[y("circle",{cx:"12",cy:"12",r:"8.5"}),y("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"})]}),LegalLineBlock:q($,{children:[y("path",{d:"M3 9h18"}),y("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:q($,{children:[y("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),y("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),y("path",{d:"M7 17h7"})]}),Collections:q($,{children:[y("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),y("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),y("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:q($,{children:[y("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),y("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:q($,{children:[y("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),y("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),y("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),y("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),y("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:q($,{children:[y("path",{d:"M3 7h9M15.5 7H21"}),y("circle",{cx:"13.5",cy:"7",r:"1.7"}),y("path",{d:"M3 12h4M10.5 12H21"}),y("circle",{cx:"8.5",cy:"12",r:"1.7"}),y("path",{d:"M3 17h9M15.5 17H21"}),y("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:q($,{children:[y("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:q($,{children:[y("path",{d:"M3 5h10"}),y("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),y("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),y("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:q($,{children:[y("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),y("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),y("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:q($,{children:[y("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),y("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),y("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),y("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:q($,{children:[y("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),y("circle",{cx:"9",cy:"10",r:"1.6"}),y("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:q($,{children:[y("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),y("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:q($,{children:[y("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),y("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),y("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:q($,{children:[y("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),y("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:q($,{children:[y("path",{d:"M3.5 20h17"}),y("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:q($,{children:[y("circle",{cx:"6",cy:"12",r:"2.6"}),y("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),y("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:q($,{children:[y("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),y("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:q($,{children:[y("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),y("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:q($,{children:[y("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),y("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:q($,{children:[y("path",{d:"M4 8.5h4.5M11 8.5h9"}),y("path",{d:"M4 14.5h16"})]}),HeroGroup:q($,{children:[y("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),y("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M6.5 9h11M6.5 12.5h11"}),y("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:y($,{children:y("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:q($,{children:[y("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),y("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:q($,{children:[y("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),y("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),y("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),y("path",{d:"M4 13.5h11M4 17.5h7"}),y("path",{d:"M17 15l3 2-3 2"})]}),CustomHTML:y("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},cR=y("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),fR={footer:iI,Footer:iI,Divider:sI,FooterDivider:sI,Banner:JT,Flex:ZT,FooterSocial:oR,page:sR,chat:nR,Heading:eR,Text:rR,ImageBlock:lR,ButtonBlock:QT,Grid:aR,ProductRef:tR},dR={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",SiteHeader:"header",SiteFooter:"footer"};function uR({type:e,size:t=16,className:o}){let r=dR[e]??e,n=fR[r];return n?y(n,{size:t,className:o}):y("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:o,"aria-hidden":"true",children:iR[r]??cR})}function dU(){return{type:ps,props:{id:Lo(ps)}}}function uU(e){let t=[];for(let o of e){let r=t[t.length-1];r&&r.group===o.group?r.items.push(o):t.push({group:o.group,items:[o]})}return t}var cI=[{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"}],pR=cI.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),mR="FooterGroup",fI="blocks";function dI(e){return e===jn?cI:e===mR?pR:null}function pU(){let e=(t,o)=>({type:t,props:{id:`${t}-${crypto.randomUUID()}`,...o}});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"})]})]}import{createContext as xR,useContext as gR}from"react";import{jsx as IR}from"react/jsx-runtime";var uI=xR(null);function gU({value:e,children:t}){return IR(uI.Provider,{value:e,children:t})}function IU(){return gR(uI)}function Ue(e,t,o,r={}){return{type:e,props:{...t(e),id:o(e),...r}}}var hR={Manifesto:(e,t)=>({type:_e,props:{...e(_e),id:t(_e),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[Ue(_e,e,t,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[Ue("Eyebrow",e,t,{eyebrowLook:"plain"}),Ue("Heading",e,t),Ue("Text",e,t),Ue("Stats",e,t)]}),Ue(_e,e,t,{direction:"column",name:"Picture",content:[]})]}}),Split:(e,t)=>({type:_e,props:{...e(_e),id:t(_e),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[Ue(_e,e,t,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[Ue("Eyebrow",e,t,{eyebrowLook:"plain"}),Ue("Heading",e,t),Ue("Text",e,t),Ue("ButtonBlock",e,t)]}),Ue(_e,e,t,{direction:"column",name:"Image",content:[Ue("ImageBlock",e,t)]})]}}),Subscribe:(e,t)=>({type:_e,props:{...e(_e),id:t(_e),direction:"column",name:"Subscribe",content:[Ue("Heading",e,t),Ue("Text",e,t),Ue("Form",e,t)]}})};function pI(e){return hR[e]??null}var Pc="plain",mI=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],bR="line",yR={KeyFeatures:"filled"};function SR(e){return yR[e]??Pc}function PU(e,t){return Xe(mI,SR(t),e)}function kU(e){return Xe(mI,bR,e)}import{createContext as kR,useContext as wR}from"react";var kc={tag:{label:"Tag",follows:"Labels",builtIn:"13px",writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:"48px",writable:!0},body:{label:"Body",follows:"Body",builtIn:"14px",writable:!0},price:{label:"Price",follows:"Labels",builtIn:"15px",writable:!0},link:{label:"Link",follows:"Labels",builtIn:"14px",writable:!0}},xI=kc;var Rr="data-sf-spec-region";function gI(e,t,o){if(!e)return;let r=o[e];if(r)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${r}, ${t.builtIn})`}}function wc(e){return`@${e}`}function CR(e,t){if(!t.startsWith("@"))return null;let o=t.slice(1);return o in e?o:null}function II(e,t){return t&&t in e?t:null}function PR(e,t){let o=t?.closest(`[${Rr}]`)?.getAttribute(Rr);return II(e,o??null)}import{jsx as ko,jsxs as vc}from"react/jsx-runtime";function vR(e){return Jd(e)??void 0}var TR=kR({}),hI=3;function RR({tag:e,name:t,desc:o,href:r,imageSrc:n,imageLabel:a,price:l}){let{showPrice:s,cardStyle:i,partStyles:c,editing:f}=wR(TR),u=i==="bordered"?" border border-line":i==="shadow"?" shadow-[0_8px_30px_rgba(0,0,0,0.12)]":"",d=vR(n),p=g=>f?{[Rr]:g}:{},x=g=>gI(c?.[wc(g)]?.role,kc[g],ar);return vc(Pe,{href:r||"#",className:`sf-card group relative block w-full min-w-0 overflow-hidden bg-surface-2${u}`,children:[ko("div",{className:"relative z-0 aspect-[4/5] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)] group-hover:scale-[1.04]",children:ko(Wo,{label:a||"collection.jpg",src:d})}),ko("div",{className:"pointer-events-none absolute inset-0 z-[1] [background:rgba(0,0,0,0.4)] group-hover:[background:rgba(0,0,0,0.3)] max-[800px]:hidden",style:{transition:"none"}}),vc("div",{className:"absolute inset-x-8 bottom-8 z-[2] flex flex-col gap-2.5 text-overlay-fg max-[800px]:relative max-[800px]:inset-auto max-[800px]:p-6 max-[800px]:gap-3 max-[800px]:text-fg",children:[e&&ko("span",{...p("tag"),style:x("tag"),className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.25em] opacity-70",children:re(e)}),t&&ko("h3",{...p("name"),style:x("name"),className:"font-heading2 text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))] font-medium leading-none tracking-[-0.03em] max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",children:typeof t=="string"?Ot(t,!1):t}),o&&el(o).map((g,I)=>ko("p",{...p("body"),style:x("body"),className:"max-w-[420px] text-[length:var(--size-body,14px)] leading-[1.5] opacity-80",children:re(g)},I)),s&&l&&ko("span",{...p("price"),style:x("price"),className:"font-mono text-[length:var(--size-label,15px)] tracking-[0.05em] text-accent",children:re(l)}),vc("span",{...p("link"),style:x("link"),className:"mt-2 inline-flex items-center gap-2.5 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em]",children:["Explore",ko("span",{className:"transition-transform group-hover:translate-x-[3px]","aria-hidden":!0,children:"\u2192"})]})]})]})}import{createContext as ER,useCallback as LR,useContext as _R,useEffect as SI,useRef as AR,useState as Rc}from"react";import{useState as FR}from"react";function bI(e){switch(e){case"tall":return"aspect-[3/4]";case"wide":return"aspect-[2/1]";case"landscape":return"aspect-[4/3]";case"portrait":return"aspect-[4/5]";case"auto":return"";default:return"aspect-square"}}function yI(e){return e==="below"}import{jsx as Pt,jsxs as Fr}from"react/jsx-runtime";function Tc({build:e,hiddenMobile:t,alwaysShowOverlay:o,forceHover:r,index:n,total:a,ratio:l,captionPlace:s}){let[i,c]=FR(!1),f=yI(s),u=Fr("div",{className:["sf-card group relative overflow-hidden bg-surface-2",bI(l),t?"max-[800px]:hidden":""].join(" "),children:[Fr("div",{className:["absolute inset-0 z-[1] flex items-center justify-center transition-[transform,filter,opacity] duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",r?"scale-[1.06] opacity-0 [filter:brightness(0.5)]":"group-hover:scale-[1.06] group-hover:opacity-0 group-hover:[filter:brightness(0.5)]"].join(" "),children:[Pt(Wo,{label:e.imageLabel,src:e.imageSrc}),Pt("div",{className:"absolute inset-0",style:{background:"rgba(0,0,0,0.35)"}})]}),Pt("div",{className:["absolute inset-0 z-[1] flex items-center justify-center transition-[transform,filter,opacity] duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",r?"opacity-100 scale-[1.06] [filter:brightness(0.5)]":"opacity-0 group-hover:scale-[1.06] group-hover:opacity-100 group-hover:[filter:brightness(0.5)]"].join(" "),style:{background:"var(--surface)"},children:e.detailSrc&&Pt(io,{src:e.detailSrc,alt:"",fill:!0,sizes:"(max-width: 800px) 100vw, (max-width: 1500px) 33vw, 25vw",loading:"lazy",className:"absolute inset-0 z-[3] object-cover",style:{display:i?"none":"block"},onError:()=>c(!0)})}),n!=null&&a!=null&&Fr("span",{className:"pointer-events-none absolute top-3 right-3 z-[3] font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.24em] max-[800px]:top-2.5 max-[800px]:right-2.5",style:{color:"rgba(245,241,232,0.7)"},children:[String(n).padStart(2,"0")," / ",String(a).padStart(2,"0")]}),e.process&&Pt("span",{className:["pointer-events-none absolute top-3 left-3 z-[3] inline-block max-w-[60%] truncate font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.24em] text-accent max-[800px]:top-2.5 max-[800px]:left-2.5","transition-opacity duration-300 ease-out",o||r?"opacity-100":"opacity-0 group-hover:opacity-100 max-[800px]:opacity-100"].join(" "),children:et(e.process)}),Fr("div",{className:["absolute inset-0 z-[2] flex flex-col justify-end gap-1 p-6","transition-[opacity,transform] duration-300 ease-out",o||r?"opacity-100 translate-y-0":"opacity-0 translate-y-2 group-hover:opacity-100 group-hover:translate-y-0 max-[800px]:opacity-100 max-[800px]:translate-y-0","max-[800px]:p-3.5"].join(" "),style:{color:"var(--overlay-fg)",background:"linear-gradient(180deg, transparent 40%, rgba(10,10,10,.85) 100%)"},children:[e.car&&Pt("div",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-accent max-[800px]:text-[length:var(--size-label,11px)] max-[800px]:tracking-[0.15em]",children:e.car}),e.wheel&&Pt("div",{className:"font-heading3 text-[length:var(--size-headingSmall,22px)] font-medium leading-[1.05] tracking-[-0.02em] max-[800px]:text-[length:var(--size-body,16px)]",children:e.wheel}),e.finish&&Pt("div",{className:"mt-1.5 flex gap-3.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.12em]",style:{color:"rgba(245,241,232,0.7)"},children:Pt("span",{children:et(e.finish)})})]})]});return f?Fr("div",{className:t?"max-[800px]:hidden":"",children:[u,Fr("div",{className:"bg-surface px-3.5 pt-3 pb-3.5",children:[e.wheel&&Pt("div",{className:"font-display text-[length:var(--size-body,15px)] font-medium leading-[1.25] tracking-[-0.01em] text-fg",children:e.wheel}),(e.finish||e.car)&&Pt("div",{className:"mt-0.5 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.14em] text-fg-dim",children:et(e.finish||e.car)})]})]}):u}import{Fragment as Er,jsx as pe,jsxs as ze}from"react/jsx-runtime";var OR=ER({}),NR="data-gallery-grid",Fc="data-gallery-tile";function BR(e,t){let[o,r]=Rc(null);return SI(()=>{let n=e.current,a=n?.closest(`[${NR}]`);if(!n||!a)return;let l=()=>{let i=Array.from(a.querySelectorAll(`[${Fc}]`)),c=i.indexOf(n),f=c>=0?{index:c+1,total:i.length}:null;r(u=>u?.index===f?.index&&u?.total===f?.total?u:f)};if(l(),!t)return;let s=new MutationObserver(l);return s.observe(a,{childList:!0,subtree:!0}),()=>s.disconnect()},[e,t]),o}var CI=[{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"}];function DR(e,t){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}function MR(e){let t=(e.photos??[]).map(a=>a?.src).filter(a=>!!a),o=e.image||t[0]||"",r=[o,...t].filter(a=>!!a),n=DR(e.name,"gallery-item");return{car:e.eyebrow??"",wheel:e.name??"",process:e.process??"",finish:e.meta??"",imageLabel:`${n}.jpg`,detailLabel:`${n}-detail.jpg`,imageSrc:o||void 0,detailSrc:t[0]||o||void 0,photos:r,href:e.href}}function HR({editing:e=!1,previewHover:t,ratio:o,captionPlace:r,...n}){let{galleryHref:a="/gallery",submitHref:l="/contact",previewHover:s}=_R(OR),i=MR(n),c=i.photos??(i.imageSrc?[i.imageSrc]:[]),f=AR(null),u=LR(S=>{f.current=S},[]),d=BR(f,e),p=e&&(!!t||!!s),[x,g]=Rc(!1),[I,h]=Rc(0);SI(()=>{if(!x)return;let S=T=>{T.key==="Escape"?g(!1):T.key==="ArrowLeft"&&c.length>1?h(b=>(b-1+c.length)%c.length):T.key==="ArrowRight"&&c.length>1&&h(b=>(b+1)%c.length)};window.addEventListener("keydown",S);let P=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",S),document.body.style.overflow=P}},[x,c.length]);let C=pe(Tc,{build:i,forceHover:p,index:d?.index,total:d?.total,ratio:o,captionPlace:r});return ze(Er,{children:[e?pe("div",{ref:u,[Fc]:"",className:"block w-full text-left",children:C}):pe("button",{ref:u,[Fc]:"",type:"button","aria-label":`Open ${i.car||"build"} on ${i.wheel||"wheel"}`,onClick:()=>{h(0),g(!0)},className:"block w-full cursor-pointer text-left focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2",children:C}),x&&(()=>{let S=c[I]??i.imageSrc??"",P=()=>h(b=>(b-1+c.length)%c.length),T=()=>h(b=>(b+1)%c.length);return pe("div",{role:"dialog","aria-modal":"true","aria-label":`${i.car} on ${i.wheel}`,onClick:()=>g(!1),className:"fixed inset-0 z-[100] flex items-center justify-center p-6 backdrop-blur-[8px] max-[700px]:p-3",style:{background:"color-mix(in oklab, var(--bg) 78%, transparent)"},children:ze("div",{onClick:b=>b.stopPropagation(),className:"relative grid w-[min(1800px,100%)] max-h-[calc(100vh-48px)] grid-cols-[1.4fr_1fr] overflow-hidden border border-line bg-bg max-[1100px]:grid-cols-1 max-[1100px]:overflow-auto",style:{boxShadow:"0 60px 120px -20px rgba(0,0,0,0.7)"},children:[pe("button",{type:"button",onClick:()=>g(!1),"aria-label":"Close popup",className:"absolute right-[24px] top-[24px] z-[5] flex h-[56px] w-[56px] items-center justify-center border border-line font-mono text-[length:var(--size-label,21px)] text-fg-dim transition-colors hover:border-accent hover:text-fg",style:{background:"color-mix(in oklab, var(--bg) 70%, transparent)"},children:"\u2715"}),ze("div",{className:"relative flex min-h-[690px] items-center justify-center overflow-hidden bg-surface-2 max-[1100px]:min-h-[450px]",children:[S&&pe("img",{src:S,alt:`${i.car} \u2014 ${I+1} of ${c.length}`,className:"block h-full max-h-[88vh] w-full object-cover"},S),c.length>1&&ze(Er,{children:[pe("button",{type:"button","aria-label":"Previous photo",onClick:P,className:"absolute left-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"\u25C1"}),pe("button",{type:"button","aria-label":"Next photo",onClick:T,className:"absolute right-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"\u25B7"}),ze("span",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 border border-fg-dim/30 bg-overlay-scrim/50 px-4 py-1.5 font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em] text-fg-dim backdrop-blur-[4px]",children:[I+1," / ",c.length]})]})]}),ze("div",{className:"flex flex-col gap-[30px] px-[60px] py-[72px] max-[1100px]:px-9 max-[1100px]:py-[54px]",children:[i.process&&pe("span",{className:"font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.3em] text-accent",children:re(i.process)}),i.wheel&&pe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:Ot(i.wheel,!1)}),i.car&&ze("div",{className:"font-heading3 text-[length:var(--size-headingSmall,27px)] leading-[1.4] text-fg",children:["on ",pe("em",{className:"font-serif font-normal italic text-accent tracking-[-0.01em]",children:re(i.car,!0)})]}),ze("dl",{className:"mt-3 grid grid-cols-[auto_1fr] gap-x-7 gap-y-[18px] border-y border-line py-[30px] font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em]",children:[i.wheel&&ze(Er,{children:[pe("dt",{className:"text-fg-dim",children:"Wheel"}),pe("dd",{className:"text-fg",children:re(i.wheel)})]}),i.process&&ze(Er,{children:[pe("dt",{className:"text-fg-dim",children:"Process"}),pe("dd",{className:"text-fg",children:re(i.process)})]}),i.finish&&ze(Er,{children:[pe("dt",{className:"text-fg-dim",children:"Finish"}),pe("dd",{className:"text-fg",children:re(i.finish)})]}),i.car&&ze(Er,{children:[pe("dt",{className:"text-fg-dim",children:"Vehicle"}),pe("dd",{className:"text-fg",children:re(i.car)})]})]}),ze("div",{className:"mt-auto flex flex-col gap-3.5 pt-6",children:[ze(Pe,{href:i.href||"/wheels",onClick:()=>g(!1),className:"group flex items-center justify-between gap-6 border border-btn bg-btn px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg",children:[pe("span",{children:"View product"}),pe("span",{className:"transition-transform group-hover:translate-x-[6px]",children:"\u2192"})]}),ze(Pe,{href:a,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[pe("span",{children:"See more builds"}),pe("span",{children:"\u2192"})]}),ze(Pe,{href:l,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[pe("span",{children:"Submit your build"}),pe("span",{children:"\u2192"})]})]})]})]})})})()]})}import{createContext as aF,useContext as lF}from"react";import{useEffect as Lc,useRef as qR,useState as yl}from"react";import{useEffect as GR,useRef as PI,useState as WR}from"react";import{Fragment as $R,jsx as kI,jsxs as VR}from"react/jsx-runtime";var UR="#t=0.001",zR=2;function KR(e,t){if(e.readyState<zR||!e.videoWidth||!e.videoHeight)return!1;let o=t.getContext("2d");return o?(t.width=e.videoWidth,t.height=e.videoHeight,o.drawImage(e,0,0,t.width,t.height),!0):!1}function Ec({src:e,objectPosition:t="50% 50%",onError:o}){let r=PI(null),n=PI(null),[a,l]=WR(!1);return GR(()=>{let s=r.current,i=n.current;if(a||!s||!i)return;let c=()=>{KR(s,i)&&l(!0)};return c(),s.addEventListener("loadeddata",c),s.addEventListener("seeked",c),()=>{s.removeEventListener("loadeddata",c),s.removeEventListener("seeked",c)}},[a]),VR($R,{children:[kI("canvas",{ref:n,"aria-hidden":!0,className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:t,visibility:a?"visible":"hidden"}}),!a&&kI("video",{ref:r,src:`${e}${UR}`,muted:!0,playsInline:!0,preload:"auto",className:"hidden",onError:o})]})}import{jsx as Lr,jsxs as wI}from"react/jsx-runtime";var YR=.5;function _c({videoSrc:e,posterSrc:t,showVideo:o=!0,playbackRate:r=YR,objectPosition:n="50% 50%",quiet:a=!1}){let l=t||"",s=e||"",[i,c]=yl(!1),[f,u]=yl(!1),[d,p]=yl(!1),[x,g]=yl(!1),I=qR(null);Lc(()=>{c(!1),u(!1),p(!1)},[e,t]),Lc(()=>{if(typeof window>"u")return;let C=()=>{let S=window;S.requestIdleCallback?S.requestIdleCallback(()=>g(!0),{timeout:2e3}):setTimeout(()=>g(!0),800)};if(document.readyState==="complete"){C();return}return window.addEventListener("load",C,{once:!0}),()=>window.removeEventListener("load",C)},[]),Lc(()=>{let C=I.current;if(!C)return;let S=()=>{C.playbackRate=r};return S(),C.addEventListener("loadedmetadata",S),()=>C.removeEventListener("loadedmetadata",S)},[e,r]);let h=Zn(l);return wI("div",{className:"absolute inset-0 z-[1]",children:[Lr("div",{className:"absolute inset-0",style:{background:"var(--surface)"}}),l&&(h?Lr("img",{src:l,alt:"",className:"absolute inset-0 z-[2] h-full w-full object-cover",style:{display:i?"none":"block",objectPosition:n},onError:()=>c(!0)},l):Lr(sl,{src:l,alt:"",fill:!0,priority:!0,sizes:"100vw",className:"z-[2] object-cover",style:{display:i?"none":"block",objectPosition:n},onError:()=>c(!0)},l)),o&&!a&&s&&x&&!f&&wI("video",{ref:I,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:n},onError:()=>u(!0),children:[Zd(s)&&Lr("source",{src:s.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),Lr("source",{src:s,type:"video/mp4"})]},s),o&&a&&s&&x&&!d&&(!l||i)&&Lr(Ec,{src:s,objectPosition:n,onError:()=>p(!0)},s)]})}var vI=["top","middle","bottom"],TI=["left","center","right"],RI="bottom",FI="left",XR={top:"Top",middle:"Middle",bottom:"Bottom"},jR={left:"Left",center:"Center",right:"Right"};var s6="Up and down",i6="Sideways",JR={top:"flex-start",middle:"center",bottom:"flex-end"},ZR={left:"flex-start",center:"center",right:"flex-end"},QR="--sf-hero-phone-y",eF="--sf-hero-phone-x";function tF(e){return vI.includes(e)?e:RI}function oF(e){return TI.includes(e)?e:FI}function EI(e,t){let o=tF(e),r=oF(t),n={};return o!==RI&&(n[QR]=JR[o]),r!==FI&&(n[eF]=ZR[r]),n}function c6(){return vI.map(e=>({label:XR[e],value:e}))}function f6(){return TI.map(e=>({label:jR[e],value:e}))}var rF="#0A0A0A",nF=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function LI(e){let t=e.trim().replace(/^#/,""),o=t.length===3?t.split("").map(n=>n+n).join(""):t;if(!/^[0-9a-fA-F]{6}$/.test(o))return null;let r=Number.parseInt(o,16);return`${r>>16&255},${r>>8&255},${r&255}`}function _I(e){return e==null?!0:e!==!1}function AI(e){let t=(e?LI(e):null)??LI(rF);return`linear-gradient(180deg, ${nF.map(([r,n])=>`rgba(${t},${n}) ${r}%`).join(", ")})`}import{jsx as Fn,jsxs as iF}from"react/jsx-runtime";var Ac=aF({});function sF({name:e,process:t,mediaType:o="video",mediaSrc:r,videoSpeed:n,poster:a,objectPosition:l,tintColor:s="#000000",tintOpacity:i=0,groups:c,editing:f=!1,themeClassName:u,themeStyle:d}){let{alignment:p="left",textureOpacity:x,textureOn:g,textureColor:I,quietVideo:h,phoneUpDown:C,phoneSideways:S}=lF(Ac),P=o==="video",T=P?$t(r):void 0,b=P?$t(a):$t(r)??$t(a),w=typeof n=="number"?n/100:1;return iF("section",{className:u?`relative h-full w-full overflow-hidden ${u}`:"relative h-full w-full overflow-hidden",style:d,"data-slide-name":e??"","data-slide-process":t??"","data-slide-media":T?"video":"still",children:[Fn(_c,{videoSrc:T,posterSrc:b,showVideo:P,playbackRate:w,objectPosition:l,quiet:h}),i>0&&Fn("div",{className:"absolute inset-0 z-[2]",style:{background:s,opacity:Math.min(Math.max(i,0),100)/100}}),_I(g)&&Fn("div",{className:"absolute inset-0 z-[2]",style:{background:AI(I),...x!==void 0?{opacity:x/100}:null}}),Fn("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",f?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{color:"var(--overlay-fg)",...EI(C,S)},children:c&&Fn(c,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}var OI=Array.from({length:3},(e,t)=>({name:`Slide ${t+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{createContext as uF,useContext as pF,useEffect as Sl,useId as mF,useMemo as xF,useState as ve}from"react";var cF=14,fF=3;function Oc(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function dF(e,t){let o=new Date(`${e}T00:00:00`);return o.setDate(o.getDate()+t),Oc(o)}async function NI(e,t,o={}){let r=o.days??cF,n=o.read??Ao.getAvailability,a=0,l=0;for(let s=0;s<r;s++){if(o.signal?.aborted)return{outcome:"unreadable"};let i=dF(t,s);try{let c=await n(e,i);if(a=0,l++,c.slots.length>0)return{outcome:"found",date:i,availability:c}}catch{if(a++,a>=fF)return{outcome:"unreadable"}}}return l===r?{outcome:"noneInWindow",days:r}:{outcome:"unreadable"}}import{jsx as hF}from"react/jsx-runtime";var BI=uF(null);function _r(){let e=pF(BI);if(!e)throw new Error("useBookingForm must be used inside <BookingFormProvider>");return e}var Nc=[{id:"example-1",name:"Example service",durationMinutes:45,price:"80.00",description:"What this appointment includes, in a sentence."},{id:"example-2",name:"Second example",durationMinutes:30,price:"0",description:""}];function gF(e){return{timezone:"UTC",slots:[`${e}T09:00:00.000Z`,`${e}T10:30:00.000Z`,`${e}T13:00:00.000Z`].map(t=>({start:t}))}}var Bc={bookingNumber:"EXAMPLE-0000",service:"Example service",startAt:"2026-01-01T00:00:00.000Z",timezone:"UTC",customerTimezone:"",manageToken:"example"};function IF(e,t){return e&&t?.length===0}function v6({editing:e=!1,previewConfirmation:t=!1,children:o}){let r=mF(),n=xF(()=>Oc(new Date),[]),[a,l]=ve(),[s,i]=ve(""),[c,f]=ve(""),[u,d]=ve(n),[p,x]=ve(n),[g,I]=ve(!1),[h,C]=ve(null),[S,P]=ve(),[T,b]=ve(""),[w,O]=ve(""),[D,R]=ve(""),[L,G]=ve(""),[Y,M]=ve(""),[v,j]=ve(()=>Ss()),[F,E]=ve(null),[se,N]=ve(!1),[le,ge]=ve(!1),[ie,te]=ve(null),[he,de]=ve("");Sl(()=>{de(Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC")},[]),Sl(()=>{let K=!1;return Ao.listServices().then(H=>{K||(l(H.results),i(H.currency),f(He=>He||H.results[0]?.id||""))}).catch(()=>{K||l([])}),()=>{K=!0}},[]),Sl(()=>{if(g||!c)return;let K={aborted:!1};return b(""),P(void 0),te(null),C(null),N(!0),NI(c,n,{signal:K}).then(H=>{if(!K.aborted){if(H.outcome==="found"){d(H.date),x(H.date),P(H.availability);return}C(H.outcome==="noneInWindow"?`No times are available in the next ${H.days} days.`:"We couldn't load available times. Please try again.")}}).finally(()=>{K.aborted||N(!1)}),()=>{K.aborted=!0}},[g,c,n]),Sl(()=>{if(!g||!c||!u)return;let K=!1;return b(""),P(void 0),te(null),C(null),N(!0),Ao.getAvailability(c,u).then(H=>{K||(P(H),H.slots.length===0&&C("No times are available on this date."))}).catch(()=>{K||C("We couldn't load available times. Please try again.")}).finally(()=>{K||N(!1)}),()=>{K=!0}},[u,g,c]);let z=a?.find(K=>K.id===c),Ae=z?.depositAmountDue!=null,Fe=!!(!e&&!le&&z&&T&&w.trim()&&D.trim()&&!Ae);async function Oe(K){if(K.preventDefault(),!(!Fe||!z)){ge(!0),te(null);try{let H=await Ao.create({serviceId:z.id,start:T,customer:{name:w.trim(),email:D.trim(),phone:L.trim()},notes:Y.trim(),idempotencyKey:v,customerTimezone:he});E(H),j(Ss())}catch(H){te(H instanceof at&&H.status===409?"That time was just booked. Choose another available time.":"Your appointment wasn't submitted. Please check your details and try again."),H instanceof at&&H.status===409&&(b(""),Ao.getAvailability(z.id,u).then(P).catch(()=>{}))}finally{ge(!1)}}}let ne=IF(e,a);return hF(BI.Provider,{value:{fieldPrefix:r,editing:e,services:ne?Nc:a,currency:ne?"AUD":s,serviceId:ne?Nc[0].id:c,setServiceId:f,service:ne?Nc[0]:z,requiresPayment:ne?!1:Ae,date:u,earliestDate:p,setDate:d,setDateTouched:I,availability:ne?gF(u):S,loadingSlots:ne?!1:se,noSlotsMessage:h,selectedStart:ne?`${u}T09:00:00.000Z`:T,setSelectedStart:b,customerTimezone:he,name:w,setName:O,email:D,setEmail:R,phone:L,setPhone:G,notes:Y,setNotes:M,confirmation:F??(t?Bc:null),submitting:le,error:ie,canSubmit:ne?!1:Fe,handleSubmit:Oe,sample:!!ne},children:o})}import{Fragment as yF,jsx as Dc,jsxs as SF}from"react/jsx-runtime";var bF="sf-button group inline-flex items-center justify-center gap-2.5 border px-[22px] py-4 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] transition-colors",DI={primary:"border-btn bg-btn text-btn-ink hover:border-btn-2 hover:bg-btn-2",ghost:"border-current bg-transparent hover:bg-white/10"};function Cl(e){let{variant:t="primary",arrow:o,className:r,style:n,children:a,href:l,newTab:s,...i}=e,c=`${bF} ${DI[t]??DI.primary} ${r??""}`,f=SF(yF,{children:[a,o!==null&&Dc("span",{"aria-hidden":!0,className:"transition-transform group-hover:translate-x-[3px]",children:o??"\u2192"})]});return l?Dc(ll,{href:l,className:c,style:n,...s?{target:"_blank",rel:"noopener noreferrer"}:{},children:f}):Dc("button",{type:"button",className:c,style:n,...i,children:f})}import{jsx as J,jsxs as De}from"react/jsx-runtime";var En="w-full border-2 border-line bg-bg px-4 py-3.5 font-[family-name:var(--bk-value-font,var(--font-display))] text-[length:var(--bk-value-size,17px)] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent";function CF(e,t){let o=Number(e);if(o===0)return"Free";try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(o)}catch{return`${t} ${e}`}}function MI(e,t){try{return new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit",timeZone:t}).format(new Date(e))}catch{return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}}function HI(e,t){try{return new Intl.DateTimeFormat(void 0,{weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",timeZone:t,timeZoneName:"short"}).format(new Date(e))}catch{return new Date(e).toLocaleString()}}function Ln({id:e,label:t,required:o,children:r}){return De("div",{className:"flex flex-col gap-2",children:[De("label",{htmlFor:e,className:"font-[family-name:var(--bk-name-font,var(--font-mono))] text-[length:var(--bk-name-size,12px)] font-semibold uppercase tracking-[0.2em] text-fg",children:[t,o?J("span",{className:"text-accent",children:" *"}):null]}),r]})}function Mc({number:e,children:t}){return De("div",{className:"mb-4 flex items-center gap-3",children:[J("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full border border-line font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,11px)] font-semibold text-fg-dim",children:e}),J("h3",{className:"font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,12px)] font-semibold uppercase tracking-[0.2em] text-fg",children:t})]})}function GI({eyebrow:e,heading:t,intro:o}){return De("div",{className:"mb-10 max-w-[760px]",children:[(e??"").trim()&&J("p",{className:"mb-4 font-mono text-[12px] font-semibold uppercase tracking-[0.24em] text-accent",children:e}),(t??"").trim()&&J("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.98] tracking-[-0.025em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:t}),(o??"").trim()&&J("p",{className:"mt-5 max-w-[660px] font-display text-[17px] leading-[1.65] text-fg-dim",children:o})]})}function WI({style:e}={}){let{fieldPrefix:t,services:o,currency:r,serviceId:n,setServiceId:a,requiresPayment:l,date:s,earliestDate:i,setDate:c,setDateTouched:f,availability:u,loadingSlots:d,noSlotsMessage:p,selectedStart:x,setSelectedStart:g,customerTimezone:I}=_r();return o?De("div",{className:"flex flex-col gap-9",style:e,children:[De("div",{children:[J(Mc,{number:"01",children:"Choose a service"}),J("div",{className:"grid gap-3 sm:grid-cols-2",children:o.map(h=>{let C=h.id===n;return De("button",{type:"button","aria-pressed":C,onClick:()=>a(h.id),className:`min-h-11 border p-4 text-left transition-colors ${C?"border-accent bg-accent/10":"border-line bg-bg hover:border-fg-dim"}`,children:[J("span",{className:"block font-[family-name:var(--bk-name-font,var(--font-display))] text-[length:var(--bk-name-size,18px)] font-medium text-fg",children:h.name}),De("span",{className:"mt-1 block font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,11px)] uppercase tracking-[0.14em] text-fg-dim",children:[h.durationMinutes," min \xB7 ",CF(h.price,r)]}),h.description&&J("span",{className:"mt-3 block font-[family-name:var(--bk-note-font,var(--font-display))] text-[length:var(--bk-note-size,14px)] leading-[1.5] text-fg-dim",children:h.description})]},h.id)})}),l&&J("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.14em] text-alert",role:"alert",children:"This service requires an upfront payment and cannot be booked through this form yet."})]}),De("div",{children:[J(Mc,{number:"02",children:"Choose a date and time"}),J(Ln,{id:`${t}-date`,label:"Date",required:!0,children:J("input",{id:`${t}-date`,type:"date",min:i,value:s,onChange:h=>{f(!0),c(h.target.value)},className:En,required:!0})}),J("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3 min-[1200px]:grid-cols-4",role:"group","aria-label":"Available appointment times",children:d?J("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",children:"Loading times\u2026"}):u?.slots.length?u.slots.map(h=>De("button",{type:"button","aria-pressed":x===h.start,onClick:()=>g(h.start),className:`min-h-11 border px-3 py-2 font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,12px)] font-semibold uppercase tracking-[0.12em] transition-colors ${x===h.start?"border-accent bg-accent text-bg":"border-line bg-bg text-fg hover:border-accent"}`,children:[J("span",{className:"block",children:MI(h.start,I||u.timezone)}),I&&I!==u.timezone&&De("span",{className:"mt-0.5 block text-[9px] font-normal tracking-[0.08em] opacity-70",children:[MI(h.start,u.timezone)," business"]})]},h.start)):p?J("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",role:"status",children:p}):null}),u?.timezone&&De("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,10px)] uppercase tracking-[0.16em] text-fg-dim",children:["Times shown in ",I||u.timezone,I&&I!==u.timezone?` \xB7 business timezone ${u.timezone}`:""]})]})]}):null}function UI({buttonLabel:e,style:t}){let{fieldPrefix:o,editing:r,name:n,setName:a,email:l,setEmail:s,phone:i,setPhone:c,notes:f,setNotes:u,submitting:d,error:p,canSubmit:x}=_r();return De("div",{className:"sf-card border border-line bg-bg p-5 min-[640px]:p-7",style:t,children:[J(Mc,{number:"03",children:"Your details"}),De("div",{className:"flex flex-col gap-4",children:[J(Ln,{id:`${o}-name`,label:"Name",required:!0,children:J("input",{id:`${o}-name`,type:"text",autoComplete:"name",value:n,onChange:g=>a(g.target.value),className:En,required:!0})}),J(Ln,{id:`${o}-email`,label:"Email",required:!0,children:J("input",{id:`${o}-email`,type:"email",inputMode:"email",autoComplete:"email",value:l,onChange:g=>s(g.target.value),className:En,required:!0})}),J(Ln,{id:`${o}-phone`,label:"Phone",children:J("input",{id:`${o}-phone`,type:"tel",inputMode:"tel",autoComplete:"tel",value:i,onChange:g=>c(g.target.value),className:En})}),J(Ln,{id:`${o}-notes`,label:"What would you like to cover?",children:J("textarea",{id:`${o}-notes`,rows:4,value:f,onChange:g=>u(g.target.value),className:`${En} resize-y`})})]}),p&&J("p",{className:"mt-4 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.16em] text-alert",role:"alert",children:p}),J(Cl,{type:r?"button":"submit",disabled:!x,arrow:null,className:"mt-6 w-full disabled:cursor-not-allowed disabled:opacity-50",children:d?"Submitting\u2026":(e??"").trim()||"Book appointment"})]})}function zI({successMessage:e}){let{confirmation:t,customerTimezone:o}=_r();return t?De("div",{className:"sf-card max-w-[760px] border border-line bg-bg p-6 min-[640px]:p-9",role:"status",children:[De("p",{className:"font-mono text-[12px] font-semibold uppercase tracking-[0.22em] text-accent",children:["Request received \xB7 ",t.bookingNumber]}),J("h3",{className:"mt-4 font-display text-[28px] font-medium uppercase text-fg",children:t.service}),J("p",{className:"mt-2 font-display text-[17px] text-fg-dim",children:HI(t.startAt,t.customerTimezone||o||t.timezone)}),t.customerTimezone&&t.timezone!==t.customerTimezone&&De("p",{className:"mt-1 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:["Business time: ",HI(t.startAt,t.timezone)]}),(e??"").trim()&&J("p",{className:"mt-5 max-w-[620px] font-serif text-[18px] italic leading-[1.6] text-fg-dim",children:e}),J(Cl,{href:`/book/${encodeURIComponent(t.manageToken)}`,newTab:t!==Bc,variant:"ghost",className:"mt-7",children:"Manage booking"})]}):null}var PF=["step","name","value","note"],M6={step:"Step",name:"Name",value:"Value",note:"Note"},kF={step:"styleStep",name:"styleName",value:"styleValue",note:"styleNote"},KI={step:{font:"--bk-step-font",size:"--bk-step-size"},name:{font:"--bk-name-font",size:"--bk-name-size"},value:{font:"--bk-value-font",size:"--bk-value-size"},note:{font:"--bk-note-font",size:"--bk-note-size"}};function wF(e){return typeof e=="string"&&Kt.includes(e)?e:null}var vF={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:900};function $I(e,t){let o={};for(let r of PF){let n=wF(e[kF[r]]);if(!n)continue;let a=So({role:n},vF,t);a.fontFamily&&(o[KI[r].font]=a.fontFamily),a.fontSize&&(o[KI[r].size]=a.fontSize)}return o}import{jsx as Ar}from"react/jsx-runtime";var VI=["head","booking","details","confirm"],qI={head:"Head",booking:"Booking",details:"Your details",confirm:"Confirmation"};function TF({region:e,eyebrow:t,heading:o,intro:r,buttonLabel:n,successMessage:a,...l}){let{confirmation:s,services:i}=_r(),c=$I(l);return e==="head"?Ar("div",{className:"min-[960px]:col-span-2",style:c,children:Ar(GI,{eyebrow:t,heading:o,intro:r})}):e==="confirm"?s?Ar("div",{className:"min-[960px]:col-span-2",style:c,children:Ar(zI,{successMessage:a})}):null:s||!i||i.length===0?null:e==="booking"?Ar(WI,{style:c}):e==="details"?Ar(UI,{buttonLabel:n,style:c}):null}import{useEffect as YI,useState as $o}from"react";import{jsx as Or,jsxs as FF}from"react/jsx-runtime";function XI(e,t){let[o,r]=$o(void 0),[n,a]=$o(0);return YI(()=>{if(t!==void 0)return;if(!e){r(null);return}let l=!1;return Rt.getForm(e).then(s=>{l||r(s)}).catch(()=>{l||r(null)}),()=>{l=!0}},[t,e,n]),YI(()=>{if(t===void 0)return Il(()=>a(l=>l+1))},[t]),t!==void 0?t:o}var RF="Something went wrong \u2014 your submission wasn't sent. Please try again.";function jI(e,t="Thanks \u2014 we've received your submission."){return e.successMessage?.trim()||t}function JI({form:e,formSlug:t,editing:o=!1}){let[r,n]=$o({}),[a,l]=$o(""),[s,i]=$o(!1),[c,f]=$o(!1),[u,d]=$o(null);async function p(x){if(x.preventDefault(),!(o||s||!e||!t)){i(!0),d(null);try{let g=e.fields.map(I=>({fieldKey:I.key,value:r[I.key]??""}));await Rt.submitForm(t,{answers:g,...a?{company:a}:{}}),f(!0)}catch{d(RF)}finally{i(!1)}}}return{valueOf:x=>r[x]??"",set:(x,g)=>n(I=>({...I,[x]:g})),honeypot:a,setHoneypot:l,submitting:s,done:c,error:u,handleSubmit:p}}function ZI({value:e,onChange:t}){return Or("input",{type:"text",name:"company",tabIndex:-1,autoComplete:"off","aria-hidden":"true",className:"hidden",value:e,onChange:o=>t(o.target.value)})}function Hc({field:e,value:t,onChange:o,className:r,rows:n=5,placeholder:a}){let l=a??e.placeholder;return e.type==="textarea"?Or("textarea",{required:e.required,rows:n,value:t,placeholder:l,onChange:s=>o(s.target.value),className:r}):e.type==="select"?FF("select",{required:e.required,value:t,onChange:s=>o(s.target.value),className:r,children:[Or("option",{value:"",children:l||"Select\u2026"}),e.options.map(s=>Or("option",{value:s,children:s},s))]}):e.type==="checkbox"?Or("input",{type:"checkbox",required:e.required,checked:t==="true",onChange:s=>o(s.target.checked?"true":""),className:r}):Or("input",{type:e.type==="email"?"email":e.type==="tel"?"tel":"text",required:e.required,value:t,placeholder:l,onChange:s=>o(s.target.value),className:r})}var Gc="solid",EF=[{label:"Solid",value:"solid"},{label:"Outlined",value:"outlined"}];function QI(e){return Xe(EF,Gc,e)}var Wc="sf-secnum-outline",eh="font-display text-[length:var(--size-headingMedium,clamp(48px,6vw,96px))] font-medium leading-[0.8] tracking-[-0.02em]",th=`@supports (-webkit-text-stroke: 1px currentColor){.${Wc}{color:var(--surface-2);-webkit-text-stroke:1px var(--line)}}`;import{jsx as LF}from"react/jsx-runtime";function Uc(){return LF("span",{className:"block h-px w-[30px] bg-current"})}import{jsx as zc,jsxs as NF}from"react/jsx-runtime";function _F(e,t){return`font-mono text-[length:var(--size-label,${e}px)] uppercase tracking-[0.3em] text-accent`}var AF="inline-block w-fit bg-accent px-3.5 py-1.5 font-mono text-[length:var(--size-label,12px)] font-semibold uppercase tracking-[0.16em] text-bg",OF="flex items-center gap-3.5 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em] opacity-80 max-[800px]:text-[length:var(--size-label,12px)] max-[800px]:tracking-[0.25em]";function Zt({text:e,look:t="plain",size:o=13,scaled:r=!0,className:n="",classNameAfter:a=""}){if(t==="line")return NF("div",{className:[n,OF,a].filter(Boolean).join(" "),children:[zc(Uc,{}),zc("span",{children:re(e)})]});let l=t==="filled"?AF:_F(o,r);return zc("span",{className:[n,l,a].filter(Boolean).join(" "),children:re(e)})}import{Fragment as BF,jsx as fe,jsxs as pt}from"react/jsx-runtime";var _n=(e,t=!1)=>typeof e=="string"?Ot(e,t):e,Nr=(e,t=!1)=>typeof e=="string"?re(e,t):e;function Kc({num:e,title:t,link:o,logo:r,description:n,accent:a,accentNum:l,numStyle:s=Gc,look:i="standard",titleAccent:c,accentTracking:f="-0.02em",spaceBelow:u,rowGap:d,descriptionSize:p,className:x="",eyebrowLook:g=Pc}){let I=u??(i==="editorial"?"mb-[60px]":"");if(i==="editorial"){let b=!!t||!!c;return pt("header",{className:`${I} grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-8 max-[1100px]:grid-cols-1 max-[1100px]:gap-3.5 ${x}`.trim(),children:[e&&(typeof e=="string"?fe(Zt,{text:e,className:"pb-2"}):fe("span",{className:"pb-2",children:e})),b&&pt("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5.5vw,80px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:[t,c&&pt(BF,{children:[" ",fe("em",{className:"font-serif font-normal italic text-accent",style:{letterSpacing:f},children:c})]})]}),n&&fe("p",{className:"max-w-[360px] pb-1 text-right font-display text-[length:var(--size-body,14px)] leading-[1.5] text-fg-dim max-[1100px]:max-w-full max-[1100px]:text-left",children:n})]})}if(i==="simple"){let b=`${I} ${x}`.trim();return pt("div",{className:b||void 0,children:[e&&(typeof e=="string"?fe(Zt,{text:e,look:g,className:"mb-4 block"}):fe("span",{className:"mb-4 block",children:e})),t&&fe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:_n(t)})]})}if(i==="statement"){let b=`${I} ${x}`.trim();return pt("div",{className:b||void 0,children:[e&&(typeof e=="string"?fe(Zt,{text:e,look:g,className:"mb-4 block"}):fe("span",{className:"mb-4 block",children:e})),t&&fe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,72px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em] text-fg",children:_n(t,!0)})]})}if(i==="natural"){let b=`flex max-w-[680px] flex-col ${d??"gap-5"} ${I} ${x}`.replace(/\s+/g," ").trim();return pt("div",{className:b,children:[e&&(typeof e=="string"?fe(Zt,{text:e,look:g}):fe("span",{children:e})),t&&fe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium leading-[1.05] tracking-[-0.03em] max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:_n(t)}),n&&fe("p",{className:`${p??"text-[length:var(--size-body,16px)]"} leading-[1.6] opacity-85`,children:n})]})}if(i==="essay"){let b=`${I} ${x}`.trim();return pt("div",{className:b||void 0,children:[e&&(typeof e=="string"?fe(Zt,{text:e,look:g,className:"mb-4 block"}):fe("span",{className:"mb-4 block",children:e})),t&&fe("h2",{className:"font-heading2 text-[length:var(--sf-heading-max,var(--size-headingMedium,38px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.02em] text-fg max-[800px]:text-[length:var(--size-headingSmall,28px)]",children:_n(t)})]})}let h=!!n||!!o,C=!!t,S=QI(s)==="outlined",P="font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em]",T=null;if(e)if(S)T=fe("span",{className:`${eh} text-fg-dim ${Wc}`,children:Nr(e)});else if(l&&!a&&typeof e=="string"){let b=e.indexOf("/"),w=b===-1?e:e.slice(0,b),O=b===-1?"":e.slice(b);T=pt("span",{className:P,children:[fe("span",{className:"text-accent",children:Nr(w)}),O&&fe("span",{className:"text-fg-dim",children:Nr(O)})]})}else T=fe("span",{className:`${P} ${a?"text-accent":"text-fg-dim"}`,children:Nr(e)});return pt("div",{className:"mb-16 grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-6 max-[800px]:mb-9 max-[800px]:grid-cols-1 max-[800px]:gap-3 max-[800px]:pb-5",children:[S&&e&&fe("style",{children:th}),pt("div",{className:"flex flex-col items-start gap-3",children:[r?.src&&fe("img",{src:Xd(r.src),alt:r.alt,className:"h-8 w-auto object-contain"}),T]}),C&&fe("h2",{className:a?"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,5vw,64px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.95] tracking-[-0.025em]":"font-heading2 text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.03em] whitespace-pre-line max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))] max-[800px]:leading-[1]",children:_n(t)}),h&&pt("div",{className:"flex flex-col items-end gap-3 max-[800px]:items-start",children:[n&&fe("p",{className:"max-w-[340px] font-display text-[length:var(--size-body,14px)] leading-[1.5] text-fg-dim text-right max-[800px]:max-w-full max-[800px]:text-left",children:Nr(n)}),o&&pt(ll,{href:o.href,className:"inline-flex items-center gap-2 whitespace-nowrap font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg",children:[Nr(o.text),fe("span",{"aria-hidden":!0,children:"\u2192"})]})]})]})}import{jsx as mt,jsxs as An}from"react/jsx-runtime";function DF(e){return e.type==="textarea"||e.type==="select"||e.type==="checkbox"}function xz({eyebrow:e,title:t}){return An("div",{className:"flex flex-col gap-4",children:[e&&mt(Zt,{text:e,scaled:!1}),t&&mt("h2",{className:"font-display text-[min(clamp(40px,5vw,72px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:Ot(t,!0)})]})}function oh({body:e,buttonLabel:t,consent:o,form:r,submission:n,showForm:a,resolving:l,editing:s}){return An("div",{className:"flex flex-col gap-7",children:[e&&el(e).map((i,c)=>mt("p",{className:"max-w-[480px] font-display text-[16px] leading-[1.6] text-fg-dim",children:re(i)},c)),a&&(r?n.done?mt("p",{role:"status",className:"max-w-[480px] font-[family-name:var(--sb-thanks-font,var(--font-serif))] text-[length:var(--sb-thanks-size,17px)] italic leading-[1.6] text-fg-dim",children:jI(r)}):An("form",{className:"grid grid-cols-2 gap-2",onSubmit:n.handleSubmit,children:[r.fields.map(i=>{let c=["border border-line bg-transparent px-4 py-3.5 font-[family-name:var(--sb-field-font,var(--font-mono))] text-[length:var(--sb-field-size,14px)] tracking-[0.1em] text-fg outline-none focus:border-accent",DF(i)?"col-span-2":""].join(" ");return i.type==="checkbox"?An("label",{className:"col-span-2 flex items-start gap-3 font-[family-name:var(--sb-tick-font,var(--font-mono))] text-[length:var(--sb-tick-size,12px)] uppercase tracking-[0.18em] text-fg-dim",children:[mt(Hc,{field:i,value:n.valueOf(i.key),onChange:f=>n.set(i.key,f),className:"mt-0.5 size-4 accent-accent"}),An("span",{children:[i.label,i.required?mt("span",{className:"text-accent",children:" *"}):null]})]},i.key):mt(Hc,{field:i,value:n.valueOf(i.key),onChange:f=>n.set(i.key,f),rows:4,placeholder:i.placeholder||i.label,className:i.type==="textarea"?`${c} resize-y`:c},i.key)}),mt(ZI,{value:n.honeypot,onChange:n.setHoneypot}),n.error&&mt("p",{role:"alert",className:"col-span-2 font-mono text-[12px] uppercase tracking-[0.18em] text-alert",children:n.error}),t&&mt("button",{type:s?"button":"submit",disabled:n.submitting,className:"col-span-2 cursor-pointer bg-btn px-6 py-4 font-mono text-[14px] uppercase tracking-[0.32em] text-btn-ink transition-colors hover:bg-fg hover:text-bg disabled:cursor-wait disabled:opacity-60",children:n.submitting?"Sending\u2026":re(t)})]}):mt("p",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim",children:l?"Loading form\u2026":"Choose a form in the inspector, under Form \u2014 until then this form is hidden on the live page and nothing can be submitted."})),a&&o&&mt("span",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim/70",children:re(o)})]})}var MF=["field","tick","thanks"],yz={field:"Form rows",tick:"Tick label",thanks:"Thank-you message"},HF={field:"styleField",tick:"styleTick",thanks:"styleThanks"},rh={field:{font:"--sb-field-font",size:"--sb-field-size"},tick:{font:"--sb-tick-font",size:"--sb-tick-size"},thanks:{font:"--sb-thanks-font",size:"--sb-thanks-size"}};function GF(e){return typeof e=="string"&&Kt.includes(e)?e:null}var WF={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:900};function nh(e,t){let o={};for(let r of MF){let n=GF(e[HF[r]]);if(!n)continue;let a=So({role:n},WF,t);a.fontFamily&&(o[rh[r].font]=a.fontFamily),a.fontSize&&(o[rh[r].size]=a.fontSize)}return o}import{jsx as Pl}from"react/jsx-runtime";var ah=["head","form"],lh={head:"Head",form:"Form"};function UF({region:e,eyebrow:t,title:o,body:r,buttonText:n,consent:a,formSlug:l,form:s,editing:i=!1,...c}){let f=XI(l,s),u=JI({form:f,formSlug:l,editing:i}),d=nh(c);return e==="head"?Pl("div",{style:d,children:Pl(Kc,{look:"statement",num:t,title:o})}):Pl("div",{style:d,children:Pl(oh,{body:r??"",buttonLabel:n??"",consent:a??"",form:f,submission:u,showForm:!!f||i,resolving:f===void 0,editing:i})})}var zF="ImageBlock",KF=3,kl=(e,t,o={})=>({type:e,props:{...t?.(e)??{},id:Lo(e),...o}}),$F=e=>({...e?.(_e)??{},direction:"column",[Tr]:[kl(zF,e),kl(_e,e,{direction:"column",[Tr]:[kl("Heading",e),kl("Text",e)]})]}),On={AppointmentBooking:{slot:"boxes",childType:"BookingBox",addLabel:"Add box",fixed:!0,seeds:()=>VI.map(e=>({region:e,name:qI[e]})),addBlocked:()=>"A Booking Form is these three boxes. They cannot be added to or removed.",skipSeed:e=>e.layout!=="boxes"},SubmitBuild:{slot:"boxes",childType:"SubmitBox",addLabel:"Add box",fixed:!0,seeds:()=>ah.map(e=>({region:e,name:lh[e]})),addBlocked:()=>"A Submit-a-build section is these two boxes. They cannot be added to or removed.",skipSeed:e=>e.layout!=="boxes"},Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>OI.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${xo.toLowerCase()}`,seeds:()=>[],addBlocked:ca,notice:ks},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${xo.toLowerCase()}`,seeds:()=>[],addBlocked:ca,notice:ks},Collections:{slot:"cards",childType:"CollectionCard",addLabel:"Add card",seeds:()=>Array.from({length:hI},()=>({collection:null}))},ProductGrid:{slot:"products",childType:"ProductRef",addLabel:"Add product",seeds:()=>[{code:""},{code:""},{code:""}],legacy:e=>Array.isArray(e.design_codes)?e.design_codes.map(t=>t?.code).filter(t=>!!t).map(t=>({code:t})):[]},GalleryB:{slot:"items",childType:"GalleryItem",addLabel:"Add image",seeds:()=>CI.map(e=>({...e})),legacy:e=>Array.isArray(e.cards)?e.cards.map(t=>({...t})):[]},ProcessSteps:{slot:"boxes",childType:_e,addLabel:`Add ${xo.toLowerCase()}`,seeds:e=>Array.from({length:KF},()=>$F(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}};function Dz(e,t){let o=On[e];return o?{slot:o.slot,children:o.seeds(t).map(r=>({type:o.childType,props:{id:Lo(o.childType),...r}}))}:null}var Vo=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function $c(e){return Vo(e)&&typeof e.type=="string"&&e.type!==""&&Vo(e.props)}function sh(e,t,o){if(Array.isArray(e))for(let r of e)$c(r)?Vc(r,t,o):Vo(r)&&typeof r.type=="string"&&r.type!==""&&t.add(r.type)}function wl(e,t,o){if(Array.isArray(e)){if(o.has(e))return;o.add(e);for(let r of e)$c(r)?Vc(r,t,o):wl(r,t,o);return}if(!(!Vo(e)||o.has(e))){o.add(e);for(let r of Object.values(e))wl(r,t,o)}}function Vc(e,t,o){if(!o.has(e)){o.add(e),t.add(e.type);for(let r of Object.values(e.props))wl(r,t,o)}}function qc(e){let t=new Set,o=new Set;if($c(e))Vc(e,t,o);else if(Vo(e)){if(sh(e.content,t,o),Vo(e.zones))for(let r of Object.values(e.zones))sh(r,t,o);Vo(e.root)&&wl(e.root,t,o)}return[...t].sort()}var ih=()=>({}),ch=new Map;function VF(e){let t=ch.get(e);if(t)return t;let o=new Set,r=On[e];if(r)for(let l of r.seeds(ih))for(let s of qc({type:r.childType,props:l}))o.add(s);let n=pI(e);if(n){let l=0;for(let s of qc(n(ih,i=>`${i}-${l+=1}`)))o.add(s)}o.delete(e);let a=[...o].sort();return ch.set(e,a),a}function qF(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let t=$s(e),o=e.allow?new Set(e.allow):null,r=new Set(e.deny??[]),n=new Set(Object.keys(e.host??{})),a=i=>{if(r.has(i))return!1;if(n.has(i))return!0;let c=Zu(i);return!c||!t[c]?!1:o?o.has(i):!0},l=new Map,s=i=>{let c=l.get(i);if(c!==void 0)return c;l.set(i,!1);let f=a(i)&&VF(i).every(s);return l.set(i,f),f};return{sets:t,offers:s}}var YF="block-offer";function Yc(e=Ye()){return e.cache(YF,()=>qF(e.blocks))}function Vz(e,t=Ye()){let o=Yc(t);return o?o.offers(e):!0}function Zz(e,t=0){let o=jF(e,t),r=o?Yc():null;return o&&r?XF(o,r):o}function XF(e,t){if(e.spec)return t.offers(e.spec.childType)?e:null;let o=e.choices??[],r=o.filter(n=>t.offers(n.type));return r.length===o.length?e:r.length>0?{...e,choices:r}:null}function jF(e,t){let o=On[e];if(o)return{source:"section",slot:o.slot,choices:null,spec:o};let r=rI(e,t);if(r)return{source:"container",slot:r.slot,choices:r.choices,spec:null};let n=dI(e);return n?{source:"footer",slot:fI,choices:n,spec:null}:null}var t3="Scrolling Bar",{Provider:o3,useSelection:fh}=sa("selectedHeroId");import{createContext as JF,useCallback as dh,useContext as ZF,useMemo as QF,useRef as eE}from"react";import{jsx as oE}from"react/jsx-runtime";var tE=Object.fromEntries(Tu.map(e=>[e,{value:"",error:null}])),uh=JF({links:Ru,rows:tE,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function l3({children:e,value:t}){let o=eE(()=>{}),r=dh(()=>o.current(),[]),n=dh(l=>{o.current=l},[]),a=QF(()=>({...t,openPanel:r,setOpenHandler:n}),[t,r,n]);return oE(uh.Provider,{value:a,children:e})}var s3=()=>ZF(uh);import{useRef as Zf,useState as Jl}from"react";import{useEasel as $r}from"efficient-easel/easel";var ph="50% 50%";var Dr=e=>e<0?0:e>100?100:Math.round(e);function Xc(e){let t=String(e??"").trim().split(/\s+/);if(t.length!==2)return{x:50,y:50};let o=a=>{let l=/^(-?\d+(?:\.\d+)?)%$/.exec(a);return l?Number(l[1]):null},r=o(t[0]),n=o(t[1]);return r===null||n===null?{x:50,y:50}:{x:Dr(r),y:Dr(n)}}function Br(e,t){return`${Dr(e)}% ${Dr(t)}%`}function mh(e,t,o=!1){let r=o?10:1,{x:n,y:a}=Xc(e);switch(t){case"ArrowLeft":return Br(n-r,a);case"ArrowRight":return Br(n+r,a);case"ArrowUp":return Br(n,a-r);case"ArrowDown":return Br(n,a+r);default:return null}}function xh(e,t,o){return!(e.width>0)||!(e.height>0)?{x:50,y:50}:{x:Dr((t-e.left)/e.width*100),y:Dr((o-e.top)/e.height*100)}}import{useCallback as lE,useEffect as sE,useRef as iE,useState as cE}from"react";import{useEasel as fE}from"efficient-easel/easel";import{SettingsAction as dE}from"efficient-easel/panel";function jc(e){return typeof e=="number"&&Number.isFinite(e)}function u3(e,t){if(!jc(e))return;let o=Xn(so(e));if(Object.keys(o).length===0)return;let r=o[vl];if(typeof r!="string")return o;let n=Mr(t)?Hr(r,xt(t)??[]):r;return{...o,[rE]:n}}var rE="--sf-section-radius",vl="--sf-card-radius",ct=["tl","tr","br","bl"];function xt(e){if(!Array.isArray(e))return null;let t=e.filter(o=>ct.includes(o));return ct.filter(o=>t.includes(o))}function Mr(e){let t=xt(e);return t!==null&&t.length<ct.length}function Hr(e,t){return ct.map(o=>t.includes(o)?e:"0").join(" ")}var wo="Which corners",Gr=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];function Tl(e){let t=o=>e.includes(o);if(e.length===ct.length)return"All four";if(e.length===0)return"None";if(e.length===1)return Gr.find(o=>o.value===e[0])?.label??"1 corner";if(e.length===2){if(t("tl")&&t("tr"))return"Top two";if(t("bl")&&t("br"))return"Bottom two";if(t("tl")&&t("bl"))return"Left two";if(t("tr")&&t("br"))return"Right two"}return`${e.length} corners`}var nE="--sf-card-box-radius",aE="--sf-site-card-radius",g3="sf-section-bleeds";function Nn(e){return typeof e=="number"&&Number.isFinite(e)}function I3(e,t){if(!Nn(e))return;let o=Xn(so(e))[vl];if(typeof o!="string")return;let r=Mr(t)?Hr(o,xt(t)??[]):o;return{[nE]:r}}function h3(e){let t=e[vl];return typeof t=="string"?{[aE]:t}:{}}function gh(e,t){let o=e.find(a=>a?.props?.id===t);if(!o)return[...e];let r=o.props?.cardCorners,n=o.props?.cardCornerSides;return e.map(a=>a?.props?.id===t?a:{...a,props:{...a.props,cardCorners:r,cardCornerSides:n}})}function Ih(e,t,o){let r=o?.zone??"",n=r.lastIndexOf(":"),a=n>0?r.slice(0,n):"",l=n>0?r.slice(n+1):"",s=a?Hd(e,t,a):null,i=s&&Array.isArray(s.item.props[l])?s.item.props[l]:[],c=o?.index??-1,f=c>=0?i[c]:void 0,u=f?.props?.id?String(f.props.id):"",d=Math.max(i.length-1,0);return!s||!u?{can:!1,reason:"unreachable",others:0}:i.length<=1?{can:!1,reason:"alone",others:d}:Nn(f?.props?.cardCorners)?{can:!0,others:d,zone:s.zone,index:s.index,data:{...s.item,props:{...s.item.props,[l]:gh(i,u)}}}:{can:!1,reason:"unset",others:d}}function hh(e){if(!e.can)return e.reason==="alone"?"This is the only card in the section.":e.reason==="unset"?"Set this card's corners first.":"This card is not in a section that can share corners.";let t=e.others;return`Gives the other ${t===1?"card":`${t} cards`} this card's Corners and Which corners.`}function bh(e){return`Applied to ${e} ${e===1?"card":"cards"}`}function yh(e,t){e.can&&t(e.zone,e.index,e.data)}import{jsx as Sh}from"react/jsx-runtime";var uE=2200,pE="apply-corners-to-siblings",mE="Apply to all cards";function xE({plan:e,doneCount:t,onPress:o}){return Sh(dE,{id:pE,label:mE,note:hh(e),disabled:!e.can,done:t!==null,doneLabel:bh(t??0),onPress:o})}function Jc(){let{appState:e,config:t}=fE(i=>i),o=Eu(),[r,n]=cE(null),a=iE(null);sE(()=>()=>{a.current&&clearTimeout(a.current)},[]);let l=Ih(t,e.data.content??[],e.ui.itemSelector),s=lE(()=>{yh(l,o.replaceComponent),l.can&&(n(l.others),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>n(null),uE))},[l,o]);return Sh(xE,{plan:l,doneCount:r,onPress:s})}import{jsx as Bn,jsxs as Ch}from"react/jsx-runtime";function Rl({label:e,onClear:t,what:o="override"}){return Bn("button",{type:"button",className:"sf-part-mark",title:`Clear ${o}`,"aria-label":`Clear ${o}: ${e}`,onClick:t,children:Bn(gE,{})})}function gE(){return Ch("svg",{width:"12",height:"12",viewBox:"0 0 16 16","aria-hidden":"true",children:[Bn("circle",{className:"sf-part-mark-dot",cx:"8",cy:"8",r:"3",fill:"currentColor"}),Ch("g",{className:"sf-part-mark-arrow",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",children:[Bn("path",{d:"M13 8a5 5 0 1 1-1.6-3.7"}),Bn("path",{d:"M13 2.5V5h-2.6"})]})]})}var Ph=1,kh="Corners";function IE(e){return so(e)}function N3(e,t){let o=IE(e);if(o===null)return null;let r=`${o}px`;return{borderRadius:Mr(t)?Hr(r,xt(t)??[]):r}}import{createContext as bE,useContext as yE,useMemo as SE}from"react";var hE=["vehicle","process","size","lugs","finish","price"],Fl={vehicle:"My Car",process:"Process",size:"Size",lugs:"Lugs",finish:"Finish",price:"Price"};function wh(e){if(!e)return Fl;let t={...Fl};for(let o of hE){let r=e[o];if(typeof r!="string")continue;let n=r.trim();n&&(t[o]=n)}return t}import{jsx as CE}from"react/jsx-runtime";var vh=bE(Fl);function G3({labels:e,children:t}){let o=SE(()=>wh(e),[e]);return CE(vh.Provider,{value:o,children:t})}function Zc(){return yE(vh)}var Bt={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]]}},Qc=Object.keys(Bt),Rh=[2,3,4,6];function Fh(e){return typeof e!="string"||e===""?null:Bt[e]??null}function Th(e,t){return t?6/e.acrossPhone:12/e.across}var PE="sf-wall--";function kE(e){return`${PE}${e}`}function z3(e){let t=Bt[e],o=`.${kE(e)}`,r=[],n=(a,l)=>{let s=[],i=a.length;a.forEach(([c,f],u)=>{s.push(`${o} > :nth-child(${i}n+${u+1}){grid-column:span ${c};grid-row:span ${f}}`)});for(let c=1;c<i;c+=1)s.push(`${o}:has(> :nth-child(${i}n+${c}):last-child) > :nth-last-child(-n+${c}){grid-column:span ${l};grid-row:span 1}`);return s};return r.push(`${o}{grid-template-columns:repeat(12,minmax(0,1fr))}`),r.push(...n(t.desktop,Th(t,!1))),r.push("@media (max-width:800px){"),r.push(`${o}{grid-template-columns:repeat(6,minmax(0,1fr))}`),r.push(...n(t.phone,Th(t,!0))),r.push("}"),r.join("")}var El=12,Eh=1,wE=3;var vE=3;function ef(e,t,o){let r=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(r)?Math.min(o,Math.max(t,Math.trunc(r))):null}function TE(e){return ef(e,1,El)??vE}function V3(e,t){let o=ef(e,Eh,wE);return o??(TE(t)===4?2:Eh)}function q3(e){return e==null||e===""?null:ef(e,1,El)}var Y3="data-sf-span";function X3(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if(Fh(e.props?.layout))return!1;let t=e.props?.columns;return t!=null&&t!==""}return!1}import{AlignLeftIcon as aA,AlignSeparateIcon as lA,AnimationIcon as Xb,BackgroundIcon as sA,CartIcon as iA,ColumnWidthsIcon as jb,ColumnsIcon as cA,CornerIcon as Jb,DirectionDownIcon as fA,DirectionLeftIcon as dA,DirectionRightIcon as uA,DirectionUpIcon as pA,DollarIcon as mA,FinishIcon as xA,GapIcon as Zb,GridIcon as gA,GroundIcon as IA,HashIcon as Qb,ImageIcon as hA,LayoutIcon as bA,ListIcon as yA,LocationIcon as jf,PaddingBottomIcon as SA,PaddingLeftIcon as CA,PaddingRightIcon as PA,PaddingTopIcon as kA,PageIcon as ey,PhoneIcon as wA,PlacementIcon as vA,ProductSizeIcon as TA,RotateIcon as RA,SquareIcon as FA,StylesIcon as EA,TextLinesIcon as LA,WidthIcon as _A,WrapIcon as AA}from"efficient-easel/icons";import{TitleIcon as RE,ButtonIcon as FE,DollarIcon as EE,HashIcon as LE,LinkIcon as _E,NoteIcon as AE,TagIcon as OE,TextLinesIcon as NE}from"efficient-easel/icons";import{Fragment as Dt,jsx as Z,jsxs as Mt}from"react/jsx-runtime";var Lh={body:NE,button:FE,link:_E,label:OE,number:LE,price:EE,note:AE,title:RE},_h={eyebrow:Mt(Dt,{children:[Z("path",{d:"M5 6.5h5"}),Z("path",{d:"M5 12.5h14"}),Z("path",{d:"M5 18h11"})]}),heading:Mt(Dt,{children:[Z("path",{d:"M6.5 5v14"}),Z("path",{d:"M17.5 5v14"}),Z("path",{d:"M6.5 12h11"})]}),intro:Mt(Dt,{children:[Z("path",{d:"M4 5.5v13"}),Z("path",{d:"M8 7.5h12"}),Z("path",{d:"M8 12h12"}),Z("path",{d:"M8 16.5h8"})]}),value:Mt(Dt,{children:[Z("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),Z("path",{d:"M6.5 12h7"})]}),name:Mt(Dt,{children:[Z("path",{d:"M6 3.5v17"}),Z("path",{d:"M6 5h11.5l-2.6 3.6L17.5 12H6z"})]}),date:Mt(Dt,{children:[Z("rect",{x:"4",y:"5.5",width:"16",height:"15",rx:"2"}),Z("path",{d:"M4 10.5h16"}),Z("path",{d:"M9 3.2v4.4"}),Z("path",{d:"M15 3.2v4.4"})]}),caption:Mt(Dt,{children:[Z("rect",{x:"3.5",y:"4.5",width:"17",height:"11",rx:"2"}),Z("path",{d:"M3.5 12.8l4.2-3.2 3.6 2.8 3.4-2.4 5.8 4"}),Z("path",{d:"M6.5 19.5h11"})]}),quote:Mt(Dt,{children:[Z("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),Z("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Mt(Dt,{children:[Z("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),Z("path",{d:"M8 9.5h8"}),Z("path",{d:"M12 9.5v5"})]}),meta:Mt(Dt,{children:[Z("path",{d:"M4 7h16"}),Z("path",{d:"M4 14h3.5"}),Z("path",{d:"M10.5 14h3"}),Z("path",{d:"M17 14h3"})]})};function tf({noun:e,size:t=14,strokeWidth:o=1.8,className:r,style:n}){let a=Lh[e];return a?Z("span",{className:r,style:{display:"inline-flex",...n},"aria-hidden":"true",children:Z(a,{size:t})}):Z("svg",{className:r,style:n,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:_h[e]})}var Z3=Object.keys(Lh);var Q3=Object.keys(_h);var BE="#ffffff",DE=/^#[0-9a-fA-F]{6}$/;function of(e){return ME(e)?e:BE}function ME(e){return typeof e=="string"&&DE.test(e)}function oK(e){return{"--bg":of(e)}}var HE=["fade","rise","scale"],rf="none",Ah=[{label:"None",value:rf},{label:"Fade",value:"fade"},{label:"Rise",value:"rise"},{label:"Scale",value:"scale"}];function aK(e){return HE.includes(e)?e:null}var Oh="data-sf-anim",Dn="data-sf-anim-state";function lK(e){let t=()=>{};if(typeof IntersectionObserver>"u"||!e.getAttribute(Oh))return t;let o=window.innerHeight||document.documentElement.clientHeight;if(e.getBoundingClientRect().top<o)return t;e.setAttribute(Dn,"armed");let r=new IntersectionObserver(n=>{for(let a of n)if(a.isIntersecting){r.disconnect(),GE(e);break}},{threshold:0});return r.observe(e),()=>{r.disconnect(),e.removeAttribute(Dn)}}function GE(e){if(!e.getAttribute(Oh))return;e.removeAttribute(Dn),e.offsetWidth,e.setAttribute(Dn,"play");let t=o=>{o.target===e&&(e.removeAttribute(Dn),e.removeEventListener("animationend",t))};e.addEventListener("animationend",t)}var sK=Ud;function af(e,t){let o=e?.content;if(!Array.isArray(o))return null;for(let r of o){if(!r||typeof r!="object")continue;let n=r.props;if(n?.id===t)return null;if(nf(r,t,0))return n??{}}return null}function nf(e,t,o){if(o>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(n=>nf(n,t,o+1));let r=e.props;return r&&typeof r=="object"&&r.id===t?!0:Object.values(e).some(n=>nf(n,t,o+1))}import{SettingsCorners as ty,SettingsField as be,SettingsGroupHead as OA,SettingsGroupSub as NA,SettingsPlacement as BA,SettingsSegmented as DA,SettingsSwitch as oy}from"efficient-easel/panel";import{ListField as MA}from"efficient-easel/fields";import{useContext as KE,useEffect as Dh,useRef as Nl,useState as Bl}from"react";import{useEffect as Nh,useMemo as Ll,useRef as WE,useState as lf}from"react";import{jsx as Ht,jsxs as _l}from"react/jsx-runtime";function UE(e,t){let o=t.trim().toLowerCase(),r=o?e.filter(l=>l.label.toLowerCase().includes(o)):[...e],n=[],a;for(let l of r)l.group&&l.group!==a&&n.push({type:"group",label:l.group,count:r.filter(s=>s.group===l.group).length}),a=l.group,n.push({type:"option",option:l});return n}function Al({label:e,options:t,fallback:o,value:r,onChange:n,placeholder:a,bare:l=!1}){let[s,i]=lf(!1),[c,f]=lf(""),[u,d]=lf(0),p=WE(null),x=r??"",g=Ll(()=>t.find(b=>b.value===x)??t.find(b=>b.value===o)??null,[t,x,o]),I=Ll(()=>UE(t,c),[t,c]),h=Ll(()=>I.filter(b=>b.type==="option").map(b=>b.option),[I]),C=Ll(()=>t.some(b=>b.thumb!==void 0),[t]);Nh(()=>{if(!s)return;let b=w=>{p.current&&!p.current.contains(w.target)&&(i(!1),f(""))};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[s]),Nh(()=>{d(b=>b>=h.length?0:b)},[h.length]);let S=b=>{n(b.value),i(!1),f("")},P=b=>{b.key==="Escape"?(i(!1),f("")):b.key==="ArrowDown"?(b.preventDefault(),i(!0),d(w=>Math.min(w+1,Math.max(h.length-1,0)))):b.key==="ArrowUp"?(b.preventDefault(),d(w=>Math.max(w-1,0))):b.key==="Enter"&&s&&h[u]&&(b.preventDefault(),S(h[u]))},T=-1;return _l("div",{className:l?"sf-combo":"sf-field sf-combo",ref:p,children:[!l&&Ht("div",{className:"sf-field-label",children:e}),_l("div",{className:"sf-combo-control",children:[Ht("input",{type:"text",className:"sf-combo-input",role:"combobox",...l?{"aria-label":e}:{},"aria-expanded":s,"aria-autocomplete":"list",value:s?c:g?.label??"",placeholder:a??"Search\u2026",onChange:b=>{f(b.target.value),i(!0),d(0)},onFocus:()=>{i(!0),f("")},onClick:()=>i(!0),onKeyDown:P}),Ht("span",{className:"sf-combo-caret","aria-hidden":"true",children:"\u25BE"})]}),s&&Ht("ul",{className:"sf-combo-menu",role:"listbox",children:h.length===0?Ht("li",{className:"sf-combo-empty",children:"No matches"}):I.map(b=>{if(b.type==="group")return _l("li",{className:"sf-combo-group",role:"presentation",children:[b.label,Ht("span",{className:"sf-combo-group-count",children:b.count})]},`group:${b.label}`);let w=b.option,O=++T;return _l("li",{role:"option","aria-selected":w.value===x,className:"sf-combo-option"+(O===u?" is-active":"")+(w.value===x?" is-selected":""),onMouseDown:D=>{D.preventDefault(),S(w)},onMouseEnter:()=>d(O),children:[C&&Ht("span",{className:"sf-combo-thumb","aria-hidden":"true",children:w.thumb?Ht("img",{src:w.thumb,alt:"",loading:"lazy"}):null}),Ht("span",{className:"sf-combo-option-label",children:w.label}),w.meta!==void 0&&Ht("span",{className:"sf-combo-meta",children:w.meta})]},w.value||"__none__")})})]})}var Mn=class extends Error{constructor(o){super("The storefront forms list could not be loaded.");this.cause=o;this.name="FormsUnavailableError"}},Ol=null,sf=null,cf=null;function zE(){Ol=null,sf=null,cf=null}function Bh(e=!1){let t=dr(),o=_o();return(e||!Ol||sf===null&&t!==null||cf!==o)&&(sf=t,cf=o,Ol=(t?oe.listForms(t,{siteId:o}):Promise.reject(new Mn)).catch(r=>{throw zE(),r instanceof Mn?r:new Mn(r)})),Ol}import{jsx as Te,jsxs as kt}from"react/jsx-runtime";var Mh="__create-a-new-form__";function $E({value:e,forms:t,loadFailed:o,emptyLabel:r="No form yet"}){let n=t??[],a=e?n.some(u=>u.slug===e):!0,l=t===null&&!o,s={value:"",label:l?"Loading\u2026":o?"Forms couldn\u2019t be loaded":r},i=e&&!a?[{value:e,label:l||o?e:`${e} \u2014 no form with this name`}]:[],c=n.map(u=>({value:u.slug,label:u.is_active?u.title:`${u.title} (switched off)`})),f=l?[]:[{value:Mh,label:"Create a new form\u2026"}];return[s,...i,...c,...f]}function VE(e){return e===Mh?{action:"create"}:{action:"store",slug:e}}function qE({value:e,pickedId:t,forms:o}){if(!e||!t||o.some(n=>n.slug===e))return null;let r=o.find(n=>n.id===t);return r&&r.slug&&r.slug!==e?r.slug:null}function YE(e){let t=["Goes to Storefront \u2192 Forms"],o=(e.notify_email??"").trim();return o&&t.push(`Emails a copy to ${o}`),e.mailing_list_name&&t.push(e.subscribe_mode==="checkbox"?`Joins the \u201C${e.mailing_list_name}\u201D audience, but only when the consent box is ticked`:`Joins the \u201C${e.mailing_list_name}\u201D audience`),e.kind==="account_signup"&&t.push(e.signup_customer_type==="importer"?"Creates a wholesale account":"Creates a retail account"),t}function ff({value:e,onChange:t,label:o="Form",emptyLabel:r}){let n=fo(),a=KE(Po),l=a?a.capabilities.hasForms:!0,[s,i]=Bl(null),[c,f]=Bl(!1),[u,d]=Bl(!1),[p,x]=Bl(!1),g=Nl(!0),I=Nl(e);I.current=e;let h=Nl(t);h.current=t;let C=Nl(null),S=(R=!1)=>Bh(R).then(L=>{if(g.current){i(L),f(!1);let G=qE({value:I.current,pickedId:C.current,forms:L});G&&h.current(G)}return L},()=>(g.current&&f(!0),[]));Dh(()=>(g.current=!0,l&&S(),()=>{g.current=!1}),[l]),Dh(()=>l?Il(()=>{S(!0)}):void 0,[l]);let T=e?(s??[]).find(R=>R.slug===e)??null:null;T?C.current=T.id:e||(C.current=null);let b=!!e&&!T&&s!==null&&!c,w=$E({value:e,forms:s,loadFailed:c,emptyLabel:r}),O=async()=>{d(!0),x(!1);try{let R=await Zg(n,{mode:"create"}),L=await S(!0);if(!g.current)return;if(R.status==="timeout"){x(!0);return}if(R.status!=="saved")return;let{form:G}=R;G.slug!==I.current&&h.current(G.slug),L.some(Y=>Y.id===G.id)||S(!0)}finally{g.current&&d(!1)}},D=R=>{let L=VE(R);L.action==="create"?O():(x(!1),t(L.slug))};return l?kt("div",{className:"sf-formpicker",children:[Te(Al,{label:o,options:w,fallback:"",value:e??"",onChange:D,placeholder:"Search forms\u2026"}),p&&Te("p",{className:"sf-formsummary-warn",children:"That didn\u2019t come back \u2014 pick the form from the list, or try again."}),T?kt("div",{className:"sf-blogsource sf-formsummary",children:[kt("div",{children:[Te("div",{className:"sf-formsummary-caption",children:T.fields.length===1?"1 field":`${T.fields.length} fields`}),T.fields.length?Te("ol",{className:"sf-formsummary-fields",children:T.fields.map((R,L)=>Te("li",{children:R.label},R.key||`${R.label}-${L}`))}):Te("p",{className:"sf-blogsource-hint",children:"This form has no fields yet, so there is nothing for a visitor to fill in."})]}),kt("div",{children:[Te("div",{className:"sf-formsummary-caption",children:"Where the answers go"}),Te("ul",{className:"sf-formsummary-fields",children:YE(T).map(R=>Te("li",{children:R},R))})]}),!T.is_active&&Te("p",{className:"sf-formsummary-warn",children:"This form is switched off, so it won\u2019t appear on the published page. Turn it back on in Storefront \u2192 Forms."}),kt("div",{className:"sf-formsummary-actions",children:[Te("button",{type:"button",className:"sf-blogsource-btn",onClick:()=>Jg(n,T.id),children:"Edit form \u270E"}),Te("button",{type:"button",className:"sf-blogsource-btn",disabled:u,onClick:()=>{O()},children:"New form +"})]}),Te("p",{className:"sf-blogsource-hint",children:"The questions, the button text and the thank-you message all come from Storefront \u2192 Forms. Edit them there \u2014 this section updates to match."})]}):kt("div",{className:"sf-blogsource sf-formsummary",children:[c?kt("p",{className:"sf-blogsource-hint",children:["This website\u2019s forms couldn\u2019t be loaded, so there is nothing to choose from yet.",e?` This section still points at \u201C${e}\u201D, and that is unchanged.`:""]}):b&&kt("p",{className:"sf-formsummary-warn",children:["This section points at \u201C",e,"\u201D, and this website has no form with that name. Pick one from the list above, or leave it \u2014 nothing has been changed."]}),kt("div",{className:"sf-formsummary-actions",children:[c&&Te("button",{type:"button",className:"sf-blogsource-btn",disabled:u,onClick:()=>{S(!0)},children:"Try again"}),Te("button",{type:"button",className:"sf-blogsource-btn",disabled:u,onClick:()=>{O()},children:"New form +"})]}),!c&&Te("p",{className:"sf-blogsource-hint",children:"Pick a form to show here, or build a new one. Forms are made once in Storefront \u2192 Forms and can be shown on any number of pages."})]})]}):Te("div",{className:"sf-formpicker",children:Te("div",{className:"sf-blogsource sf-formsummary",children:kt("div",{children:[Te("div",{className:"sf-formsummary-caption",children:o}),kt("p",{className:"sf-blogsource-hint",children:["Forms aren\u2019t available in this editor, so there is nothing to choose here.",e?` This section still points at \u201C${e}\u201D, and that is unchanged.`:""]})]})})})}import{ColourPicker as jE}from"efficient-easel/pick";import{typedHex as XE}from"efficient-easel/pick";function Hh(e){let t=new Set,o=[];return Qr(e).themes.forEach((r,n)=>{let a=[[`Theme ${n+1} main color`,r.accent],[`Theme ${n+1} text color`,r.text],[`Theme ${n+1} background`,r.background]];for(let[l,s]of a){let i=s?XE(s):null;!i||t.has(i)||(t.add(i),o.push({name:l,value:i}))}}),o}import{jsx as Gh}from"react/jsx-runtime";function Qt({value:e,onChange:t,label:o,id:r,caption:n,ariaLabel:a}){return Gh(JE,{value:e,onChange:t,label:a??o,id:r,caption:n})}function JE({value:e,onChange:t,label:o,id:r,caption:n}){let{theme:a}=uo();return Gh(jE,{value:e,onChange:t,label:o,id:r,caption:n,theme:Hh(a)})}import{useEffect as ZE,useState as QE}from"react";import{MarkBar as eL,markSelection as tL,useCaretEdit as oL}from"efficient-easel/copy";import{RevertIcon as rL}from"efficient-easel/icons";import{Fragment as Dl,jsx as Ke,jsxs as Ml}from"react/jsx-runtime";function nL({style:e}){let t=o=>Ke("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o});switch(e){case"bold":return t(Ke("path",{d:"M7 5h6.5a3.5 3.5 0 0 1 0 7H7zm0 7h7.5a3.5 3.5 0 0 1 0 7H7z"}));case"italic":return t(Ml(Dl,{children:[Ke("line",{x1:"10",y1:"5",x2:"19",y2:"5"}),Ke("line",{x1:"5",y1:"19",x2:"14",y2:"19"}),Ke("line",{x1:"14",y1:"5",x2:"10",y2:"19"})]}));case"strike":return t(Ml(Dl,{children:[Ke("path",{d:"M16.5 6.5A4.2 4.2 0 0 0 12.7 4.7C10 4.7 8.4 6 8.4 7.9c0 1.6 1.2 2.5 3.4 3.1"}),Ke("path",{d:"M7.6 17.4A4.4 4.4 0 0 0 11.7 19.3c2.8 0 4.5-1.4 4.5-3.4 0-1-.4-1.8-1.2-2.4"}),Ke("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}));case"highlight":return t(Ml(Dl,{children:[Ke("path",{d:"M14.5 4.5l5 5-8 8H6.5v-5z"}),Ke("line",{x1:"4",y1:"21",x2:"20",y2:"21"})]}));case"quiet":return t(Ml(Dl,{children:[Ke("path",{d:"M12 4.5l5.5 7.5L12 19.5 6.5 12z"}),Ke("line",{x1:"9.4",y1:"12",x2:"14.6",y2:"12"})]}));default:return null}}var aL=["bold","italic","strike","highlight"],lL=Object.fromEntries(aL.map(e=>[e,Ke(nL,{style:e},e)])),Wh="Clear formatting";function sL(e,t,o){return tL(e,t,o,Ix)}function iL(e){let[t,o]=QE(null);return ZE(()=>{let r=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!r)return;let n=()=>{let a=e.current;if(!a||r.activeElement!==a)return;let l=a.selectionStart??a.value.length,s=a.selectionEnd??l;o(i=>i&&i.start===l&&i.end===s?i:{start:l,end:s})};return r.addEventListener("selectionchange",n),()=>r.removeEventListener("selectionchange",n)},[e]),[t,o]}function cL({target:e,value:t,onChange:o,disabled:r=!1,label:n="Formatting"}){let a=oL({target:e,onChange:o}),[l,s]=iL(e),i=d=>a(p=>{let x=sL(t,d,p);return s({start:x.selectionStart,end:x.selectionEnd}),x}),c=xx(),f={};if(l)for(let d of c)f[d.style]=hx(t,l.start,l.end,d.style);let u=jt(t);return Ke(eL,{tools:c,onApply:i,pressed:f,disabled:r,glyphs:lL,ariaLabel:n,actions:Ke("button",{type:"button",className:"sf-markup-btn sf-markup-clear",onMouseDown:d=>d.preventDefault(),onClick:()=>o(u),disabled:r||u===t,title:Wh,"aria-label":Wh,children:Ke(rL,{size:14})})})}var df=cL;import{jsx as dL}from"react/jsx-runtime";var fL="data-sf-no-control";function Uh(){return dL("span",{[fL]:"",hidden:!0})}var zh="__noControl";function GK(e){return e?.[zh]??null}function Hl(e,t){return{...e,[zh]:t}}import{jsx as qo}from"react/jsx-runtime";function uL(e){return e==="mobile"?"mobile":"desktop"}var pL={desktop:null,tablet:"Tablet uses the desktop settings.",mobile:"Showing the phone settings for this section."},mL="data-sf-device-hidden";function Kh(){return qo("span",{hidden:!0,[mL]:""})}function xL({tier:e,render:t,...o}){let r=yc();return uL(r)===e?qo(t,{...o}):qo(Kh,{})}var $h="__device";function uf(e){return e?.[$h]??null}function $K(e){return uf(e)?.inner??e}function wt(e,t){let o=t.render,r=n=>qo(xL,{tier:e,render:o,...n});return{...t,[$h]:{tier:e,inner:t},render:r}}function gL(){let e=pL[yc()];return e?qo("div",{className:"sf-device-scope",children:e}):qo(Kh,{})}function VK(){return Hl({type:"custom",render:()=>qo(gL,{})},"always")}function Hn(e){return`${e}Phone`}function Gl(e,t,o){return typeof e=="number"?e:typeof t=="number"?t:o}import{createContext as IL,useContext as hL}from"react";import{Fragment as yL,jsx as pf}from"react/jsx-runtime";var Vh=IL(!1);function QK({children:e}){return pf(Vh.Provider,{value:!0,children:e})}function bL(){return hL(Vh)}function qh({name:e,children:t}){return!bL()||!e||Sn(e)?pf(yL,{children:t}):pf(Uh,{})}var mf="Enter",SL="Escape",CL=/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)$/,PL=/(px|%)$/i;function kL(e,t,o,r){let n=e.trim().replace(/\s+/g,"").replace(PL,"");if(!CL.test(n))return null;let a=Number(n);if(!Number.isFinite(a))return null;let l=Math.min(o,Math.max(t,a));if(!(r>0))return l;let s=t+Math.round((l-t)/r)*r,i=Math.min(o,Math.max(t,s));return Number(i.toFixed(4))}function xf(e,t,o,r,n){return e===mf?{handled:!0,editing:!1,commit:kL(t,o,r,n)}:e===SL?{handled:!0,editing:!1,commit:null}:{handled:!1,editing:!0,commit:null}}import{useRef as Xh,useState as TL}from"react";import{ChevronIcon as wL}from"efficient-easel/icons";import{jsx as Gt,jsxs as Yh}from"react/jsx-runtime";function gf({styleKey:e,label:t,icon:o,value:r,sampleStyle:n,open:a,onToggle:l,saved:s=!1,children:i}){return Yh("div",{"data-sf-style-row":e,className:`sf-style-row${a?" is-open":""}`,children:[Yh("button",{type:"button",className:"sf-style-head","aria-expanded":a,onClick:l,children:[Gt("span",{className:"sf-style-caret","aria-hidden":"true",children:Gt(wL,{size:13})}),o?Gt("span",{className:"es-field-icon",children:o}):null,Gt("span",{className:"sf-style-name",children:t}),r!=null?Gt("span",{className:"sf-style-sample",style:n,title:typeof r=="string"?r:void 0,children:r}):null,Gt("span",{className:`sf-style-slot${s?" is-saved":""}`,children:Gt(vL,{})})]}),a&&Gt("div",{className:"sf-style-body",children:i})]})}function vL(){return Gt("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:Gt("polyline",{points:"20 6 9 17 4 12"})})}import{Fragment as RL,jsx as Wt,jsxs as If}from"react/jsx-runtime";function hf({label:e,value:t,onChange:o,image:r}){let[n,a]=TL(!1),l=Xh(null),s=Xh(!1),{x:i,y:c}=Xc(t),f=(g,I)=>{let h=l.current?.getBoundingClientRect();if(!h)return;let C=xh(h,g,I);o(Br(C.x,C.y))},u=g=>{let I=mh(t,g.key,g.shiftKey);I!==null&&(g.preventDefault(),o(I))},d=g=>{g.currentTarget.setPointerCapture?.(g.pointerId),s.current=!0,f(g.clientX,g.clientY)},p=g=>{s.current&&f(g.clientX,g.clientY)},x=()=>{s.current=!1};return Wt(gf,{styleKey:"imageFocal",label:e,value:t,sampleStyle:{fontSize:11,fontVariantNumeric:"tabular-nums"},open:n,onToggle:()=>a(g=>!g),children:n?Wt("div",{className:"sf-focus","data-sf-focusing":"",children:r?If(RL,{children:[Wt("button",{type:"button",className:"sf-focus-canvas","aria-label":`${e}: ${t}. Use the arrow keys to move the point.`,onKeyDown:u,onPointerDown:d,onPointerMove:p,onPointerUp:x,onPointerCancel:x,onLostPointerCapture:x,children:If("span",{className:"sf-focus-pane",ref:l,children:[Wt("img",{className:"sf-focus-img",src:r,alt:"",draggable:!1}),Wt("span",{className:"sf-focus-cross sf-focus-cross--h",style:{top:`${c}%`}}),Wt("span",{className:"sf-focus-cross sf-focus-cross--v",style:{left:`${i}%`}}),Wt("span",{className:"sf-focus-marker",style:{left:`${i}%`,top:`${c}%`}})]})}),If("div",{className:"sf-focus-bar",children:[Wt("span",{className:"sf-focus-hint",children:"Press the picture, or nudge the point with the arrow keys."}),Wt("button",{type:"button",className:"sf-image-btn",onClick:()=>a(!1),children:"Done"})]})]}):Wt("p",{className:"sf-field-hint",children:"Choose a background image first \u2014 there\u2019s nothing to focus yet."})}):null})}import{SettingsField as Zh}from"efficient-easel/panel";import{ImageIcon as Qh,PlayIcon as eb}from"efficient-easel/icons";import{ImageBox as FL}from"efficient-easel/pick";import{useContext as EL,useState as tb}from"react";import{FileIntakeAlert as LL,useFileIntake as _L}from"efficient-shell/file-intake";var jh={"PATCH /api/activity/note-media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/activity/notes/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/auth/entities/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_on_dark:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_square:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/auth/me/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PATCH /api/auth/users/{id}/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PATCH /api/bug-reports/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"PATCH /api/employee-documents/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issue-files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/carton-groups/{group_id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/pallets/{pallet_id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/update_status/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/platform/brand-catalog/brands/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/products/brands/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/products/design-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/products/dfm-log-files/{id}/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"PATCH /api/products/moulds/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/products/project-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/products/proposals/{id}/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"PATCH /api/products/weight-logs/{id}/":{image:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"},photo:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/purchase-invoices/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/purchase-orders/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/qc-reports/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/recruitment/candidates/{id}/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"PATCH /api/reimbursements/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/rnd/images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/sales-claims/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/storefront/header-settings/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/storefront/sites/{id}/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/activity/note-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/activity/notes/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/auth/entities/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_on_dark:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_square:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/auth/users/{id}/reset-password/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"POST /api/bank-statements/{id}/import_csv/":{file:{accept:".csv,text/csv,text/plain,application/vnd.ms-excel",hint:"CSV",max_bytes:5242880,max_files:1,policy:"csv_import"}},"POST /api/bank-statements/{id}/preview_csv/":{file:{accept:".csv,text/csv,text/plain,application/vnd.ms-excel",hint:"CSV",max_bytes:5242880,max_files:1,policy:"csv_import"}},"POST /api/bug-reports/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"POST /api/bug-reports/{id}/bookmark/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"POST /api/bug-reports/{id}/thread/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"POST /api/careers/assessments/{token}/snapshots/":{image:{accept:"image/*",max_bytes:409600,max_files:1,policy:"proctoring_snapshot"}},"POST /api/careers/jobs/{slug}/apply/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/chat/conversations/{id}/thread/":{files:{accept:"*",max_bytes:26214400,max_files:10,policy:"chat_files"}},"POST /api/chat/public/conversations/{id}/thread/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"chat_image",reencoded_image:!0}},"POST /api/customer-portal/conversations/{id}/thread/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"chat_image",reencoded_image:!0}},"POST /api/customer-portal/warranty-claim-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/dealer-portal/wheel-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/employee-documents/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issue-files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/bulk_update_status/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/actual_packing/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/carton-groups/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/generate-label/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/pallets/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/refresh-tracking/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/regenerate-label/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/regenerate_invoice/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/update_loaded/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/platform/brand-catalog/brands/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/assign-owner/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/publish/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/resync/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/unpublish/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/feedback/reports/{id}/thread/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"}},"POST /api/products/brands/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/products/brands/{id}/generate-box-pns/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/products/design-images/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/products/dfm-log-files/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"POST /api/products/moulds/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/products/project-images/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/products/proposals/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"POST /api/products/proposals/{id}/approve-project/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"POST /api/products/weight-logs/":{image:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"},photo:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/purchase-invoices/capture/":{file:{accept:"application/pdf,image/jpeg,image/png",hint:"PDF \xB7 JPG \xB7 PNG",max_bytes:15728640,max_files:1,policy:"bill_capture"}},"POST /api/purchase-invoices/files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/purchase-orders/files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/qc-reports/media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/recruitment/candidates/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/analyze-cv/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/hire/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/move-stage/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/reinstate/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/reject/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/withdraw/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/reimbursements/files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/rnd/images/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/rnd/{id}/upload_image/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/sales-claims/media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/sales/contacts/import-csv/":{file:{accept:".csv,text/csv,text/plain,application/vnd.ms-excel",hint:"CSV",max_bytes:5242880,max_files:1,policy:"csv_import"}},"POST /api/sales/contacts/{id}/avatar/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"POST /api/shop-portal/return-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/storefront/media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 SVG \xB7 WEBP \xB7 MP4",max_bytes:268435456,max_files:1,policy:"storefront_media"}},"POST /api/storefront/media/ingest/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 SVG \xB7 WEBP \xB7 MP4",max_bytes:268435456,max_files:1,policy:"storefront_media"}},"POST /api/storefront/sites/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/storefront/sites/{id}/address/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/storefront/sites/{id}/duplicate/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/supplier-portal/dfm-log-files/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"POST /api/utility/mail/send/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"mail_attachments"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"mail_attachments"}},"PUT /api/activity/note-media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/activity/notes/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/auth/entities/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_on_dark:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_square:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PUT /api/auth/me/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PUT /api/auth/users/{id}/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PUT /api/bug-reports/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"PUT /api/employee-documents/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/goods-issue-files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/goods-issues/{id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/products/brands/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PUT /api/products/design-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/products/dfm-log-files/{id}/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"PUT /api/products/moulds/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/products/project-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/products/proposals/{id}/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"PUT /api/products/weight-logs/{id}/":{image:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"},photo:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/purchase-invoices/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/purchase-orders/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/qc-reports/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/recruitment/candidates/{id}/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"PUT /api/reimbursements/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/rnd/images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/sales-claims/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/storefront/header-settings/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PUT /api/storefront/sites/{id}/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"PUT /api/storefront/sites/{id}/countries/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"PUT /api/storefront/sites/{id}/currencies/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"PUT /api/storefront/sites/{id}/part-prices/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}}};function Jh(e,t){let o=jh[e][t];return{maxSizeBytes:o.max_bytes,maxFiles:o.max_files,accept:o.accept==="*"||o.accept==="*/*"?void 0:o.accept,acceptHint:o.hint}}import{jsx as vt,jsxs as ob}from"react/jsx-runtime";var AL=Jh("POST /api/storefront/media/","file");function bf({value:e,onChange:t,label:o,accept:r,placeholder:n}){let a=fo(),[l,s]=tb(!1),[i,c]=tb(null),f=r.startsWith("video"),u=EL(Po),d=_L({accept:r,maxSizeBytes:AL.maxSizeBytes,acceptHint:f?"videos only":"images only",multiple:!1,disabled:l,onAccept:([x])=>{c(null),s(!0),Us(a,{accept:r,title:o,file:x}).then(g=>{g&&t(g.url)}).catch(()=>c("Couldn\u2019t open the media picker \u2014 please try again.")).finally(()=>s(!1))}}),p=()=>(d.clearRejections(),c(null),Us(a,{accept:r,title:o}).then(x=>x?.url??null));return u&&!u.capabilities.mediaEditing?vt(Zh,{label:o,icon:f?vt(eb,{}):vt(Qh,{}),children:ob("div",{className:"sf-image-slot-inert",children:["Templates don\u2019t store ",f?"videos":"images"," \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."]})}):ob("div",{children:[vt(Zh,{label:o,icon:f?vt(eb,{}):vt(Qh,{}),children:vt("div",{className:`sf-image-drop${d.dragOver?" is-dragover":""}`,...d.zoneProps,children:vt(FL,{value:e,onChange:t,label:o,kind:f?"video":"image",placeholder:n,openLibrary:l?void 0:p})})}),l&&vt("div",{className:"sf-image-status",role:"status",children:"Opening the picker\u2026"}),i&&vt("div",{className:"sf-image-status sf-image-status--error",role:"alert",children:i}),vt(LL,{rejections:d.rejections,className:"sf-image-status sf-image-status--error"})]})}import{useEffect as OL,useId as NL,useRef as rb,useState as BL}from"react";import{jsx as Yo,jsxs as yf}from"react/jsx-runtime";function Sf({label:e,options:t,value:o,onChange:r,emptyLabel:n="None"}){let[a,l]=BL(!1),s=rb(null),i=rb(null),c=NL(),f=Array.isArray(o)?o:[];OL(()=>{if(!a)return;let p=x=>{s.current&&!s.current.contains(x.target)&&l(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[a]);let u=(p,x)=>{let g=t.map(I=>I.value).filter(I=>I===p?x:f.includes(I));r(g)},d=t.filter(p=>f.includes(p.value)).map(p=>p.label).join(", ");return yf("div",{className:"sf-field sf-multi",ref:s,children:[Yo("div",{className:"sf-field-label",id:`${c}-label`,children:e}),yf("button",{ref:i,type:"button",className:"sf-multi-btn","aria-expanded":a,"aria-controls":c,"aria-labelledby":`${c}-label ${c}-value`,onClick:()=>l(p=>!p),onKeyDown:p=>{p.key==="Escape"&&a&&(p.preventDefault(),l(!1))},children:[Yo("span",{id:`${c}-value`,className:`sf-multi-value${d?"":" is-empty"}`,children:d||n}),Yo("span",{className:"sf-multi-caret","aria-hidden":"true",children:"\u25BE"})]}),a&&Yo("div",{className:"sf-multi-menu",id:c,role:"group","aria-labelledby":`${c}-label`,onKeyDown:p=>{p.key==="Escape"&&(p.preventDefault(),l(!1),i.current?.focus())},children:t.map(p=>yf("label",{className:"sf-multi-option",children:[Yo("input",{type:"checkbox",checked:f.includes(p.value),onChange:x=>u(p.value,x.target.checked)}),Yo("span",{children:p.label}),p.note?Yo("span",{className:"sf-note","aria-hidden":"true",children:p.note}):null]},p.value))})]})}import{useCallback as r_,useContext as n_,useEffect as a_,useId as pb,useRef as db,useState as ub}from"react";import{ThemeIcon as l_}from"efficient-easel/icons";import{SettingsField as s_}from"efficient-easel/panel";import{SettingsField as kf,SettingsGroupSub as zL}from"efficient-easel/panel";import{SettingsField as DL}from"efficient-easel/panel";import{AccentIcon as ML}from"efficient-easel/icons";import{jsx as Xo,jsxs as nb}from"react/jsx-runtime";function Cf(e){return no(e).background}function HL(e){let t=ao(e.accent,Cf(e));return t===null?null:{ratio:t,grade:nr(t)}}function GL(e){let t=Cf(e),o=ao(e.accent,t);return o===null?[]:Dd(e.accent).filter(r=>{let n=ao(r,t);return n!==null&&n>o&&nr(n)==="good"})}var WL={good:"Easy to read","large-only":rr["large-only"],hard:rr.hard};function Pf({value:e,onChange:t}){let o=HL(e),r=o?.grade,n=o&&o.grade!=="good"?GL(e):[];return Xo(DL,{label:"Main color",icon:Xo(ML,{}),hint:o?WL[o.grade]:void 0,action:Xo(Qt,{value:e.accent,onChange:a=>t({...e,accent:a}),label:"Main color"}),children:n.length>0?Xo("div",{className:"w-full min-w-0",children:nb("div",{className:"sf-readability",children:[Xo("p",{className:"sf-readability-advice",children:UL(r,!0)}),Xo("div",{className:"sf-readability-suggestions",children:n.map(a=>{let l=ao(a,Cf(e));return nb("button",{type:"button",className:"sf-readability-suggestion",onClick:()=>t({...e,accent:a}),title:`Use ${a.toUpperCase()}`,children:[Xo("span",{className:"sf-readability-chip",style:{background:a},"aria-hidden":!0}),l?`${l.toFixed(1)}:1`:a.toUpperCase()]},a)})})]})}):null})}function UL(e,t){return e?e==="good"?"This color reads clearly on your pages.":t?"This color is hard to read on this theme's page. The buttons below are the same hue, darkened.":"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.":"Pick a color to see how it reads."}import{ButtonIcon as KL,GroundIcon as $L,LayoutIcon as VL,SquareIcon as qL,TextSmallIcon as YL,TypeIcon as ab}from"efficient-easel/icons";import{Fragment as QL,jsx as U,jsxs as vo}from"react/jsx-runtime";var Gn=e=>`Theme ${e+1}`;function lb({colors:e}){let t=no(e),o=ds(e)??t.accent;return vo("span",{className:"sf-theme-page",style:{background:t.background,color:t.text},"aria-hidden":!0,children:[U("span",{className:"sf-theme-eyebrow",style:{color:t.muted},children:"label"}),vo("span",{className:"sf-theme-headline",children:["Heading ",U("span",{style:{color:t.accent},children:"accent"})]}),U("span",{className:"sf-theme-body",children:"body text"}),vo("span",{className:"sf-theme-row",children:[U("span",{className:"sf-theme-btn",style:{background:o,color:us(e,t.accent)},children:"button"}),U("span",{className:"sf-theme-mini",style:{background:t.surface,borderColor:t.line},children:"card"})]})]})}var wf={"Text color":U(ab,{}),"Label color":U(YL,{}),Background:U($L,{}),"Panels & cards":U(VL,{}),Borders:U(qL,{}),"Button color":U(KL,{}),"Button text color":U(ab,{})};function XL({label:e,colorKey:t,value:o,onChange:r,idPrefix:n="sf-theme-ink"}){let a=`${n}-${t}`;return U(kf,{label:e,icon:wf[e],htmlFor:a,action:U(Qt,{id:a,label:e,value:o,onChange:l=>r(t,l)})})}function jL({value:e,accent:t,onChange:o,idPrefix:r="sf-theme-ink"}){let n=`${r}-button`,a=/^#[0-9a-fA-F]{6}$/.test(e??""),l=a?e:t;return U(kf,{label:"Button color",icon:wf["Button color"],htmlFor:n,action:U(Qt,{id:n,label:"Button color",value:l,caption:a?l:"Main",onChange:o})})}function JL({colors:e,accent:t,onChange:o,idPrefix:r="sf-theme-ink"}){let n=`${r}-button-ink`,a=Md(e),l=us(e,t),s=ds(e)??t,i=nr(ao(l,s)??0);return U(kf,{label:"Button text color",icon:wf["Button text color"],hint:a&&i!=="good"?`${rr[i]} on the button`:void 0,htmlFor:n,action:U(Qt,{id:n,label:"Button text color",value:l,caption:a?l:"Auto",onChange:o})})}var ZL=[{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 vf({colors:e,onChange:t,idPrefix:o}){let r=no(e);return U(QL,{children:ZL.map(n=>"colour"in n?U(Pf,{value:e,onChange:t},"colour"):"group"in n?U(zL,{title:n.group},n.group):"button"in n?U(jL,{value:e.button,accent:r.accent,onChange:a=>t({...e,button:a}),idPrefix:o},"button"):"buttonInk"in n?U(JL,{colors:e,accent:r.accent,onChange:a=>t({...e,buttonInk:a}),idPrefix:o},"buttonInk"):U(XL,{label:n.label,colorKey:n.key,value:r[n.key],onChange:(a,l)=>t({...e,[a]:l}),idPrefix:o},n.key))})}function sb({index:e,colors:t,selected:o,role:r="radio",open:n,editable:a=!0,onPick:l,onEdit:s,onChangeColors:i}){let c=no(t),f=Gn(e),u=e<fs.length&&!t.brandInk?fs[e]:null,d=nr(ao(c.text,c.background)??0),p=u?JSON.stringify(t)!==JSON.stringify(u):!1,x=n!==void 0;return vo("div",{className:`sf-theme-card${o?" is-selected":""}`,children:[U("button",{type:"button",role:r,"aria-checked":r==="radio"?o:void 0,"aria-selected":r==="option"?o:void 0,"aria-label":f,className:"sf-theme-pick",onClick:l,children:U(lb,{colors:t})}),vo("div",{className:"sf-theme-foot",children:[U("span",{className:"sf-theme-name",children:f}),d!=="good"&&U("span",{className:"sf-theme-warn",children:rr[d]}),a&&s&&U("button",{type:"button",className:`sf-theme-edit${n?" is-open":""}`,"aria-expanded":x?n:void 0,"aria-controls":x?`sf-theme-colours-${e}`:void 0,"aria-label":`${n?"Done":"Edit"} ${f}`,onClick:s,children:n?"Done":"Edit"})]}),n&&vo("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[U(vf,{colors:t,onChange:g=>i?.(g)}),u&&U("button",{type:"button",className:"sf-theme-reset",disabled:!p,onClick:()=>i?.({...u}),children:p?`Reset ${f} to the preset`:"Not changed"})]})]})}function ib({colors:e,name:t,nameId:o,open:r,menuId:n,labelId:a,buttonRef:l,onClick:s,onKeyDown:i,onEdit:c}){return vo("div",{className:"sf-secttheme-btn",children:[U("button",{ref:l,type:"button",className:"sf-theme-pick","aria-expanded":r,"aria-controls":n,"aria-labelledby":`${a} ${o}`,onClick:s,onKeyDown:i,children:e?U(lb,{colors:e}):U("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),vo("div",{className:"sf-theme-foot",children:[U("span",{id:o,className:"sf-theme-name",children:t}),c&&U("button",{type:"button",className:"sf-theme-edit","aria-label":`Edit ${t}`,onClick:c,children:"Edit"}),U("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:s,children:U("span",{className:"sf-multi-caret",children:"\u25BE"})})]})]})}import{useCallback as Tf,useEffect as e_,useRef as Wl}from"react";function cb(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function t_(e,t=oe.updateThemeSettings){let{themeFromDocument:o,token:r,siteId:n,patch:a}=e,l=cb({themeFromDocument:o,token:r});if(l)return l;if(Object.keys(a).length===0)return{status:"skipped",reason:"empty"};try{return await t(a,r,n??void 0),{status:"saved"}}catch(s){return{status:"failed",error:s}}}function fb({themeFromDocument:e,tokenRef:t,siteId:o,onResult:r}){let n=Wl(null),a=Wl({}),l=Wl(r);l.current=r;let s=Wl(null),i=Tf(u=>{if(u.status==="skipped"){let d=`skipped:${u.reason}`;if(s.current===d)return;s.current=d}else s.current=null;l.current?.(u)},[]),c=Tf(async()=>{n.current&&(clearTimeout(n.current),n.current=null);let u=a.current;a.current={};let d=await t_({themeFromDocument:e,token:t?.current,siteId:o,patch:u});return i(d),d},[e,t,o,i]),f=Tf((u,d=!1)=>{let p=cb({themeFromDocument:e,token:t?.current});if(p){i(p);return}a.current={...a.current,...u},n.current&&clearTimeout(n.current),d?c():n.current=setTimeout(()=>{c()},500)},[e,t,c,i]);return e_(()=>()=>{c()},[c]),{persist:f,flush:c}}import{Fragment as p_,jsx as Re,jsxs as jo}from"react/jsx-runtime";var i_="Follow the page",Q8="Follow the slideshow",c_=e=>`Editing ${e} changes it everywhere.`;function f_({colors:e}){if(!e)return Re("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let t=no(e);return jo("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[Re("i",{style:{background:t.background}}),Re("i",{className:"sf-secttheme-chip-accent",style:{background:t.accent}})]})}function d_({themes:e,value:t,onPick:o,onEdit:r,menuId:n,followLabel:a}){return jo("div",{className:"sf-multi-menu sf-secttheme-menu",id:n,role:"listbox",children:[a!==void 0&&jo(p_,{children:[jo("button",{type:"button",role:"option","aria-selected":t===null,className:`sf-secttheme-item${t===null?" is-active":""}`,onClick:()=>o(-1),children:[Re(f_,{}),Re("span",{className:"sf-secttheme-name",children:a})]}),Re("div",{className:"sf-secttheme-sep",role:"presentation"})]}),t!==null&&e[t]&&Re("p",{className:"sf-secttheme-oncard",role:"presentation",children:`${Gn(t)} is on this section`}),e.map((l,s)=>s===t?null:Re(sb,{role:"option",index:s,colors:l,selected:!1,onPick:()=>o(s),onEdit:()=>r(s)},s))]})}function u_({index:e,colors:t,onChange:o,onDone:r}){let n=Gn(e),a=pb();return jo("div",{className:"sf-secttheme-sheet",children:[jo("div",{className:"sf-secttheme-sheet-head",children:[Re("span",{children:n}),Re("button",{type:"button",className:"sf-secttheme-done",onClick:r,children:"Done"})]}),Re("div",{className:"sf-secttheme-rows",children:Re(vf,{colors:t,onChange:o,idPrefix:a})}),Re("p",{className:"sf-secttheme-warn",children:c_(n)})]})}function Rf({value:e,onChange:t,followLabel:o}){let{theme:r,setTheme:n}=uo(),a=Qr(r),l=n_(Po),s=l?.tokenRef,i=l?.siteId??null,c=!l?.capabilities?.hasSiteTheme,{persist:f,flush:u}=fb({themeFromDocument:c,tokenRef:s,siteId:i}),d=Qr(a),p=d.themes,x=zd(e),g=x!==null?p[x]:void 0,I=g??(p.length?Bd(d):void 0),[h,C]=ub(!1),[S,P]=ub(null),T=db(null),b=db(null),w=pb(),O=r_(()=>{C(!1),P(null)},[]);a_(()=>{if(!h&&S===null)return;let L=G=>{T.current&&!T.current.contains(G.target)&&(u(),O())};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[h,S,O,u]);let D=L=>{t(L),O()},R=L=>{if(S===null)return;let G=p.map((M,v)=>v===S?L:M),Y={...d,themes:G};n(Y),f({selected_preset:Y.selected,theme_presets:Y.themes})};return jo("div",{className:"sf-secttheme",ref:T,children:[Re(s_,{label:"Theme",icon:Re(l_,{}),labelId:`${w}-label`,children:Re(ib,{colors:I,onEdit:x!==null?()=>{P(x),C(!1)}:void 0,name:g?Gn(x):o??i_,nameId:`${w}-value`,labelId:`${w}-label`,open:h,menuId:w,buttonRef:b,onClick:()=>{P(null),C(L=>!L)},onKeyDown:L=>{L.key==="Escape"&&(h||S!==null)&&(L.preventDefault(),O())}})}),h&&S===null&&Re("div",{onKeyDown:L=>{L.key==="Escape"&&(L.preventDefault(),O(),b.current?.focus())},children:Re(d_,{themes:p,value:x,onPick:D,onEdit:L=>{P(L),C(!1)},menuId:w,followLabel:o})}),S!==null&&p[S]&&Re(u_,{index:S,colors:p[S],onChange:R,onDone:()=>{u(),O(),b.current?.focus()}})]})}import{SettingsField as y_}from"efficient-easel/panel";import{LinkIcon as S_}from"efficient-easel/icons";import{useEffect as Sb,useRef as C_,useState as zl}from"react";var Ff=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"custom",label:"Custom URL"}];function Ef(e){return e.offersCommerce&&e.offersService?Ff:Ff.filter(t=>!t.needs||(t.needs==="commerce"?e.offersCommerce:e.offersService))}function Jo(e){return e===dt?"/":`/${e}`}function Lf(e){return`/journal/${e}`}function _f(e){return`/wheels/${e}`}function Ul(e,t){return`${Jo(e)}#${t}`}function mb(e){return Sa(e)}function m_(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function Af(...e){let t=new Set,o=[];for(let r of e)for(let n of r?.content??[]){let a=m_(n?.props?.anchor);if(!a)continue;let l=mb(a);!l||t.has(l)||(t.add(l),o.push({slug:l,name:a}))}return o}var xb="/wheels";var s$=[bo,...Object.entries(yt).filter(([e])=>e!=="tyreSizes").map(([,e])=>e)];function u$(){return xb}function x_(e){return(e.layout?.content??[]).some(o=>o?.type===zo)}function gb(e){return e.filter(x_).map(t=>Jo(t.slug))}function Of(e){let t=e.indexOf("#"),o=t===-1?"":e.slice(t),r=t===-1?e:e.slice(0,t),n=r.indexOf("?");return{path:n===-1?r:r.slice(0,n),params:new URLSearchParams(n===-1?"":r.slice(n+1)),hash:o}}function Ib(e){return Of(e).path}function hb(e){return Of(e).params.get(bo)||null}function bb(e,t){let{path:o,params:r,hash:n}=Of(e);t?r.set(bo,t):r.delete(bo);let a=r.toString();return`${o}${a?`?${a}`:""}${n}`}function yb(e,t){if(!e)return"page";if(e.startsWith("/journal/"))return"blog";if(e.startsWith("/wheels/"))return"product";if(e.includes("#")){let o=e.slice(0,e.indexOf("#"));if(o===""||o==="/"||t.includes(o))return"anchor"}return e==="/"||t.includes(e)?"page":"custom"}import{SettingsField as g_}from"efficient-easel/panel";import{CategoryIcon as I_}from"efficient-easel/icons";import{Fragment as h_,jsx as Wr,jsxs as b_}from"react/jsx-runtime";function Nf({value:e,onChange:t}){let o=hb(e),r=o&&!ho.some(n=>n===o)?o:null;return Wr(g_,{label:"Product type",icon:Wr(I_,{}),hint:Wr(h_,{children:"The same page can sit in the menu more than once, each entry opening it on a different type."}),children:b_("select",{value:o??"",onChange:n=>t(bb(e,n.target.value||null)),"aria-label":"Product type this link opens the listing on",children:[Wr("option",{value:"",children:Am}),ho.map(n=>Wr("option",{value:n,children:Do[n]},n)),r&&Wr("option",{value:r,children:`${r} (unavailable)`})]})})}import{jsx as gt,jsxs as Kl}from"react/jsx-runtime";function Cb(e){let t=new Map;return(o="")=>{let r=dr(),n=t.get(o);if(!n||n.token===null&&r!==null){let a=r?e(r,o).catch(()=>[]):Promise.resolve([]);return t.set(o,{promise:a,token:r}),a}return n.promise}}var P_=Cb((e,t)=>oe.listPages(e,t||void 0)),k_=Cb((e,t)=>oe.listBlogPosts(e,{visibleOnly:!0,siteId:t||void 0}));function Bf(e,t){return e&&!t.some(o=>o.value===e)?[{value:e,label:`${e} (unavailable)`},...t]:t}function Df({value:e,onChange:t,label:o="Link"}){let r=typeof e=="string"?e:"",{siteId:n,capabilities:a}=tI(),{offersCommerce:l,offersService:s}=a,i=Ef({offersCommerce:l,offersService:s}),[c,f]=zl([]),[u,d]=zl([]),[p,x]=zl([]),[g,I]=zl(null),h=C_(!0);Sb(()=>(h.current=!0,()=>{h.current=!1}),[]),Sb(()=>{let v=!0;return P_(n??void 0).then(j=>v&&h.current&&f(j)),s&&k_(n??void 0).then(j=>v&&h.current&&d(j)),l&&No().then(j=>v&&h.current&&x(j)),()=>{v=!1}},[n,l,s]);let C=c.map(v=>Jo(v.slug)),S=g??yb(r,C),P=i.some(v=>v.value===S)?S:"custom",T=l&&P==="page"&&gb(c).includes(Ib(r)),b=v=>{I(v),v!=="custom"&&t("")},w=c.filter(v=>!on(v.slug)),O=Bf(r,w.map(v=>({value:Jo(v.slug),label:rn(v)}))),D=Bf(r,u.map(v=>({value:Lf(v.slug),label:v.title||v.slug}))),R=Bf(r,p.map(v=>({value:_f(v.slug),label:v.name}))),L=(v,j)=>Kl("select",{value:r,onChange:F=>t(F.target.value),children:[gt("option",{value:"",children:j}),v.map((F,E)=>gt("option",{value:F.value,children:F.label},`${F.value}:${E}`))]}),G=w.map(v=>({page:v,anchors:Af(v.layout)})).filter(v=>v.anchors.length>0),Y=G.flatMap(v=>v.anchors.map(j=>Ul(v.page.slug,j.slug))),M=Kl("select",{value:r,onChange:v=>t(v.target.value),children:[gt("option",{value:"",children:G.length?"Select a section\u2026":"No section anchors yet"}),r&&!Y.includes(r)&>("option",{value:r,children:`${r} (unavailable)`}),G.map(v=>gt("optgroup",{label:rn(v.page),children:v.anchors.map(j=>{let F=Ul(v.page.slug,j.slug);return gt("option",{value:F,children:j.name},F)})},v.page.id))]});return Kl("div",{children:[gt(y_,{label:o,icon:gt(S_,{}),children:Kl("div",{className:"sf-linkstack",children:[gt("select",{"aria-label":"Link type",value:P,onChange:v=>b(v.target.value),children:i.map(v=>gt("option",{value:v.value,children:v.label},v.value))}),P==="page"&&L(O,"Select a page\u2026"),P==="anchor"&&M,P==="blog"&&L(D,"Select a blog post\u2026"),P==="product"&&L(R,"Select a product\u2026"),P==="custom"&>("input",{type:"text",value:r,placeholder:"Link (e.g. /wheels or https://\u2026)",onChange:v=>t(v.target.value)})]})}),T&>(Nf,{value:r,onChange:t})]})}var Tt={min:10,max:200,step:10};function Pb(e,t){let o=typeof e=="number"?e:void 0,r=typeof t=="number"?t:void 0;if(!(o===void 0&&r===void 0))return{paddingTop:o,paddingBottom:r}}var w_="sf-pad-top-phone",v_="sf-pad-bottom-phone",T_="--sf-pad-t-phone",R_="--sf-pad-b-phone",F_="sf-pad-left-phone",E_="sf-pad-right-phone",L_="--sf-pad-l-phone",__="--sf-pad-r-phone";function O$(e,t,o,r,n,a,l,s){let i=Pb(e,t)??{},c={},f=["sf-section-pad"];typeof o=="number"&&(f.push(w_),c[T_]=`${o}px`),typeof r=="number"&&(f.push(v_),c[R_]=`${r}px`);let u={};return typeof n=="number"&&(u.paddingLeft=n),typeof a=="number"&&(u.paddingRight=a),typeof l=="number"&&(f.push(F_),c[L_]=`${l}px`),typeof s=="number"&&(f.push(E_),c[__]=`${s}px`),f.length===1&&Pb(e,t)===void 0&&!Object.keys(u).length?null:{className:f.join(" "),style:{...i,...u,...c}}}var kb=e=>typeof e=="number"?e:void 0;function wb(e,t,o){let r=kb(e)??o,n=kb(t);return r===void 0?n:n===void 0?r:r+n}function N$(e,t={}){return{top:wb(e.padTop,e.sectionPaddingTop,t.top),bottom:wb(e.padBottom,e.sectionPaddingBottom,t.bottom)}}var A_=["auto","fixed","screen"],O_=["px","%"];var N_="var(--sf-header-h, 88px)",Mf={min:40,max:2e3,step:10,fallback:600},Hf={min:10,max:200,step:5,fallback:100},B_="sf-section-minh",vb={base:"--sf-section-minh",small:"--sf-section-minh-s"},Rb=e=>typeof e=="string"&&A_.includes(e),D_=e=>typeof e=="string"&&O_.includes(e);function $l(e){let t=Rb(e.sectionHeightMode)?e.sectionHeightMode:"auto",o=t==="screen"?"%":D_(e.sectionHeightUnit)?e.sectionHeightUnit:"px",r=t==="screen"?Hf.fallback:Mf.fallback,n=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:r;return{mode:t,value:n,unit:o}}function Fb(e){let{mode:t,value:o,unit:r}=$l(e);if(t==="auto")return;if(t==="fixed"&&r==="px")return[`${o}px`,null];let n=o/100,a=l=>t==="screen"?`(100${l} - ${N_})`:`100${l}`;return[`calc(${a("vh")} * ${n})`,`calc(${a("svh")} * ${n})`]}function M_(e){let t=Fb(e);if(!t)return;let[o,r]=t;return{display:"grid",[vb.base]:o,...r?{[vb.small]:r}:{}}}var D$=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),Ur="Height",H_="sf-section-minh-phone",Tb={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function Gf(e){return Rb(e.sectionHeightModePhone)}function M$(e){return $l({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function G_(e){let t=M_(e),o=Gf(e)?Fb({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone}):void 0;if(!t&&!o)return null;let r=[B_],n={...t??{}};return o&&(r.push(H_),n[Tb.base]=o[0],o[1]&&(n[Tb.small]=o[1])),{className:r.join(" "),style:n}}function H$(e){return G_(e)!==null}var W$=["desktop","tablet","mobile"],zr={desktop:"Desktop",tablet:"Tablet",mobile:"Mobile"},W_=720,U_=1100;function U$(e){return e>=U_?"desktop":e>=W_?"tablet":"mobile"}var z_=["column","row","tabs"],Eb="Direction",K_={column:"Stacked",row:"One row",tabs:"Tabs"},Lb={Flex:z_,HeroGroup:["column","row"]},$_={Flex:"row",HeroGroup:"column"},V_={column:"flex-col",row:"flex-row",tabs:"flex-col"};function Vl(e,t){return Lb[e].includes(t)?t:$_[e]}function K$(e,t){return V_[Vl(e,t)]}function _b(e){return Lb[e].map(t=>({label:K_[t],value:t}))}var Wf=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],Nb=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Stretch",value:"stretch"}],Bb="Wrap",Uf=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],Ab={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},Ob={start:"items-start",center:"items-center",stretch:"items-stretch"};function V$(e,t){let o=typeof e=="string"&&e in Ab?Ab[e]:"",r=typeof t=="string"&&t in Ob?Ob[t]:"";return[o,r].filter(Boolean).join(" ")}function q$(e){return e===!0||e==="wrap"?"flex-wrap":""}var zf="Block widths",ql=[{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]}],Wn="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",q_={equal:Wn,bigLeft:`${Wn} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${Wn} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${Wn} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${Wn} [&>*:last-child]:min-[800px]:grow-[3]`};function Y$(e){return typeof e=="string"?q_[e]??"":""}var Db="Columns on phone",Kf=1,Mb=3,Y_={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 X$(e){let t=Number(e);return Y_[t]??"max-[800px]:flex-col"}var Hb="Block spacing",$f=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],X_="sf-box-gap-only";function j$(e){return e==="gap"?X_:""}var Gb=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],Wb={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Yl="var(--section-bg)",Xl="inherit";function Z$(e,t){return e===Xl?Yl:e===void 0?t:e}function Ub(e,t){return e===Xl?!0:e===void 0&&t===Yl}var zb="inherit",jl="fixed",Kb=e=>typeof e!="number"&&e!==jl,j_="var(--sf-heading-max, 9999px)";function eV(e,t,o,r){if(typeof e=="number")return`${e}px`;if(e===jl)return t;let n=r?`var(--size-${r}, ${t})`:t;return o==="heading"?`min(${n}, ${j_})`:n}var J_=["contained","page","full"],$b=["full","page"],Vb={full:"Full width",page:"Content width"},Vf="inherit",Z_=e=>typeof e=="string"&&J_.includes(e),Q_=e=>e===Vf;function qf(e,t){let o=typeof e.pageWidth=="number"?e.pageWidth:Qn.default;return Q_(e.widthMode)?{mode:"full",pageWidth:o,inherited:!0}:e.widthMode==="contained"?{mode:"page",pageWidth:o,inherited:!1}:Z_(e.widthMode)?{mode:e.widthMode,pageWidth:o,inherited:!1}:e.contained===!0?{mode:"page",pageWidth:o,inherited:!1}:typeof e.fullWidth=="boolean"?{mode:e.fullWidth?"full":"page",pageWidth:o,inherited:!1}:e.contained===!1?{mode:"full",pageWidth:o,inherited:!1}:{mode:t,pageWidth:o,inherited:t==="full"}}function Yf(e){return qf(e,"page").mode==="full"}import{createContext as eA,useContext as tA}from"react";import{jsx as nA}from"react/jsx-runtime";var oA=2,rA=oA+1,qb=eA(2);function aV({tier:e,children:t}){return nA(qb.Provider,{value:e,children:t})}function Xf(e){let t=tA(qb);return rA+Math.max(0,e-t)}import{withStyleKind as HA}from"efficient-easel/style-clipboard";import{Fragment as eo,jsx as m,jsxs as Ce}from"react/jsx-runtime";function Un(e){for(let[t,o]of Object.entries(e))o&&typeof o=="object"&&!qr(o)&&HA(o,`section:${t}`);return e}function ry(){return null}function GA(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return m(ry,{},e)}function WA(e){return e.type===ry}function Zl(e){return WA(e)?void 0:e}function Ro({inherited:e,source:t,detail:o,onReset:r,onOptOut:n,optOutTitle:a,label:l}){if(e){let i=o?`Following the ${t.toLowerCase()} setting \u2014 ${o}`:`Following the ${t.toLowerCase()} setting`;if(!n)return Ce("span",{className:"sf-inherit",title:o?i:void 0,children:["Inherits \xB7 ",t]});let c=`${i}. ${a??`Click to keep ${l} at this section's own size instead`}`;return Ce("button",{type:"button",className:"sf-inherit sf-inherit--following",onClick:n,title:c,"aria-label":c,children:["Inherits \xB7 ",t,m("span",{className:"sf-inherit-revert","aria-hidden":"true",children:"\u21F1"})]})}let s=`Reset ${l} to follow the ${t.toLowerCase()} setting${o?` (${o})`:""}`;return Ce("button",{type:"button",className:"sf-inherit sf-inherit--over",onClick:r,title:s,"aria-label":s,children:["Overridden",m("span",{className:"sf-inherit-revert","aria-hidden":"true",children:"\u21BA"})]})}function UA(){let{appState:e}=$r(n=>n),t=e.data.root?.props??{},{mode:o,pageWidth:r}=qf(t,"full");return o==="page"?`Page width \u2014 ${r}px`:o==="contained"?"Page width \u2014 Contained":"Page width \u2014 Full"}function zA(){let{blockGap:e}=uo();return e===null?"Site block gap \u2014 not set, so this container keeps its own spacing":`Site block gap \u2014 ${e}px`}function KA({inherited:e,onReset:t,label:o}){return m(Ro,{inherited:e,source:"Site",detail:zA(),onReset:t,label:o})}function $A({inherited:e,onReset:t,label:o}){return m(Ro,{inherited:e,source:"Page",detail:UA(),onReset:t,label:o})}function VA(){return Ce("svg",{className:"sf-field-type",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,"aria-hidden":"true",children:[m("polyline",{points:"4 7 4 4 20 4 20 7"}),m("line",{x1:"9",x2:"15",y1:"20",y2:"20"}),m("line",{x1:"12",x2:"12",y1:"4",y2:"20"})]})}function Qo({value:e,onChange:t,label:o,placeholder:r,hint:n,multiline:a,hideable:l=!0,markup:s=!0}){let{text:i,hidden:c}=Jt(e),f=Zf(null),u=Zf(null),d=g=>t(l?{text:g,hidden:c}:g),p=()=>t({text:i,hidden:!c});return Ce("div",{className:`sf-field${l&&c?" is-hidden":""}`,children:[Ce("div",{className:"sf-field-head",children:[m(VA,{}),m("span",{className:"sf-field-label sf-field-label--inline",children:o}),l&&m("button",{type:"button",className:"sf-field-eye","aria-pressed":c,"aria-label":c?`Show ${o} on the slide`:`Hide ${o} on the slide`,title:c?`Show ${o} on the slide`:`Hide ${o} on the slide`,onClick:p,children:c?m(en,{name:"eye-off",size:14}):m(en,{name:"eye",size:14})})]}),Ce("div",{className:"sf-copybox",children:[s&&m(df,{target:a?u:f,value:i,onChange:d}),a?m("textarea",{ref:u,value:i,placeholder:r,onChange:g=>d(g.target.value)}):m("input",{ref:f,type:"text",value:i,placeholder:r,onChange:g=>d(g.target.value)})]}),n&&m("p",{className:`sf-field-hint${JA(n)?" sf-field-hint--while-typing":""}`,children:n})]})}function xq(e,t){return{...e,[yn]:t}}function gq(e){let t=e[Le];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[Le]:{...t,offPage:!0}}}function Iq(e){return!e||typeof e!="object"?!1:e[Le]?.offPage===!0}function hq(e){let t=e[Le];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[Le]:{...t,identifier:!0}}}function ny(e){return!e||typeof e!="object"?!1:e[Le]?.identifier===!0}var qA=new Set(Go),Vr=(e,t)=>{let o={...t,[Le]:e};if(!qA.has(e.control))return o;let r=t.render;return{...Hl(o,"authored-copy"),render:n=>m(qh,{name:n.name,children:r(n)})}},bq="Everything else on this block comes from the linked post. Unlink it to edit by hand.",YA="Select a word, then press the highlighter.",XA="A short name so a link can jump straight to this section, like yoursite.com/page#about.",jA=new Set([YA]),JA=e=>jA.has(e);function yq(e,t,o){return Vr({control:"text",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o})})}function Sq(e,t,o){return Vr({control:"textarea",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,multiline:!0})})}function ZA(e,t,o){return Vr({control:"plainText",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,hideable:!1,markup:!1})})}function Cq(e,t,o){return Vr({control:"copyText",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,hideable:!1})})}function Pq(e){return{type:"custom",[bn]:{label:e},render:({value:t,onChange:o})=>m(Df,{value:Sr(t),onChange:o,label:e})}}function kq(e,t,o){return Vr({control:"plainTextarea",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,multiline:!0,hideable:!1})})}var wq={Content:LA,Style:EA,Layout:bA,Animation:Xb};function vq(e,t){return e.includes("Content")?t!=="Content":null}function QA({label:e}){return m(OA,{title:e,level:Xf(1)})}function e0({level:e,label:t}){return e===1?m(QA,{label:t}):m(t0,{label:t})}var Qf="__fold";function qr(e){return e?.[Qf]??null}function ay(e,t){return{type:"custom",[Qf]:{label:e,level:t},render:()=>m(e0,{level:t,label:e})}}function ft(e){return ay(e,2)}function Tq(e){return{type:"custom",render:()=>m(ly,{text:e})}}function ly({text:e}){return m("p",{className:"sf-note",children:e})}function Rq(e){return ay(e,1)}function Fq(e){return qr(e)!==null&&e?.tabs!==void 0}var Yb=new Map;function Ql(e,t){let o=`${e}\0${t?t.join(""):""}`,r=Yb.get(o)??{type:"custom",tabs:t,[Qf]:{label:e,level:1},bucket:e,marker:!0,render:()=>m(eo,{})};return Yb.set(o,r),r}function t0({label:e}){return m(NA,{title:e,level:Xf(2)})}function sy({swatches:e,current:t,onPick:o,names:r}){let n=e.find(l=>l.toLowerCase()===t.toLowerCase()),a=(n?r?.[n]:void 0)??t;return Ce("div",{className:"sf-swatches",children:[e.map(l=>{let s=r?.[l]??l;return m("button",{type:"button","aria-pressed":t.toLowerCase()===l.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===l.toLowerCase()?"is-active":""}`,style:{background:l},onClick:()=>o(l),"aria-label":s,title:s},l)}),m("span",{className:"sf-swatch-hex",children:a})]})}function Eq(e,t){return{type:"custom",render:({value:o,onChange:r})=>{let n=Ub(o,t);return m(be,{label:e,icon:m(sA,{}),action:m(Ro,{inherited:n,source:"Theme",detail:"the theme's section background",onReset:()=>r(Xl),label:e}),children:sy({swatches:Gb,current:n?Yl:o??t??"",onPick:r,names:Wb})})}}}function o0(e,t){return{type:"custom",render:({value:o,onChange:r})=>{let n=o,a=Sp(n,t);return m(be,{label:e,icon:m(IA,{}),action:m(Ro,{inherited:a,source:"Theme",detail:"the theme's image stage",onReset:()=>r(fn),label:e}),children:sy({swatches:hp,current:a?Et:Pa(n,t),onPick:r,names:bp})})}}}function iy(e=o=>o,t){return Un({_gSectionTheme:ft(Wd),sectionAccent:{type:"custom",render:({value:o,onChange:r})=>m(Rf,{value:e(o),onChange:r,followLabel:t})}})}function er({min:e,max:t,step:o,value:r,onChange:n,suffix:a="",readout:l=!0,notch:s,ariaLabel:i,disabled:c=!1}){let f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return Ce("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:[m("input",{type:"range",min:e,max:t,step:o,value:r,"aria-label":i,disabled:c||void 0,onChange:u=>n(Number(u.target.value))}),l&&m(r0,{value:r,min:e,max:t,step:o,suffix:a,ariaLabel:i,onChange:n})]})}function r0({value:e,min:t,max:o,step:r,onChange:n,suffix:a="",ariaLabel:l,children:s}){let[i,c]=Jl(null),f=u=>{u.editing||c(null),u.commit!==null&&u.commit!==e&&n(u.commit)};return i===null?m("button",{type:"button",className:"sf-slider-val",title:"Click to type a value","aria-label":l?`${l}: type a value`:"Type a value",onClick:()=>c(String(e)),children:s??Ce(eo,{children:[e,a]})}):m("input",{autoFocus:!0,type:"text",inputMode:"decimal",className:"sf-slider-val sf-slider-typed",value:i,"aria-label":l,onChange:u=>c(u.target.value),onFocus:u=>u.currentTarget.select(),onKeyDown:u=>{let d=xf(u.key,i,t,o,r);d.handled&&(u.preventDefault(),u.stopPropagation(),f(d))},onBlur:()=>f(xf(mf,i,t,o,r))})}function Kr(e,t,o,r,n,a,l="",s){return{type:"custom",render:i=>m(be,{label:e,icon:Zl(t),action:s?s("storedValue"in i?i.storedValue:i.value,i.onChange):void 0,children:er({min:o,max:r,step:n,value:typeof i.value=="number"?i.value:a,suffix:l,onChange:i.onChange})})}}function cy({min:e,max:t,step:o,px:r,label:n,onChange:a,disabled:l=!1}){let{cornerRadiusPx:s}=uo();return m(eo,{children:er({min:e,max:t,step:o,value:r??(typeof s=="number"?s:e),readout:!1,ariaLabel:n,disabled:l,onChange:a})})}function zn(e,t){let{min:o,max:r,step:n=1,unsetLabel:a="Not set",hint:l,restAtSite:s=!1,restTrack:i,unsetMark:c}=t;return{type:"custom",render:({value:f,onChange:u})=>{let d=typeof f=="number"?f:null,p=d===null;return m(be,{label:e,value:p?c?"":a:`${d}px`,changed:!p,action:p?c??null:m(Rl,{label:e,what:"change",onClear:()=>u(null)}),hint:l,children:i?i({min:o,max:r,step:n,px:d,label:e,onChange:u}):s?m(cy,{min:o,max:r,step:n,px:d,label:e,onChange:u}):er({min:o,max:r,step:n,value:d??o,readout:!1,ariaLabel:e,onChange:u})})}}}function Lq(e){let t=Kr("Gap",m(Zb,{}),go.min,go.max,go.step,ka[e],"px",(o,r)=>m(KA,{inherited:!Zs(e,o),onReset:()=>r(void 0),label:"Gap"}));return{type:"custom",[vp]:e,render:o=>t.render({...o,value:Js(e,o.value,o.field?.siteGap),storedValue:o.value,onChange:r=>o.onChange(r)})}}function n0(){return{type:"custom",render:({value:e,onChange:t})=>{let r=xt(e)??[...ct],n=r.length===ct.length;return m(be,{label:wo,icon:m(Jb,{}),value:Tl(r),changed:!n,action:n?null:m(Rl,{label:wo,what:"change",onClear:()=>t(null)}),hint:"Corners left off stay square. The row above sets how round the others are.",children:m(i0,{value:r,onChange:a=>{let l=xt(a)??[];t(l.length===ct.length?null:l)}})})}}}function a0(){return zn("Corners",{min:lo,max:Eo,unsetLabel:"Inherits \xB7 Site",restTrack:e=>m(l0,{...e}),hint:m(s0,{})})}var fy="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function ed(){return Yf(es())}function l0(e){return m(cy,{...e,disabled:ed()})}function s0(){return m(eo,{children:ed()?fy:"Follows Site styles \u25B8 Basics \u25B8 Corners until you set a number here."})}function i0({value:e,onChange:t}){let o=ed();return m(ty,{label:wo,value:e,corners:o?Gr.map(r=>({...r,disabled:!0,title:fy})):Gr,onChange:t})}function dy(){return Un({_gShape:ft("Shape"),sectionCorners:a0(),sectionCornerSides:n0()})}function uy(){return{_gMotion:ft("Motion"),sectionAnimation:rd("Entrance",m(Xb,{}),[...Ah],rf)}}function td(){let e=null;try{let{appState:t,selectedItem:o}=$r(n=>n),r=o?.props?.id?String(o.props.id):void 0;e=r?af(t?.data,r):null}catch{e=null}return e!==null&&Yf(e)}function py(e){let{cornerRadiusPx:t}=uo(),o=td(),r=typeof t=="number"?t:e,n=null;try{let{appState:l,selectedItem:s}=$r(c=>c),i=s?.props?.id?String(s.props.id):void 0;n=i?af(l?.data,i):null}catch{n=null}if(o||!n)return r;let a=n.sectionCorners;return jc(a)?a:r}function c0({min:e,max:t,step:o,px:r,label:n,onChange:a}){let l=py(e);return m(eo,{children:er({min:e,max:t,step:o,value:r??l,readout:!1,ariaLabel:n,onChange:a})})}function f0({label:e}){let t=td(),o=py(lo);return m(Ro,{inherited:!0,source:t?"Site":"Section",detail:`${t?"Site":"Section"} \u2014 ${o}px`,onReset:()=>{},label:e})}function d0(){return m(eo,{children:td()?"The section is full width, so this card follows Site styles \u25B8 Basics \u25B8 Corners.":"Follows the section's Corners until you set a number here."})}function u0(){return zn("Corners",{min:lo,max:Eo,unsetLabel:"Inherits \xB7 Section",unsetMark:m(f0,{label:"Corners"}),restTrack:e=>m(c0,{...e}),hint:m(d0,{})})}function p0({value:e,onChange:t}){return m(ty,{label:wo,value:e,corners:Gr,onChange:t})}function m0({unset:e}){return m(eo,{children:e?"Set a number above first \u2014 there is nothing to shape yet.":"Corners left off stay square. The row above sets how round the others are."})}function x0(){return{type:"custom",render:({value:e,onChange:t})=>{let r=xt(e)??[...ct],n=r.length===ct.length;return m(be,{label:wo,icon:m(Jb,{}),value:Tl(r),changed:!n,action:n?null:m(Rl,{label:wo,what:"change",onClear:()=>t(null)}),hint:m(m0,{unset:!Nn(e)}),children:m(p0,{value:r,onChange:a=>{let l=xt(a)??[];t(l.length===ct.length?null:l)}})})}}}function g0(){return{type:"custom",render:()=>m(Jc,{})}}function _q(){return{_gShape:ft("Shape"),cardCorners:u0(),cardCornerSides:x0(),cardCornersApplyAll:g0()}}function Aq(){return To("Justify",m(lA,{}),Wf,Wf[0].value)}function Oq(){return To("Item alignment",m(aA,{}),Nb,"stretch")}function Nq(){return To(Bb,m(AA,{}),Uf,Uf[0].value)}function Bq(){return{type:"custom",render:({value:e,onChange:t})=>{let o=ql.find(r=>r.value===e)??ql[0];return m(be,{label:zf,icon:m(jb,{}),value:o.label,children:m("div",{className:"sf-gallery-layouts",role:"group","aria-label":zf,children:ql.map(r=>m("button",{type:"button","aria-pressed":o.value===r.value,"aria-label":r.label,title:r.label,onClick:()=>t(r.value),children:m("span",{className:"sf-gallery-pic",children:I0(r.weights).map((n,a)=>m("i",{style:{gridColumn:`span ${n}`}},a))})},r.value))})})}}}function I0(e){if(!e)return[3,4];let t=e.reduce((o,r)=>o+r,0);return e.map(o=>Math.round(o/t*12))}function Dq(){return To(Hb,m(Zb,{}),$f,$f[0].value)}function Mq(){return Kr(Db,m(wA,{}),Kf,Mb,1,Kf)}function Hq(e){let t=rd(Eb,GA("`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)."),_b(e),Vl(e,void 0));return{type:"custom",render:o=>t.render({...o,value:Vl(e,o.value),onChange:r=>o.onChange(r)})}}function Gq(e,t,o,r,n,a){return{type:"custom",render:({value:l,onChange:s})=>m(be,{label:e,icon:m(tf,{noun:a}),action:m(Ro,{inherited:Kb(l),source:"Text",detail:"Website settings \u2192 Text",onReset:()=>s(zb),onOptOut:()=>s(jl),optOutTitle:`Click to keep ${e} at this section's own built-in size instead`,label:e}),children:er({min:t,max:o,step:r,value:typeof l=="number"?l:n,suffix:"px",onChange:s})})}}function Wq(){return{_gCellWidth:ft("Cell width"),gridSpan:To("Positions",m(jb,{}),[{label:"Auto",value:""},...Array.from({length:El},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function es(){let e=null;try{e=$r(t=>t).selectedItem}catch{e=null}return e?.props??{}}function h0({min:e,max:t,step:o,px:r,label:n,onChange:a,desktopKey:l,fallback:s}){let i=es()[l],c=Gl(void 0,i,s);return m(eo,{children:er({min:e,max:t,step:o,value:Gl(r,i,s),readout:!1,ariaLabel:n,notch:c,onChange:a})})}function b0({label:e,desktopKey:t,fallback:o}){let r=es()[t],n=Gl(void 0,r,o);return m(Ro,{inherited:!0,source:zr.desktop,detail:`${zr.desktop} \u2014 ${n}px`,onReset:()=>{},label:e})}function y0(e){return zn(e.label,{min:e.min,max:e.max,step:e.step,unsetLabel:`Inherits \xB7 ${zr.desktop}`,unsetMark:m(b0,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>m(h0,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function my(e={}){let t=e.keys?.top??"sectionPaddingTop",o=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,n=I=>r?I:`Padding ${I.toLowerCase()}`,a=I=>Kr(n("Top"),m(kA,{}),Tt.min,Tt.max,Tt.step,I,"px"),l=(I,h,C,S=Tt)=>wt("mobile",y0({label:n(I),desktopKey:h,min:S.min,max:S.max,step:S.step,fallback:C})),s=e.top??Tt.min,i=e.bottom??Tt.min,c="sectionPaddingLeft",f="sectionPaddingRight",u=e.sideBounds??Tt,d=e.side??u.min,p=e.sidePhone??d,x=e.phone===!0,g=I=>x?wt("desktop",I):I;return Un({...r?{_gSpacing:ft("Padding")}:{},[t]:g(a(s)),...x?{[Hn(t)]:l("Top",t,s)}:{},...e.only==="top"?{}:{[o]:g(Kr(n("Bottom"),m(SA,{}),Tt.min,Tt.max,Tt.step,i,"px")),...x?{[Hn(o)]:l("Bottom",o,i)}:{}},...e.sides?{[c]:g(Kr(n("Left"),m(CA,{}),u.min,u.max,u.step,d,"px")),...x?{[Hn(c)]:l("Left",c,p,u)}:{},[f]:g(Kr(n("Right"),m(PA,{}),u.min,u.max,u.step,d,"px")),...x?{[Hn(f)]:l("Right",f,p,u)}:{}}:{}})}var S0={contained:"Contained",page:"Page",full:"Full"},Jf="Width";function xy(e,t=$b,o=!0){let r=t.map(n=>({label:Vb[n]??S0[n],value:n}));return Un({...o?{_gWidth:ft(Jf)}:{},widthMode:{type:"custom",render:({onChange:n,field:a})=>m(be,{label:"Width",icon:m(_A,{}),action:o?m($A,{inherited:a?.inherited??!1,onReset:()=>n(Vf),label:Jf}):void 0,children:od({options:r,value:a?.currentValue||e,onChange:n,ariaLabel:Jf})})}})}function gy(){let e=r=>({type:"custom",render:({value:n,onChange:a})=>Ce("div",{className:"sf-field",children:[r?Ce("div",{className:"sf-field-head",children:[m("span",{className:"sf-field-label sf-field-label--inline",children:Ur}),r(a)]}):null,m("div",{children:od({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(n)?n:"auto",onChange:a,ariaLabel:Ur})})]})}),t=()=>({type:"custom",render:({value:r,onChange:n,field:a})=>{let l=a?.unit==="%"?"%":"px",s=l==="%"?Hf:Mf;return m("div",{className:"sf-field",children:er({min:s.min,max:s.max,step:s.step,value:typeof r=="number"?r:s.fallback,suffix:l,ariaLabel:Ur,onChange:n})})}}),o=()=>rd("Unit",m(Qb,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return Un({_gHeight:ft(Ur),sectionHeightMode:wt("desktop",e()),sectionHeightValue:wt("desktop",t()),sectionHeightUnit:wt("desktop",o()),sectionHeightModePhone:wt("mobile",e(r=>m(C0,{onClear:()=>r(void 0)}))),sectionHeightValuePhone:wt("mobile",t()),sectionHeightUnitPhone:wt("mobile",o())})}function C0({onClear:e}){let t=es(),o=Gf(t),r=$l(t),n=`${zr.desktop} \u2014 ${r.mode==="auto"?"Auto":`${r.value}${r.unit}`}`;return m(Ro,{inherited:!o,source:zr.desktop,detail:n,onReset:e,label:Ur})}function Iy(){return{_gAnchor:ft("Anchor"),anchor:ZA("Anchor name","e.g. about",XA)}}function Zo(e,t,o){return{type:"custom",render:({value:r,onChange:n,id:a,name:l})=>{let s=typeof r=="boolean"?r:t,i=`${a??l??e}-label`;return m(be,{label:e,labelId:i,icon:o,action:m(oy,{checked:s,onChange:n,ariaLabelledBy:i})})}}}function Uq(){return{type:"custom",render:({value:e,onChange:t,id:o,name:r})=>{let n=`${String(o??r??"pageBackground")}-colour`;return m(be,{label:"Background",icon:m(ey,{}),htmlFor:n,action:m(Qt,{id:n,label:"Background",value:of(e),onChange:t})})}}}function P0({facet:e,fallback:t,value:o,onChange:r,fieldId:n}){let l=Zc()[e],s=typeof o=="boolean"?o:t,i=`${n}-label`;return m(be,{label:l,labelId:i,action:m(oy,{checked:s,onChange:r,ariaLabelledBy:i})})}function zq(e,t){return{type:"custom",render:({value:o,onChange:r,id:n,name:a})=>m(P0,{facet:e,fallback:t,value:o,onChange:r,fieldId:String(n??a??e)})}}function Kq(e,t){return{type:"custom",render:()=>m(k0,{facets:e,rest:t})}}function k0({facets:e,rest:t}){let o=Zc(),r=e.map(a=>o[a]),n=r.length>1?`${r.slice(0,-1).join(", ")} and ${r[r.length-1]}`:r.join("");return m(ly,{text:`${n} ${t}`})}function $q(e,t){return{type:"custom",render:({value:o,onChange:r})=>Ce("div",{className:"sf-field sf-field--row",children:[m("span",{className:"sf-field-label sf-field-label--inline",children:e}),Qt({value:o||t,onChange:r,label:e})]})}}var w0=[{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 hy({label:e,value:t,onChange:o,points:r=w0}){return m(BA,{label:e,value:t,points:r,onChange:o})}function Vq(e,t=ph,o="mediaImage"){return{type:"custom",render:({value:r,onChange:n})=>m("div",{className:"sf-field",children:m(v0,{label:e,value:r||t,onChange:n,imageProp:o})})}}function v0({label:e,value:t,onChange:o,imageProp:r}){let{selectedItem:n}=$r(l=>l),a=n?.props?.[r];return m(hf,{label:e,value:t,onChange:o,image:typeof a=="string"?a:void 0})}var T0=Ps([]);function qq(e,{stacking:t,fallback:o=ia}){return{type:"custom",render:({value:r,onChange:n})=>{let a=bt.includes(r)?r:o;return t?m(R0,{label:e,value:a,onChange:n}):by({label:e,value:a,onChange:n,points:T0})}}}function R0({label:e,value:t,onChange:o}){let{appState:r,selectedItem:n}=$r(s=>s),a=n?.props?.id?String(n.props.id):void 0,l=a?ws(r?.data,a):[];return by({label:e,value:t,onChange:o,points:Ps(l,a)})}function by({label:e,value:t,onChange:o,points:r}){let n=r.find(a=>a.disabled);return m(be,{label:e,icon:m(vA,{}),hint:n?n.title:void 0,children:hy({label:e,value:po(t),onChange:o,points:r})})}var Yq={top:m(pA,{}),right:m(uA,{}),bottom:m(fA,{}),left:m(dA,{})};function Xq(e,t,o,r,n,a){let l=f=>t.find(u=>u.value===f),s=f=>({value:f,label:"",disabled:!0,title:r}),i=f=>{let u=t.find(p=>p.cell===f);if(!u)return s(`missing-${f}`);let d=a?.[f];return d?{value:u.value,label:u.label,icon:d}:{value:u.value,label:u.label}},c=[s("corner-top-left"),i("top"),s("corner-top-right"),i("left"),s("centre"),i("right"),s("corner-bottom-left"),i("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:u})=>{let d=t.some(p=>p.value===f)?f:o;return m(be,{label:e,icon:n,value:l(d)?.label??"",children:hy({label:e,value:d,onChange:u,points:c})})}}}function To(e,t,o,r,n){return{type:"custom",options:o,fallback:r,render:({value:a,onChange:l,field:s})=>{let i=s.options??o,c=s.fallback??r,f=i.some(u=>u.value===a)?a:c;return m(be,{label:e,icon:Zl(t),children:Ce("select",{value:f,onChange:u=>l(u.target.value),children:[n?m("option",{disabled:!0,value:"",children:n}):null,i.map(u=>m("option",{value:u.value,children:u.label},u.value))]})})}}}function jq(e,t,o){return{type:"custom",options:t,render:({value:r,onChange:n,field:a})=>m(Sf,{label:e,options:a.options??t,value:Array.isArray(r)?r:[],onChange:n,...o?{emptyLabel:o}:{}})}}function Jq(e,t){return{type:"custom",render:({value:o,onChange:r})=>m(ff,{value:o,onChange:r,...e?{label:e}:{},...t?{emptyLabel:t}:{}})}}function Zq(e,t={}){return{type:"custom",render:({value:o,onChange:r})=>{let n={value:o,onChange:r,...t};return m(e,{...n})}}}function od({options:e,value:t,onChange:o,ariaLabel:r,disabled:n=!1}){return m(DA,{options:e.map(a=>({id:a.value,label:a.label,title:a.title})),value:t,onChange:o,ariaLabel:r,disabled:n})}var Qq=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function rd(e,t,o,r){let n=o.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:l,field:s})=>m(be,{label:e,icon:Zl(t),children:od({options:n,value:n.some(i=>i.value===a)?a:a||s?.currentValue||r,onChange:l,ariaLabel:e})})}}var F0="__media";function e9(e,t,o){return{type:"custom",[F0]:!0,render:({value:r,onChange:n})=>m(bf,{value:r||"",onChange:n,label:e,accept:t,placeholder:o})}}function t9({value:e,onChange:t,label:o}){let r=e||{},n=!!r.pending,a=n?"var(--fg-dim, #888)":r.ok?"#1d9e75":"#d85a30",l=(s,i)=>t({...r,[s]:i===""?void 0:Number(i)});return Ce(be,{label:o,icon:m(jf,{}),children:[m("button",{type:"button",disabled:n,onClick:()=>t({...r,pending:!0,ok:!1,status:"Finding\u2026"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:n?"default":"pointer",opacity:n?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:n?"Finding\u2026":"Find coordinates"}),r.status&&m("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:r.status}),m("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:"Coordinates from OpenStreetMap"}),m("button",{type:"button",onClick:()=>t({...r,manual:!r.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:r.manual?"Hide manual coordinates":"Enter coordinates manually"}),r.manual&&Ce("div",{style:{marginTop:8,display:"grid",gap:8},children:[m(be,{label:"Latitude",icon:m(jf,{}),children:m("input",{type:"number",step:"any",placeholder:"e.g. 34.0990198",value:typeof r.lat=="number"?r.lat:"",onChange:s=>l("lat",s.target.value)})}),m(be,{label:"Longitude",icon:m(jf,{}),children:m("input",{type:"number",step:"any",placeholder:"e.g. -117.9842833",value:typeof r.lng=="number"?r.lng:"",onChange:s=>l("lng",s.target.value)})})]})]})}function o9({items:e,placeholder:t,onChange:o,markup:r=!1}){let n=Zf(null),[a,l]=Jl(null),s=u=>u.map(d=>({text:d?.text??""})),i=(u,d)=>o(L0(e,u,d)),c=u=>{let d=_0(a,u);d===null&&(n.current=null),l(d),o(s(e.filter((p,x)=>x!==u)))},f=()=>o([...s(e),{text:""}]);return Ce("div",{className:"sf-textlist",children:[r&&m(df,{target:n,value:E0(e,a),onChange:u=>i(a??-1,u),disabled:a===null,label:a===null?"Formatting \u2014 click a row first":`Formatting \u2014 row ${a+1}`}),e.map((u,d)=>Ce("div",{className:`sf-textlist-row${r&&a===d?" is-marking":""}`,children:[m("input",{type:"text",value:u?.text??"",placeholder:t,onChange:p=>i(d,p.target.value),onFocus:p=>{n.current=p.currentTarget,l(d)}}),m("button",{type:"button",className:"sf-textlist-x",onClick:()=>c(d),"aria-label":"Remove item",title:"Remove item",children:"\xD7"})]},d)),m("button",{type:"button",className:"sf-textlist-add",onClick:f,children:"+ Add item"})]})}function E0(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function L0(e,t,o){let r=e.map(n=>({text:n?.text??""}));return t===null||t<0||t>=e.length?r:r.map((n,a)=>a===t?{text:o}:n)}function _0(e,t){return e===null?null:t>e?e:null}var r9={label:"Ticker items",icon:m(yA,{})};function n9(e,t,o,r){return{type:"custom",[Le]:{control:"textList",label:e,placeholder:o,itemKey:"text",rendering:r},render:({value:n,onChange:a})=>m(A0,{label:e,icon:Zl(t),items:Array.isArray(n)?n:[],placeholder:o,onChange:a,markup:r==="markup"})}}function A0({label:e,icon:t,items:o,placeholder:r,onChange:n,markup:a=!1}){let[l,s]=Jl(null),i=c=>c.map(f=>({text:f?.text??""}));return m(MA,{label:e,icon:t,noun:"line",items:o,onChange:c=>n(i(c)),newItem:()=>({text:""}),itemName:(c,f)=>`Line ${f+1}`,summary:c=>jt(c?.text??"")||r,open:l,onOpen:s,renderItem:(c,f,u)=>m(Qo,{value:c?.text??"",onChange:d=>u({text:typeof d=="string"?d:d?.text??""}),label:`${e} \u2014 line ${f+1}`,placeholder:r,hideable:!1,markup:a})})}function a9(e,t){let o=`${e.label} \u2014 row ${t+1}`;return Vr({control:"plainText",label:o,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:o,placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function yy(e){return{_gCards:ft("Cards"),coverIndex:To("Cover image",m(hA,{}),nm,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:o0("Image background",Lt),cardImage:O0(),spinOnHover:Zo("Rotate on hover",e?.spinDefault??!0,m(RA,{}))}}function Sy(){return{outline:To("Card outline",m(FA,{}),oi,Io),indexBadge:To("Card number",m(Qb,{}),ti,pr),showBadge:Zo("Product badge",!0,m(tf,{noun:"tag"}))}}function Cy(e){let t=e?.bottomDefault??!0;return{_gShowOnCard:ft("Show on a card"),showCardPrice:Zo("Price",!0,m(mA,{})),showCardFinishes:Zo("Finish swatches",!0,m(xA,{})),showCardSizes:Zo("Sizes",t,m(TA,{})),showCardBuy:Zo("Buy button",t,m(iA,{})),showCardPage:Zo("Page button",t,m(ey,{}))}}function O0(){return zn("Card image",{min:lo,max:Eo,step:Cp,hint:"Rounds the picture. The card's own corner is in Site styles."})}function l9(){return zn(kh,{min:lo,max:Eo,step:Ph,unsetLabel:"Square",hint:"Rounds the picture. Left alone it stays square."})}function s9(){return{type:"custom",render:({value:e,onChange:t})=>m(N0,{value:typeof e=="string"?e:"",onChange:t})}}function N0({value:e,onChange:t}){let[o,r]=Jl(null),n=Qc.filter(l=>o===null||Bt[l].across===o),a=e&&e in Bt?Bt[e]:null;return Ce(eo,{children:[m(be,{label:"Photos in a row",icon:m(cA,{}),children:Ce("div",{className:"sf-gallery-filter",children:[m("button",{type:"button","aria-pressed":o===null,onClick:()=>r(null),children:"All"}),Rh.map(l=>m("button",{type:"button","aria-pressed":o===l,onClick:()=>r(l),children:l},l))]})}),m(be,{label:"Layout",icon:m(gA,{}),value:a?a.label:"Not chosen",hint:`${n.length} of ${Qc.length} layouts`,children:m("div",{className:"sf-gallery-layouts",children:n.map(l=>m("button",{type:"button","aria-pressed":e===l,"aria-label":Bt[l].label,title:Bt[l].label,onClick:()=>t(e===l?"":l),children:m("span",{className:"sf-gallery-pic",children:Bt[l].desktop.map(([s,i],c)=>m("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${i}`}},c))})},l))})})]})}function B0(e,t){let o=Sr(e.props.name);if(o)return o;let r=Sr(e.props.altName);if(r)return r;let n=e.props.collection?.name;if(n)return n;let a=e.props.source?.title;if(a)return a;let l=e.props.code;return l?t?.(l)??l:""}function p9(e,t,o){return jt(B0(e,o))||t(e.type)}function m9(e){if(!e)return null;for(let t of["name","altName"])if(ny(e[t]))return t;return null}function x9(e,t){return Sr(e.props?.name).trim()||t}import{SETTINGS_BUCKETS as D0}from"efficient-easel/panel";var Yr=D0,$e={Content:"_sContent",Style:"_sStyle",Layout:"_sLayout",Animation:"_sAnimation"},y9=[$e.Layout,...Object.keys(my({phone:!0})),...Object.keys(xy("full")),...Object.keys(gy()),...Object.keys(Iy())],S9=[$e.Style,...Object.keys(iy())],C9=[$e.Style,...Object.keys(dy())],P9=[$e.Animation,...Object.keys(uy())],M0=Object.keys(yy()),H0=new Set(["cardImage","imageBackground"]),k9=[$e.Style,...M0.filter(e=>e.startsWith("_g")||H0.has(e))],w9=Object.keys(Sy()),v9=Object.keys(Cy({bottomDefault:!0})),G0="Editor only \u2014 not shown live",Py={"Archive link":"Content",Article:"Content",Boxes:"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","Opening filter":"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","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",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":"Style",Gallery:"Style",Image:"Style","Image column":"Style",Images:"Style",Logo:"Style",Media:"Style","Background image":"Style",Color:"Style","Image tint":"Style",Style:"Style",Shape:"Style",Texture:"Style","Text style":"Style",Motion:"Animation",Animation:"Animation",Anchor:"Layout",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Layout",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[G0]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Layout","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:"Layout",Height:"Layout"},ky={"AlloyWheelsListing._gCards":"Style","ProductGrid._gCards":"Style"};function W0(e,t,o){return ky[`${e}.${t}`]??Py[o]}var U0={"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)","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)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","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)"};function T9(e){let t=new Set(Object.values($e));for(let[o,r]of Object.entries(e))if(!t.has(o)&&qr(r)?.level===1)return 1;return 2}function z0(e){let t=`${e}.`;return Object.keys(U0).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function K0(e,t){let o=uf(e),r=ft(t);return o?wt(o.tier,r):r}function R9(e,t){let o=[],r=new Set(z0(t)),n=new Set,a=null;for(let[d,p]of Object.entries(e)){let x=qr(p);if(!x){a||o.push(a={bucket:"Content",entries:[]}),a.entries.push([d,p]);continue}if(r.has(d)){let h=Py[x.label];if(x.level!==2||!h||x.label!==h)throw new Error(`${t}.${d}: RETIRED (lib/puck/field-groups.ts) lists this sub-heading as one whose name duplicates its bucket, but it is a level-${x.level} "${x.label}" header in the ${h??"(unclassified)"} bucket. Only a level-2 header whose label IS its bucket's name may be retired \u2014 anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);n.add(d),o.push(a={bucket:h,entries:[]});continue}let g=W0(t,d,x.label);if(!g)throw new Error(`${t}.${d}: the inspector group "${x.label}" is not classified in LABEL_BUCKET (lib/puck/field-groups.ts), so there is no way to say which of ${Yr.join(" / ")} its controls belong under. Classify it \u2014 an unclassified group silently lands wherever it was declared, which is the whole bug.`);let I=d===$e[g]&&x.level===1;if(!I&&d===$e[g])throw new Error(`${t}.${d}: that key is reserved for the ${g} bucket header, but this field is a level-${x.level} "${x.label}" header, so it cannot serve as one. Rename the section's own field.`);o.push(a={bucket:g,entries:[[d,I||x.level===2?p:K0(p,x.label)]],isBucketHeader:I})}let l=new Set(Object.entries(e).filter(([,d])=>qr(d)).map(([d])=>d)),s=Object.keys(ky).filter(d=>d.startsWith(`${t}.`)).filter(d=>!l.has(d.slice(t.length+1)));if(s.length)throw new Error(`${t}: KEY_BUCKET (lib/puck/field-groups.ts) lists ${JSON.stringify(s)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key \u2014 an override that quietly matches nothing is worse than no override.`);let c=o.some(d=>d.isBucketHeader)?[]:[...r].filter(d=>!n.has(d));if(c.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(c)}, but this section has no such fold header${c.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section \u2014 a list that quietly matches nothing is worse than no list.`);for(let d of Yr){let p=$e[d];if(p in e&&!o.some(x=>x.isBucketHeader&&x.entries[0]?.[0]===p))throw new Error(`${t}.${p} is reserved for the ${d} bucket header but is not a level-1 "${d}" fold header. Rename the section's own field.`)}let f=Yr.filter(d=>o.some(p=>p.bucket===d)),u={};for(let d of Yr){let p=o.filter(I=>I.bucket===d);if(!p.length)continue;let x=p.findIndex(I=>I.isBucketHeader);x>0&&p.unshift(...p.splice(x,1));let g=Ql(d,d===f[0]?f:null);x<0&&(u[$e[d]]=g);for(let I of p)for(let[h,C]of I.entries)u[h]=I.isBucketHeader&&h===$e[d]?g:C}return u}function F9(e){return $e.Content in e?e:{[$e.Content]:Ql("Content",null),...e}}function E9(e){return Yr.some(t=>$e[t]in e)}function L9(e){let t=Yr.filter(r=>$e[r]in e);if(t.length===0)return e;let o={...e};for(let r of t)o[$e[r]]=Ql(r,r===t[0]?t:null);return o}var{Provider:O9,useSelection:N9}=sa("selectedPartId");import{createContext as $0,useContext as V0,useMemo as q0,useState as Y0}from"react";import{jsx as j0}from"react/jsx-runtime";var X0={partStyle:null,setPartStyle:()=>{}},wy=$0(X0);function M9({children:e}){let[t,o]=Y0(null),r=q0(()=>({partStyle:t,setPartStyle:o}),[t]);return j0(wy.Provider,{value:r,children:e})}function H9(){return V0(wy)}import{useCallback as Xr,useEffect as jr,useId as EO,useRef as to,useState as Vn}from"react";var vy="data-puck-overlay-portal";function ts(e){return e.setAttribute(vy,"true"),()=>e.removeAttribute(vy)}var nd="small",ad="dot",J0=[{label:"Small",value:"small"},{label:"Display",value:"display"}],Z0=[{label:"Dot \u25CF",value:"dot"},{label:"Cross \u2715",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle \u25BC",value:"triangle"},{label:"None",value:"none"}],Ty={dot:"\u25CF",cross:"\u2715",slash:"/",triangle:"\u25BC",none:""},Q0={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-[800px]:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-[800px]:text-[length:var(--size-headingMedium,28px)]"},eO={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function Ry(e){return Xe(J0,nd,e)}function Fy(e){return Xe(Z0,ad,e)}function Ey(e){return Q0[e]}function Ly(e,t){return eO[e][t]}var ld="left",tO=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],oO={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function _y(e){return Xe(tO,ld,e)}function Ay(e){return e==="up"||e==="down"}function Oy(e,t){return`${oO[e]} ${t}s linear infinite`}import{jsx as Kn,jsxs as Ny}from"react/jsx-runtime";var rO={"themed-band":"text-fg/70","themed-section":"text-fg-dim","dark-media":"text-overlay-fg/70"};function sd({items:e,separator:t=ad,size:o=nd,durationSec:r=50,scroll:n=ld,backdrop:a="themed-band",className:l}){let s=Ry(o),i=_y(n),c=Fy(t),f=`text-accent ${Ly(s,c)}`.trim(),u=Ty[c],d=u===""?Kn("span",{}):Kn("span",{className:f,children:u}),p=Ay(i),x=p?"inline-flex flex-col items-center gap-[60px] pb-[60px] max-[800px]:gap-8 max-[800px]:pb-8":"inline-flex items-center gap-[60px] pr-[60px] max-[800px]:gap-8 max-[800px]:pr-8",g=p?"inline-flex flex-col items-center gap-[60px] max-[800px]:gap-8":"inline-flex items-center gap-[60px] max-[800px]:gap-8",I=h=>Kn("span",{className:x,children:e.map((C,S)=>{let P=typeof C=="string"?C:C.text,T=typeof C=="object"&&C.gold;return Ny("span",{className:g,children:[Kn("span",{className:T?"text-accent":void 0,children:re(P)}),d]},S)})},h);return Kn("div",{className:`overflow-hidden ${l??""}`,children:Ny("div",{className:`flex ${p?"flex-col ":""}whitespace-nowrap ${Ey(s)} ${rO[a]}`,style:{animation:Oy(i,r)},children:[I("a"),I("b")]})})}var nO={"top-left":"left-0 top-[120px]","top-center":"left-1/2 top-[120px] -translate-x-1/2","top-right":"right-0 top-[120px]",left:"left-0 top-1/2 -translate-y-1/2",center:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",right:"right-0 top-1/2 -translate-y-1/2","bottom-left":"left-0 bottom-[120px]","bottom-center":"left-1/2 bottom-[120px] -translate-x-1/2","bottom-right":"right-0 bottom-[120px]"},aO=`calc(${au} - ${hs}*2)`,By=`var(${lu},${hs})`,e7=`pointer-events-none absolute inset-y-0 left-[${By}] right-[${By}] z-[6] mx-auto max-w-[var(${su},${aO.replace(/ /g,"_")})]`;function os(e,t){return`pointer-events-auto absolute ${nO[e]} z-[6] sf-hero-overlay-rail flex ${t}`}function Dy(e){return bt.includes(e)?e:null}var lO="bottom-right",sO=["outline","solid","square","bare"],iO="outline",n7={outline:"Outline",solid:"Solid",square:"Square",bare:"Bare"},a7=!1,My=["prev","next"],Hy={prev:"Previous slide",next:"Next slide"};function cO(e){return sO.includes(e)?e:iO}function fO(e){return Dy(e)??lO}var dO="flex-row items-center gap-2";function Gy(e){return os(fO(e),dO)}var uO={outline:"grid h-10 w-10 cursor-pointer place-items-center rounded-full border border-overlay-chrome/60 text-overlay-fg transition-colors hover:border-overlay-chrome hover:bg-overlay-scrim/30",solid:"grid h-10 w-10 cursor-pointer place-items-center rounded-full border border-overlay-chrome bg-overlay-chrome text-overlay-scrim transition-colors hover:bg-overlay-chrome/85",square:"grid h-10 w-10 cursor-pointer place-items-center rounded-md border border-overlay-chrome/60 text-overlay-fg transition-colors hover:border-overlay-chrome hover:bg-overlay-scrim/30",bare:"grid h-10 w-10 cursor-pointer place-items-center text-overlay-fg transition-colors hover:text-overlay-chrome"};function Wy(e){return uO[cO(e)]}function Uy(e){return e.shown===!0&&(e.count??0)>1}function rs(e,t,o){if(o<=1)return t;let r=Math.min(Math.max(t,0),o-1);return e==="prev"?(r-1+o)%o:(r+1)%o}import{jsx as id}from"react/jsx-runtime";function cd({shape:e,placement:t,ref:o}){let r=Wy(e);return id("div",{ref:o,className:Gy(t),style:{color:"var(--overlay-fg)"},children:My.map(n=>id("button",{type:"button","data-hero-nav":n,"aria-label":Hy[n],className:r,children:id(en,{name:"chevron-right",size:18,rounded:!0,style:n==="prev"?{rotate:"180deg"}:void 0})},n))})}var pO=bt;var mO="top-right",xO=["cards","dots","numbers","bar","tabs"],gO=["cards","dots","numbers","bar"],zy="cards",p7={cards:"Cards",dots:"Dots",numbers:"Numbers",bar:"Bar",tabs:"Tabs"},m7=!0;function ns(e){return xO.includes(e)?e:zy}function Ky(e){return gO.includes(e)?e:zy}function IO(e){return pO.includes(e)?e:mO}var $y={cards:"flex-col gap-2.5",dots:"flex-row items-center gap-2",numbers:"flex-col gap-2",bar:"h-0.5 w-[34%] max-w-[420px] gap-px overflow-hidden rounded-full",tabs:"flex-row items-stretch w-full overflow-x-auto"};function Vy(e,t){return os(IO(t),$y[ns(e)])}function qy(e){return`flex ${$y[ns(e)]}`}function Yy(e){return e.shown!==!1&&(e.count??0)>1}function hO(e){return{name:e.dataset.slideName||"",process:e.dataset.slideProcess||"",video:e.dataset.slideMedia==="video"}}function bO(e,t){return e===t?!0:e.length!==t.length?!1:e.every((o,r)=>o.name===t[r].name&&o.process===t[r].process&&o.video===t[r].video)}function Xy(e,t){let o=Array.from(t,hO);return bO(e,o)?e:o}import{Fragment as $n,jsx as Me,jsxs as fd}from"react/jsx-runtime";function dd({slides:e,active:t,shape:o,placement:r,ref:n,tone:a="media",label:l}){let s=ns(o),i=a==="surface"?{"--overlay-fg":"var(--fg)","--overlay-chrome":"var(--fg)","--overlay-scrim":"var(--surface-2)"}:void 0;return fd("aside",{ref:n,"aria-label":l??"Featured slides",className:a==="surface"?qy(s):Vy(s,r),style:{color:"var(--overlay-fg)",...i},children:[s==="cards"&&Me(yO,{slides:e,active:t}),s==="dots"&&Me(SO,{count:e.length,active:t}),s==="numbers"&&Me(CO,{count:e.length,active:t}),s==="bar"&&Me(PO,{count:e.length,active:t}),s==="tabs"&&Me(kO,{slides:e,active:t})]})}function yO({slides:e,active:t}){return fd($n,{children:[Me("span",{className:"mb-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.28em] text-overlay-chrome/55",children:"Reel \xB7 pick a slide"}),e.map((o,r)=>{let n=r===t;return fd("button",{type:"button","data-idx":r,"aria-pressed":n,"aria-label":`Go to ${o.name||`slide ${r+1}`}`,className:["group flex w-[170px] cursor-pointer flex-col items-start gap-0.5 border bg-overlay-scrim/55 px-3 py-2.5 text-left transition-all motion-reduce:transition-none max-[1100px]:w-[140px]",n?"border-accent bg-overlay-scrim/70":"border-overlay-chrome/15 hover:border-overlay-chrome/45 hover:bg-overlay-scrim/70"].join(" "),children:[Me("span",{className:["font-display text-[length:var(--size-body,13px)] font-medium uppercase leading-tight tracking-[-0.01em]",n?"text-accent":"text-overlay-fg"].join(" "),children:o.name||`Slide ${r+1}`}),Me("span",{className:"font-mono text-[length:var(--size-label,9px)] uppercase tracking-[0.2em] text-overlay-chrome/55",children:n?"\u25B6 Now playing":o.process||" "})]},r)})]})}function SO({count:e,active:t}){return Me($n,{children:Array.from({length:e},(o,r)=>Me("button",{type:"button","data-idx":r,"aria-pressed":r===t,"aria-label":`Go to slide ${r+1}`,className:`h-2 cursor-pointer rounded-full transition-all motion-reduce:transition-none ${r===t?"w-5 bg-accent":"w-2 bg-overlay-chrome/45 hover:bg-overlay-chrome/70"}`},r))})}function CO({count:e,active:t}){return Me($n,{children:Array.from({length:e},(o,r)=>Me("button",{type:"button","data-idx":r,"aria-pressed":r===t,"aria-label":`Go to slide ${r+1}`,className:`cursor-pointer font-mono text-[length:var(--size-label,11px)] leading-none tracking-[0.06em] transition-colors ${r===t?"text-overlay-fg":"text-overlay-chrome/45 hover:text-overlay-chrome/80"}`,children:String(r+1).padStart(2,"0")},r))})}function PO({count:e,active:t}){return Me($n,{children:Array.from({length:e},(o,r)=>Me("button",{type:"button","data-idx":r,"aria-pressed":r===t,"aria-label":`Go to slide ${r+1}`,className:`h-full flex-1 cursor-pointer transition-colors ${r<=t?"bg-overlay-fg":"bg-overlay-chrome/25"}`},r))})}function kO({slides:e,active:t}){return Me($n,{children:e.map((o,r)=>{let n=r===t;return Me("button",{type:"button","data-idx":r,"aria-pressed":n,className:["flex min-w-[140px] flex-1 cursor-pointer items-end px-6 py-7 text-left transition-colors",r>0?"border-l border-overlay-chrome/15":"",n?"bg-overlay-scrim/70":"hover:bg-overlay-scrim/40"].join(" "),children:Me("span",{className:["font-heading3 text-[length:var(--size-headingSmall,24px)] font-medium uppercase leading-tight tracking-[-0.02em]",n?"text-overlay-fg":"text-overlay-chrome/55"].join(" "),children:o.name})},r)})})}import{useEffect as wO,useState as vO}from"react";var jy="(prefers-reduced-motion: reduce)";function TO(){return globalThis.window?.matchMedia?.(jy)?.matches??!1}function y7(){return TO()?"auto":"smooth"}function Jy(){let[e,t]=vO(!1);return wO(()=>{let o=globalThis.window?.matchMedia?.(jy);if(!o||(t(o.matches),typeof o.addEventListener!="function"))return;let r=n=>t(n.matches);return o.addEventListener("change",r),()=>o.removeEventListener("change",r)},[]),e}var Zy={min:40,max:100,step:5,fallback:100,unit:"vh"};function ud(e){return`${typeof e=="number"?e:Zy.fallback}${Zy.unit}`}function Qy(...e){return e.some(t=>typeof t=="number")}var RO=40;function FO(e,t){return Math.abs(e)<=RO||Math.abs(e)<=Math.abs(t)?null:e<0?"next":"prev"}function eS(e,t,o,r){let n=FO(e,t);return n?rs(n,o,r):o}function tS(e){return(e.count??0)>1&&e.editing!==!0}function oS(e){return e.editing!==!0?!1:(e.slides??[])[e.shown??0]?.video===!0}function rS(e){return e.editing!==!0?!1:!(e.playing===!0&&e.controlShown===!0)}import{jsx as Ut,jsxs as as}from"react/jsx-runtime";var LO=`
|
|
6
6
|
.hero-ticker-pick { cursor: pointer; }
|
|
7
7
|
.hero-ticker-pick:hover {
|
|
8
8
|
outline: 2px solid color-mix(in srgb, ${ys.accent} 45%, transparent);
|
|
@@ -12,4 +12,4 @@ import{$b as la,Aa as Ud,Ab as pu,Bb as mu,Cb as oa,Da as ms,Db as cr,Eb as ra,F
|
|
|
12
12
|
outline: 2px solid ${ys.accent};
|
|
13
13
|
outline-offset: -2px;
|
|
14
14
|
}
|
|
15
|
-
`,PO="Play video",kO="Hold video",wO="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",vO="item",TO=["","","","","",""],tS=new Map,oS="hero-slider:goto";function RO(e,t){let o=e?.ownerDocument?.defaultView;if(o)return o.addEventListener(oS,t),()=>o.removeEventListener(oS,t)}function FO({slides:e,alignment:t,textureOpacity:o,showTexture:r,textureColor:n,phoneUpDown:a,phoneSideways:l,autoplay:s,autoplayInterval:i,showTicker:c,tickerItems:f,heightDesktop:u,heightMobile:d,showPicker:p,pickerShape:x,pickerPlacement:g,showArrows:I,arrowsShape:h,arrowsPlacement:C,editing:S}){let P=jy(u,d),T=P?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",b=P?{"--sf-hero-h-d":dd(u),"--sf-hero-h-m":dd(d)}:void 0,O=(f??TO.map(A=>({text:A}))).map(A=>A?.text?.trim()?A.text:S?vO:"").filter(Boolean),D=c!==!1,R=to(null),_=to(null),G=to(null),Y=to(null),M=to(null),v=SO(),j=to(v),[F,E]=Vn([]),[se,N]=Vn(0),le=to(0),[ge,ie]=Vn(!1),[te,he]=Vn(!1),[de,z]=Vn(null),Ae=Yy(),{selectedHeroId:Fe,select:Oe}=sh(),ne=Xr(()=>R.current?.querySelector(".hero-track")??null,[]),K=Xr((A,W=!1)=>{N(A),le.current=A,tS.set(j.current,A);let B=R.current?.querySelector(".hero-track");if(B)if(W){let ce=B.style.transition;B.style.transition="none",B.style.transform=`translateX(-${Math.max(0,A)*100}%)`,B.offsetHeight,B.style.transition=ce}else B.style.transform=`translateX(-${Math.max(0,A)*100}%)`},[]);jr(()=>{let A=R.current,W=A?.getAttribute("data-puck-component")||A?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||v;j.current=W,z(W);let B=tS.get(W);typeof B=="number"&&(N(B),le.current=B)},[]),jr(()=>{let A=ne();if(!A)return;let W=()=>{E(ce=>Vy(ce,A.querySelectorAll("[data-slide-name]")))};W();let B=new MutationObserver(W);return B.observe(A,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{B.disconnect()}},[ne]),jr(()=>{if(!S)return;let A=W=>{let B=W.detail;if(!B||typeof B.index!="number")return;let ce=R.current,Ie=ce?.getAttribute("data-puck-component")||ce?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||j.current;B.id&&B.id!==Ie||K(B.index,!0)};return RO(R.current,A)},[S,K]);let H=F.length,He=Math.min(Math.max(se,0),Math.max(0,H-1)),Ze=$y({shown:p,count:H}),It=Hy({shown:I,count:H}),oo=Qy({editing:S,shown:He,slides:F}),Ne=eS({editing:S,playing:te,controlShown:oo}),Ve=Zy({count:H,editing:S}),ht=to(null),rt=to(null),zt=Xr(A=>{if(ht.current=null,rt.current=null,!Ve||A.touches.length!==1)return;let W=A.touches[0];ht.current={x:W.clientX,y:W.clientY},rt.current={x:W.clientX,y:W.clientY}},[Ve]),tr=Xr(A=>{if(!ht.current)return;if(A.touches.length!==1){ht.current=null;return}let W=A.touches[0];rt.current={x:W.clientX,y:W.clientY}},[]),Jr=Xr(()=>{let A=ht.current,W=rt.current;if(ht.current=null,rt.current=null,!Ve||!A||!W)return;let B=Jy(W.x-A.x,W.y-A.y,le.current,H);B!==le.current&&K(B)},[Ve,H,K]);jr(()=>{if(S||!s||ge||Ae||H<=1)return;let W=Math.max(1,typeof i=="number"?i:6)*1e3,B=window.setTimeout(()=>K((He+1)%H),W);return()=>window.clearTimeout(B)},[S,s,i,ge,Ae,H,He,K]),jr(()=>{let A=[_.current,G.current,Y.current].filter(Boolean),W=A.map(ce=>ts(ce)),B=ce=>{let Ie=ce.target,ro=Ie.closest("[data-hero-nav]"),nt=ro??Ie.closest("[data-idx]");if(!nt)return;ce.stopPropagation(),ce.preventDefault();let Zr=ro?rs(ro.dataset.heroNav,le.current,H):Number(nt.dataset.idx);Number.isNaN(Zr)||(K(Zr,S),ne()?.querySelectorAll("[data-slide-name]")[Zr]?.click())};return A.forEach(ce=>ce.addEventListener("click",B,{capture:!0})),()=>{W.forEach(ce=>ce?.()),A.forEach(ce=>ce.removeEventListener("click",B,{capture:!0}))}},[H,K,ne,S]),jr(()=>{if(!S)return;let A=M.current;if(!A)return;let W=ts(A),B=ce=>{ce.stopPropagation(),ce.preventDefault();let Ie=R.current,ro=Ie?.getAttribute("data-puck-component")||Ie?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||j.current;Oe(ro)};return A.addEventListener("click",B,{capture:!0}),()=>{W?.(),A.removeEventListener("click",B,{capture:!0})}},[S,Oe,D,O.length]);let Ee=Xr(A=>{if(!A)return;let W=ts(A),B=ce=>{ce.stopPropagation(),ce.preventDefault(),he(Ie=>!Ie)};return A.addEventListener("click",B,{capture:!0}),()=>{W?.(),A.removeEventListener("click",B,{capture:!0})}},[]);return Ut(Lc.Provider,{value:{alignment:t,textureOpacity:o,textureOn:r,textureColor:n,quietVideo:Ne,phoneUpDown:a,phoneSideways:l},children:as("div",{ref:R,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${T} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:b,onMouseEnter:()=>ie(!0),onMouseLeave:()=>ie(!1),onTouchStart:zt,onTouchMove:tr,onTouchEnd:Jr,children:[Ut(e,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${He*100}%)`,transition:Ae?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),oo&&Ut("div",{ref:Ee,"data-hero-video-control":te?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Pu} + 16px)`},children:as("button",{type:"button",className:wO,children:[Ut("span",{"aria-hidden":"true",children:te?"\u275A\u275A":"\u25B6"}),te?kO:PO]})}),(Ze||It)&&as("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))_-_var(--sf-site-gutter,40px)*2))]",children:[Ze&&Ut(fd,{ref:_,slides:F,active:He,shape:Wy(x),placement:g}),It&&Ut(id,{ref:Y,shape:h,placement:C})]}),Ze&&Ut("div",{ref:G,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:F.map((A,W)=>Ut("button",{type:"button","data-idx":W,"aria-label":`Go to slide ${W+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${W===He?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},W))}),D&&O.length>0&&as("div",{ref:M,className:`sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5${S?" hero-ticker-pick":""}`,"data-selected":S&&de!=null&&Fe===de?"":void 0,style:{background:"rgba(10,10,10,.55)"},children:[S&&Ut("style",{children:CO}),Ut(ld,{items:O,backdrop:"dark-media"})]})]})})}var qn=new Map,rS=e=>e??"";function ud(e,t,o){o&&qn.clear();let r=rS(t),n=qn.get(r);if(!n){let a=oe.listMenus(e,t);qn.set(r,a),a.catch(()=>{qn.get(r)===a&&qn.delete(r)}),n=a}return n}var ls=new Map;function nS(e,t){let o=rS(t),r=ls.get(o);if(!r){let n=ud(e,t,!0);ls.set(o,n);let a=()=>{ls.get(o)===n&&ls.delete(o)};n.then(a,a),r=n}return r}function L7(e,t=!1){return ud(e,Lo(),t)}function A7(e){return nS(e,Lo())}function O7(e,t=!1){return ud(e,null,t)}function N7(e){return nS(e,null)}var B7={ids:new Set,handles:new Set};function D7(e){return{ids:new Set(e.map(t=>t.id).filter(Boolean)),handles:new Set(e.map(t=>t.handle).filter(Boolean))}}function M7({id:e,handle:t,editing:o,ready:r,live:n}){if(!o)return!1;let a=e??"",l=t??"";return!a&&!l?!0:r?a?!n.ids.has(a):!n.handles.has(l):!1}function H7(e,t){if(t){if(t.id)return e.find(o=>o.id===t.id);if(t.handle)return e.find(o=>o.handle===t.handle)}}var EO={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}},aS=EO;var K7=Rr;var lS={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 sS={SpecTable:lS,FAQ:aS,Collections:mI};function X7(e){return e&&Object.hasOwn(sS,e)?sS[e]:null}import{forwardRef as _O,createElement as pd}from"react";var iS={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};var ee=(e,t,o,r)=>{let n=_O(({color:a="currentColor",size:l=24,stroke:s=2,title:i,className:c,children:f,...u},d)=>pd("svg",{ref:d,...iS[e],width:l,height:l,className:["tabler-icon",`tabler-icon-${t}`,c].join(" "),...e==="filled"?{fill:a}:{strokeWidth:s,stroke:a},...u},[i&&pd("title",{key:"svg-title"},i),...r.map(([p,x])=>pd(p,x)),...Array.isArray(f)?f:[f]]));return n.displayName=`${o}`,n};var LO=[["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"}]],md=ee("outline","brand-facebook","BrandFacebook",LO);var AO=[["path",{d:"M4 8a4 4 0 0 1 4 -4h8a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-8a4 4 0 0 1 -4 -4l0 -8",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}],["path",{d:"M16.5 7.5v.01",key:"svg-2"}]],xd=ee("outline","brand-instagram","BrandInstagram",AO);var OO=[["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"}]],gd=ee("outline","brand-linkedin","BrandLinkedin",OO);var NO=[["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"}]],Id=ee("outline","brand-pinterest","BrandPinterest",NO);var BO=[["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"}]],hd=ee("outline","brand-tiktok","BrandTiktok",BO);var DO=[["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"}]],bd=ee("outline","brand-whatsapp","BrandWhatsapp",DO);var MO=[["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"}]],yd=ee("outline","brand-x","BrandX",MO);var HO=[["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"}]],Sd=ee("outline","brand-youtube","BrandYoutube",HO);var GO=[["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"}]],Cd=ee("filled","brand-facebook-filled","BrandFacebookFilled",GO);var WO=[["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"}]],Pd=ee("filled","brand-instagram-filled","BrandInstagramFilled",WO);var UO=[["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"}]],kd=ee("filled","brand-linkedin-filled","BrandLinkedinFilled",UO);var zO=[["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"}]],wd=ee("filled","brand-pinterest-filled","BrandPinterestFilled",zO);var KO=[["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"}]],vd=ee("filled","brand-tiktok-filled","BrandTiktokFilled",KO);var $O=[["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"}]],Td=ee("filled","brand-whatsapp-filled","BrandWhatsappFilled",$O);var VO=[["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"}]],Rd=ee("filled","brand-x-filled","BrandXFilled",VO);var qO=[["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"}]],Fd=ee("filled","brand-youtube-filled","BrandYoutubeFilled",qO);import{jsx as XO}from"react/jsx-runtime";var JY="outline",YO={instagram:{outline:xd,solid:Pd},facebook:{outline:md,solid:Cd},tiktok:{outline:hd,solid:vd},youtube:{outline:Sd,solid:Fd},x:{outline:yd,solid:Rd},linkedin:{outline:gd,solid:kd},pinterest:{outline:Id,solid:wd},whatsapp:{outline:bd,solid:Td}};function ZY({platform:e,iconStyle:t,size:o}){let r=YO[e][t];return XO(r,{size:o,stroke:1.75,"aria-hidden":"true",focusable:"false"})}export{Jt as a,Sr as b,fh as c,_e as d,bn as e,Qz as f,r3 as g,n3 as h,a3 as i,Fu as j,Rl as k,Cp as l,C3 as m,T3 as n,Jc as o,vh as p,xE as q,E3 as r,El as s,Th as t,gE as u,IE as v,hE as w,A3 as x,O3 as y,N3 as z,B3 as A,ia as B,CS as C,eN as D,po as E,tN as F,oN as G,_u as H,rN as I,nN as J,aN as K,vS as L,ef as M,FE as N,z3 as O,V3 as P,_h as Q,q3 as R,_E as S,Y3 as T,f2 as U,d2 as V,Ri as W,jt as X,Al as Y,lt as Z,sN as _,iN as $,cN as aa,fN as ba,fa as ca,dN as da,uN as ea,pN as fa,dt as ga,je as ha,IN as ia,_S as ja,hN as ka,bN as la,LS as ma,CN as na,AS as oa,PN as pa,FN as qa,on as ra,GS as sa,WS as ta,US as ua,Rs as va,EN as wa,eC as xa,oC as ya,DN as za,Wu as Aa,iC as Ba,uC as Ca,rn as Da,Vu as Ea,VN as Fa,mo as Ga,ln as Ha,rB as Ia,aB as Ja,lB as Ka,sB as La,iB as Ma,yC as Na,xo as Oa,uB as Pa,pB as Qa,dp as Ra,IB as Sa,ba as Ta,yB as Ua,Ms as Va,Hs as Wa,Qu as Xa,PB as Ya,Sa as Za,Ys as _a,xp as $a,Et as ab,_t as bb,Pa as cb,d1 as db,wp as eb,ka as fb,js as gb,JC as hb,x1 as ib,Rp as jb,QC as kb,h1 as lb,b1 as mb,y1 as nb,S1 as ob,iP as pb,Be as qb,Dp as rb,k1 as sb,Kp as tb,_1 as ub,va as vb,Yp as wb,Xp as xb,L1 as yb,A1 as zb,Jp as Ab,O1 as Bb,Zp as Cb,N1 as Db,xP as Eb,B1 as Fb,pr as Gb,Io as Hb,Qp as Ib,H1 as Jb,Ra as Kb,em as Lb,tm as Mb,om as Nb,W1 as Ob,IP as Pb,nm as Qb,am as Rb,mr as Sb,lm as Tb,bP as Ub,z1 as Vb,K1 as Wb,Fa as Xb,im as Yb,Ea as Zb,ri as _b,ai as $b,fm as ac,si as bc,ci as cc,xm as dc,gD as ec,Oa as fc,Na as gc,Tm as hc,Yt as ic,Vt as jc,ho as kc,Em as lc,Do as mc,Lm as nc,Am as oc,_D as pc,pn as qc,ke as rc,LD as sc,AD as tc,Da as uc,OD as vc,ND as wc,Ma as xc,HP as yc,Wm as zc,GP as Ac,zD as Bc,KD as Cc,zP as Dc,KP as Ec,$D as Fc,VD as Gc,qD as Hc,qP as Ic,XP as Jc,Vm as Kc,jP as Lc,YD as Mc,XD as Nc,jD as Oc,JD as Pc,ZD as Qc,QD as Rc,eM as Sc,tM as Tc,oM as Uc,rM as Vc,Qm as Wc,yi as Xc,Si as Yc,In as Zc,ex as _c,mM as $c,tx as ad,rx as bd,ax as cd,hn as dd,Fi as ed,Ei as fd,Sn as gd,Cx as hd,H2 as id,Lk as jd,Ak as kd,Ok as ld,Nk as md,z2 as nd,K2 as od,Q2 as pd,eH as qd,tH as rd,oH as sd,Xa as td,rH as ud,Cr as vd,nH as wd,wx as xd,Bk as yd,aH as zd,lH as Ad,sH as Bd,Mi as Cd,zk as Dd,Kk as Ed,ja as Fd,Tx as Gd,_x as Hd,Qk as Id,pH as Jd,mH as Kd,So as Ld,xH as Md,gH as Nd,IH as Od,hH as Pd,bw as Qd,kn as Rd,Hx as Sd,SH as Td,Wx as Ud,TH as Vd,RH as Wd,Pr as Xd,re as Yd,WH as Zd,Ot as _d,el as $d,zi as ae,XH as be,Ki as ce,dr as de,tp as ee,ya as fe,No as ge,AB as he,OB as ie,jw as je,fG as ke,ol as le,xG as me,cg as ne,Yi as oe,ll as pe,sl as qe,TG as re,Wo as se,BG as te,Qi as ue,ZG as ve,QG as we,e4 as xe,t4 as ye,Nv as ze,ul as Ae,i4 as Be,g4 as Ce,I4 as De,ml as Ee,h4 as Fe,w4 as Ge,oc as He,Tn as Ie,Gv as Je,v4 as Ke,Eg as Le,nc as Me,Og as Ne,ac as Oe,Zv as Pe,sT as Qe,_5 as Re,Dg as Se,ic as Te,N5 as Ue,$g as Ve,Vg as We,K5 as Xe,$5 as Ye,DB as Ze,MB as _e,sp as $e,HB as af,GB as bf,Us as cf,Qg as df,cp as ef,Po as ff,eI as gf,EW as hf,Qt as if,AT as jf,yc as kf,Hh as lf,TK as mf,Hl as nf,df as of,LK as pf,wt as qf,AK as rf,GK as sf,xf as tf,hf as uf,yf as vf,nb as wf,sb as xf,Q_ as yf,G8 as zf,Tf as Af,Jo as Bf,db as Cf,Q8 as Df,mb as Ef,xb as Ff,gb as Gf,mL as Hf,S$ as If,C$ as Jf,$l as Kf,k$ as Lf,Hf as Mf,w$ as Nf,_L as Of,v$ as Pf,R$ as Qf,zr as Rf,F$ as Sf,NL as Tf,Vl as Uf,_$ as Vf,Fb as Wf,A$ as Xf,O$ as Yf,N$ as Zf,B$ as _f,D$ as $f,Yl as ag,Xl as bg,H$ as cg,Gb as dg,W$ as eg,zb as fg,Vf as gg,qf as hg,V$ as ig,_A as jg,Zl as kg,oq as lg,rq as mg,nq as ng,aq as og,lq as pg,HA as qg,sq as rg,iq as sg,zA as tg,cq as ug,fq as vg,dq as wg,uq as xg,pq as yg,qr as zg,ft as Ag,mq as Bg,xq as Cg,gq as Dg,VA as Eg,Iq as Fg,ay as Gg,er as Hg,YA as Ig,Kr as Jg,hq as Kg,XA as Lg,iy as Mg,cy as Ng,bq as Og,yq as Pg,Sq as Qg,Cq as Rg,Pq as Sg,kq as Tg,wq as Ug,vq as Vg,Tq as Wg,Rq as Xg,dy as Yg,uy as Zg,py as _g,my as $g,Zo as ah,Fq as bh,Eq as ch,_q as dh,Lq as eh,Aq as fh,Oq as gh,Nq as hh,Bq as ih,To as jh,Dq as kh,Mq as lh,Hq as mh,td as nh,Gq as oh,od as ph,y0 as qh,Wq as rh,Uq as sh,zq as th,Kq as uh,$q as vh,Vq as wh,Iy as xh,hy as yh,by as zh,w0 as Ah,qq as Bh,Yq as Ch,Yr as Dh,$e as Eh,s9 as Fh,i9 as Gh,c9 as Hh,f9 as Ih,d9 as Jh,u9 as Kh,p9 as Lh,_0 as Mh,m9 as Nh,x9 as Oh,g9 as Ph,I9 as Qh,h9 as Rh,Le as Sh,tI as Th,BW as Uh,bl as Vh,Cc as Wh,MW as Xh,HW as Yh,GW as Zh,WW as _h,UW as $h,zW as ai,ts as bi,S9 as ci,C9 as di,w9 as ei,v9 as fi,L7 as gi,A7 as hi,O7 as ii,N7 as ji,B7 as ki,D7 as li,M7 as mi,H7 as ni,VI as oi,qI as pi,YI as qi,XI as ri,Mc as si,Zt as ti,s7 as ui,nI as vi,qW as wi,YW as xi,cR as yi,oU as zi,rU as Ai,nU as Bi,sU as Ci,iU as Di,uI as Ei,Vc as Fi,Rr as Gi,xI as Hi,wc as Ii,bR as Ji,gI as Ki,yR as Li,PR as Mi,kR as Ni,wR as Oi,hI as Pi,_R as Qi,LR as Ri,BR as Si,_c as Ti,wI as Ui,vI as Vi,YU as Wi,XU as Xi,jU as Yi,JU as Zi,YR as _i,ZR as $i,Lr as aj,p6 as bj,Cl as cj,DI as dj,MI as ej,HI as fj,GI as gj,mF as hj,w6 as ij,xF as jj,hF as kj,Hc as lj,SF as mj,Pc as nj,pI as oj,gR as pj,hR as qj,mU as rj,xU as sj,zc as tj,oz as uj,QI as vj,FF as wj,sz as xj,EF as yj,AF as zj,On as Aj,kz as Bj,MF as Cj,qc as Dj,Az as Ej,Hz as Fj,Xy as Gj,dd as Hj,jy as Ij,EO as Jj,K7 as Kj,X7 as Lj,aO as Mj,sO as Nj,Gy as Oj,e7 as Pj,t7 as Qj,fd as Rj,J0 as Sj,Z0 as Tj,Q0 as Uj,$9 as Vj,V9 as Wj,rd as Xj,nd as Yj,U0 as Zj,z0 as _j,ad as $j,V0 as ak,ld as bk,Uz as ck,zz as dk,sh as ek,TO as fk,oS as gk,FO as hk,VF as ik,qz as jk,Yz as kk,T0 as lk,e9 as mk,t9 as nk,o9 as ok,JY as pk,ZY as qk};
|
|
15
|
+
`,_O="Play video",AO="Hold video",OO="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",NO="item",BO=["","","","","",""],nS=new Map,aS="hero-slider:goto";function DO(e,t){let o=e?.ownerDocument?.defaultView;if(o)return o.addEventListener(aS,t),()=>o.removeEventListener(aS,t)}function MO({slides:e,alignment:t,textureOpacity:o,showTexture:r,textureColor:n,phoneUpDown:a,phoneSideways:l,autoplay:s,autoplayInterval:i,showTicker:c,tickerItems:f,heightDesktop:u,heightMobile:d,showPicker:p,pickerShape:x,pickerPlacement:g,showArrows:I,arrowsShape:h,arrowsPlacement:C,editing:S}){let P=Qy(u,d),T=P?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",b=P?{"--sf-hero-h-d":ud(u),"--sf-hero-h-m":ud(d)}:void 0,O=(f??BO.map(A=>({text:A}))).map(A=>A?.text?.trim()?A.text:S?NO:"").filter(Boolean),D=c!==!1,R=to(null),L=to(null),G=to(null),Y=to(null),M=to(null),v=EO(),j=to(v),[F,E]=Vn([]),[se,N]=Vn(0),le=to(0),[ge,ie]=Vn(!1),[te,he]=Vn(!1),[de,z]=Vn(null),Ae=Jy(),{selectedHeroId:Fe,select:Oe}=fh(),ne=Xr(()=>R.current?.querySelector(".hero-track")??null,[]),K=Xr((A,W=!1)=>{N(A),le.current=A,nS.set(j.current,A);let B=R.current?.querySelector(".hero-track");if(B)if(W){let ce=B.style.transition;B.style.transition="none",B.style.transform=`translateX(-${Math.max(0,A)*100}%)`,B.offsetHeight,B.style.transition=ce}else B.style.transform=`translateX(-${Math.max(0,A)*100}%)`},[]);jr(()=>{let A=R.current,W=A?.getAttribute("data-puck-component")||A?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||v;j.current=W,z(W);let B=nS.get(W);typeof B=="number"&&(N(B),le.current=B)},[]),jr(()=>{let A=ne();if(!A)return;let W=()=>{E(ce=>Xy(ce,A.querySelectorAll("[data-slide-name]")))};W();let B=new MutationObserver(W);return B.observe(A,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{B.disconnect()}},[ne]),jr(()=>{if(!S)return;let A=W=>{let B=W.detail;if(!B||typeof B.index!="number")return;let ce=R.current,Ie=ce?.getAttribute("data-puck-component")||ce?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||j.current;B.id&&B.id!==Ie||K(B.index,!0)};return DO(R.current,A)},[S,K]);let H=F.length,He=Math.min(Math.max(se,0),Math.max(0,H-1)),Ze=Yy({shown:p,count:H}),It=Uy({shown:I,count:H}),oo=oS({editing:S,shown:He,slides:F}),Ne=rS({editing:S,playing:te,controlShown:oo}),Ve=tS({count:H,editing:S}),ht=to(null),rt=to(null),zt=Xr(A=>{if(ht.current=null,rt.current=null,!Ve||A.touches.length!==1)return;let W=A.touches[0];ht.current={x:W.clientX,y:W.clientY},rt.current={x:W.clientX,y:W.clientY}},[Ve]),tr=Xr(A=>{if(!ht.current)return;if(A.touches.length!==1){ht.current=null;return}let W=A.touches[0];rt.current={x:W.clientX,y:W.clientY}},[]),Jr=Xr(()=>{let A=ht.current,W=rt.current;if(ht.current=null,rt.current=null,!Ve||!A||!W)return;let B=eS(W.x-A.x,W.y-A.y,le.current,H);B!==le.current&&K(B)},[Ve,H,K]);jr(()=>{if(S||!s||ge||Ae||H<=1)return;let W=Math.max(1,typeof i=="number"?i:6)*1e3,B=window.setTimeout(()=>K((He+1)%H),W);return()=>window.clearTimeout(B)},[S,s,i,ge,Ae,H,He,K]),jr(()=>{let A=[L.current,G.current,Y.current].filter(Boolean),W=A.map(ce=>ts(ce)),B=ce=>{let Ie=ce.target,ro=Ie.closest("[data-hero-nav]"),nt=ro??Ie.closest("[data-idx]");if(!nt)return;ce.stopPropagation(),ce.preventDefault();let Zr=ro?rs(ro.dataset.heroNav,le.current,H):Number(nt.dataset.idx);Number.isNaN(Zr)||(K(Zr,S),ne()?.querySelectorAll("[data-slide-name]")[Zr]?.click())};return A.forEach(ce=>ce.addEventListener("click",B,{capture:!0})),()=>{W.forEach(ce=>ce?.()),A.forEach(ce=>ce.removeEventListener("click",B,{capture:!0}))}},[H,K,ne,S]),jr(()=>{if(!S)return;let A=M.current;if(!A)return;let W=ts(A),B=ce=>{ce.stopPropagation(),ce.preventDefault();let Ie=R.current,ro=Ie?.getAttribute("data-puck-component")||Ie?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||j.current;Oe(ro)};return A.addEventListener("click",B,{capture:!0}),()=>{W?.(),A.removeEventListener("click",B,{capture:!0})}},[S,Oe,D,O.length]);let Ee=Xr(A=>{if(!A)return;let W=ts(A),B=ce=>{ce.stopPropagation(),ce.preventDefault(),he(Ie=>!Ie)};return A.addEventListener("click",B,{capture:!0}),()=>{W?.(),A.removeEventListener("click",B,{capture:!0})}},[]);return Ut(Ac.Provider,{value:{alignment:t,textureOpacity:o,textureOn:r,textureColor:n,quietVideo:Ne,phoneUpDown:a,phoneSideways:l},children:as("div",{ref:R,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${T} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:b,onMouseEnter:()=>ie(!0),onMouseLeave:()=>ie(!1),onTouchStart:zt,onTouchMove:tr,onTouchEnd:Jr,children:[Ut(e,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${He*100}%)`,transition:Ae?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),oo&&Ut("div",{ref:Ee,"data-hero-video-control":te?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${ku} + 16px)`},children:as("button",{type:"button",className:OO,children:[Ut("span",{"aria-hidden":"true",children:te?"\u275A\u275A":"\u25B6"}),te?AO:_O]})}),(Ze||It)&&as("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))_-_var(--sf-site-gutter,40px)*2))]",children:[Ze&&Ut(dd,{ref:L,slides:F,active:He,shape:Ky(x),placement:g}),It&&Ut(cd,{ref:Y,shape:h,placement:C})]}),Ze&&Ut("div",{ref:G,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:F.map((A,W)=>Ut("button",{type:"button","data-idx":W,"aria-label":`Go to slide ${W+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${W===He?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},W))}),D&&O.length>0&&as("div",{ref:M,className:`sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5${S?" hero-ticker-pick":""}`,"data-selected":S&&de!=null&&Fe===de?"":void 0,style:{background:"rgba(10,10,10,.55)"},children:[S&&Ut("style",{children:LO}),Ut(sd,{items:O,backdrop:"dark-media"})]})]})})}var qn=new Map,lS=e=>e??"";function pd(e,t,o){o&&qn.clear();let r=lS(t),n=qn.get(r);if(!n){let a=oe.listMenus(e,t);qn.set(r,a),a.catch(()=>{qn.get(r)===a&&qn.delete(r)}),n=a}return n}var ls=new Map;function sS(e,t){let o=lS(t),r=ls.get(o);if(!r){let n=pd(e,t,!0);ls.set(o,n);let a=()=>{ls.get(o)===n&&ls.delete(o)};n.then(a,a),r=n}return r}function $7(e,t=!1){return pd(e,_o(),t)}function V7(e){return sS(e,_o())}function q7(e,t=!1){return pd(e,null,t)}function Y7(e){return sS(e,null)}var X7={ids:new Set,handles:new Set};function j7(e){return{ids:new Set(e.map(t=>t.id).filter(Boolean)),handles:new Set(e.map(t=>t.handle).filter(Boolean))}}function J7({id:e,handle:t,editing:o,ready:r,live:n}){if(!o)return!1;let a=e??"",l=t??"";return!a&&!l?!0:r?a?!n.ids.has(a):!n.handles.has(l):!1}function Z7(e,t){if(t){if(t.id)return e.find(o=>o.id===t.id);if(t.handle)return e.find(o=>o.handle===t.handle)}}var HO={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}},iS=HO;var rY=Rr;var cS={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 fS={SpecTable:cS,FAQ:iS,Collections:xI};function iY(e){return e&&Object.hasOwn(fS,e)?fS[e]:null}import{forwardRef as GO,createElement as md}from"react";var dS={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};var ee=(e,t,o,r)=>{let n=GO(({color:a="currentColor",size:l=24,stroke:s=2,title:i,className:c,children:f,...u},d)=>md("svg",{ref:d,...dS[e],width:l,height:l,className:["tabler-icon",`tabler-icon-${t}`,c].join(" "),...e==="filled"?{fill:a}:{strokeWidth:s,stroke:a},...u},[i&&md("title",{key:"svg-title"},i),...r.map(([p,x])=>md(p,x)),...Array.isArray(f)?f:[f]]));return n.displayName=`${o}`,n};var WO=[["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"}]],xd=ee("outline","brand-facebook","BrandFacebook",WO);var UO=[["path",{d:"M4 8a4 4 0 0 1 4 -4h8a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-8a4 4 0 0 1 -4 -4l0 -8",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}],["path",{d:"M16.5 7.5v.01",key:"svg-2"}]],gd=ee("outline","brand-instagram","BrandInstagram",UO);var zO=[["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"}]],Id=ee("outline","brand-linkedin","BrandLinkedin",zO);var KO=[["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"}]],hd=ee("outline","brand-pinterest","BrandPinterest",KO);var $O=[["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"}]],bd=ee("outline","brand-tiktok","BrandTiktok",$O);var VO=[["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"}]],yd=ee("outline","brand-whatsapp","BrandWhatsapp",VO);var qO=[["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"}]],Sd=ee("outline","brand-x","BrandX",qO);var YO=[["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"}]],Cd=ee("outline","brand-youtube","BrandYoutube",YO);var XO=[["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"}]],Pd=ee("filled","brand-facebook-filled","BrandFacebookFilled",XO);var jO=[["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"}]],kd=ee("filled","brand-instagram-filled","BrandInstagramFilled",jO);var JO=[["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"}]],wd=ee("filled","brand-linkedin-filled","BrandLinkedinFilled",JO);var ZO=[["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"}]],vd=ee("filled","brand-pinterest-filled","BrandPinterestFilled",ZO);var QO=[["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"}]],Td=ee("filled","brand-tiktok-filled","BrandTiktokFilled",QO);var eN=[["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"}]],Rd=ee("filled","brand-whatsapp-filled","BrandWhatsappFilled",eN);var tN=[["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"}]],Fd=ee("filled","brand-x-filled","BrandXFilled",tN);var oN=[["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"}]],Ed=ee("filled","brand-youtube-filled","BrandYoutubeFilled",oN);import{jsx as nN}from"react/jsx-runtime";var fX="outline",rN={instagram:{outline:gd,solid:kd},facebook:{outline:xd,solid:Pd},tiktok:{outline:bd,solid:Td},youtube:{outline:Cd,solid:Ed},x:{outline:Sd,solid:Fd},linkedin:{outline:Id,solid:wd},pinterest:{outline:hd,solid:vd},whatsapp:{outline:yd,solid:Rd}};function dX({platform:e,iconStyle:t,size:o}){let r=rN[e][t];return nN(r,{size:o,stroke:1.75,"aria-hidden":"true",focusable:"false"})}export{Jt as a,Sr as b,ph as c,Le as d,bn as e,u3 as f,g3 as g,I3 as h,h3 as i,Eu as j,Rl as k,Pp as l,N3 as m,G3 as n,Zc as o,Fh as p,kE as q,z3 as r,El as s,Eh as t,wE as u,vE as v,TE as w,V3 as x,q3 as y,Y3 as z,X3 as A,ia as B,wS as C,cN as D,po as E,fN as F,dN as G,_u as H,uN as I,pN as J,mN as K,FS as L,tf as M,ME as N,oK as O,aK as P,Oh as Q,lK as R,GE as S,sK as T,b2 as U,y2 as V,Ri as W,jt as X,Al as Y,lt as Z,gN as _,IN as $,hN as aa,bN as ba,fa as ca,yN as da,SN as ea,CN as fa,dt as ga,je as ha,vN as ia,OS as ja,TN as ka,RN as la,NS as ma,LN as na,BS as oa,_N as pa,MN as qa,on as ra,zS as sa,KS as ta,$S as ua,Rs as va,HN as wa,rC as xa,aC as ya,VN as za,Uu as Aa,dC as Ba,xC as Ca,rn as Da,qu as Ea,tB as Fa,mo as Ga,ln as Ha,uB as Ia,mB as Ja,xB as Ka,gB as La,IB as Ma,PC as Na,xo as Oa,SB as Pa,CB as Qa,up as Ra,vB as Sa,ba as Ta,FB as Ua,Ms as Va,Hs as Wa,ep as Xa,_B as Ya,Sa as Za,Ys as _a,gp as $a,Et as ab,Lt as bb,Pa as cb,y1 as db,vp as eb,ka as fb,js as gb,eP as hb,k1 as ib,Fp as jb,oP as kb,T1 as lb,R1 as mb,F1 as nb,E1 as ob,dP as pb,Be as qb,Mp as rb,A1 as sb,$p as tb,G1 as ub,va as vb,Xp as wb,jp as xb,W1 as yb,U1 as zb,Zp as Ab,z1 as Bb,Qp as Cb,K1 as Db,hP as Eb,$1 as Fb,pr as Gb,Io as Hb,em as Ib,Y1 as Jb,Ra as Kb,tm as Lb,om as Mb,rm as Nb,j1 as Ob,yP as Pb,am as Qb,lm as Rb,mr as Sb,sm as Tb,CP as Ub,Z1 as Vb,Q1 as Wb,Fa as Xb,cm as Yb,Ea as Zb,ri as _b,ai as $b,dm as ac,si as bc,ci as cc,gm as dc,wD as ec,Oa as fc,Na as gc,Rm as hc,Yt as ic,Vt as jc,ho as kc,Lm as lc,Do as mc,Am as nc,Om as oc,GD as pc,pn as qc,ke as rc,WD as sc,UD as tc,Da as uc,zD as vc,KD as wc,Ma as xc,UP as yc,Um as zc,zP as Ac,ZD as Bc,QD as Cc,VP as Dc,qP as Ec,eM as Fc,tM as Gc,oM as Hc,jP as Ic,ZP as Jc,qm as Kc,QP as Lc,rM as Mc,nM as Nc,aM as Oc,lM as Pc,sM as Qc,iM as Rc,cM as Sc,fM as Tc,dM as Uc,uM as Vc,ex as Wc,yi as Xc,Si as Yc,In as Zc,tx as _c,PM as $c,ox as ad,nx as bd,lx as cd,hn as dd,Fi as ed,Ei as fd,Sn as gd,Px as hd,Y2 as id,Nk as jd,Bk as kd,Dk as ld,Mk as md,Z2 as nd,Q2 as od,iH as pd,cH as qd,fH as rd,dH as sd,Xa as td,uH as ud,Cr as vd,pH as wd,vx as xd,Hk as yd,mH as zd,xH as Ad,gH as Bd,Mi as Cd,Vk as Dd,qk as Ed,ja as Fd,Rx as Gd,_x as Hd,ow as Id,CH as Jd,PH as Kd,So as Ld,kH as Md,wH as Nd,vH as Od,TH as Pd,Cw as Qd,kn as Rd,Gx as Sd,EH as Td,Ux as Ud,BH as Vd,DH as Wd,Pr as Xd,re as Yd,jH as Zd,Ot as _d,el as $d,zi as ae,nG as be,Ki as ce,dr as de,op as ee,ya as fe,No as ge,UB as he,zB as ie,Qw as je,bG as ke,ol as le,kG as me,fg as ne,Yi as oe,ll as pe,sl as qe,BG as re,Wo as se,$G as te,Qi as ue,s4 as ve,i4 as we,c4 as xe,f4 as ye,Mv as ze,ul as Ae,I4 as Be,w4 as Ce,v4 as De,ml as Ee,T4 as Fe,O4 as Ge,oc as He,Tn as Ie,zv as Je,N4 as Ke,Lg as Le,nc as Me,Ng as Ne,ac as Oe,tT as Pe,fT as Qe,G5 as Re,Mg as Se,ic as Te,K5 as Ue,Vg as Ve,qg as We,Q5 as Xe,eW as Ye,VB as Ze,qB as _e,ip as $e,YB as af,XB as bf,Us as cf,eI as df,fp as ef,Po as ff,tI as gf,HW as hf,Qt as if,BT as jf,yc as kf,Uh as lf,GK as mf,Hl as nf,uf as of,$K as pf,wt as qf,VK as rf,QK as sf,gf as tf,bf as uf,Sf as vf,sb as wf,fb as xf,i_ as yf,Q8 as zf,Rf as Af,Jo as Bf,mb as Cf,u$ as Df,Ib as Ef,hb as Ff,bb as Gf,P_ as Hf,O$ as If,N$ as Jf,$l as Kf,D$ as Lf,Gf as Mf,M$ as Nf,G_ as Of,H$ as Pf,W$ as Qf,zr as Rf,U$ as Sf,K_ as Tf,Vl as Uf,K$ as Vf,_b as Wf,V$ as Xf,q$ as Yf,Y$ as Zf,X$ as _f,j$ as $f,Yl as ag,Xl as bg,Z$ as cg,zb as dg,eV as eg,Vb as fg,qf as gg,Yf as hg,aV as ig,GA as jg,Zl as kg,xq as lg,gq as mg,Iq as ng,hq as og,bq as pg,YA as qg,yq as rg,Sq as sg,ZA as tg,Cq as ug,Pq as vg,kq as wg,wq as xg,vq as yg,qr as zg,ft as Ag,Tq as Bg,Rq as Cg,Fq as Dg,t0 as Eg,Eq as Fg,iy as Gg,er as Hg,r0 as Ig,Kr as Jg,Lq as Kg,n0 as Lg,dy as Mg,uy as Ng,_q as Og,Aq as Pg,Oq as Qg,Nq as Rg,Bq as Sg,Dq as Tg,Mq as Ug,Hq as Vg,Gq as Wg,Wq as Xg,my as Yg,xy as Zg,gy as _g,Iy as $g,Zo as ah,Uq as bh,zq as ch,Kq as dh,$q as eh,Vq as fh,qq as gh,Yq as hh,Xq as ih,To as jh,jq as kh,Jq as lh,Zq as mh,od as nh,Qq as oh,rd as ph,F0 as qh,e9 as rh,t9 as sh,o9 as th,r9 as uh,n9 as vh,a9 as wh,yy as xh,Sy as yh,Cy as zh,O0 as Ah,l9 as Bh,s9 as Ch,Yr as Dh,$e as Eh,y9 as Fh,S9 as Gh,C9 as Hh,P9 as Ih,k9 as Jh,w9 as Kh,v9 as Lh,G0 as Mh,T9 as Nh,R9 as Oh,F9 as Ph,E9 as Qh,L9 as Rh,_e as Sh,oI as Th,$W as Uh,bl as Vh,Cc as Wh,qW as Xh,YW as Yh,XW as Zh,jW as _h,JW as $h,ZW as ai,ts as bi,O9 as ci,N9 as di,M9 as ei,H9 as fi,$7 as gi,V7 as hi,q7 as ii,Y7 as ji,X7 as ki,j7 as li,J7 as mi,Z7 as ni,XI as oi,jI as pi,JI as qi,ZI as ri,Hc as si,Zt as ti,y7 as ui,aI as vi,oU as wi,rU as xi,uR as yi,dU as zi,uU as Ai,pU as Bi,gU as Ci,IU as Di,pI as Ei,qc as Fi,Rr as Gi,gI as Hi,wc as Ii,CR as Ji,II as Ki,PR as Li,vR as Mi,TR as Ni,RR as Oi,bI as Pi,OR as Qi,NR as Ri,HR as Si,_c as Ti,RI as Ui,FI as Vi,s6 as Wi,i6 as Xi,c6 as Yi,f6 as Zi,rF as _i,sF as $i,_r as aj,v6 as bj,Cl as cj,GI as dj,WI as ej,UI as fj,zI as gj,PF as hj,M6 as ij,kF as jj,TF as kj,Gc as lj,EF as mj,Pc as nj,mI as oj,bR as pj,SR as qj,PU as rj,kU as sj,Kc as tj,xz as uj,oh as vj,MF as wj,yz as xj,HF as yj,UF as zj,On as Aj,Dz as Bj,qF as Cj,Yc as Dj,Vz as Ej,Zz as Fj,Zy as Gj,ud as Hj,Qy as Ij,HO as Jj,rY as Kj,iY as Lj,mO as Mj,gO as Nj,zy as Oj,p7 as Pj,m7 as Qj,dd as Rj,lO as Sj,sO as Tj,iO as Uj,n7 as Vj,a7 as Wj,nd as Xj,ad as Yj,J0 as Zj,Z0 as _j,ld as $j,tO as ak,sd as bk,t3 as ck,o3 as dk,fh as ek,BO as fk,aS as gk,MO as hk,tE as ik,l3 as jk,s3 as kk,B0 as lk,p9 as mk,m9 as nk,x9 as ok,fX as pk,dX as qk};
|