efficient-web-builder 0.7.0 → 0.7.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/chunks/EditorPreviewCheckout-NMJHO2WR.js +4 -0
  3. package/dist/chunks/{PreviewFooter-3TQMFRPZ.js → PreviewFooter-E3AVT663.js} +1 -1
  4. package/dist/chunks/SectionEditorShell-CNJJULHO.js +1 -0
  5. package/dist/chunks/SiteEditorProvider-4NZYBEVE.js +1 -0
  6. package/dist/chunks/StorefrontEditorChrome-OF6DKLWG.js +1 -0
  7. package/dist/chunks/{chunk-KR3FTVDW.js → chunk-6C5FL63W.js} +1 -1
  8. package/dist/chunks/chunk-A2QNXDQ6.js +11 -0
  9. package/dist/chunks/{chunk-K3Y6UBLO.js → chunk-G3X5WFSD.js} +1 -1
  10. package/dist/chunks/chunk-INA2LIFW.js +230 -0
  11. package/dist/chunks/chunk-JSOIOPWC.js +1 -0
  12. package/dist/chunks/{chunk-4G3T6ZD2.js → chunk-NTGUUW2T.js} +1 -1
  13. package/dist/chunks/chunk-PAXN7G3Y.js +1 -0
  14. package/dist/chunks/chunk-QVG6K5WY.js +15 -0
  15. package/dist/chunks/{chunk-N35EG6RF.js → chunk-V2G3QFLM.js} +28 -28
  16. package/dist/chunks/{chunk-IVOJJ6LW.js → chunk-YMLSAFSM.js} +1 -1
  17. package/dist/chunks/{fitment-data-ZLYB5QPR.js → fitment-data-6OYGRNMJ.js} +1 -1
  18. package/dist/chunks/{render-client-A75K43T5.js → render-client-O7623TWA.js} +1 -1
  19. package/dist/editor.css +1 -1
  20. package/dist/index.js +297 -134
  21. package/package.json +2 -2
  22. package/dist/chunks/EditorPreviewCheckout-UMTU2FL4.js +0 -4
  23. package/dist/chunks/SectionEditorShell-FZIT2REV.js +0 -1
  24. package/dist/chunks/SiteEditorProvider-FHKVGA4K.js +0 -1
  25. package/dist/chunks/StorefrontEditorChrome-MYOIHQ5J.js +0 -1
  26. package/dist/chunks/chunk-4KLEZTLW.js +0 -11
  27. package/dist/chunks/chunk-RF5DTRJ5.js +0 -1
  28. package/dist/chunks/chunk-UTFM4DGR.js +0 -15
  29. package/dist/chunks/chunk-WMFQNAWF.js +0 -11
  30. package/dist/chunks/chunk-X6KEAC34.js +0 -1
  31. /package/dist/chunks/{chunk-UTFM4DGR.js.LEGAL.txt → chunk-QVG6K5WY.js.LEGAL.txt} +0 -0
  32. /package/dist/chunks/{chunk-N35EG6RF.js.LEGAL.txt → chunk-V2G3QFLM.js.LEGAL.txt} +0 -0
@@ -1,11 +0,0 @@
1
- import{C as Rn,E as wt,L as In,N as An,P as ee,i as _n,u as Me,w as _t,z as wn}from"./chunk-RF5DTRJ5.js";function Ln(e,t){let n=e.components?.[t]?.fields??{};return Object.keys(n).filter(r=>n[r]?.type==="slot")}function lo(e,t){return Ln(e,t.type).flatMap(n=>(Array.isArray(t.props[n])?t.props[n]:[]).map((o,s)=>({child:o,zone:`${t.props.id}:${n}`,index:s})))}function fa(e,t,n){let r=(o,s,i,a)=>{if(!o||typeof o!="object"||!o.props)return null;if(o.props.id===n)return{item:o,zone:s,index:i};if(a>=12)return null;for(let{child:u,zone:m,index:y}of lo(e,o)){let d=r(u,m,y,a+1);if(d)return d}return null};for(let o=0;o<t.length;o+=1){let s=r(t[o],uo,o,0);if(s)return s}return null}var co=6;function ga(e,t,n){return n<co&&Ln(e,t).length>0}var ha=e=>`${e}-${crypto.randomUUID()}`,Ke="Header",Rt="Footer",uo="root:default-zone",kn=[Ke,Rt];function po(e){let t=new Set,n=[];return e.forEach((r,o)=>{let s=r?.type;s===void 0||!kn.includes(s)||(t.has(s)?n.push(o):t.add(s))}),n}function ya(e){return po(e).map(t=>e[t]?.props?.id).filter(t=>typeof t=="string")}function xa(e,t){let n=(r,o)=>r.some(s=>s?.type===o);return kn.filter(r=>!n(e,r)&&!n(t,r))}import{createContext as go,useContext as ho,useEffect as yo,useMemo as Xe,useState as Hn}from"react";function Pn(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function Fe(e,t){if(e.length===0)return null;let n=0;for(let r of e){let o=r.prices?.[t];if(typeof o!="number"||!Number.isFinite(o)||o<=0)return null;n+=o*r.wheels}return n}var It=4,Sa=1,Ea={unit:"set",spares:0,spareSide:"left"};function Nn(e){return e.unit==="single"?1:It+e.spares}function Ca(e,t){return[{partNumber:e.partNumber,wheels:Nn(t),prices:e.prices}]}function Ta(e,t){let n=Nn(t)-It;if(n<=0||e.length===0)return e;let r=mo(e),o=r?r[t.spareSide]:0;return e.map((s,i)=>i===o?{...s,wheels:s.wheels+n}:s)}function mo(e){let t,n;for(let r=0;r<e.length;r+=1){let o=e[r].hand;if(o!=="left"&&o!=="right")continue;if((o==="left"?t:n)!==void 0)return null;o==="left"?t=r:n=r}return t!==void 0&&n!==void 0?{left:t,right:n}:null}function fo(e,t){return t.spares>0?`${e} + spare`:e}function va(e){return e.unit==="single"?"Single":fo(`Set of ${It}`,e)}var _a="data-add-to-basket",At=9,Lt="en";function qe(e,t,n=0){return new Intl.NumberFormat(Lt,{style:"currency",currency:t,minimumFractionDigits:0,maximumFractionDigits:n}).format(e)}import{jsx as So}from"react/jsx-runtime";var On="storefront-country",Dn=go(null);function xo(e){return Mn(e,"catalogue")}function bo(e){return Mn(e,"money")}function Mn(e,t){let n=new Map(e.map(o=>[o.code,o.decimalPlaces])),r=new Map;return(o,s)=>{if(!s)return"";let i=r.get(s);if(!i){let a=n.get(s)??0;i=new Intl.NumberFormat(Lt,{style:"currency",currency:s,minimumFractionDigits:t==="money"?a:0,maximumFractionDigits:a}),r.set(s,i)}return i.format(o)}}function La({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let s=Xe(()=>t??[],[t]),i=Xe(()=>n??[],[n]),a=Xe(()=>r||s.find(_=>_.isDefault)?.code||s[0]?.code||"",[r,s]),u=Xe(()=>o||i.find(_=>_.isDefault)?.code||i[0]?.code||"",[o,i]),[m,y]=Hn(u),[d,C]=Hn(!1);yo(()=>{let _=Me.getItem(On);_&&i.some($=>$.code===_)&&y(_),C(!0)},[i]);function l(_){y(_),Me.setItem(On,_)}let x=Xe(()=>{let _=i.find(g=>g.code===m)??null,$=_?.currency,k=$&&s.some(g=>g.code===$)?$:a,B=xo(s),ae=bo(s);return{country:m,currency:k,setCountry:l,currencies:s,countries:i,activeCountry:_,formatPrice:(g,L)=>B(g,L??k),formatMoney:(g,L)=>ae(g,L??k),ready:d}},[m,s,i,a,d]);return So(Dn.Provider,{value:x,children:e})}function je(){let e=ho(Dn);if(!e)throw new Error("useCurrency must be used within a CurrencyProvider");return e}import{createContext as Po,useCallback as j,useContext as No,useEffect as Se,useMemo as Wn,useRef as $e,useState as Z}from"react";function Fn(e,t){return e.map(n=>({qty:n.qty,slug:n.slug,name:`${n.name.lead}${n.name.accent}`.trim(),finish:n.finishName,size:n.size,kind:n.kind,sku:n.sku,pack:n.pack,priceLabel:t(n)}))}var ot="Price on request",Co="Request a quote";function kt(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Pt(e,t){let n=e?.[t];return kt(n)?n:null}function Oa(e,t,n,r){let o=Pt(e,n),s=Pt(t,n);return o===null&&s===null?0:o===null?1:s===null?-1:r==="asc"?o-s:s-o}function Da(e,t,n,r){if(n==null&&r==null)return!0;let o=Pt(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var To={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function vo(e,t,n){if(!kt(e))return To;let r=kt(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function Ma(e,t,n=""){return!e.priced||e.unit==null?ot:`${n}${qe(e.unit,t)}`}function Fa(e,t){return e.was==null?null:qe(e.was,t)}function _o(e,t,n=1){let r=Fe(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((i,a)=>i+a.wheels,0),s=Math.min(...e.map(i=>i.prices[t]));return{priced:!0,unit:s,isFrom:s*o!==r,setTotal:r*n}}var wo={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function $a(e,t,n,r=1){let o=vo(e.prices[n],e.msrpPrices?.[n],4),s=o.setTotal==null?null:o.setTotal*r;if(!t)return{priced:o.priced,unit:o.unit,isFrom:!0,was:o.was,onSale:o.onSale,setTotal:null,fromSetTotal:s};let i=_o(t.components,n,r);return i.priced?{priced:!0,unit:i.unit,isFrom:i.isFrom,was:null,onSale:!1,setTotal:i.setTotal,fromSetTotal:s}:{...wo,fromSetTotal:s}}function Ro(e,t){return!e.priced||e.unit==null?ot:`${e.isFrom?"from ":""}${qe(e.unit,t)}`}function Ua(e,t){return e.was==null?null:qe(e.was,t)}function Va(e,t){return!e.priced||e.unit==null?Co:Ro(e,t)}var Io=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function $n(e){return Io.test(e.trim())}var Un="sf:ga-purchases",Ao=20;function Gn(){return typeof window>"u"||window.parent!==window}function Ze(...e){try{if(Gn()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function Lo(e,t){let n=e.config.find(r=>r.gold)?.label;return{item_id:`${e.slug}|${e.finishName}|${e.size}`,item_name:`${e.name.lead}${e.name.accent}`.trim(),...n?{item_variant:n}:{},price:Fe(e.components,t)??0,quantity:e.qty}}function Nt(e,t){return e.filter(st).map(n=>Lo(n,t))}function Ka(e){Ze("event","view_item",{currency:e.currency,value:e.pricePerSet,items:[{item_id:e.itemId,item_name:e.itemName,...e.variant?{item_variant:e.variant}:{},price:e.pricePerSet,quantity:1}]})}function Bn(e,t){let n=Nt([e],t);n.length!==0&&Ze("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function qa(e){let t=Nt(e.lines,e.currency);t.length!==0&&Ze("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var Vn=new Set;function ko(e){if(Vn.has(e))return!1;Vn.add(e);try{let t=JSON.parse(Me.getItem(Un)??"[]");if(t.includes(e))return!1;Me.setItem(Un,JSON.stringify([...t,e].slice(-Ao)))}catch{}return!0}function Xa(e){let t=e.confirmation;if(Gn()||!ko(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);Ze("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:Nt(e.lines,n)}),e.adsSendTo&&Ze("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}import{jsx as Mo}from"react/jsx-runtime";var Ho=400,Oo=400,Do=1500;function st(e){return(e.components?.length??0)>0}function Yn(e,t){return Fe(e.components,t)}function Ht(e,t){let n=Yn(e,t);return n===null?null:n*e.qty}function zn(e){return e!=="tyre"}var Kn=Po(null);function sl({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=je(),[s,i]=Z(t),[a,u]=Z([]),[m,y]=Z([]),[d,C]=Z([]),[l,x]=Z(!1),[_,$]=Z(!1),[k,B]=Z(!1),[ae,g]=Z(!1),[L,b]=Z(null),te=$e(r),q=$e("");te.current=te.current||r;let[U,X]=Z(null),[O,Q]=Z(!1),[D,ne]=Z(null),re=$e(void 0),W=j(()=>i(!0),[]),pe=j(()=>i(!1),[]),P=j(()=>i(c=>!c),[]);Se(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&W()},[W,t]);let be=j(c=>{g(!0),zn(c)&&B(!0)},[]),Y=k||a.some(c=>zn(c.kind)),me=ae||a.length>0;Se(()=>{if(t||!Y||l)return;let c=!0;return ee.listWheels().then(S=>{c&&(y(S),x(!0))}),()=>{c=!1}},[t,Y,l]),Se(()=>{if(t||!me||_)return;let c=!0;return ee.listBundles().then(S=>{c&&(C(S),$(!0))}),()=>{c=!1}},[t,me,_]);let V=L?.deliveryOptions??[];Se(()=>{V.length!==0&&ne(c=>c&&V.some(S=>S.id===c)?c:V[0]?.id??null)},[L]);let le=j(()=>a.filter(st).flatMap(c=>Pn(c.components,c.qty)),[a]),J=j(async(c,S)=>{let T=c.trim().toUpperCase();if(!T)return;let h=le();if(h.length===0){X({code:T,valid:!1,message:"Add a wheel to the cart first."});return}Q(!0),re.current=S;try{let A=await ee.validateCoupon({code:T,items:h,currency:n,shippingMethodId:D??void 0,customerEmail:S});X({code:T,valid:A.valid,message:A.message||void 0,effects:A.effects??void 0})}catch{X({code:T,valid:!1,message:"Could not check that code. Please try again."})}finally{Q(!1)}},[le,n,D]),w=j(()=>{X(null),re.current=void 0},[]);Se(()=>{if(!U)return;let c=U.code,S=setTimeout(async()=>{let T=le();if(T.length===0){X(h=>h&&h.code===c?{code:c,valid:!1,message:"Add a wheel to the cart first."}:h);return}Q(!0);try{let h=await ee.validateCoupon({code:c,items:T,currency:n,shippingMethodId:D??void 0,customerEmail:re.current});X(A=>A&&A.code===c?{code:c,valid:h.valid,message:h.message||void 0,effects:h.effects??void 0}:A)}catch{}finally{Q(!1)}},Ho);return()=>clearTimeout(S)},[a,n,D]),Se(()=>{if(t)return;let c=setTimeout(async()=>{let S=le();if(S.length===0){b(null);return}try{b(await ee.quoteCart({items:S,currency:n,shippingMethodId:D??void 0,couponCode:U?.code||void 0,customerEmail:re.current||void 0,country:te.current||void 0,subdivision:q.current||void 0}))}catch{}},Oo);return()=>clearTimeout(c)},[a,n,D,U?.code,r]),Se(()=>{if(t||!s)return;let c=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=c}},[s,t]);let M=j(c=>{u(S=>{let T=S.findIndex(h=>h.id===c.id);return T===-1?[...S,c]:S.map((h,A)=>A===T?{...h,qty:Math.min(At,h.qty+c.qty)}:h)}),Bn(c,n)},[n]),I=j(c=>{u(S=>S.filter(T=>T.id!==c))},[]),Te=j((c,S)=>{let T=Math.max(1,Math.min(At,S));u(h=>h.map(A=>A.id===c?{...A,qty:T}:A))},[]),Ae=j(c=>{u(c)},[]),[fe,We]=Z(null),ve=$e(null);ve.current=fe;let F=$e(null),ce=$e(""),ge=j((c,S)=>{let T=c.trim().toLowerCase();$n(T)&&We(h=>h&&h.email===T&&h.firstName===(S??"")?h:{email:T,firstName:S??""})},[]);Se(()=>{if(t||!fe)return;let c=Fn(a.filter(st),h=>Ht(h,n)===null?ot:o(Ht(h,n),n)),S={email:fe.email,firstName:fe.firstName,currency:n,items:c},T=JSON.stringify(S);if(T!==ce.current)return F.current&&clearTimeout(F.current),F.current=setTimeout(()=>{F.current=null,ce.current=T,ee.captureCart(S).catch(h=>{})},Do),()=>{F.current&&(clearTimeout(F.current),F.current=null)}},[a,fe,n,t]);let Le=j(()=>{F.current&&(clearTimeout(F.current),F.current=null);let c=ve.current;c&&(ce.current="",ee.captureCart({email:c.email,firstName:c.firstName,currency:n,items:[]}).catch(S=>{}))},[n]),he=Wn(()=>{let c=a.reduce((N,f)=>{let ue=Ht(f,n);return ue===null?N:N+ue},0),S=a.some(N=>Yn(N,n)===null),T=a.reduce((N,f)=>N+f.qty,0),h=U?.valid?U.effects:void 0,A=h?Math.min(c,Number(h.discountAmount)):0,ke=L?.bundleDiscount??0,ze=L?.appliedBundles??[],Pe=!!h?.freeShipping,oe=V.find(N=>N.id===D),we=Pe?0:L?.shipping??oe?.amount??0,ye={};for(let N of h?.freeUnits??[])ye[N.partNumber]=(ye[N.partNumber]??0)+N.quantity;let z=L?.tax??null,Ne=L?L.grandTotal:c-A-ke+we;return{sets:T,units:a.reduce((N,f)=>N+(f.components??[]).reduce((ue,Ye)=>ue+Ye.wheels*f.qty,0),0),subtotal:c,hasUnpricedLine:S,discount:A,bundleDiscount:ke,appliedBundles:ze,shipping:we,freeShipping:Pe,freeUnitsByPartNumber:ye,tax:z,grand:Ne,currency:n}},[a,n,U,V,D,L]),_e=Wn(()=>({isOpen:s,open:W,close:pe,toggle:P,items:a,catalog:m,bundles:d,warmCatalog:be,add:M,remove:I,setQty:Te,replaceItems:Ae,identify:ge,clearCapturedCart:Le,coupon:U,applyCoupon:J,removeCoupon:w,couponBusy:O,deliveryOptions:V,shippingMethodId:D,setShippingMethodId:ne,totals:he}),[s,W,pe,P,a,m,d,be,M,I,Te,Ae,ge,Le,U,J,w,O,V,D,he]);return Mo(Kn.Provider,{value:_e,children:e})}function qn(){let e=No(Kn);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}var Ee="Storefront";import{Fragment as Qe,jsx as K,jsxs as Je}from"react/jsx-runtime";var Fo={eye:Je(Qe,{children:[K("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7S2 12 2 12z"}),K("circle",{cx:"12",cy:"12",r:"2.6"})]}),"eye-off":K("path",{d:"M3 3l18 18M10.6 10.6a2 2 0 002.8 2.8M9.4 5.2A9.7 9.7 0 0112 5c7 0 10 7 10 7a16 16 0 01-3.6 4.4M6.1 6.1A16 16 0 002 12s3 7 10 7a9.6 9.6 0 004.1-.9"}),search:Je(Qe,{children:[K("circle",{cx:"11",cy:"11",r:"7"}),K("path",{d:"M21 21l-3.8-3.8"})]}),"external-link":Je(Qe,{children:[K("path",{d:"M14 4h6v6"}),K("path",{d:"M20 4l-9 9"}),K("path",{d:"M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5"})]}),pencil:Je(Qe,{children:[K("path",{d:"M12 20h9"}),K("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"})]}),trash:Je(Qe,{children:[K("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),K("path",{d:"M10 11v6M14 11v6"})]}),"chevron-right":K("path",{d:"M9 6l6 6-6 6"})};function Ot({name:e,size:t,strokeWidth:n=1.8,rounded:r=!1,className:o,style:s}){return K("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:r?"round":void 0,strokeLinejoin:r?"round":void 0,className:o,style:s,"aria-hidden":"true",children:Fo[e]})}import{cache as jo}from"react";function Xn(e,t,n,r){for(;e.size>=t;){let o,s;for(let[a,u]of e){if(u.expiresAt<=r){o=a;break}s===void 0&&n(a)&&(s=a)}let i=o??s??e.keys().next().value;if(i===void 0)return;e.delete(i)}}var $o=6e4,Uo=5e3,Vo=500,Dt=new Map;async function Go(e){let{host:t,matchesRequestHost:n}=await In();if(!t)return"";let r=await An();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}var Bo=e=>e.includes("|slug:")||e.includes("|xhost:");async function jn(e,t){let n=await Go(e);if(!n)return t();let r=Date.now(),o=Dt.get(n);if(o&&o.expiresAt>r)return o.load;let s=await t(),i=s.outcome.state==="failed"?Uo:$o;return Xn(Dt,Vo,Bo,r),Dt.set(n,{load:s,expiresAt:r+i}),s}var Wo=404;function zo(e){if(e instanceof wt&&e.status===Wo)return{state:"absent"};let t=e instanceof wt?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var Yo="[storefront:chrome-load-failed]";function Ko(e,t){console.error(`${Yo} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function Zn(e,t,n,r){try{let o=await t();return r?.(o)?{value:o,outcome:{state:"absent"}}:{value:o,outcome:{state:"ok"}}}catch(o){let s=zo(o);return s.state==="failed"&&Ko(e,s),{value:n,outcome:s}}}function qo(e){return e==="production"?"silent":"banner"}var hl=qo("production");var Qn=["instagram","facebook","tiktok","youtube","x","linkedin","pinterest","whatsapp"],Xo={instagram:"Instagram",facebook:"Facebook",tiktok:"TikTok",youtube:"YouTube",x:"X",linkedin:"LinkedIn",pinterest:"Pinterest",whatsapp:"WhatsApp"},it={};function Jn(e){if(!e||typeof e!="object")return it;let t={};for(let n of Qn){let r=e[n];if(typeof r!="string")continue;let o=r.trim();!o||!/^https?:\/\//i.test(o)||(t[n]=o)}return t}function xl(e){return Qn.flatMap(t=>{let n=e[t];return n?[{platform:t,href:n,label:Xo[t]}]:[]})}var bl=e=>`${e}_url`;function Zo(e){return e?.trim()||Ee}function Qo(e,t){return e?.trim()||t}function Rl({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=Qo(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var Jo={name:Ee,legalName:null,foundedYear:null,faviconUrl:null,currencies:[],defaultCurrency:null,countries:[],defaultCountry:null,commerceEnabled:!0,cardPayments:!1,paymentMethods:[],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,mapsApiKey:null,mapsMapId:null,socialLinks:it},Il=jo(async()=>jn("site",()=>Zn("site",async()=>{let e=await ee.getSite();return{name:Zo(e.name),legalName:e.legalName?.trim()||null,foundedYear:e.foundedYear??null,faviconUrl:e.faviconUrl??null,currencies:e.currencies??[],defaultCurrency:e.defaultCurrency??null,countries:e.countries??[],defaultCountry:e.defaultCountry??null,commerceEnabled:e.commerceEnabled??!0,cardPayments:e.cardPayments??!1,paymentMethods:e.paymentMethods??(e.cardPayments?["card"]:[]),paypalClientId:e.paypalClientId??null,paypalEnvironment:e.paypalEnvironment??null,squareApplicationId:e.squareApplicationId??null,squareLocationId:e.squareLocationId??null,squareEnvironment:e.squareEnvironment??null,ga4MeasurementId:e.ga4MeasurementId??null,googleAdsId:e.googleAdsId??null,googleAdsConversionLabel:(e.googleAdsId?e.googleAdsConversionLabel:null)??null,metaPixelId:e.metaPixelId??null,mapsApiKey:e.mapsApiKey??null,mapsMapId:e.mapsMapId??null,socialLinks:Jn(e.socialLinks)}},Jo)));var Al={name:Ee,legalName:null,foundedYear:null,faviconUrl:null,currencies:[{code:"USD",symbol:"$",decimalPlaces:2,isDefault:!0}],defaultCurrency:"USD",countries:[{code:"US",name:"United States",currency:"USD",url:"",isDefault:!0,chargeTax:!1,taxDisplay:"none",taxName:"",taxRate:null,postalLabel:"Zip Code"}],defaultCountry:"US",commerceEnabled:!0,cardPayments:!0,paymentMethods:["card"],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,mapsApiKey:null,mapsMapId:null,socialLinks:it};import{createContext as ra,useCallback as H,useContext as oa,useMemo as sa,useState as so}from"react";import{forwardRef as es}from"react";import{jsx as rs}from"react/jsx-runtime";function ts(e){if(typeof e=="string")return e;let t=e.query?`?${new URLSearchParams(e.query).toString()}`:"",n=e.hash?e.hash.startsWith("#")?e.hash:`#${e.hash}`:"";return`${e.pathname??""}${t}${n}`}var ns=es(function({href:t,prefetch:n,replace:r,scroll:o,shallow:s,legacyBehavior:i,passHref:a,locale:u,onClick:m,children:y,...d},C){let l=x=>{m?.(x),!(x.defaultPrevented||d.target==="_blank")&&x.preventDefault()};return rs("a",{ref:C,href:ts(t),onClick:l,...d,children:y})}),se=ns;function er(){return"/edit"}import{useEffect as bt,useState as St}from"react";import{createContext as os,useCallback as Mt,useContext as ss,useEffect as is,useMemo as as,useState as ls}from"react";import{jsx as us}from"react/jsx-runtime";var cs={isOpen:!1,open:()=>{},close:()=>{},toggle:()=>{}},tr=os(cs);function Dl({children:e,shortcut:t=!0}){let[n,r]=ls(!1),o=Mt(()=>r(!0),[]),s=Mt(()=>r(!1),[]),i=Mt(()=>r(u=>!u),[]);is(()=>{if(!t)return;let u=m=>{(m.metaKey||m.ctrlKey)&&(m.key==="k"||m.key==="K")&&(m.preventDefault(),r(y=>!y))};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[t]);let a=as(()=>({isOpen:n,open:o,close:s,toggle:i}),[n,o,s,i]);return us(tr.Provider,{value:a,children:e})}function nr(){return ss(tr)}import{useEffect as ms,useRef as fs,useState as gs}from"react";var ds=[{code:"US",name:"United States"},{code:"GB",name:"United Kingdom"},{code:"AU",name:"Australia"},{code:"CA",name:"Canada"},{code:"IE",name:"Ireland"},{code:"NZ",name:"New Zealand"},{code:"DE",name:"Germany"},{code:"FR",name:"France"},{code:"IT",name:"Italy"},{code:"ES",name:"Spain"},{code:"NL",name:"Netherlands"},{code:"BE",name:"Belgium"},{code:"AT",name:"Austria"},{code:"CH",name:"Switzerland"},{code:"SE",name:"Sweden"},{code:"NO",name:"Norway"},{code:"DK",name:"Denmark"},{code:"FI",name:"Finland"},{code:"PT",name:"Portugal"},{code:"PL",name:"Poland"},{code:"JP",name:"Japan"},{code:"SG",name:"Singapore"},{code:"AE",name:"United Arab Emirates"},{code:"HK",name:"Hong Kong"},{code:"ZA",name:"South Africa"}],ps=Object.fromEntries(ds.map(e=>[e.code,e.name]));function rr(e){return ps[e]??e}import{jsx as Ue,jsxs as Ft}from"react/jsx-runtime";function or(e,t,n){let r=new Map(e.map(o=>[o.code,o]));return(t?.length?t:e.map(o=>o.code)).map(o=>{let s=r.get(o);return{code:o,name:s?.name||rr(o),currency:s?.currency,url:s?.url||n?.[o]||""}})}function sr(e){let{countries:t}=je();return or(t,e).length>0}function $t({urls:e,countries:t}={}){let{country:n,setCountry:r,countries:o}=je(),[s,i]=gs(!1),a=fs(null);ms(()=>{if(!s)return;function d(l){a.current&&!a.current.contains(l.target)&&i(!1)}function C(l){l.key==="Escape"&&i(!1)}return document.addEventListener("mousedown",d),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",C)}},[s]);let u=or(o,t,e),m=u.find(d=>d.code===n)??u[0];if(!m)return null;function y(d){let C=(e?u.find(l=>l.code===d)?.url:"")?.trim();if(C){window.location.href=C;return}o.some(l=>l.code===d)&&r(d),i(!1)}return Ft("div",{ref:a,className:"relative",children:[Ft("button",{type:"button","aria-haspopup":"listbox","aria-expanded":s,"aria-label":`Region: ${m.name}. Click to change.`,onClick:()=>i(d=>!d),suppressHydrationWarning:!0,className:"inline-flex items-center gap-2 whitespace-nowrap border border-fg-dim px-2.5 py-1.5 font-mono text-[13px] uppercase tracking-[0.18em] transition-colors hover:border-fg",style:{color:"color-mix(in oklab, currentColor 80%, transparent)"},children:[Ue("span",{children:m.name}),Ue("span",{"aria-hidden":!0,className:`text-[11px] opacity-70 transition-transform ${s?"rotate-180":""}`,children:"\u25BE"})]}),s&&Ue("ul",{role:"listbox","aria-label":"Choose region",className:"absolute right-0 top-full z-[200] mt-2 flex min-w-[240px] flex-col border border-line bg-surface text-fg",children:u.map((d,C)=>{let l=d.code===n;return Ue("li",{role:"option","aria-selected":l,children:Ft("button",{type:"button",onClick:()=>y(d.code),className:["flex w-full items-center gap-3 px-3.5 py-3 text-left transition-colors","font-mono text-[13px] uppercase tracking-[0.18em]","hover:bg-surface-2 hover:text-fg",C<u.length-1?"border-b border-line":"",l?"text-accent":""].join(" "),style:l?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"},children:[Ue("span",{className:"flex-1 whitespace-nowrap",children:d.name}),d.currency&&Ue("span",{className:"ml-auto text-[12px] opacity-50",children:d.currency})]})},d.code)})})]})}import{useEffect as hs,useId as ys,useRef as ir,useState as xs}from"react";function at(e){let t=(e??"").trim();return t===""||t==="#"}import{jsx as G,jsxs as Ut}from"react/jsx-runtime";function lt({item:e,mobile:t=!1,onNavigate:n,dropdownAlign:r="start"}){let[o,s]=xs(!1),i=ys(),a=ir(null),u=ir(null),m=e.dropdownItems.length>0,y=!at(e.href);hs(()=>{if(!o)return;let l=a.current?.ownerDocument??document,x=_=>{a.current?.contains(_.target)||s(!1)};return l.addEventListener("pointerdown",x),()=>l.removeEventListener("pointerdown",x)},[o]);let d=()=>{s(!1),n?.()};if(!m)return y?G(se,{href:e.href,onClick:d,className:t?"flex min-h-11 items-center font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"whitespace-nowrap opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label}):G("span",{className:t?"flex min-h-11 items-center font-display text-3xl":"whitespace-nowrap opacity-80",children:e.label});let C=G("button",{ref:u,type:"button","aria-label":`${o?"Close":"Open"} ${e.plainLabel} menu`,"aria-expanded":o,"aria-controls":i,onClick:()=>s(l=>!l),className:t?"flex h-11 w-11 shrink-0 items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"flex h-8 w-8 shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:G("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":"true",className:`transition-transform ${o?"rotate-180":""}`,children:G("path",{d:"m3 5 4 4 4-4"})})});return t?Ut("div",{ref:a,children:[Ut("div",{className:"flex min-h-11 items-center justify-between gap-3",children:[y?G(se,{href:e.href,onClick:d,className:"min-w-0 flex-1 font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label}):G("span",{className:"min-w-0 flex-1 font-display text-3xl",children:e.label}),C]}),o?G("div",{id:i,className:"mt-3 flex flex-col border-l border-line pl-5",children:e.dropdownItems.map((l,x)=>at(l.href)?G("span",{className:"flex min-h-11 items-center text-base opacity-80",children:l.label},`${l.href}-${x}`):G(se,{href:l.href,onClick:d,className:"flex min-h-11 items-center text-base opacity-80 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:l.label},`${l.href}-${x}`))}):null]}):Ut("div",{ref:a,className:"relative flex items-center whitespace-nowrap",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onBlurCapture:l=>{l.currentTarget.contains(l.relatedTarget)||s(!1)},onKeyDown:l=>{l.key==="Escape"&&(s(!1),u.current?.focus())},children:[y?G(se,{href:e.href,onClick:d,onFocus:()=>s(!0),className:"opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label}):G("span",{className:"opacity-80",children:e.label}),C,o?G("div",{id:i,className:`absolute top-full z-[60] w-72 pt-3 text-fg ${r==="end"?"right-0":r==="center"?"left-1/2 -translate-x-1/2":"left-0"}`,children:G("div",{className:"overflow-hidden rounded-lg border border-line bg-bg p-2 shadow-xl",children:e.dropdownItems.map((l,x)=>at(l.href)?G("span",{className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80",children:l.label},`${l.href}-${x}`):G(se,{href:l.href,onClick:d,className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80 transition-[background,opacity] hover:bg-[var(--card-bg)] hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:l.label},`${l.href}-${x}`))})}):null]})}import{useEffect as ct,useRef as lr,useState as ut}from"react";var et=new Map,bs=64;async function Ss(e){if(!_n())return null;try{let t=await fetch(`${Rn()}/logo-analysis.json?url=${encodeURIComponent(e)}`);if(!t.ok)return null;let n=await t.json();if(!n||typeof n!="object")return null;let{reversed:r,inkIsDark:o}=n;return typeof r!="string"?null:{reversed:r,inkIsDark:typeof o=="boolean"?o:null}}catch{return null}}function ar(e){let t=et.get(e);if(t)return t;let n=Ss(e);if(et.set(e,n),et.size>bs){let r=et.keys().next();r.done||et.delete(r.value)}return n}import{jsx as cr,jsxs as ur}from"react/jsx-runtime";var Es={small:54,medium:66,large:84},Cs=44,Ts=202/22,oc=16,sc=140,vs=.88,_s="invert(1)";function Vt({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,onLightSurface:o,reversedSrc:s,inkIsDark:i,size:a="medium",sizePx:u,wordmark:m,siteName:y=Ee,fitToContainer:d=!1}){let C=m&&m.trim()?m.trim():y,[l,x]=ut(!1),_=lr(null),$=w=>{_.current=w};ct(()=>{let w=_.current?.ownerDocument??document,M=()=>{x(w.documentElement.getAttribute("data-theme")==="light")};M();let I=new MutationObserver(M);return I.observe(w.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>I.disconnect()},[]);let k=n&&n.trim()?n.trim():null,B=!!k&&wn(k),ae=o??(l&&t),g=r&&B&&k&&s!=null?{reversed:s,inkIsDark:i??null}:null,L=g!==null,[b,te]=ut(null);ct(()=>{if(!r||!k||!B||L){te(null);return}let w=!1;return te(null),ar(k).then(M=>{w||te(M)}),()=>{w=!0}},[r,k,B,L]);let q=g??b,U=!!q&&q.inkIsDark!==null&&(ae?!q.inkIsDark:q.inkIsDark),X=r&&!!k&&!B&&!ae,O=U&&q?q.reversed:k,Q=O?[O]:[],[D,ne]=ut(0);ct(()=>{ne(0)},[k,U]);let re=e==="footer"?Cs:Es[a],W=u&&u>0?u:re,pe=Math.round(W*Ts),P=D<Q.length?Q[D]:null,[be,Y]=ut(O),me=P!==null&&P===be,V=lr(null);ct(()=>{let w=V.current;if(!w||!w.complete)return;if(w.naturalWidth>0||w.naturalHeight>0){Y(P);return}let M=!1;return w.decode().then(()=>!M&&Y(P),()=>!M&&ne(I=>I+1)),()=>{M=!0}},[P]);let le=d?`min(${W}px, calc(100cqi / ${((C.length+1)*vs).toFixed(2)}))`:`${W}px`;return ur("span",{ref:$,className:"inline-flex items-center",children:[!me&&ur("span",{className:"font-display font-bold tracking-[0.18em] whitespace-nowrap",style:{fontSize:le,lineHeight:1},"aria-label":C,children:[C,cr("span",{className:"text-accent",children:"."})]}),P&&cr("img",{ref:V,src:P,alt:C,width:pe,height:W,className:"shrink-0 object-contain",style:{...me?{height:`${W}px`,width:"auto",...d?{maxWidth:"100cqi"}:{}}:{display:"none"},...X?{filter:_s}:{}},onLoad:()=>Y(P),onError:()=>ne(w=>w+1)},P)]})}var dr="Menu Item";var lc="Menu",cc="Link a menu in the inspector \u2192",uc="This menu has no links yet \u2014 add them in Storefront \u2192 Menus.",dc="This column isn't linked to a menu, so the preview shows placeholder links. Pick a menu above.";function pc(e){return`\u201C${e}\u201D no longer exists in Storefront \u2192 Menus, so the preview shows placeholder links. Pick another menu.`}var mc="The menu linked here no longer exists in Storefront \u2192 Menus, so the header shows placeholder links. Pick another menu.";import{jsx as ws}from"react/jsx-runtime";function Gt(){return ws("span",{className:"opacity-50",children:dr})}import{Fragment as Rs,jsx as Bt}from"react/jsx-runtime";function pr({className:e=""}){return Bt("sup",{className:`text-accent tracking-normal ${e}`,children:"\xAE"})}function Wt(e){if(!e.includes("\xAE"))return e;let t=e.split("\xAE"),n=[];return t.forEach((r,o)=>{r&&n.push(r),o<t.length-1&&n.push(Bt(pr,{},`r${o}`))}),Bt(Rs,{children:n})}var xc=pr;import{Fragment as Is,jsx as zt,jsxs as As}from"react/jsx-runtime";var mr=As(Is,{children:[zt("circle",{cx:"9",cy:"20",r:"1.3"}),zt("circle",{cx:"18",cy:"20",r:"1.3"}),zt("path",{d:"M2.5 3.5h3l2.3 11.3a1.6 1.6 0 0 0 1.6 1.3h8.1a1.6 1.6 0 0 0 1.6-1.2L21 7H6"})]});import{Fragment as Ls,jsx as de,jsxs as Yt}from"react/jsx-runtime";var Kt={search:"Search",account:"Account",cart:"Bag"},qt="whitespace-nowrap";function fr({onClick:e,count:t,asText:n,className:r}){return de("button",{type:"button",onClick:e,"aria-label":`Open cart, ${t} item${t===1?"":"s"}`,className:`mono-eyebrow-ctl inline-flex items-center gap-1.5 opacity-80 transition-opacity hover:opacity-100 ${r??""}`,children:n?Yt("span",{className:qt,children:[Kt.cart,t>0?` ${t}`:""]}):Yt(Ls,{children:[de("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:mr}),de("span",{className:"rounded-lg border border-current px-1.5 font-mono text-[12px]",children:t})]})})}function gr({asText:e,className:t}){return de(se,{href:"/account","aria-label":"Account",className:`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${t??""}`,children:e?de("span",{className:qt,children:Kt.account}):Yt("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[de("circle",{cx:"12",cy:"8",r:"3.4"}),de("path",{d:"M5 20a7 7 0 0 1 14 0"})]})})}function hr({onClick:e,asText:t,className:n}){return de("button",{type:"button",onClick:e,"aria-label":"Search",title:"Search (\u2318K)",className:`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${n??""}`,children:t?de("span",{className:qt,children:Kt.search}):de(Ot,{name:"search",size:18,strokeWidth:1.6,rounded:!0})})}import{useEffect as tt,useRef as Ms,useState as Sr}from"react";var ks=new Set(["Hero","HeroSingle","IntroBleed"]),dt={min:56,max:140,default:88},Ac={min:0,max:120,step:2,default:28},Lc=`var(--sf-header-h, ${dt.default}px)`,Xt="--sf-header-set-h",jt="--sf-header-h",yr=`var(${Xt}, ${dt.default}px)`,kc="sf-header-clearance",Pc="sf-sticky-underheader";function Zt(e){return e?.find(t=>t?.type&&t.type!==Ke)??null}function xr(e){let t=Zt(e)?.type;return!t||!ks.has(t)}function br(e){return!xr(e)}function Nc(e){return!!e?.some(t=>t?.type===Ke)}function Hc(e){return!e||e.length===0?!1:!e.some(t=>t?.type===Ke||t?.type===Rt)}var Ps=["auto","shared","own"],Ns="auto",Hs="topSpace",Oc="data-top-space";function Os(e){return Ps.includes(e)?e:Ns}function Ds(e,t){let n=Os(e?.props?.[Hs]);return n==="own"?!0:n==="shared"?!1:xr(t)}function Dc(e,t){return Ds(e,t)?"own":null}function Er({stickyMode:e,heightPx:t}){let n=Ms(null),[r,o]=Sr(!1),[s,i]=Sr(!1);return tt(()=>{let a=n.current?.ownerDocument?.defaultView??window,u=t,m=a.scrollY;function y(){let d=a.scrollY;o(d>10),e==="on_scroll_up"&&(d<=u?i(!1):d>m+4?i(!0):d<m-4&&i(!1)),m=d}return y(),a.addEventListener("scroll",y,{passive:!0}),()=>a.removeEventListener("scroll",y)},[e,t]),tt(()=>{e!=="on_scroll_up"&&i(!1)},[e]),tt(()=>{let a=n.current?.ownerDocument?.documentElement;a&&a.style.setProperty(Xt,`${t}px`)},[t]),tt(()=>{let a=n.current,u=a?.ownerDocument,m=u?.defaultView;if(!a||!u||!m)return;let y="",d=l=>{let x=`${Math.round(l)}px`;x!==y&&(y=x,u.documentElement.style.setProperty(jt,x),u.body?.style.setProperty(jt,x))};if(typeof m.ResizeObserver!="function"){d(a.getBoundingClientRect().height);return}let C=new m.ResizeObserver(l=>{let x=l[0]?.borderBoxSize?.[0];d(x?x.blockSize:a.getBoundingClientRect().height)});return C.observe(a),()=>C.disconnect()},[]),tt(()=>{let a=n.current?.ownerDocument?.documentElement;a&&a.setAttribute("data-header-sticky",e)},[e]),{headerRef:n,scrolled:r,navHidden:s}}import{useEffect as Si,useRef as Ei,useState as Mr}from"react";var rn="storefront-theme",Vc="sf:theme-mode",Gc="sf:theme-switch",Bc="hide",on="light";function Fs(e){return e>=7&&e<18}function Cr(e){let{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?Fs(o)?"light":"dark":t==="light"?"light":"dark"}var Ve={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},$s=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],ft={selected:0,themes:$s};function Tr(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ft}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function Qt(e,t,n){let r=mt(e),o=mt(t);if(r===null||o===null)return e;let s=i=>Math.max(0,Math.min(255,Math.round(i))).toString(16).padStart(2,"0");return`#${r.map((i,a)=>s(i+(o[a]-i)*n)).join("")}`}var Us={light:"#ffffff",dark:"#0a0a0a"},Wc=["light","dark"];function zc(e,t){let n=Us[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:Qt(e,r,.1),line:Qt(e,r,.22),muted:Qt(n,e,.35),brandInk:t}}function gt(e){let t=Tr(e);return t.themes[t.selected]}function vr(e){return{text:e.text,accent:e.accent,background:e.background||Ve.background,surface:e.surface||Ve.surface,line:e.line||Ve.line,muted:e.muted||Ve.muted}}function mt(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;let n=t[1].length===3?[...t[1]].map(i=>i+i).join(""):t[1],[r,o,s]=[0,2,4].map(i=>parseInt(n.slice(i,i+2),16));return[r,o,s]}function nn(e){let t=mt(e);if(t===null)return null;let[n,r,o]=t.map(s=>{let i=s/255;return i<=.04045?i/12.92:((i+.055)/1.055)**2.4});return .2126*n+.7152*r+.0722*o}var Vs=.4,Gs=4.5,Bs=3;function Ws(e,t){let n=nn(e),r=nn(t);if(n===null||r===null)return null;let[o,s]=n>=r?[n,r]:[r,n];return(o+.05)/(s+.05)}var Yc={good:"Good","large-only":"Large text only",hard:"Hard to read"};function Kc(e){return e>=Gs?"good":e>=Bs?"large-only":"hard"}var Jt=["#000000","#ffffff"];function ht(e){let t=Jt[0],n=-1;for(let r of Jt){let o=Ws(e,r);if(o===null)return Jt[0];o>n&&(n=o,t=r)}return t}var zs=[.25,.4,.55];function qc(e){let t=mt(e);return t===null?[]:zs.map(n=>"#"+t.map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function Xc(e){let t=gt(e),n={"--theme-fg":t.text},r=nn(t.text);return(r===null||r>=Vs)&&(n["--overlay-fg"]=t.text),n}var Ys=82;function sn(e){return`color-mix(in srgb, ${e} ${Ys}%, #000)`}function jc(e){let t=gt(e);return{"--theme-accent":t.accent,"--theme-accent-2":sn(t.accent),"--theme-accent-ink":ht(t.accent)}}function _r(e){let t=e?.button;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function Zc(e){let t=gt(e),n=_r(t),r=wr(t);if(n===null&&r===null)return{};let o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=sn(n)),o["--theme-btn-ink"]=r??ht(n),o}function wr(e){let t=e?.buttonInk;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function Qc(e,t){return wr(e)??ht(_r(e)??t)}function Jc(e){let t={};return Tr(e).themes.forEach((n,r)=>{let o=vr(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=sn(o.accent),t[`--theme-preset-${r}-accent-ink`]=ht(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}var Rr=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Ir(e){let t=vr(gt(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==Ve.surface||t.line!==Ve.line)&&(r["--theme-surface-2"]=n),r}var Ks=["heading","body","label"];function eu(e){if(!e)return null;for(let t of Ks)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}var Ar=["headingLarge","headingMedium","headingSmall","accent","body","label"];var an={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},qs=8,Xs=200,tu=1;function js(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.round(e);return t>=qs&&t<=Xs?t:null}function Zs(e){let t={};for(let n of Ar)t[n]=js(e?.[n]);return t}function nu(e){let t=Zs(e),n={};for(let r of Ar){let o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}var Qs=["square","small","large"],Js="small";function ru(e){return Qs.includes(e??"")?e:Js}var ei=0,ti=40,ou={square:0,small:null,large:16},ni={"--sf-card-radius":1,"--sf-button-radius":.5,"--radius":.5,"--radius-xs":.25,"--radius-sm":.5,"--radius-md":.75,"--radius-lg":1,"--radius-xl":1.25,"--radius-2xl":1.5,"--radius-3xl":2,"--radius-4xl":2.5};function ri(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;let t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(ti,Math.max(ei,Math.round(t))):null}function su(e){let t=ri(e);return t===null?{}:Object.fromEntries(Object.entries(ni).map(([n,r])=>{let o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}var oi=["none","soft","lifted"],si="soft",Lr="none",ii=["tight","normal","roomy"],ai="normal",yt="normal",li=["none","lift","highlight"],ci="lift",ui="highlight",kr="#141416";function Pr(e){return oi.includes(e??"")?e:si}function di(e){return ii.includes(e??"")?e:ai}function Nr(e){return li.includes(e??"")?e:ci}function pi(e){return/^#[0-9a-fA-F]{6}$/.test(e??"")?e.toLowerCase():kr}function iu(e){let t=Pr(e);return t===Lr?void 0:t}function au(e){let t=di(e);return t===yt?void 0:t}function lu(e){let t=Nr(e);return t===ui?void 0:t}function cu(e,t,n){let r=pi(t);return r===kr?{}:Pr(e)!==Lr||Nr(n)==="lift"?{"--sf-shadow-color":r}:{}}var mi=["normal","tight","compressed"],nt="normal";function Hr(e){return mi.includes(e??"")?e:nt}function uu(e){let t=Hr(e);return t===nt?void 0:t}function du(e){switch(Hr(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}var ln={case:"authored",weight:null,weightStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},en=100,tn=900,fi=24,gi=200;function pt(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function cn(e){let t=pt(e?.weight,en,tn),n=e?.case==="sentence"?"sentence":"authored",r=s=>s==null?t:pt(s,en,tn),o=s=>s==="sentence"?"sentence":s==="authored"?"authored":n;return{case:n,weight:t,weightStrong:pt(e?.weightStrong,en,tn),maxPx:pt(e?.maxPx,fi,gi),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function pu(e){let t=cn(e),n={};return t.case==="sentence"&&(n["--sf-heading-case"]="none"),t.weight!==null&&(n["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(n["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(n["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(n["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(n["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(n["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(n["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),n}function mu(e){return cn({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}function fu(e){let t=cn(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}var Ge="data-theme",Or="light";function un(e){return e.getAttribute(Ge)===Or?"light":"dark"}function dn(e,t){return un(e)===t?!1:(t==="light"?e.setAttribute(Ge,Or):e.removeAttribute(Ge),!0)}function hi(e){return _t(e).getItem(rn)}function Dr(e,t){_t(e).setItem(rn,t)}function yi(e,t,n=new Date().getHours()){return Cr({mode:t.mode,override:hi(e),switchShown:t.switchShown,hour:n})}function xu(e,t){let n=e.documentElement;if(!n)return()=>{};let r=()=>dn(n,yi(e,t));r();let o=e.defaultView?.MutationObserver;if(!o)return()=>{};let s=new o(r);return s.observe(n,{attributes:!0,attributeFilter:[Ge]}),()=>s.disconnect()}var xi="style";function bi(e,t){let n=Ir(t),r=!1;for(let o of Rr){let s=n[o]??"";e.style.getPropertyValue(o)!==s&&(s?e.style.setProperty(o,s):e.style.removeProperty(o),r=!0)}return r}function bu(e,t){let n=e.body;if(!n)return()=>{};let r=()=>bi(n,t);r();let o=e.defaultView?.MutationObserver;if(!o)return()=>{};let s=new o(r);return s.observe(n,{attributes:!0,attributeFilter:[xi]}),()=>s.disconnect()}import{jsx as Fr}from"react/jsx-runtime";function pn(){let[e,t]=Mr("dark"),[n,r]=Mr(!1),o=Ei(null),s=()=>o.current?.ownerDocument??document;Si(()=>{let a=s().documentElement,u=()=>t(un(a));u(),r(!0);let m=new MutationObserver(u);return m.observe(a,{attributes:!0,attributeFilter:[Ge]}),()=>m.disconnect()},[]);function i(){let a=s(),u=e==="dark"?"light":"dark";t(u),dn(a.documentElement,u),Dr(a,u)}return Fr("button",{ref:o,type:"button",onClick:i,"aria-label":`Switch to ${e==="dark"?"light":"dark"} theme`,"aria-pressed":e==="light",className:"relative inline-flex h-5 w-9 items-center rounded-full border border-line bg-surface-2 p-0.5",children:Fr("span",{className:"block h-3.5 w-3.5 rounded-full bg-accent transition-transform duration-200 ease-out",style:{transform:n&&e==="light"?"translateX(16px)":"translateX(0)"}})})}function $r({editorPreview:e,hasPreviewSettings:t,hasInitialSettings:n}){return!e&&!t&&!n}var xe={min:1e3,max:2e3,step:50,default:1600};function Ur(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}function wu(e,t){if(e!==!1)return null;let n=typeof t=="number"?t:xe.default;return Ur(n)}var Vr="--sf-site-width",xt=`var(${Vr},${xe.default}px)`,Ru=`max-w-[${xt}]`,Iu=`max-w-[${xe.default}px]`;function Ci(e){return typeof e!="number"||!Number.isFinite(e)?xe.default:Math.round(Math.min(Math.max(e,xe.min),xe.max))}function Au(e){let t=Ci(e);return t===xe.default?{}:{[Vr]:`${t}px`}}var rt={min:0,max:80,step:4,default:40},Gr="--sf-site-gutter",ie=`var(${Gr},${rt.default}px)`,Ti=`px-[${ie}]`;var Ce={md:`min(24px,${ie})`,sm:`min(20px,${ie})`,frame:`min(24px,${ie})`,tabs:`min(16px,${ie})`},Lu=[[`max-[1100px]:px-[${Ce.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${Ce.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${Ce.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${Ce.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${Ce.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${Ce.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${Ce.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${Ce.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${ie}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${ie})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${ie})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${ie})]`,"max-[720px]:-mx-5"],[`-mx-[${ie}]`,"-mx-10"],[Ti,"px-10"]];function vi(e){return typeof e!="number"||!Number.isFinite(e)?rt.default:Math.round(Math.min(Math.max(e,rt.min),rt.max))}function ku(e){let t=vi(e);return t===rt.default?{}:{[Gr]:`${t}px`}}var Br=`min(var(--sf-page-cap,${xt}),${xt})`,Pu=`max-w-[${Br}]`,Nu=`max-w-[min(var(--sf-page-cap,${xe.default}px),${xe.default}px)]`,Wr="--sf-hero-cap",_i=`var(${Wr},none)`,Hu=`max-w-[${_i}]`,mn="--sf-hero-bleed-m",fn="--sf-hero-bleed-w",Ou=`var(${mn},calc(50% - 50vw))`,Du=`var(${fn},100vw)`,Mu=`mx-[var(${mn},calc(50%_-_50vw))]`,Fu=`w-[var(${fn},100vw)]`,wi="--sf-hero-chrome-x",Ri="--sf-hero-chrome-cap";function $u(e){return e===!0?{[Wr]:Br,[mn]:"auto",[fn]:"100%",[wi]:"24px",[Ri]:"none"}:{}}var gn=`calc(${xt} - ${ie}*2)`,Uu=`max-w-[${gn.replace(/ /g,"_")}]`;var Ii="--sf-chrome-cap",Ai=`var(${Ii},${gn})`,Vu="data-page-width";function Gu(e){return e==="full"?"full":null}function zr(e){return e==="full"?null:Ur(e==="content"?gn:Ai)}function Yr(e){if(e==="full")return"full";if(e==="content")return"content"}var Li="sf-section-accent",Wu="Color",zu=new Set(["CategoryBar","DocTabs"]),Yu=new Set(["Flex"]),ki=0;function Pi(e){return e===-1?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:ki}function Ku(e){return e??-1}function hn(e){let t=`--theme-preset-${e}`;return{"--sf-sec-accent":`var(${t}-accent)`,"--sf-sec-accent-2":`var(${t}-accent-2)`,"--sf-sec-accent-ink":`var(${t}-accent-ink)`,"--sf-sec-bg":`var(${t}-bg, var(--theme-bg))`,"--sf-sec-fg":`var(${t}-fg, var(--theme-fg))`,"--sf-sec-surface":`var(${t}-surface, var(--theme-surface))`,"--sf-sec-surface-2":`var(${t}-surface-2, var(--theme-surface-2))`,"--sf-sec-line":`var(${t}-line, var(--theme-line))`,"--sf-sec-muted":`var(${t}-muted, var(--theme-muted))`}}function qu(e){let t=Pi(e.sectionAccent);return t===null?null:{className:Li,style:hn(t)}}var Zu=-1,Hi="sf-header-theme";function Oi(e){return typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}function Kr(e){let t=Oi(e);return t===null?null:{className:Hi,style:hn(t)}}function qr(e,t,n){return e.some(o=>(typeof o=="object"?o.value:o)===n)?n:t}var Di="overlay",Mi=[{label:"Copy over image",value:"overlay"},{label:"Copy above image",value:"stacked"}];function Xr(e){return qr(Mi,Di,e)}var td={desktop:40,mobile:45,min:20,max:80,step:5};function nd(e,t){return`${typeof e=="number"?e:t}%`}var jr="data-lead-ink",Zr="data-header-ink";var Fi="auto";function $i(e){return e.type==="IntroBleed"?Xr(e.props?.layout)!=="stacked":!0}function id(e){let t=Zt(e);return t&&br(e)&&$i(t)?"light":null}function Qr(e){return e==="light"||e==="dark"?e:Fi}import{Fragment as Et,jsx as v,jsxs as R}from"react/jsx-runtime";var Jr={stacked:{grid:"hidden min-[1501px]:grid",flex:"hidden min-[1501px]:flex"},inline:{grid:"hidden min-[801px]:grid",flex:"hidden min-[801px]:flex"}},Vi=Array.from({length:6},()=>({href:"#",label:v(Gt,{})}));function yn({previewSettings:e,initialSettings:t,editorPreview:n,showThemeToggle:r,wordmark:o,hideLogo:s,hideMenu:i,siteName:a,commerceEnabled:u=!0}={}){let m=er(),[y,d]=St(!1);bt(()=>{let p=_e.current?.ownerDocument??document,E=()=>d(p.querySelector(`[${jr}="light"]`)!=null);E();let De=requestAnimationFrame(E);return()=>cancelAnimationFrame(De)},[m]);let C=m.startsWith("/wheels/")&&m!=="/wheels",[l,x]=St(!1),{open:_,totals:$}=qn(),{open:k}=nr(),[B,ae]=St(!1),[g,L]=St(t??null),b=e??(g?{logoUrl:g.logoUrl,reverseLogo:g.reverseLogo,logoReversed:g.logoReversed,logoInkIsDark:g.logoInkIsDark,logoPosition:g.logoPosition,logoSize:g.logoSize,logoSizePx:g.logoSizePx,menuItems:(g.menuItems??[]).map(p=>({label:p.label,url:p.url,dropdown_menu:null,dropdown_items:p.dropdownItems??[]})),menuSplit:g.menuSplit??3,menuPosition:g.menuPosition,menuRow:g.menuRow,menuGapPx:g.menuGapPx??null,searchEnabled:g.searchEnabled,searchPosition:g.searchPosition,searchRow:g.searchRow,countrySelectorEnabled:g.countrySelectorEnabled,countryUrls:g.countryUrls,accountEnabled:g.accountEnabled,cartEnabled:g.cartEnabled,utilStyle:g.utilStyle,navTextCase:g.navTextCase,lightReverseText:g.lightReverseText,topTextColor:g.topTextColor,transparentTop:g.transparentTop,surface:g.surface,theme:g.theme,width:g.width,heightPx:g.heightPx,sticky:g.sticky}:null),te=s?null:b?.logoUrl??null,q=b?.reverseLogo??!1,U=b?.logoReversed??null,X=b?.logoInkIsDark??null,O=b?.logoPosition??"center",Q=b?.logoSize??"medium",D=b?.logoSizePx??null,ne=Math.min(Math.max(b?.menuSplit??3,1),4),re=(b?.menuPosition??"left")==="center",W=(b?.menuPosition??"left")==="beside",pe=(b?.menuRow??"top")==="inline",P=b?.menuGapPx??null,be=P!=null?{gap:`${P}px`}:void 0,Y=pe?Jr.inline:Jr.stacked,me=b?.searchEnabled??!1,V=b?.searchPosition??"right",le=b?.countrySelectorEnabled??!0,J=b?.accountEnabled??!0,w=b?.cartEnabled??!0,M=(b?.utilStyle??"icon")==="text",I=`mono-eyebrow${(b?.navTextCase??"uppercase")==="capitalised"?" mono-eyebrow-plain":""}`,Te=b?.countryUrls??{},Ae=Yr(b?.width),fe=zr(Ae)??void 0,We=b?.heightPx??dt.default,ve=b?.sticky??"always",F=Qr(b?.topTextColor),ce=Kr(b?.theme),ge=Object.keys(Te),Le=sr(ge.length?ge:void 0),he=le?v($t,{countries:ge.length?ge:void 0,urls:e?void 0:Te}):null,{headerRef:_e,scrolled:c,navHidden:S}=Er({stickyMode:ve,heightPx:We});bt(()=>{let p=_e.current?.ownerDocument??document,E=()=>{ae(p.documentElement.getAttribute("data-theme")==="light")};E();let De=new MutationObserver(E);return De.observe(p.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>De.disconnect()},[]);let T=r??!1?v(pn,{}):null;bt(()=>{if(!$r({editorPreview:!!n,hasPreviewSettings:!!e,hasInitialSettings:!!t}))return;let p=!1;return ee.getHeaderSettings().then(E=>!p&&L(E)).catch(E=>{console.warn("[header] settings fetch failed; using built-in defaults",E)}),()=>{p=!0}},[n,e,t]);let h=c||C,A=F==="auto"?y:F==="light",ke=h||!A,ze=h?B:B&&!A,Pe=F==="auto"?null:{[Zr]:F};bt(()=>{if(!l)return;let p=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=p}},[l]);let oe=(p,E,De="start")=>v(lt,{item:p,dropdownAlign:De},E),we=!i&&(b?.menuItems?.length??0)>0,ye=!!n||!!e,z=we?b.menuItems.map(p=>({href:p.url||"",label:Wt(p.label),plainLabel:p.label,dropdownItems:(p.dropdown_items??[]).map(E=>({href:E.url||"",label:Wt(E.label),plainLabel:E.label}))})):ye?Vi.map(p=>({...p,plainLabel:"Menu item",dropdownItems:[]})):[],Ne=O==="center"?z.slice(0,ne):O==="right"?z:[],N=O==="center"?z.slice(ne):O==="left"?z:[],f=me?v(hr,{onClick:ye?void 0:k,asText:M}):null,ue=u&&J?v(gr,{asText:M}):null,Ye=p=>u&&w?v(fr,{onClick:_,count:$.sets,asText:M,className:p}):null,He=R(Et,{children:[V==="left"?f:null,he,T,ue,Ye(),V==="right"?f:null]}),vt=(p,E=!1)=>v(se,{href:"/","aria-label":a?`${a} home`:"Home",className:p,children:v(Vt,{variant:"header",scrolled:ke,src:te,reverse:q,onLightSurface:ze,reversedSrc:U,inkIsDark:X,size:Q,sizePx:D,wordmark:o,siteName:a,fitToContainer:E})}),Oe=vt("inline-flex shrink-0 items-center justify-center"),vn="flex min-w-0 flex-1 items-center overflow-x-clip [container-type:inline-size]";return R(Et,{children:[v("header",{ref:_e,"data-scrolled":c||void 0,...Pe,className:["sf-site-header",...ce?[ce.className]:[],ve==="none"?"absolute":"fixed","inset-x-0 top-0 z-50","flex items-center","px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",h?"border-b border-line backdrop-blur-md":"border-b border-transparent","transition-[background,border-color,transform] duration-300 ease-out"].join(" "),style:{...ce?ce.style:null,minHeight:yr,...S?{transform:"translateY(-100%)"}:null,...h?{background:!B&&C?"var(--section-bg)":"var(--bg)",color:"var(--fg)"}:{color:"var(--sf-header-overlay-fg)"}},children:R("div",{className:"w-full",style:fe,children:[re?R("div",{className:`${Y.grid} grid-cols-[1fr_auto_1fr] items-center gap-8`,children:[O==="right"?v("nav",{className:`${I} flex items-center gap-7`,children:He}):v("div",{className:"flex items-center",children:Oe}),v("nav",{className:`${I} flex items-center justify-center gap-7`,children:z.map((p,E)=>oe(p,`${p.href}-${E}`,"center"))}),O==="right"?v("div",{className:"flex items-center justify-end",children:Oe}):v("nav",{className:`${I} flex items-center justify-end gap-7`,children:He})]}):O==="center"?R("div",{className:`${Y.grid} grid-cols-[1fr_auto_1fr] items-center gap-8`,children:[v("nav",{className:`${I} flex items-center gap-7`,children:Ne.map((p,E)=>oe(p,`${p.href}-${E}`))}),Oe,R("nav",{className:`${I} flex items-center justify-end gap-7`,children:[N.map((p,E)=>oe(p,`${p.href}-${E}`,"end")),He]})]}):W?R("div",{className:`${Y.flex} items-center justify-between gap-8`,children:[R("div",{className:"flex items-center gap-7",style:be,children:[Oe,v("nav",{className:`${I} flex items-center gap-7`,children:z.map((p,E)=>oe(p,`${p.href}-${E}`))})]}),v("nav",{className:`${I} flex items-center justify-end gap-7`,children:He})]}):v("div",{className:`${Y.flex} items-center justify-between gap-8`,children:O==="right"?R(Et,{children:[R("nav",{className:`${I} flex items-center gap-7`,children:[z.map((p,E)=>oe(p,`${p.href}-${E}`)),He]}),Oe]}):R(Et,{children:[Oe,R("nav",{className:`${I} flex items-center gap-7`,children:[z.map((p,E)=>oe(p,`${p.href}-${E}`)),He]})]})}),!pe&&R("div",{className:"hidden min-[801px]:max-[1500px]:flex flex-col gap-3",children:[R("div",{className:"flex items-center justify-between",children:[vt(vn,!0),R("div",{className:`${I} flex shrink-0 items-center gap-5`,children:[f,he,T,ue,Ye()]})]}),v("nav",{className:`${I} flex items-center gap-6 border-t border-line/60 pt-2.5`,children:z.map((p,E)=>oe(p,`${p.href}-${E}`))})]}),R("div",{className:"hidden max-[800px]:flex items-center justify-between",children:[vt(vn,!0),R("div",{className:"flex shrink-0 items-center gap-4",children:[f,ue,Ye(I),R("button",{type:"button","aria-label":l?"Close menu":"Open menu","aria-expanded":l,onClick:()=>x(p=>!p),className:"flex h-11 w-11 flex-col items-center justify-center gap-1.5",children:[v("span",{className:`block h-px w-5 bg-current transition-transform ${l?"translate-y-[3px] rotate-45":""}`}),v("span",{className:`block h-px w-5 bg-current transition-transform ${l?"opacity-0":""}`}),v("span",{className:`block h-px w-5 bg-current transition-transform ${l?"-translate-y-[3px] -rotate-45":""}`})]})]})]})]})}),l&&R("div",{className:"fixed inset-x-0 top-0 bottom-0 z-40 hidden overflow-y-auto max-[800px]:flex max-[800px]:flex-col max-[800px]:gap-7 max-[800px]:bg-bg max-[800px]:px-6 max-[800px]:pt-24 max-[800px]:pb-10",children:[z.map((p,E)=>v(lt,{item:p,mobile:!0,onNavigate:()=>x(!1)},`${p.href}-${E}`)),R("div",{className:"mt-auto flex flex-col gap-4 border-t border-line pt-6",children:[u&&J&&R("div",{className:"flex items-center justify-between",children:[v("span",{className:"mono-eyebrow text-fg-dim",children:"Account"}),v(se,{href:"/account",onClick:()=>x(!1),className:"mono-eyebrow underline",children:"Your account"})]}),he&&Le&&R("div",{className:"flex items-center justify-between",children:[v("span",{className:"mono-eyebrow text-fg-dim",children:"Region"}),he]}),T&&R("div",{className:"flex items-center justify-between",children:[v("span",{className:"mono-eyebrow text-fg-dim",children:"Theme"}),T]})]})]})]})}import{createContext as to,useContext as xn}from"react";import{createContext as Gi}from"react";var eo=Gi(null);var Bi=to(null),bn=to({logo:null,placeholder:!1,wordmark:null});function Od(){let e=xn(eo),t=xn(Bi),n=xn(bn),r=!e&&n.placeholder,o=e?e.logoUrl:n.logo?.logoUrl??t?.logoUrl??null;return{src:r?null:o,reversedSrc:e?e.logoReversed:n.logo?.logoReversed??t?.logoReversed??null,inkIsDark:e?e.logoInkIsDark:n.logo?.logoInkIsDark??t?.logoInkIsDark??null,wordmark:e?null:n.wordmark,siteName:e?.siteName??t?.siteName}}var Sn={accent:"#2563eb",accentTint:"#eff6ff",accentText:"#1d4ed8",appBg:"#f9fafb",previewBg:"#f3f4f6",panel:"#ffffff",fieldBg:"#ffffff",inputBorder:"#d1d5db",text:"#111827",text2:"#374151",muted:"#6b7280",line:"#e5e7eb",chipBg:"#f3f4f6",chipFg:"#6b7280",panelRadius:12,rowRadius:8,panelShadow:"0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.06)",topbarShadow:"0 1px 3px rgba(0,0,0,.06)",panelGap:10,leftWidth:288,rightWidth:308,topbarHeight:52,labelFont:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif"};import{createContext as Wi,useCallback as ro,useContext as zi,useRef as Yi,useState as Ki}from"react";var En=0;function no(e){En+=1;try{return e()}finally{En-=1}}function Fd(){return En>0}import{jsx as qi}from"react/jsx-runtime";function Cn(){let e=Yi(()=>{}),t=ro((...r)=>no(()=>e.current(...r)),[]),n=ro(r=>{e.current=r},[]);return{select:t,setSelectHandler:n}}function Gd(e){let t=`set${e.charAt(0).toUpperCase()}${e.slice(1)}`,n=(i,a,u,m)=>({[e]:i,[t]:a,select:u,setSelectHandler:m}),r=Wi(n(null,()=>{},()=>{},()=>{}));function o({children:i}){let[a,u]=Ki(null),{select:m,setSelectHandler:y}=Cn();return qi(r.Provider,{value:n(a,u,m,y),children:i})}return{Provider:o,useSelection:()=>zi(r)}}var Tn=[{key:"space-grotesk",label:"Space Grotesk",cssVar:"--font-display",category:"sans",italic:!1,italicLoaded:!1},{key:"inter",label:"Inter",cssVar:"--font-body",category:"sans",italic:!0,italicLoaded:!0},{key:"poppins",label:"Poppins",cssVar:"--font-poppins",category:"sans",italic:!0,italicLoaded:!0},{key:"dm-sans",label:"DM Sans",cssVar:"--font-dm-sans",category:"sans",italic:!0,italicLoaded:!0},{key:"sora",label:"Sora",cssVar:"--font-sora",category:"sans",italic:!1,italicLoaded:!1},{key:"oswald",label:"Oswald",cssVar:"--font-oswald",category:"sans",italic:!1,italicLoaded:!1},{key:"archivo",label:"Archivo",cssVar:"--font-archivo",category:"sans",italic:!0,italicLoaded:!0},{key:"outfit",label:"Outfit",cssVar:"--font-outfit",category:"sans",italic:!1,italicLoaded:!1},{key:"manrope",label:"Manrope",cssVar:"--font-manrope",category:"sans",italic:!1,italicLoaded:!1},{key:"big-shoulders",label:"Big Shoulders",cssVar:"--font-big-shoulders",category:"sans",italic:!1,italicLoaded:!1},{key:"michroma",label:"Michroma",cssVar:"--font-michroma",category:"sans",italic:!1,italicLoaded:!1},{key:"fraunces",label:"Fraunces",cssVar:"--font-serif",category:"serif",italic:!0,italicLoaded:!0},{key:"playfair-display",label:"Playfair Display",cssVar:"--font-playfair",category:"serif",italic:!0,italicLoaded:!0},{key:"cormorant",label:"Cormorant",cssVar:"--font-cormorant",category:"serif",italic:!0,italicLoaded:!0},{key:"jetbrains-mono",label:"JetBrains Mono",cssVar:"--font-mono-loaded",category:"mono",italic:!0,italicLoaded:!0}],Re=new Map(Tn.map(e=>[e.key,e])),Xi={sans:"Sans",serif:"Serif",mono:"Mono"};function zd(){return Object.keys(Xi).map(e=>[e,Tn.filter(t=>t.category===e)]).filter(([,e])=>e.length>0)}function Yd(e){return Re.get(e)?.italicLoaded??!1}function Kd(e){return Re.get(e)}var oo=["heading","heading2","heading3","body","accent","label"],qd={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Accent",label:"Labels"},ji=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],Zi=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,Xd={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},Qi={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function jd(e){let t=e?Zi.exec(e):null;return t?Qi[t[1]]??null:Ji(e)}function Ji(e){if(!e)return null;let t=e.split(/\s+/).filter(n=>!n.slice(0,n.lastIndexOf(":")+1).includes("&")).map(n=>n.slice(n.lastIndexOf(":")+1));for(let[n,r]of ji)if(t.includes(n))return r;return null}var ea=["heading","heading2","heading3"];function Zd(e){return ea.includes(e)}var Ie={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function ta(e){let t=n=>{let r=e?.[n];if(r&&Re.has(r))return r;if(n==="heading2"||n==="heading3"){let o=e?.heading;return o&&Re.has(o)?o:Ie.heading}return Ie[n]};return Object.fromEntries(oo.map(n=>[n,t(n)]))}function na(e,t){return Re.get(e[t])??Re.get(Ie[t])}function Be(e,t){return`var(${na(e,t).cssVar})`}var Qd=[...new Set(oo.map(e=>Re.get(Ie[e]).cssVar))],Jd=[...new Set(Tn.map(e=>e.cssVar))];function ep(e){let t=ta(e);return{"--font-role-heading":Be(t,"heading"),"--font-role-heading2":Be(t,"heading2"),"--font-role-heading3":Be(t,"heading3"),"--font-role-body":Be(t,"body"),"--font-role-accent":Be(t,"accent"),"--font-role-label":Be(t,"label"),fontFamily:"var(--font-role-body)"}}import{jsx as Tt,jsxs as la}from"react/jsx-runtime";var io=ra({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:on,setThemeMode:()=>{},themeSwitchShown:!1,setThemeSwitchShown:()=>{},theme:ft,setTheme:()=>{},fonts:Ie,setFonts:()=>{},sizes:an,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:yt,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:nt,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,blockGap:null,setSiteGutter:()=>{},setBlockGap:()=>{},headingTypography:ln,setHeadingTypography:()=>{},heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},themeFromDocument:!1,selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function mp({children:e,websiteName:t=null,templateChrome:n=!1,templateName:r=null,chromePlaceholder:o=!1,themeMode:s=on,onThemeModeChange:i,themeSwitchShown:a=!1,onThemeSwitchShownChange:u,theme:m=ft,onThemeChange:y,fonts:d=Ie,onFontsChange:C,sizes:l=an,onSizesChange:x,cornerRadiusPx:_=null,onCornerRadiusPxChange:$,cardShadow:k=null,onCardShadowChange:B,shadowColor:ae=null,onShadowColorChange:g,cardGap:L=yt,onCardGapChange:b,hoverEffect:te=null,onHoverEffectChange:q,headingCompression:U=nt,onHeadingCompressionChange:X,siteWidth:O=null,onSiteWidthChange:Q,siteGutter:D=null,blockGap:ne=null,onSiteGutterChange:re,onBlockGapChange:W,headingTypography:pe=ln,onHeadingTypographyChange:P,heroBackgroundFollowsWidth:be=null,onHeroBackgroundFollowsWidthChange:Y,photographyGrayscale:me=null,onPhotographyGrayscaleChange:V,themeFromDocument:le=!1}){let[J,w]=so(null),M=H(f=>w(ue=>ue??f),[]),[I,Te]=so(!1),Ae=H(f=>i?.(f),[i]),fe=H(f=>u?.(f),[u]),We=H(f=>y?.(f),[y]),ve=H(f=>C?.(f),[C]),F=H(f=>x?.(f),[x]),ce=H(f=>Q?.(f),[Q]),ge=H(f=>re?.(f),[re]),Le=H(f=>W?.(f),[W]),he=H(f=>Y?.(f),[Y]),_e=H(f=>V?.(f),[V]),c=H(f=>$?.(f),[$]),S=H(f=>B?.(f),[B]),T=H(f=>g?.(f),[g]),h=H(f=>b?.(f),[b]),A=H(f=>q?.(f),[q]),ke=H(f=>X?.(f),[X]),ze=H(f=>P?.(f),[P]),{select:Pe,setSelectHandler:oe}=Cn(),we=J?.logoUrl,ye=J?.logoReversed,z=J?.logoInkIsDark,Ne=J!==null,N=sa(()=>({logo:Ne?{logoUrl:we,logoReversed:ye,logoInkIsDark:z}:null,placeholder:n||o,wordmark:n?r:t}),[Ne,we,ye,z,n,o,r,t]);return Tt(bn.Provider,{value:N,children:Tt(io.Provider,{value:{settings:J,setSettings:w,primeSettings:M,websiteName:t,templateChrome:n,templateName:r,chromePlaceholder:o,themeMode:s,setThemeMode:Ae,themeSwitchShown:a,setThemeSwitchShown:fe,theme:m,setTheme:We,fonts:d,setFonts:ve,sizes:l,setSizes:F,cornerRadiusPx:_,setCornerRadiusPx:c,cardShadow:k,setCardShadow:S,shadowColor:ae,setShadowColor:T,cardGap:L,setCardGap:h,hoverEffect:te,setHoverEffect:A,headingCompression:U,setHeadingCompression:ke,siteWidth:O,setSiteWidth:ce,siteGutter:D,blockGap:ne,setSiteGutter:ge,setBlockGap:Le,headingTypography:pe,setHeadingTypography:ze,heroBackgroundFollowsWidth:be,setHeroBackgroundFollowsWidth:he,photographyGrayscale:me,setPhotographyGrayscale:_e,themeFromDocument:le,selected:I,setSelected:Te,select:Pe,setSelectHandler:oe},children:e})})}var ia=()=>oa(io),aa=`
2
- .sf-preview-header-pick header { cursor: pointer; }
3
- .sf-preview-header-pick header:hover {
4
- outline: 2px solid color-mix(in srgb, ${Sn.accent} 45%, transparent);
5
- outline-offset: -2px;
6
- }
7
- .sf-preview-header-pick[data-selected] header {
8
- outline: 2px solid ${Sn.accent};
9
- outline-offset: -2px;
10
- }
11
- `;function fp(){let{settings:e,selected:t,select:n,websiteName:r,templateChrome:o,templateName:s,chromePlaceholder:i,themeSwitchShown:a}=ia(),u=o?s?.trim()||"Template":r?.trim()||Ee,m=o||i;return la("div",{className:"sf-preview-header-pick sf-theme-surfaces","data-selected":t||void 0,onClick:y=>{y.stopPropagation(),n()},children:[Tt("style",{children:aa}),Tt(yn,{previewSettings:e??void 0,editorPreview:!0,showThemeToggle:a,wordmark:u,hideLogo:m,hideMenu:m})]})}import{forwardRef as ca}from"react";import{jsx as pa}from"react/jsx-runtime";var ua={position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,color:"transparent"},da=ca(function({src:t,width:n,height:r,fill:o,priority:s,loading:i,style:a,quality:u,placeholder:m,blurDataURL:y,unoptimized:d,loader:C,overrideSrc:l,...x},_){let $=l??(typeof t=="string"?t:t.src);return pa("img",{ref:_,src:$,width:o?void 0:n,height:o?void 0:r,loading:s?"eager":i??"lazy",fetchPriority:s?"high":void 0,decoding:"async",style:o?{...ua,...a}:{color:"transparent",...a},...x})}),xp=da;function bp(e){return{props:{src:e.overrideSrc??(typeof e.src=="string"?e.src:e.src.src),sizes:e.sizes}}}var Cp="#c9a461",ao=[{f:"black",label:"Black",hex:"#171717"},{f:"silver",label:"Silver",hex:"#cccccc"},{f:"bronze",label:"Bronze",hex:"#8a6438"},{f:"graphite",label:"Graphite",hex:"#3a3c3f"},{f:"red",label:"Candy Red",hex:"#7a0f14"}],Tp={name:"",color:"var(--fg)",family:"silver",src:""};function ma(e,t){let n=r=>{let o=ao.findIndex(s=>s.f===r);return o===-1?ao.length:o};return n(e)-n(t)||e.localeCompare(t)}function vp(e){let t=new Set;for(let n of e)for(let r of n.finishes??[])r?.family&&t.add(r.family);return[...t].sort(ma)}function wp(){let e=typeof crypto<"u"?crypto:void 0;if(typeof e?.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}export{se as a,xp as b,bp as c,Tn as d,Xi as e,zd as f,Yd as g,Kd as h,oo as i,qd as j,Xd as k,jd as l,Ji as m,Zd as n,Ie as o,ta as p,ep as q,Wt as r,xc as s,rn as t,Vc as u,Gc as v,Bc as w,on as x,$s as y,Tr as z,Wc as A,zc as B,gt as C,vr as D,Ws as E,Yc as F,Kc as G,qc as H,Xc as I,jc as J,_r as K,Zc as L,wr as M,Qc as N,Jc as O,Ir as P,eu as Q,an as R,qs as S,Xs as T,tu as U,Zs as V,nu as W,ru as X,ei as Y,ti as Z,ou as _,ri as $,su as aa,oi as ba,si as ca,Lr as da,yt as ea,li as fa,ci as ga,ui as ha,kr as ia,Pr as ja,di as ka,Nr as la,pi as ma,iu as na,au as oa,lu as pa,cu as qa,nt as ra,Hr as sa,uu as ta,du as ua,ln as va,en as wa,tn as xa,fi as ya,gi as za,cn as Aa,pu as Ba,mu as Ca,fu as Da,Ln as Ea,lo as Fa,fa as Ga,co as Ha,ga as Ia,ha as Ja,Ke as Ka,Rt as La,uo as Ma,po as Na,ya as Oa,xa as Pa,Wu as Qa,zu as Ra,Yu as Sa,Pi as Ta,Ku as Ua,qu as Va,xe as Wa,Ur as Xa,wu as Ya,xt as Za,Ci as _a,Au as $a,rt as ab,ie as bb,vi as cb,ku as db,Br as eb,Wr as fb,wi as gb,Ri as hb,$u as ib,Vu as jb,Gu as kb,zr as lb,Yr as mb,Pn as nb,It as ob,Sa as pb,Ea as qb,Ca as rb,Ta as sb,mo as tb,fo as ub,va as vb,_a as wb,At as xb,Lt as yb,qe as zb,ot as Ab,Co as Bb,Pt as Cb,Oa as Db,Da as Eb,vo as Fb,Ma as Gb,Fa as Hb,_o as Ib,$a as Jb,Ro as Kb,Ua as Lb,Va as Mb,qr as Nb,La as Ob,je as Pb,$n as Qb,Ka as Rb,qa as Sb,Xa as Tb,st as Ub,Ht as Vb,sl as Wb,qn as Xb,Cp as Yb,ao as Zb,Tp as _b,ma as $b,vp as ac,dt as bc,Ac as cc,Lc as dc,yr as ec,kc as fc,Pc as gc,Nc as hc,Hc as ic,Ns as jc,Oc as kc,Ds as lc,Dc as mc,er as nc,Dl as oc,nr as pc,sr as qc,$t as rc,at as sc,Ee as tc,Es as uc,Cs as vc,oc as wc,sc as xc,Vt as yc,lc as zc,cc as Ac,uc as Bc,dc as Cc,pc as Dc,mc as Ec,Gt as Fc,mr as Gc,Ot as Hc,Kt as Ic,fr as Jc,hr as Kc,Er as Lc,xu as Mc,bu as Nc,Zu as Oc,Di as Pc,Mi as Qc,Xr as Rc,td as Sc,nd as Tc,jr as Uc,Zr as Vc,id as Wc,Qr as Xc,eo as Yc,Od as Zc,Sn as _c,Qn as $c,Xo as ad,it as bd,Jn as cd,xl as dd,bl as ed,Zo as fd,Rl as gd,Jo as hd,Al as id,Fd as jd,Cn as kd,Gd as ld,mp as md,ia as nd,fp as od,wp as pd};
@@ -1 +0,0 @@
1
- var $e=Symbol.for("efficient-web.efficient-backend");function Ue(e){return!!e&&e[$e]===!0}function X(e){return e?.trim()||null}function Me(e={}){let t=e.backend??null,n=new Map,r={token:null,brandId:null},s={documentId:null,bridgedId:null};return{hostBackend:t,usesBridgedToken:t===null||Ue(t),blocks:e.blocks??null,auth:r,site:s,siteId:()=>s.documentId??s.bridgedId,cache(i,u){return n.has(i)||n.set(i,u()),n.get(i)},forget(i){i===void 0?n.clear():n.delete(i)}}}function He(e,t){e.site.documentId=X(t)}function De(e,t){e.site.bridgedId=X(t)}var We=Me(),O=null,q=new Set;function _(){return O??We}function Ut(e){q.delete(e),O=e}function Mt(e){q.add(e),queueMicrotask(()=>{q.delete(e)&&O===e&&(O=null)})}function ee(){return _().usesBridgedToken}var N="x-forwarded-for";function te(e){let t=(e??"").split(",").map(n=>n.trim()).filter(Boolean);return t.length>0?t[t.length-1]:null}var Je="x-forwarded-host";function ne(e,t,n){let r={};return e&&(r[Je]=e),t&&n==="uncached"&&(r[N]=t),r}function re(e){if(e?.cache==="no-store"||e?.cache==="no-cache")return"uncached";if(e?.cache==="force-cache")return"data-cached";let t=e?.next?.revalidate;return typeof t=="number"&&t>0?"data-cached":"uncached"}var Ge={siteSlug:null,shopOrigin:""},$=Ge;function Wt(e){$={siteSlug:e.siteSlug?.trim()||null,shopOrigin:(e.shopOrigin??"").trim().replace(/\/+$/,"")}}function U(){return $.siteSlug}function se(){return $.shopOrigin}var ie="x-storefront-site",oe="x-storefront-host";var ae={contentHash:"db2b679aad5380c6",schema:1,mediaFields:{ImageBlock:["src"],LogoBlock:["src"],Flex:["bgImage"],FeaturedCover:["image"],LongRead:["image"],Banner:["imageSrc"],Timeline:["imageSrc"],Logos:["items[].src"],ContactLocations:["locations[].photo"],HeroSingle:["imageFocal","mediaImage","mediaVideo","poster"],HeroSlide:["mediaImage","mediaVideo","poster"],PostCard:["image"],Gallery:["othersCards[].image","othersCards[].photos[].src","vehicleCards[].image","vehicleCards[].photos[].src","wheelCards[].image","wheelCards[].photos[].src"],GalleryItem:["image","photos[].src"],Manifesto:["imageSrc"],SectionHeader:["logoSrc"],IntroBleed:["imageSrc","imageSrcMobile"],Split:["imageSrc","textBgSrc"],ProcessSteps:["steps[].image"],DetailRows:["rows[].image"],PaymentBadges:["badges[].src"]},mediaKeyNames:["bgImage","image","imageFocal","imageSrc","imageSrcMobile","logoSrc","mediaImage","mediaVideo","photo","poster","src","textBgSrc"],snapshotObjects:{ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},hydratedLists:{Events:["posts"],SubscribeBlogs:["posts"]},technicalStateKeys:["imageFocal"]};function M(e){return{getItem(t){try{return e()?.getItem(t)??null}catch{return null}},setItem(t,n){try{e()?.setItem(t,n)}catch{}},removeItem(t){try{e()?.removeItem(t)}catch{}}}}var A="__storefront_probe__";function Kt(e){try{e.setItem(A,A);let t=e.getItem(A)===A;return e.removeItem(A),t}catch{return!1}}var v=M(()=>typeof window>"u"?null:window.localStorage),zt=M(()=>typeof window>"u"?null:window.sessionStorage);function jt(e){return M(()=>e.defaultView?.localStorage??null)}var Ke="shop_access_token",le="shop_refresh_token",H=null;function D(){v.removeItem(Ke),v.removeItem(le)}var b={getAccess(){return H},takeLegacyRefresh(){let e=v.getItem(le);return D(),e},setTokens(e){H=e,D()},clear(){H=null,D()}};function ze(e){return!!e.src}function R(e){let t=e.finishes.filter(ze);if(t.length===e.finishes.length)return e;let n=e.defaultFinish&&t.some(r=>r.name===e.defaultFinish)?e.defaultFinish:null;return{...e,finishes:t,defaultFinish:n}}function je(e){return e.listable!==!1}function W(e){return e.map(R).filter(je)}var I="https://cdn.inovit.com"?.replace(/\/+$/,"");function J(e,t){let n=_().hostBackend?.media.resolve;if(!(!n||n===Qe))return n(e,t)??e}function Ze(e){return/^(?:https?:)?\/\//i.test(e)||/^(?:data|blob):/i.test(e)}function G(e){return J(e)??ce(e)}function ce(e){return!I||Ze(e)?e:I+e.replace(/^\/media/,"")}var Qe=e=>ce(e),Ye="";function E(e){if(!e)return null;let t=J(e);return t!==void 0?t:e.startsWith("/")?`${Ye}${e}`:e}function rn(e){return/^https?:\/\//i.test(e)&&!(I&&e.startsWith(I+"/"))}function sn(e){if(!e)return;let t=J(e);return t!==void 0?t:e.startsWith("/media/")?G(e):e}function on(e){let t=e.split("?")[0],n=t.substring(t.lastIndexOf("/")+1);try{return decodeURIComponent(n.replace(/^[0-9a-f]{32}_/i,""))||n}catch{return n}}var Xe="/videos/products/";function an(e){return!!e&&e.includes(Xe)}var pe=["fill","stroke","stop-color","color","flood-color","lighting-color","solid-color"],ge=new Set(["none","transparent","currentcolor","inherit","initial","unset","context-fill","context-stroke"]),F={black:[0,0,0],white:[255,255,255],gray:[128,128,128],grey:[128,128,128],darkgray:[169,169,169],darkgrey:[169,169,169],dimgray:[105,105,105],dimgrey:[105,105,105],lightgray:[211,211,211],lightgrey:[211,211,211],gainsboro:[220,220,220],silver:[192,192,192],whitesmoke:[245,245,245]},he=12,ye=/\burl\(/i,fe=new RegExp(`(?<![-\\w])(${pe.join("|")})(\\s*=\\s*)(["'])([^"']*)\\3`,"gi"),Se=new RegExp(`((?:^|[;{\\s"'])(?:${pe.join("|")})\\s*:\\s*)([^;}"'<>]+)`,"gi"),et=/<svg\b([^>]*)>/i,tt=/\bfill\s*[=:]/i;function nt(e){let t=e.replace(fe,(n,r,s,i,u)=>{let m=ue(u);return m===null?n:`${r}${s}${i}${m}${i}`}).replace(Se,(n,r,s)=>{let i=ue(s);return i===null?n:`${r}${i}`});return t=t.replace(et,(n,r)=>tt.test(r)?n:`<svg fill="#ffffff"${r}>`),t}function ue(e){let t=/!important/i.test(e),r=e.replace(/!important/gi,"").trim().toLowerCase();if(!r||ye.test(r)||ge.has(r))return null;let s=r in F?[...F[r],1]:Pe(r);if(!s)return null;let[i,u,m,d]=s;if(Math.max(i,u,m)-Math.min(i,u,m)>he)return null;let y=rt(255-i,255-u,255-m,d);return t?`${y} !important`:y}function rt(e,t,n,r){if(r<1)return`rgba(${e}, ${t}, ${n}, ${r})`;let s=i=>i.toString(16).padStart(2,"0");return`#${s(e)}${s(t)}${s(n)}`}function Pe(e){return e.startsWith("#")?st(e):e.startsWith("rgb")?it(e):e.startsWith("hsl")?at(e):null}function st(e){let t=e.slice(1),n=1;if(t.length===3||t.length===4)t.length===4&&(n=parseInt(t[3]+t[3],16)/255),t=t.slice(0,3).split("").map(r=>r+r).join("");else if(t.length===6||t.length===8)t.length===8&&(n=parseInt(t.slice(6,8),16)/255),t=t.slice(0,6);else return null;return/^[0-9a-f]{6}$/.test(t)?[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),n]:null}function it(e){let t=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),[n,r]=t.split("/"),s=n.split(/[\s,]+/).filter(Boolean).slice(0,3);if(s.length<3)return null;let i=s.map(m=>m.endsWith("%")?Math.round(parseFloat(m)/100*255):Math.round(parseFloat(m)));if(i.some(m=>Number.isNaN(m)))return null;let u=r?B(r):ot(n);return[i[0],i[1],i[2],u]}function ot(e){let t=e.split(/[\s,]+/).filter(Boolean);return t.length>=4?B(t[3]):1}function B(e){let t=e.trim().endsWith("%")?parseFloat(e)/100:parseFloat(e);return Number.isNaN(t)?1:t}function at(e){let t=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),[n,r]=t.split("/"),s=n.split(/[\s,]+/).filter(Boolean);if(s.length<3)return null;let i=parseFloat(s[0]),u=parseFloat(s[1])/100,m=parseFloat(s[2])/100;if([i,u,m].some(Ne=>Number.isNaN(Ne)))return null;let d=r?B(r):s.length>=4?B(s[3]):1,[y,S,P]=lt(i,u,m);return[y,S,P,d]}function lt(e,t,n){let r=(1-Math.abs(2*n-1))*t,s=(e%360+360)%360/60,i=r*(1-Math.abs(s%2-1)),u=0,m=0,d=0;s<1?[u,m,d]=[r,i,0]:s<2?[u,m,d]=[i,r,0]:s<3?[u,m,d]=[0,r,i]:s<4?[u,m,d]=[0,i,r]:s<5?[u,m,d]=[i,0,r]:[u,m,d]=[r,0,i];let y=n-r/2;return[Math.round((u+y)*255),Math.round((m+y)*255),Math.round((d+y)*255)]}var me=512*1024;function V(e){return/\.svg(\?|$)/i.test(e)}function ct(e){return`data:image/svg+xml,${encodeURIComponent(nt(e))}`}function ut(e){let t=e.replace(/!important/gi,"").trim().toLowerCase();if(!t||ye.test(t)||ge.has(t))return null;let n=t in F?[...F[t],1]:Pe(t);if(!n)return null;let[r,s,i]=n;return Math.max(r,s,i)-Math.min(r,s,i)>he?null:(.2126*r+.7152*s+.0722*i)/255}function mt(e){let t=[],n=r=>{let s=ut(r);s!==null&&t.push(s)};for(let r of e.matchAll(fe))n(r[4]);for(let r of e.matchAll(Se))n(r[2]);return t.length?t.reduce((r,s)=>r+s,0)/t.length<.5:null}var de=/^(?:\uFEFF|\s+|<\?xml[^>]*\?>|<!--[\s\S]*?-->|<!DOCTYPE\s+svg[^>[]*>)/i;function dt(e){let t=e;for(let n=de.exec(t);n&&n[0].length>0;n=de.exec(t))t=t.slice(n[0].length);return/^<svg[\s>/]/i.test(t)}async function pt(e,t){if(!V(e))return null;try{let n=await fetch(e,{signal:t,redirect:"manual"});if(!n.ok)return null;let r=Number(n.headers.get("content-length"));if(Number.isFinite(r)&&r>me)return null;let s=await n.text();return s.length>me?null:dt(s)?s:null}catch{return null}}async function be(e,t){let n=await pt(e,t);return n===null?null:{reversed:ct(n),inkIsDark:mt(n)}}function we(){return _().siteId()}var gt="",f=class extends Error{constructor(t,n,r){super(n),this.status=t,this.data=r}},z="Unable to reach the server. This could be a problem with your internet connection, or the server may be undergoing maintenance or an upgrade. Please try again shortly.",ht=new Set([502,503,504]),K=0,yt="This editor runs on its host's own backend, which does not serve this request.",ft=5e3,St=15e3,Pt=()=>typeof window>"u"?ft:St;function ve(e){let t=(e.method??"GET").toUpperCase();if(!(e.body!=null||t!=="GET"&&t!=="HEAD")&&e.audience!=="admin"&&typeof AbortSignal?.timeout=="function")return AbortSignal.timeout(Pt())}var _e=e=>e instanceof Error&&e.name==="TimeoutError",Ae=(e,t)=>ht.has(e)?z:t;function bt(e){if(typeof window>"u"||!e.startsWith("/api/v1/"))return e;let t=U();return!t||/[?&]site=/.test(e)?e:j(e,`site=${encodeURIComponent(t)}`)}async function o(e,t={}){let{token:n,baseUrl:r,headers:s,audience:i,...u}=t;if(typeof window<"u"&&!ee())throw new f(K,yt,null);if(typeof window>"u"&&r===void 0)throw new Error(`apiFetch(${JSON.stringify(e)}) ran on the server without an explicit baseUrl. The API_URL default it would inherit is browser-only (the prod image bakes NEXT_PUBLIC_API_URL="" for same-origin use, which a Node fetch cannot resolve). Pass a base explicitly: \`await backendOpts()\` (or baseUrl: PRODUCT_FETCH_BASE) for product reads, or the server-only PRODUCT_BACKEND_URL env for other backend surfaces.`);let m=typeof FormData<"u"&&u.body instanceof FormData,d;try{d=await fetch(`${r??gt}${bt(e)}`,{...u,headers:{...m?{}:{"Content-Type":"application/json"},...n?{Authorization:`Bearer ${n}`}:{},"X-Portal-Audience":i??"shop",...s},signal:u.signal??ve({...u,audience:i})})}catch(P){throw P instanceof TypeError||_e(P)?new f(K,z,null):P}let y;try{y=await d.text()}catch(P){throw _e(P)?new f(K,z,null):P}let S=null;if(y)try{S=JSON.parse(y)}catch{throw new f(d.status,d.ok?"Expected JSON but received a non-JSON response":Ae(d.status,d.statusText),y)}if(!d.ok){let P=(S&&typeof S=="object"&&"detail"in S&&typeof S.detail=="string"?S.detail:null)??Ae(d.status,d.statusText);throw new f(d.status,P,S)}return S}var x=null;async function Ie(){return x||(x=wt().finally(()=>{x=null}),x)}async function wt(){let e=b.takeLegacyRefresh(),t=await _t.refresh(e??void 0);return b.setTokens(t.access),t.access}async function Ee(){return b.getAccess()??Ie()}async function p(e,t={}){let n;try{n=await Ee()}catch{throw b.clear(),new f(401,"Not signed in",null)}try{return await o(e,{...t,token:n})}catch(r){if(!(r instanceof f)||r.status!==401)throw r;try{let s=await Ie();return await o(e,{...t,token:s})}catch{throw b.clear(),r}}}async function Re(){let e=await p("/api/auth/me/");if(e.portal!=="shop")throw b.clear(),new f(403,"This session is not valid for this shop.",null);return e}var _t={login:(e,t)=>o("/api/auth/login/",{method:"POST",body:JSON.stringify({email:e,password:t,portal:"shop"}),credentials:"include"}),refresh:e=>o("/api/auth/refresh/",{method:"POST",body:JSON.stringify(e?{refresh:e,portal:"shop"}:{portal:"shop"}),credentials:"include"}),logout:async()=>{b.clear();try{await o("/api/auth/logout/",{method:"POST",body:JSON.stringify({portal:"shop"}),credentials:"include"})}catch{}},restoreSession:async()=>{let e=await Ee();return await Re(),e},me:Re,updateMe:e=>p("/api/auth/me/",{method:"PATCH",body:JSON.stringify(e)}),changePassword:(e,t)=>p("/api/auth/me/",{method:"PATCH",body:JSON.stringify({password:t,old_password:e})}),changeEmail:(e,t)=>p("/api/shop-portal/change-email/",{method:"POST",body:JSON.stringify({new_email:e,current_password:t})}),myProfile:()=>p("/api/shop-portal/profile/"),updateMyProfile:e=>p("/api/shop-portal/profile/",{method:"PATCH",body:JSON.stringify(e)}),myAddresses:()=>p("/api/shop-portal/delivery-locations/"),createAddress:e=>p("/api/shop-portal/delivery-locations/",{method:"POST",body:JSON.stringify(e)}),updateAddress:(e,t)=>p(`/api/shop-portal/delivery-locations/${e}/`,{method:"PATCH",body:JSON.stringify(t)}),deleteAddress:e=>p(`/api/shop-portal/delivery-locations/${e}/`,{method:"DELETE"}),passwordResetRequest:e=>o("/api/auth/password-reset/",{method:"POST",body:JSON.stringify({email:e})}),passwordResetConfirm:(e,t,n)=>o("/api/auth/password-reset/confirm/",{method:"POST",body:JSON.stringify({uid:e,token:t,new_password:n})}),brands:()=>p("/api/products/brands/"),myOrders:()=>p("/api/shop-portal/orders/").then(e=>e.results),myOrder:e=>p(`/api/shop-portal/orders/${e}/`),cancelOrder:e=>p(`/api/shop-portal/orders/${e}/cancel/`,{method:"POST"}),myReturns:e=>p(`/api/shop-portal/returns/${e?`?order=${encodeURIComponent(e)}`:""}`).then(t=>t.results),createReturn:e=>p("/api/shop-portal/returns/",{method:"POST",body:JSON.stringify(e)}),withdrawReturn:e=>p(`/api/shop-portal/returns/${e}/cancel/`,{method:"POST"}),uploadReturnPhoto:(e,t)=>{let n=new FormData;return n.append("claim_item",e),n.append("file",t),n.append("media_type",t.type.startsWith("video/")?"video":"image"),p("/api/shop-portal/return-media/",{method:"POST",body:n})}};function h(e){if(typeof e=="string")return e.startsWith("/media/")?G(e):e;if(Array.isArray(e))return e.map(h);if(e&&typeof e=="object"){let t={};for(let[n,r]of Object.entries(e))t[n]=n==="captions"&&r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r).map(([s,i])=>[h(s),i])):h(r);return t}return e}var At="",Fe="".replace(/\/+$/,""),Be=typeof window>"u"&&Fe!=="",Rt=Be?Fe:At,w=se;function l(e,t){let n=t?`?process=${encodeURIComponent(t)}`:"";return`/api/v1${e}${n}`}var xt=100,xe=50;function Le(e,t,n){let r=new URLSearchParams;for(let[s,i]of Object.entries(t))i!=null&&i!==""&&r.set(s,String(i));return r.set("pageSize",String(xt)),n&&r.set("cursor",n),`/api/v1${e}?${r.toString()}`}function kt(e,t){return Le("/wheels",{process:e},t)}function Tt(e,t,n){return Le("/products",{kind:e.join(","),make:t?.make,model:t?.model,year:t?.year,modification:t?.modification},n)}function Ct(e){if(!e)return null;try{return new URL(e,"http://cursor.invalid").searchParams.get("cursor")}catch{return null}}async function ke(e,t,n=()=>!1){let r=[],s=null;try{for(let i=0;i<xe;i++){let u=await o(await t(s),await a());if(r.push(...u.results),s=Ct(u.next),!s)break}s&&console.warn(`[${e}] stopped at ${xe} pages (${r.length} rows); catalog may be truncated`)}catch(i){if(n(i))throw i;console.warn(`[${e}] product API unavailable, returning []`,i)}return r}var Ot=e=>e instanceof f&&e.status===400;function vt(e){return e.flatMap(t=>t.kind==="alloy-wheel"?W([t]):[t])}async function qe(){return(await It()).host}async function It(){try{let{headers:e}=await import("./headers-3CAQXQEY.js"),t=await e(),n=i=>i?.split(",")[0]?.split(":")[0]?.trim().toLowerCase()||null,r=n(t.get(oe)??t.get("x-forwarded-host")??t.get("host")),s=n(t.get("host"));return{host:r,matchesRequestHost:r!==null&&r===s}}catch{return{host:null,matchesRequestHost:!1}}}async function Et(){try{let{headers:e}=await import("./headers-3CAQXQEY.js");return te((await e()).get(N))}catch{return null}}async function Ft(){try{let{headers:e}=await import("./headers-3CAQXQEY.js");return(await e()).get(ie)||null}catch{return null}}async function Bt(){let e=await Ft();if(e)return`site=${encodeURIComponent(e)}`;let t=await qe();return t?`host=${encodeURIComponent(t)}`:""}async function g(e){if(typeof window<"u"){let t=U();return t?j(e,`site=${encodeURIComponent(t)}`):e}return j(e,await Bt())}function j(e,t){return t?`${e}${e.includes("?")?"&":"?"}${t}`:e}async function Lt(e){if(!Be)return;let[t,n]=await Promise.all([qe(),Et()]),r=ne(t,n,e);return Object.keys(r).length>0?r:void 0}async function a(e){let t=await Lt(re(e)),n={baseUrl:Rt,...e};return t&&(n.headers={...t,...e?.headers}),n}var k=typeof window>"u";function T(e,t){let n=new URLSearchParams;for(let[s,i]of Object.entries(t))i!==void 0&&i!==""&&n.set(s,String(i));let r=n.toString();return`/api/v1/fitment${e}${r?`?${r}`:""}`}var An={listMakes:async e=>{if(k){let{fitmentData:n}=await import("./fitment-data-ZLYB5QPR.js");return n.makes(e)}return(await o(T("/makes",{region:e}),{baseUrl:w()})).results},listModels:async(e,t)=>{if(k){let{fitmentData:r}=await import("./fitment-data-ZLYB5QPR.js");return r.models(e,t)}return(await o(T("/models",{make:e,region:t}),{baseUrl:w()})).results},listYears:async(e,t,n)=>{if(k){let{fitmentData:s}=await import("./fitment-data-ZLYB5QPR.js");return s.years(e,t,n)}return(await o(T("/years",{make:e,model:t,region:n}),{baseUrl:w()})).results},listModifications:async(e,t,n,r)=>{if(k){let{fitmentData:i}=await import("./fitment-data-ZLYB5QPR.js");return i.modifications(e,t,n,r)}return(await o(T("/modifications",{make:e,model:t,year:n,region:r}),{baseUrl:w()})).results},getStockFitment:async(e,t,n,r,s)=>{if(k){let{fitmentData:i}=await import("./fitment-data-ZLYB5QPR.js");return i.stockFitment(e,t,n,r,s)}return o(T("/stock-fitment",{make:e,model:t,year:n,modification:r,region:s}),{baseUrl:w()})}},Rn={listWheels:async e=>{let t=await ke("products.listWheels",async n=>await g(kt(e,n)));return W(h(t))},listCatalog:async(e,t)=>{if(e.length===0)throw new Error("products.listCatalog() needs at least one kind. An empty list would omit `kind`, which the contract reads as `alloy-wheel` \u2014 so the call would silently return the wheel catalog instead of nothing.");let n=await ke("products.listCatalog",async r=>await g(Tt(e,t,r)),Ot);return vt(h(n))},getWheel:async e=>R(h(await o(await g(l(`/wheels/${e}`)),await a()))),getTyre:async e=>h(await o(await g(l(`/tyres/${e}`)),await a())),listBundles:async()=>{try{return await o(await g(l("/bundles")),await a())}catch{return[]}},getBundle:async e=>o(await g(l(`/bundles/${e}`)),await a()),listGalleryBuilds:async(e={})=>{let{process:t=null,wheelSlug:n=null}=e;if(typeof window>"u"){let{listGalleryBuilds:r}=await import("./gallery-builds-data-SWA6XKFF.js");return h(r(t,n))}try{let r=new URLSearchParams;t&&r.set("process",t),n&&r.set("wheelSlug",n);let s=r.toString(),i=await o(`/api/v1/gallery-builds${s?`?${s}`:""}`,{baseUrl:w()});return h(i.results)}catch(r){return console.warn("[products.listGalleryBuilds] product API unavailable, returning []",r),[]}},getSite:async()=>o(await g(l("/site")),await a()),getSiteBySlug:async e=>o(`${l("/site")}?${new URLSearchParams({site:e})}`,typeof window>"u"?await a():void 0),listBrands:async()=>{try{return(await o(await g(l("/brands")),await a())).results??[]}catch(e){return console.warn("[products.listBrands] product API unavailable, returning []",e),[]}},listBrandsForSite:async e=>(await o(`${l("/brands")}?${new URLSearchParams({site:e})}`,typeof window>"u"?await a():void 0)).results??[],listPages:async()=>h(await o(await g(l("/pages")),await a())),listProductTemplates:async()=>{try{return await o(await g(l("/product-templates")),await a())}catch(e){return console.warn("[products.listProductTemplates] unavailable, returning []",e),[]}},listProductTypeChoices:async()=>{try{return await o(await g(l("/product-type-choices")),await a())}catch(e){return console.warn("[products.listProductTypeChoices] unavailable, returning []",e),[]}},listFieldUsage:async()=>{try{return await o(await g(l("/field-usage")),await a())}catch(e){return console.warn("[products.listFieldUsage] unavailable, returning []",e),[]}},getPage:async(e,t={})=>h(await o(await g(l(`/pages/${e}`)),await a(t.revalidate!==void 0?{next:{revalidate:t.revalidate}}:void 0))),listBlogPosts:async()=>{try{return(await o(l("/blog-posts"),await a())).map(t=>({...t,coverImage:E(t.coverImage)??""}))}catch(e){return console.warn("[products.listBlogPosts] blog API unavailable, returning []",e),[]}},getBlogPost:async e=>{let t=await o(l(`/blog-posts/${e}`),await a());return{...t,coverImage:E(t.coverImage)??""}},createOrder:async e=>o(l("/orders"),await a({method:"POST",body:JSON.stringify(e)})),createOrderAuthed:async e=>p(l("/orders"),await a({method:"POST",body:JSON.stringify(e)})),lookupOrder:async e=>o(l("/orders/lookup"),await a({method:"POST",body:JSON.stringify(e)})),createPaymentIntent:async e=>o(l("/payments/intent"),await a({method:"POST",body:JSON.stringify(e)})),createPaypalOrder:async e=>o(l("/payments/paypal/order"),await a({method:"POST",body:JSON.stringify(e)})),capturePaypalOrder:async e=>o(l("/payments/paypal/capture"),await a({method:"POST",body:JSON.stringify(e)})),createAfterpayCheckout:async e=>o(l("/payments/afterpay/checkout"),await a({method:"POST",body:JSON.stringify(e)})),captureAfterpayPayment:async e=>o(l("/payments/afterpay/capture"),await a({method:"POST",body:JSON.stringify(e)})),chargeSquare:async e=>o(l("/payments/square/charge"),await a({method:"POST",body:JSON.stringify(e)})),createGocardlessBillingRequest:async e=>o(l("/payments/gocardless/billing-request"),await a({method:"POST",body:JSON.stringify(e)})),completeGocardlessPayment:async e=>o(l("/payments/gocardless/complete"),await a({method:"POST",body:JSON.stringify(e)})),createZipCheckout:async e=>o(l("/payments/zip/checkout"),await a({method:"POST",body:JSON.stringify(e)})),captureZipPayment:async e=>o(l("/payments/zip/capture"),await a({method:"POST",body:JSON.stringify(e)})),createKlarnaCheckout:async e=>o(l("/payments/klarna/checkout"),await a({method:"POST",body:JSON.stringify(e)})),captureKlarnaPayment:async e=>o(l("/payments/klarna/capture"),await a({method:"POST",body:JSON.stringify(e)})),createStockAlert:async e=>o(l("/stock-alerts"),await a({method:"POST",body:JSON.stringify(e)})),createPreOrderIntent:async e=>o(l("/pre-order-intents"),await a({method:"POST",body:JSON.stringify(e)})),createNewsletterSubscription:async e=>o(l("/newsletter-subscriptions"),await a({method:"POST",body:JSON.stringify(e)})),unsubscribeNewsletter:async e=>o(l("/newsletter-unsubscribe"),await a({method:"POST",body:JSON.stringify(e)})),captureCart:async e=>o(l("/carts"),await a({method:"POST",body:JSON.stringify(e)})),restoreCart:async e=>o(l("/carts/restore"),await a({method:"POST",body:JSON.stringify(e)})),unsubscribeCartReminders:async e=>o(l("/carts/unsubscribe"),await a({method:"POST",body:JSON.stringify(e)})),listReviews:async(e={})=>{let t=new URLSearchParams;e.limit&&t.set("limit",String(e.limit)),e.designCode&&t.set("designCode",e.designCode);let n=l("/reviews"),r=t.toString();try{return await o(await g(r?`${n}?${r}`:n),await a())}catch(s){return console.warn("[products.listReviews] product API unavailable, returning []",s),[]}},submitReview:async e=>o(l("/reviews"),await a({method:"POST",body:JSON.stringify(e)})),getForm:async e=>o(l(`/forms/${encodeURIComponent(e)}`),await a()),submitForm:async(e,t)=>o(l(`/forms/${encodeURIComponent(e)}/submissions`),await a({method:"POST",body:JSON.stringify(t)})),listShippingMethods:async()=>{try{return await o(l("/shipping-methods"),await a())}catch(e){return console.warn("[products.listShippingMethods] product API unavailable, returning []",e),[]}},listCountrySubdivisions:async e=>{try{return await o(l(`/countries/${encodeURIComponent(e)}/subdivisions`),await a())}catch(t){return console.warn("[products.listCountrySubdivisions] unavailable, returning []",t),[]}},quoteCart:async e=>o(l("/cart/quote"),await a({method:"POST",body:JSON.stringify(e)})),validateCoupon:async e=>o(l("/coupons/validate"),await a({method:"POST",body:JSON.stringify(e)})),getHeaderSettings:async()=>{let e=ve({method:"GET"}),t=await o(await g(l("/header-settings")),await a({signal:e})),n=E(t.logoUrl),r=null,s=null;if(n&&V(n)){let i=await be(n,e);i&&(r=i.reversed,s=i.inkIsDark)}return{...t,logoUrl:n,logoReversed:r,logoInkIsDark:s}},getThemeSettings:async()=>o(await g(l("/theme-settings")),await a()),getChatSettings:async()=>o(await g(l("/chat-settings")),await a())},xn={listServices:async()=>{try{return await o(l("/bookings/services"),await a())}catch(e){return console.warn("[bookings.listServices] API unavailable, returning []",e),{results:[],currency:"USD"}}},getAvailability:async(e,t)=>o(l(`/bookings/availability?service=${encodeURIComponent(e)}&date=${t}`),await a()),create:async e=>o(l("/bookings"),await a({method:"POST",body:JSON.stringify(e)})),get:async e=>o(l(`/bookings/manage/${encodeURIComponent(e)}`),await a()),cancel:async e=>o(l(`/bookings/manage/${encodeURIComponent(e)}/cancel`),await a({method:"POST"})),createPaymentIntent:async e=>o(l("/bookings/payments/intent"),await a({method:"POST",body:JSON.stringify({manageToken:e})}))},Z=class extends Error{constructor(n,r){super(`Slug "${n}" exists on ${r} websites; a site is required to pick one.`);this.slug=n;this.count=r;this.name="AmbiguousPageSlugError"}},C=e=>e?`/api/storefront/header-settings/?${new URLSearchParams({site:e})}`:"/api/storefront/header-settings/",Te=e=>e?`/api/storefront/theme-settings/?${new URLSearchParams({site:e})}`:"/api/storefront/theme-settings/",Ce=e=>e?`/api/storefront/chat-settings/?${new URLSearchParams({site:e})}`:"/api/storefront/chat-settings/",Oe=e=>`/api/storefront/social-settings/?${new URLSearchParams({site:e})}`,Q=e=>`/api/storefront/sites/${encodeURIComponent(e)}/`,qt=e=>`${Q(e)}currencies/`,Nt="/api/storefront/media/ingest/",Y=class extends Error{constructor(){super("This editor is not connected to a website, so an upload has nowhere to go. Open the page from the website the file should belong to, then try again."),this.name="MediaUploadDestinationError"}};function $t(){let e=we();if(!e)throw new Y;return`${Nt}?${new URLSearchParams({site:e})}`}var L={"X-Puck-Media-Manifest":ae.contentHash},c=(e,t={})=>o(e,{...t,audience:"admin"}),kn={findPageBySlug:async(e,t,n)=>{let r=new URLSearchParams({slug:e});n&&r.set("site",n);let s=await c(`/api/storefront/pages/?${r.toString()}`,{token:t}),i=Array.isArray(s)?s:s.results??[];if(!n&&i.length>1)throw new Z(e,i.length);return i[0]??null},getPageById:(e,t)=>c(`/api/storefront/pages/${e}/`,{token:t}),saveLayout:(e,t,n,r,s)=>c(`/api/storefront/pages/${e}/`,{method:"PATCH",body:JSON.stringify({layout:t,expected_updated_at:r,...s?{client_id:s}:{}}),token:n}),publishPage:(e,t,n)=>c(`/api/storefront/pages/${e}/publish/`,{method:"POST",body:n?JSON.stringify({expected_updated_at:n}):void 0,token:t}),claimPageEditLock:(e,t,n,r=!1)=>c(`/api/storefront/pages/${e}/edit-lock/`,{method:"POST",body:JSON.stringify({client_id:n,takeover:r}),token:t}),releasePageEditLock:(e,t)=>c(`/api/storefront/pages/${e}/edit-lock/`,{method:"DELETE",token:t}),createTemplate:(e,t,n)=>c("/api/storefront/page-templates/",{method:"POST",body:JSON.stringify({name:e,layout:t}),headers:L,token:n}),getTemplate:(e,t)=>c(`/api/storefront/page-templates/${e}/`,{token:t}),saveTemplateLayout:(e,t,n)=>c(`/api/storefront/page-templates/${e}/`,{method:"PATCH",body:JSON.stringify({layout:t}),headers:L,token:n}),listTemplatePages:async(e,t)=>{let n=await c(`/api/storefront/template-pages/?template=${encodeURIComponent(e)}`,{token:t});return Array.isArray(n)?n:n.results??[]},findTemplatePageBySlug:async(e,t,n)=>{let r=await c(`/api/storefront/template-pages/?template=${encodeURIComponent(e)}&slug=${encodeURIComponent(t)}`,{token:n});return(Array.isArray(r)?r:r.results??[])[0]??null},createTemplatePage:(e,t,n)=>c("/api/storefront/template-pages/",{method:"POST",body:JSON.stringify({template:e,...t}),headers:L,token:n}),saveTemplatePageLayout:(e,t,n)=>c(`/api/storefront/template-pages/${e}/`,{method:"PATCH",body:JSON.stringify({layout:t}),headers:L,token:n}),deleteTemplatePage:(e,t)=>c(`/api/storefront/template-pages/${e}/`,{method:"DELETE",token:t}),listPages:async(e,t)=>{let n=new URLSearchParams({no_page:"true"});t&&n.set("site",t);let r=await c(`/api/storefront/pages/?${n.toString()}`,{token:e});return Array.isArray(r)?r:r.results??[]},createPage:(e,t,n,r)=>c("/api/storefront/pages/",{method:"POST",body:JSON.stringify({title:e,slug:t,layout:n}),token:r}),deletePage:(e,t)=>c(`/api/storefront/pages/${e}/`,{method:"DELETE",token:t}),getHeaderSettings:(e,t)=>c(C(t),{token:e}),listMenus:async(e,t)=>{let n=new URLSearchParams({no_page:"true"});t&&n.set("site",t);let r=await c(`/api/storefront/menus/?${n}`,{token:e});return Array.isArray(r)?r:r.results??[]},listBlogPosts:async(e,t={})=>{let n=new URLSearchParams({no_page:"true"});t.visibleOnly&&n.set("is_visible","true"),t.siteId&&n.set("site",t.siteId);let r=await c(`/api/storefront/blog-posts/?${n.toString()}`,{token:e});return Array.isArray(r)?r:r.results??[]},listCategories:async(e,t={})=>{let n=new URLSearchParams({no_page:"true"});t.visibleOnly&&n.set("is_visible","true"),t.siteId&&n.set("site",t.siteId);let r=await c(`/api/storefront/categories/?${n.toString()}`,{token:e});return[...Array.isArray(r)?r:r.results??[]].sort((i,u)=>i.sort_order-u.sort_order||i.name.localeCompare(u.name))},listForms:async(e,t={})=>{let n=new URLSearchParams({no_page:"true"});t.siteId&&n.set("site",t.siteId);let r=await c(`/api/storefront/forms/?${n.toString()}`,{token:e});return[...Array.isArray(r)?r:r.results??[]].sort((i,u)=>i.title.localeCompare(u.title))},listWheelSummaries:async(e,t={})=>{let n=new URLSearchParams;t.siteId&&n.set("site",t.siteId);let r=n.toString(),s=await c(`/api/storefront/wheel-curations/summaries/${r?`?${r}`:""}`,{token:e});return h(s)},listProducts:async(e,t={})=>{let n=new URLSearchParams;t.kinds?.length&&n.set("kind",t.kinds.join(",")),t.siteId&&n.set("site",t.siteId);let r=n.toString(),s=await c(`/api/storefront/products/${r?`?${r}`:""}`,{token:e});return h(s)},getWheelDetail:async(e,t,n={})=>{let r=new URLSearchParams({slug:t});return n.siteId&&r.set("site",n.siteId),R(h(await c(`/api/storefront/wheel-curations/detail/?${r.toString()}`,{token:e})))},updateHeaderSettings:(e,t,n)=>c(C(n),{method:"PATCH",body:JSON.stringify(e),token:t}),getSite:(e,t)=>c(Q(e),{token:t}),listSiteCurrencies:async(e,t)=>{let n=await c(qt(e),{token:t});return Array.isArray(n)?n:[]},updateSite:(e,t,n)=>c(Q(e),{method:"PATCH",body:JSON.stringify(t),token:n}),getThemeSettings:(e,t)=>c(Te(t),{token:e}),updateThemeSettings:(e,t,n)=>c(Te(n),{method:"PATCH",body:JSON.stringify(e),token:t}),getChatSettings:(e,t)=>c(Ce(t),{token:e}),updateChatSettings:(e,t,n)=>c(Ce(n),{method:"PATCH",body:JSON.stringify(e),token:t}),getSocialSettings:(e,t)=>c(Oe(t),{token:e}),updateSocialSettings:(e,t,n)=>c(Oe(n),{method:"PATCH",body:JSON.stringify(e),token:t}),uploadHeaderLogo:(e,t,n)=>{let r=new FormData;return r.append("logo",e),c(C(n),{method:"PATCH",body:r,token:t})},clearHeaderLogo:(e,t)=>c(C(t),{method:"PATCH",body:JSON.stringify({logo:null}),token:e}),setHeaderLogoFromAsset:(e,t,n)=>c(C(n),{method:"PATCH",body:JSON.stringify({logo_asset_id:e}),token:t}),uploadMedia:async(e,t)=>{let n=new FormData;return n.append("file",e),c($t(),{method:"POST",body:n,token:t})},listMedia:async(e,t)=>{let n=new URLSearchParams({no_page:"true"});t&&n.set("kind",t);let r=await c(`/api/storefront/media-assets/?${n.toString()}`,{token:e});return Array.isArray(r)?r:r.results??[]}};export{$e as a,Ue as b,Me as c,He as d,De as e,_ as f,Ut as g,Mt as h,ee as i,G as j,Qe as k,E as l,rn as m,sn as n,on as o,an as p,ne as q,re as r,ae as s,Kt as t,v as u,zt as v,jt as w,b as x,ze as y,V as z,we as A,Wt as B,se as C,gt as D,f as E,z as F,K as G,o as H,_t as I,At as J,qe as K,It as L,Et as M,Ft as N,An as O,Rn as P,xn as Q,Z as R,c as S,kn as T};