efficient-storefront-blocks 0.97.0 → 0.99.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/chunks/EditorPreviewCheckout-J76THKIJ.js +4 -0
  3. package/dist/chunks/{SiteEditorProvider-VZUU5OPZ.js → SiteEditorProvider-YAIB64UV.js} +1 -1
  4. package/dist/chunks/chunk-B2IYTOE3.js +1 -0
  5. package/dist/chunks/chunk-EIBYUCDE.js +1 -0
  6. package/dist/chunks/chunk-GOVYQQA4.js +1 -0
  7. package/dist/chunks/chunk-KRMWJLBM.js +412 -0
  8. package/dist/chunks/{fitment-data-MCGKHSA4.js → fitment-data-OUHMES66.js} +1 -1
  9. package/dist/consent.js +1 -1
  10. package/dist/contract.js +11 -3
  11. package/dist/editor/components/EditorPreviewCheckout.js +1 -1
  12. package/dist/editor/components/GalleryShowcaseSource.js +1 -1
  13. package/dist/editor/components/HeaderSettingsPanel.js +1 -1
  14. package/dist/editor/lib/document/blocks/commerce/Collections/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/commerce/SearchBlock/fields.js +1 -1
  16. package/dist/editor/lib/document/blocks/commerce/SpecTable/fields.js +1 -1
  17. package/dist/editor/lib/document/blocks/commerce/WheelDiagram/fields.d.ts +2 -0
  18. package/dist/editor/lib/document/blocks/commerce/WheelDiagram/fields.js +1 -0
  19. package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
  20. package/dist/editor/lib/document/blocks/commerce/index.js +1 -1
  21. package/dist/editor/lib/document/blocks/service/BookingBox/fields.js +1 -1
  22. package/dist/editor/lib/document/blocks/service/ContactCards/fields.js +1 -1
  23. package/dist/editor/lib/document/blocks/service/SiteHeader/fields.js +1 -1
  24. package/dist/editor/lib/document/blocks/service/SubmitBox/fields.js +1 -1
  25. package/dist/editor/lib/document/box-header-for-site.d.ts +5 -0
  26. package/dist/editor/lib/document/box-header-for-site.js +1 -1
  27. package/dist/editor/lib/document/box-header.d.ts +2 -0
  28. package/dist/editor/lib/document/box-header.js +1 -1
  29. package/dist/editor/lib/document/config.d.ts +1 -0
  30. package/dist/editor/lib/document/config.js +1 -1
  31. package/dist/editor/lib/document/popup-look-fields.d.ts +1 -0
  32. package/dist/editor/lib/document/popup-look-fields.js +1 -1
  33. package/dist/editor/lib/document/text-kind-style-rows.d.ts +5 -0
  34. package/dist/editor/lib/document/text-kind-style-rows.js +1 -0
  35. package/dist/editor/lib/efficient-block-sources.js +1 -1
  36. package/dist/editor/lib/header-settings-source.js +1 -1
  37. package/dist/editor/lib/storefront-editor-words.d.ts +6 -3
  38. package/dist/editor/lib/storefront-editor-words.js +1 -1
  39. package/dist/editor.css +1 -1
  40. package/dist/index.d.ts +12 -1
  41. package/dist/index.js +212 -44
  42. package/dist/links.js +1 -1
  43. package/dist/render/app/globals.css +136 -12
  44. package/dist/render/built-with.json +1 -1
  45. package/dist/render/components/BundleCard.js +1 -1
  46. package/dist/render/components/CatalogFilterBarSection.js +1 -1
  47. package/dist/render/components/ChatWidget.js +1 -1
  48. package/dist/render/components/CollectionCard.d.ts +3 -0
  49. package/dist/render/components/CollectionCard.js +1 -1
  50. package/dist/render/components/Collections.d.ts +2 -1
  51. package/dist/render/components/Collections.js +1 -1
  52. package/dist/render/components/CompatibleTyres.js +1 -1
  53. package/dist/render/components/CountrySelect.js +1 -1
  54. package/dist/render/components/CurrencyContext.d.ts +3 -0
  55. package/dist/render/components/CurrencyContext.js +1 -1
  56. package/dist/render/components/FooterGroup.js +1 -1
  57. package/dist/render/components/FooterLogo.js +1 -1
  58. package/dist/render/components/FooterMenu.d.ts +5 -3
  59. package/dist/render/components/FooterMenu.js +1 -1
  60. package/dist/render/components/FooterPayment.js +1 -1
  61. package/dist/render/components/FooterSection.js +1 -1
  62. package/dist/render/components/FooterSocial.js +1 -1
  63. package/dist/render/components/FooterText.js +1 -1
  64. package/dist/render/components/FormBlock.d.ts +4 -1
  65. package/dist/render/components/FormBlock.js +1 -1
  66. package/dist/render/components/Header.js +1 -1
  67. package/dist/render/components/HeaderToolBlocks.d.ts +4 -2
  68. package/dist/render/components/HeaderToolBlocks.js +1 -1
  69. package/dist/render/components/HeaderTools.d.ts +7 -2
  70. package/dist/render/components/HeaderTools.js +1 -1
  71. package/dist/render/components/PhoneSheet.d.ts +16 -0
  72. package/dist/render/components/PhoneSheet.js +1 -0
  73. package/dist/render/components/PreOrderPanel.js +1 -1
  74. package/dist/render/components/ProductGridSection.js +1 -1
  75. package/dist/render/components/ProductRef.js +1 -1
  76. package/dist/render/components/SectionGroupBody.d.ts +2 -1
  77. package/dist/render/components/SectionGroupBody.js +1 -1
  78. package/dist/render/components/SpecTable.d.ts +2 -1
  79. package/dist/render/components/SpecTable.js +1 -1
  80. package/dist/render/components/Subscribe.d.ts +1 -0
  81. package/dist/render/components/Subscribe.js +1 -1
  82. package/dist/render/components/WheelCardFrame.js +1 -1
  83. package/dist/render/components/WheelDiagram.d.ts +16 -0
  84. package/dist/render/components/WheelDiagram.js +1 -0
  85. package/dist/render/components/card-pieces/CardName.js +1 -1
  86. package/dist/render/components/card-pieces/CardPrice.js +1 -1
  87. package/dist/render/components/card-pieces/CardSurfaceFrame.d.ts +1 -1
  88. package/dist/render/components/card-pieces/ProductCardState.d.ts +1 -0
  89. package/dist/render/components/card-pieces/ProductCardState.js +1 -1
  90. package/dist/render/components/catalog/CatalogFilterBar.d.ts +5 -1
  91. package/dist/render/components/catalog/CatalogFilterBar.js +1 -1
  92. package/dist/render/components/catalog/CatalogFilterContext.d.ts +2 -0
  93. package/dist/render/components/catalog/CatalogFilterContext.js +1 -1
  94. package/dist/render/components/catalog/FilterPill.js +1 -1
  95. package/dist/render/components/catalog/PriceRange.d.ts +6 -1
  96. package/dist/render/components/catalog/PriceRange.js +1 -1
  97. package/dist/render/components/catalog/ShopperFilters.js +1 -1
  98. package/dist/render/components/checkout/CheckoutPageClient.js +1 -1
  99. package/dist/render/components/checkout/checkout-parts.js +1 -1
  100. package/dist/render/components/checkout/checkout-state.d.ts +5 -0
  101. package/dist/render/components/checkout/checkout-state.js +3 -3
  102. package/dist/render/components/fitment/PickerField.js +1 -1
  103. package/dist/render/components/formSubmission.d.ts +4 -2
  104. package/dist/render/components/formSubmission.js +1 -1
  105. package/dist/render/components/pdp-dynamic/DynamicSpecTable.js +1 -1
  106. package/dist/render/components/pdp-dynamic/DynamicWheelDiagram.d.ts +6 -0
  107. package/dist/render/components/pdp-dynamic/DynamicWheelDiagram.js +1 -0
  108. package/dist/render/components/pdp-dynamic/KindGate.d.ts +2 -1
  109. package/dist/render/components/pdp-dynamic/KindGate.js +1 -1
  110. package/dist/render/components/submit/SubmitRegions.js +1 -1
  111. package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
  112. package/dist/render/components/wheels-plp/PlpActiveChips.d.ts +2 -1
  113. package/dist/render/components/wheels-plp/PlpActiveChips.js +1 -1
  114. package/dist/render/components/wheels-plp/PlpSidebar.d.ts +15 -7
  115. package/dist/render/components/wheels-plp/PlpSidebar.js +1 -1
  116. package/dist/render/components/wheels-plp/useVehicleCatalog.d.ts +6 -1
  117. package/dist/render/components/wheels-plp/useVehicleCatalog.js +1 -1
  118. package/dist/render/lib/api/index.d.ts +4 -1
  119. package/dist/render/lib/api/index.js +1 -1
  120. package/dist/render/lib/booking/text-kinds.js +1 -1
  121. package/dist/render/lib/checkout/pay-first.d.ts +1 -0
  122. package/dist/render/lib/checkout/pay-first.js +1 -1
  123. package/dist/render/lib/consent/rules.js +1 -1
  124. package/dist/render/lib/content/article-page-seed.js +1 -1
  125. package/dist/render/lib/content/collection-card-look.d.ts +13 -0
  126. package/dist/render/lib/content/collection-card-look.js +1 -0
  127. package/dist/render/lib/content/menu-row.d.ts +16 -0
  128. package/dist/render/lib/content/menu-row.js +1 -1
  129. package/dist/render/lib/content/text-kind-vars.d.ts +4 -0
  130. package/dist/render/lib/content/text-kind-vars.js +1 -0
  131. package/dist/render/lib/countries.js +1 -1
  132. package/dist/render/lib/document/blocks/commerce/Collections/meta.d.ts +4 -0
  133. package/dist/render/lib/document/blocks/commerce/Collections/meta.js +1 -1
  134. package/dist/render/lib/document/blocks/commerce/Collections/render.js +1 -1
  135. package/dist/render/lib/document/blocks/commerce/SearchBlock/render.js +1 -1
  136. package/dist/render/lib/document/blocks/commerce/WheelDiagram/meta.d.ts +2 -0
  137. package/dist/render/lib/document/blocks/commerce/WheelDiagram/meta.js +1 -0
  138. package/dist/render/lib/document/blocks/commerce/WheelDiagram/render.d.ts +2 -0
  139. package/dist/render/lib/document/blocks/commerce/WheelDiagram/render.js +1 -0
  140. package/dist/render/lib/document/blocks/commerce/metas.d.ts +1 -0
  141. package/dist/render/lib/document/blocks/commerce/metas.js +1 -1
  142. package/dist/render/lib/document/blocks/commerce/renders.d.ts +1 -0
  143. package/dist/render/lib/document/blocks/commerce/renders.js +1 -1
  144. package/dist/render/lib/document/blocks/service/SiteHeader/render.js +1 -1
  145. package/dist/render/lib/document/card-templates.d.ts +2 -0
  146. package/dist/render/lib/document/card-templates.js +1 -1
  147. package/dist/render/lib/document/current-record.js +1 -1
  148. package/dist/render/lib/document/footer-page-blocks.js +1 -1
  149. package/dist/render/lib/document/lazy-draws.js +1 -1
  150. package/dist/render/lib/document/render-config.d.ts +4 -0
  151. package/dist/render/lib/document/render-config.js +1 -1
  152. package/dist/render/lib/document/section-to-box-rows-collections.d.ts +1 -0
  153. package/dist/render/lib/document/section-to-box-rows-collections.js +1 -0
  154. package/dist/render/lib/document/section-to-box-rows-service.js +1 -1
  155. package/dist/render/lib/document/section-to-box-rows-spec.js +1 -1
  156. package/dist/render/lib/document/template-product-kind.d.ts +1 -0
  157. package/dist/render/lib/document/template-product-kind.js +1 -1
  158. package/dist/render/lib/next-fonts.js +1 -1
  159. package/dist/render/lib/popup/text-kind-style.js +1 -1
  160. package/dist/render/lib/sections/gallery-toolbar.js +1 -1
  161. package/dist/render/lib/storefront-page-groups.js +1 -1
  162. package/dist/render/lib/submit/text-kinds.js +1 -1
  163. package/dist/render/lib/wheels/catalog-filters-to-listing.d.ts +1 -1
  164. package/dist/render/lib/wheels/catalog-filters-to-listing.js +1 -1
  165. package/dist/render/lib/wheels/fitments.js +1 -1
  166. package/dist/render/lib/wheels/plp-filters.d.ts +5 -0
  167. package/dist/render/lib/wheels/plp-filters.js +1 -1
  168. package/dist/render/lib/wheels/price-display.d.ts +5 -1
  169. package/dist/render/lib/wheels/price-display.js +1 -1
  170. package/dist/render/lib/wheels/wheel-sheet.d.ts +3 -0
  171. package/dist/render/lib/wheels/wheel-sheet.js +1 -0
  172. package/dist/render/lib/wheels/wheel-specs.js +1 -1
  173. package/dist/words.d.ts +13 -3
  174. package/dist/words.js +4 -4
  175. package/package.json +5 -4
  176. package/dist/chunks/EditorPreviewCheckout-O7F36ZXB.js +0 -4
  177. package/dist/chunks/chunk-AOZEO73W.js +0 -401
  178. package/dist/chunks/chunk-MXWQOFM6.js +0 -1
  179. package/dist/chunks/chunk-NYEB6V2R.js +0 -1
  180. package/dist/chunks/chunk-SQ62RGWV.js +0 -1
  181. /package/dist/chunks/{chunk-AOZEO73W.js.LEGAL.txt → chunk-KRMWJLBM.js.LEGAL.txt} +0 -0
  182. /package/dist/chunks/{chunk-UFEEFZ5M.js → chunk-QP2F42DV.js} +0 -0
@@ -1 +0,0 @@
1
- import{f as xt,i as be,q as St,s as vt,t as Et,v as q}from"./chunk-NYEB6V2R.js";import{$d as ye,Jd as ht,Ld as Ge,Md as Ke,ae as bt,de as ze,ee as Ct}from"./chunk-SQ62RGWV.js";import{c as yt,n as le}from"./chunk-UFEEFZ5M.js";import{createContext as vn,useContext as Lt,useEffect as En,useMemo as Ce,useState as Rt}from"react";function wt(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function ue(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 Xe=4,Br=1,qr={unit:"set",spares:0,spareSide:"left"};function _t(e){return e.unit==="single"?1:Xe+e.spares}function Wr(e,t){return[{partNumber:e.partNumber,wheels:_t(t),prices:e.prices}]}function Gr(e,t){let n=_t(t)-Xe;if(n<=0||e.length===0)return e;let r=Cn(e),o=r?r[t.spareSide]:0;return e.map((i,s)=>s===o?{...i,wheels:i.wheels+n}:i)}function Cn(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 xn(e,t){return t.spares>0?`${e} + spare`:e}function Kr(e){return e.unit==="single"?"Single":xn(`Set of ${Xe}`,e)}var zr="data-add-to-basket",Ve=9,Sn="en",Pt=new Map;function Ae(e,t,n){let r=`${e}|${t??""}|${n??""}`,o=Pt.get(r);return o||(o=new Intl.NumberFormat(Sn,{style:"currency",currency:e,...t===void 0?{}:{minimumFractionDigits:t},...n===void 0?{}:{maximumFractionDigits:n}}),Pt.set(r,o)),o}function ce(e,t,n=0){return Ae(t,0,n).format(e)}function Xr(e,t){return Ae(t).format(e)}function Vr(e,t){let n=e.savings[t];if(n===void 0)return null;let r=ce(n,t);return e.savingIsFrom?`Save from ${r}`:`Save ${r}`}import{jsx as Rn}from"react/jsx-runtime";var Pn="storefront-country",Nt=Pn,Ye=vn(null);function wn(e){return kt(e,"catalogue")}function _n(e){return kt(e,"money")}function kt(e,t){let n=new Map(e.map(r=>[r.code,r.decimalPlaces]));return(r,o)=>{if(!o)return"";let i=n.get(o)??0;return Ae(o,t==="money"?i:0,i).format(r)}}function Jr({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let i=Ce(()=>t??[],[t]),s=Ce(()=>n??[],[n]),l=Ce(()=>r||i.find(m=>m.isDefault)?.code||i[0]?.code||"",[r,i]),u=Ce(()=>o||s.find(m=>m.isDefault)?.code||s[0]?.code||"",[o,s]),[c,f]=Rt(u),[x,d]=Rt(!1);En(()=>{let m=le.getItem(Nt);m&&s.some(O=>O.code===m)&&f(m),d(!0)},[s]);function N(m){f(m),le.setItem(Nt,m)}let w=Ce(()=>{let m=s.find(_=>_.code===c)??null,O=m?.currency,E=O&&i.some(_=>_.code===O)?O:l,F=wn(i),L=_n(i);return{country:c,currency:E,setCountry:N,currencies:i,countries:s,activeCountry:m,formatPrice:(_,S)=>F(_,S??E),formatMoney:(_,S)=>L(_,S??E),ready:x}},[c,i,s,l,x]);return Rn(Ye.Provider,{value:w,children:e})}function It(){let e=Lt(Ye);if(!e)throw new Error("useCurrency must be used within a CurrencyProvider");return e}function eo(){return Lt(Ye)?.country??""}import{createContext as qn,useCallback as P,useContext as Wn,useEffect as Q,useMemo as Kt,useRef as de,useState as k}from"react";function At(){return"/edit"}function Ot(e,t){return e.valid?!1:e.reason==="firstOrderOnly"?!0:e.reason==="notEligible"&&!t}var Mt="We'll confirm this discount when you place your order.",io="Confirmed at checkout";function ao(e){return e&&(e.valid||e.deferred)?e.code:void 0}var Tt="coupon_code: ";function so(e){return!(e instanceof be)||e.status!==400||!e.message.startsWith(Tt)?null:e.message.slice(Tt.length)}function Dt(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 Te="Price on request",Ln="Request a quote",kn="from ",fo="From ",po="each",Ft="Free";function Qe(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function je(e,t){let n=e?.[t];return Qe(n)?n:null}function mo(e,t,n,r){let o=je(e,n),i=je(t,n);return o===null&&i===null?0:o===null?1:i===null?-1:r==="asc"?o-i:i-o}function go(e,t,n,r){if(n==null&&r==null)return!0;let o=je(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var In={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function An(e,t,n){if(!Qe(e))return In;let r=Qe(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function ho(e,t,n=""){return!e.priced||e.unit==null?Te:`${n}${ce(e.unit,t)}`}function yo(e,t){return e.was==null?null:ce(e.was,t)}function Tn(e,t,n=1){let r=ue(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((s,l)=>s+l.wheels,0),i=Math.min(...e.map(s=>s.prices[t]));return{priced:!0,unit:i,isFrom:i*o!==r,setTotal:r*n}}var On={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function bo(e,t,n,r=1){let o=An(e.prices[n],e.msrpPrices?.[n],4),i=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:i};let s=Tn(t.components,n,r);return s.priced?{priced:!0,unit:s.unit,isFrom:s.isFrom,was:null,onSale:!1,setTotal:s.setTotal,fromSetTotal:i}:{...On,fromSetTotal:i}}function Mn(e,t){return!e.priced||e.unit==null?Te:`${e.isFrom?kn:""}${ce(e.unit,t)}`}function Co(e,t){return e.was==null?null:ce(e.was,t)}function xo(e,t){return!e.priced||e.unit==null?Ln:Mn(e,t)}var Dn=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function Ut(e){return Dn.test(e.trim())}var $t="sf:ga-purchases",Fn=20;function Bt(){return typeof window>"u"||window.parent!==window}function xe(...e){try{if(Bt()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function Un(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:ue(e.components,t)??0,quantity:e.qty}}function Ze(e,t){return e.filter(Oe).map(n=>Un(n,t))}function _o(e){xe("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 qt(e,t){let n=Ze([e],t);n.length!==0&&xe("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function Ro(e){let t=Ze(e.lines,e.currency);t.length!==0&&xe("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var Ht=new Set;function $n(e){if(Ht.has(e))return!1;Ht.add(e);try{let t=JSON.parse(le.getItem($t)??"[]");if(t.includes(e))return!1;le.setItem($t,JSON.stringify([...t,e].slice(-Fn)))}catch{}return!0}function No(e){let t=e.confirmation;if(Bt()||!$n(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);xe("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:Ze(e.lines,n)}),e.adsSendTo&&xe("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}var Hn="Arranged after review",Wt="Calculated at checkout",Bn=Wt,Io=Wt;function Gt({quoted:e,optionCount:t,chosenAmount:n,couponWaivesFreight:r}){return e&&t===0?"arranged":r?"free":n===void 0?"pending":n===0?"free":"charged"}function Ao(e){switch(e){case"arranged":return Hn;case"pending":return Bn;case"free":return Ft;case"charged":return null}}import{jsx as Xn}from"react/jsx-runtime";var Gn=400,Kn=400,zn=1500;function Oe(e){return(e.components?.length??0)>0}function zt(e,t){return{code:e,valid:t.valid,deferred:Ot(t,t.askedAsShopper),message:t.message||void 0,effects:t.effects??void 0}}function Vt(e,t){return ue(e.components,t)}function Je(e,t){let n=Vt(e,t);return n===null?null:n*e.qty}function Xt(e){return e!=="tyre"}var Yt=qn(null);function Ko({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=It(),[i,s]=k(t),[l,u]=k([]),[c,f]=k([]),[x,d]=k([]),[N,w]=k(!1),[m,O]=k(!1),[E,F]=k(!1),[L,_]=k(!1),[S,z]=k(null),[A,X]=k(0),y=P(()=>X(a=>a+1),[]),[C,b]=k(void 0),[W,we]=k(null),[v,G]=k(null),[ne,U]=k(!1),[M,_e]=k(null),V=de(void 0),K=P(()=>s(!0),[]),J=P(()=>s(!1),[]),re=P(()=>s(a=>!a),[]);Q(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&K()},[K,t]);let oe=At(),$=de(oe);Q(()=>{$.current!==oe&&($.current=oe,t||J())},[oe,t,J]);let Re=P(a=>{we(p=>p?.country===a?.country&&p?.subdivision===a?.subdivision&&p?.postcode===a?.postcode?p:a)},[]),D=P(a=>{_(!0),Xt(a)&&F(!0)},[]),Ne=E||l.some(a=>Xt(a.kind)),ie=L||l.length>0;Q(()=>{if(t||!Ne||N)return;let a=!0;return q.listWheels().then(p=>{a&&(f(p),w(!0))}),()=>{a=!1}},[t,Ne,N]),Q(()=>{if(t||!ie||m)return;let a=!0;return q.listBundles().then(p=>{a&&(d(p),O(!0))}),()=>{a=!1}},[t,ie,m]);let H=S?.deliveryOptions??[],fe=S?.courier??null;Q(()=>{S&&_e(a=>a&&H.some(p=>p.id===a)?a:H[0]?.id??null)},[S]);let ee=P(()=>l.filter(Oe).flatMap(a=>wt(a.components,a.qty)),[l]),pe=P(async(a,p)=>{let h=a.trim().toUpperCase();if(!h)return;let g=ee();if(g.length===0){G({code:h,valid:!1,message:"Add a wheel to the cart first."});return}U(!0),V.current=p;try{let I=await q.validateCoupon({code:h,items:g,currency:n,shippingMethodId:M??void 0,customerEmail:p});G(zt(h,I))}catch{G({code:h,valid:!1,unchecked:!0,message:"Could not check that code. Please try again."})}finally{U(!1)}},[ee,n,M]),ae=P(()=>{G(null),V.current=void 0},[]),Le=P(a=>{if(!v)return;let{code:p}=v;G(h=>h&&h.code===p?{code:p,valid:!1,refused:!0,message:a}:h)},[v]);Q(()=>{if(!v||v.refused)return;let a=v.code,p=g=>g!==null&&g.code===a&&!g.refused,h=setTimeout(async()=>{let g=ee();if(g.length===0){G(I=>p(I)?{code:a,valid:!1,message:"Add a wheel to the cart first."}:I);return}U(!0);try{let I=await q.validateCoupon({code:a,items:g,currency:n,shippingMethodId:M??void 0,customerEmail:V.current});G(he=>p(he)?zt(a,I):he)}catch{}finally{U(!1)}},Gn);return()=>clearTimeout(h)},[l,n,M]);let me=v&&!v.refused?v.code:void 0;Q(()=>{if(t)return;let a=!0,p=setTimeout(async()=>{let h=ee();if(h.length===0){z(null),b(void 0);return}try{let g=await q.quoteCart({items:h,currency:n,shippingMethodId:M??void 0,couponCode:me,customerEmail:V.current||void 0,country:W?.country||r||void 0,subdivision:W?.country&&W.subdivision||void 0,postcode:W?.country&&W.postcode||void 0});if(!a)return;z(g)}catch{if(!a)return}b(me)},Kn);return()=>{a=!1,clearTimeout(p)}},[l,n,M,me,r,W,A]);let R=P(a=>{u(p=>{let h=p.findIndex(g=>g.id===a.id);return h===-1?[...p,a]:p.map((g,I)=>I===h?{...g,qty:Math.min(Ve,g.qty+a.qty)}:g)}),qt(a,n)},[n]),Y=P(a=>{u(p=>p.filter(h=>h.id!==a))},[]),ke=P((a,p)=>{let h=Math.max(1,Math.min(Ve,p));u(g=>g.map(I=>I.id===a?{...I,qty:h}:I))},[]),at=P(a=>{u(a)},[]),[ge,fn]=k(null),st=de(null);st.current=ge;let B=de(null),Be=de(""),lt=P((a,p)=>{let h=a.trim().toLowerCase();Ut(h)&&fn(g=>g&&g.email===h&&g.firstName===(p??"")?g:{email:h,firstName:p??""})},[]);Q(()=>{if(t||!ge)return;let a=Dt(l.filter(Oe),g=>Je(g,n)===null?Te:o(Je(g,n),n)),p={email:ge.email,firstName:ge.firstName,currency:n,items:a},h=JSON.stringify(p);if(h!==Be.current)return B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{B.current=null,Be.current=h,q.captureCart(p).catch(g=>{})},zn),()=>{B.current&&(clearTimeout(B.current),B.current=null)}},[l,ge,n,t]);let ut=P(()=>{B.current&&(clearTimeout(B.current),B.current=null);let a=st.current;a&&(Be.current="",q.captureCart({email:a.email,firstName:a.firstName,currency:n,items:[]}).catch(p=>{}))},[n]),ct=Kt(()=>{let a=l.reduce((T,se)=>{let Ie=Je(se,n);return Ie===null?T:T+Ie},0),p=l.some(T=>Vt(T,n)===null),h=l.reduce((T,se)=>T+se.qty,0),g=v?.valid?v.effects:void 0,I=g?Math.min(a,Number(g.discountAmount)):0,he=S?.bundleDiscount??0,mn=S?.appliedBundles??[],qe=!!g?.freeShipping,mt=H.find(T=>T.id===M),gt=qe?0:S?.shipping??mt?.amount??0,gn=Gt({quoted:S!==null,optionCount:H.length,chosenAmount:mt?.amount,couponWaivesFreight:qe}),We={};for(let T of g?.freeUnits??[])We[T.partNumber]=(We[T.partNumber]??0)+T.quantity;let hn=S?.tax??null,yn=S?S.grandTotal:a-I-he+gt;return{sets:h,units:l.reduce((T,se)=>T+(se.components??[]).reduce((Ie,bn)=>Ie+bn.wheels*se.qty,0),0),subtotal:a,hasUnpricedLine:p,discount:I,bundleDiscount:he,appliedBundles:mn,shipping:gt,freeShipping:qe,shippingStatus:gn,freeUnitsByPartNumber:We,tax:hn,grand:yn,repricing:!!v?.refused&&S!==null&&C===v?.code,currency:n}},[l,n,v,H,M,S,C]),dt=de(!0),ft=P(a=>{dt.current=a},[]),pt=P(a=>{R(a),dt.current&&K()},[R,K]),pn=Kt(()=>({isOpen:i,preview:t,open:K,close:J,toggle:re,items:l,catalog:c,bundles:x,warmCatalog:D,add:R,addAndOpen:pt,setAutoOpen:ft,remove:Y,setQty:ke,replaceItems:at,identify:lt,clearCapturedCart:ut,coupon:v,applyCoupon:pe,removeCoupon:ae,refuseCoupon:Le,couponBusy:ne,deliveryOptions:H,setQuoteDestination:Re,courier:fe,requote:y,shippingMethodId:M,setShippingMethodId:_e,totals:ct}),[i,t,K,J,re,l,c,x,D,R,pt,ft,Y,ke,at,lt,ut,v,pe,ae,Le,ne,H,Re,fe,y,M,ct]);return Xn(Yt.Provider,{value:pn,children:e})}function Qt(){let e=Wn(Yt);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}import{cache as or}from"react";function jt(e,t,n,r){for(;e.size>=t;){let o,i;for(let[l,u]of e){if(u.expiresAt<=r){o=l;break}i===void 0&&n(l)&&(i=l)}let s=o??i??e.keys().next().value;if(s===void 0)return;e.delete(s)}}var Vn=6e4,Yn=5e3,Qn=500,Me=new Map;async function jn(e){let{host:t,matchesRequestHost:n}=await St();if(!t)return"";let r=await vt();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}var Zn=e=>e.includes("|slug:")||e.includes("|xhost:");async function Zt(e,t){if(await Et()!==null)return t();let n=await jn(e);if(!n)return t();let r=Date.now(),o=Me.get(n);if(o&&o.expiresAt>r)return o.load;let i=await t(),s=i.outcome.state==="failed",l=s?Yn:Vn,u=Me.get(n)?.lastGood,c=i.outcome.state==="ok"?i:s?u:void 0,f=s&&c?c:i;return jt(Me,Qn,Zn,r),Me.set(n,{load:f,expiresAt:r+l,lastGood:c}),f}var Jn=404;function er(e){if(e instanceof be&&e.status===Jn)return{state:"absent"};let t=e instanceof be?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var tr="[storefront:chrome-load-failed]";function nr(e,t){console.error(`${tr} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function Jt(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 i=er(o);return i.state==="failed"&&nr(e,i),{value:n,outcome:i}}}function rr(e){return e==="production"?"silent":"banner"}var Jo=rr("production");function ir(e,t){return e?.trim()||t}function si({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=ir(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var ar={name:ye,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,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,socialLinks:ze},li=or(async()=>Zt("site",()=>Jt("site",async()=>{let e=await q.getSite();return{name:bt(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,consentEnabled:e.consentEnabled??!1,consentPrivacyPage:e.consentPrivacyPage??null,consentNoticeOptOut:e.consentNoticeOptOut??!1,socialLinks:Ct(e.socialLinks)}},ar)));var ui={name:ye,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,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,socialLinks:ze};import{jsx as ve,jsxs as et}from"react/jsx-runtime";import{useEffect as De,useId as cr,useRef as tn,useState as Fe}from"react";import{useRootIsDark as dr}from"efficient-shell/theme";import{efficientClientOpen as sr}from"efficient-easel/screen/lib/session";var Se=new Map,lr=64;async function ur(e){if(!sr())return null;try{let t=await fetch(`${yt()}/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 en(e){let t=Se.get(e);if(t)return t;let n=ur(e);if(Se.set(e,n),Se.size>lr){let r=Se.keys().next();r.done||Se.delete(r.value)}return n}var fr=202/22,pr=.88,_i=16,mr="invert(1)";function Ri({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,color:o=null,onLightSurface:i,reversedSrc:s,inkIsDark:l,size:u="medium",sizePx:c,wordmark:f,siteName:x=ye,fitToContainer:d=!1,fitWordmarkToContainer:N=!1,fitFloorPx:w,hideClass:m,hideAttrs:O}){let E=f&&f.trim()?f.trim():x,[F,L]=Fe(null),_=tn(null),S=R=>{_.current=R};De(()=>{L(_.current?.ownerDocument??null)},[]);let z=!dr({doc:F,whenUnset:!0}),A=n&&n.trim()?n.trim():null,X=!!A&&xt(A),y=i??(z&&t),C=o&&o.trim()?o.trim():null,b=r&&!C,W=`logo-color-${cr().replace(/[^A-Za-z0-9_-]/g,"")}`,we=b&&X&&A&&s!=null?{reversed:s,inkIsDark:l??null}:null,v=we!==null,[G,ne]=Fe(null);De(()=>{if(!b||!A||!X||v){ne(null);return}let R=!1;return ne(null),en(A).then(Y=>{R||ne(Y)}),()=>{R=!0}},[b,A,X,v]);let U=we??G,M=!!U&&U.inkIsDark!==null&&(y?!U.inkIsDark:U.inkIsDark),_e=b&&!!A&&!X&&!y,V=M&&U?U.reversed:A,K=V?[V]:[],[J,re]=Fe(0);De(()=>{re(0)},[A,M]);let oe=e==="footer"?Ke:Ge[u],$=c&&c>0?c:oe,Re=Math.round($*fr),D=J<K.length?K[J]:null,[Ne,ie]=Fe(V),H=D!==null&&D===Ne,fe=tn(null);De(()=>{let R=fe.current;if(!R||!R.complete)return;if(R.naturalWidth>0||R.naturalHeight>0){ie(D);return}let Y=!1;return R.decode().then(()=>!Y&&ie(D),()=>!Y&&re(ke=>ke+1)),()=>{Y=!0}},[D]);let ee=d||N,pe=`calc(100cqi / ${((E.length+1)*pr).toFixed(2)})`,ae=ee&&w&&w>0?Math.min(w,$):null,Le=ee?ae===null?`min(${$}px, ${pe})`:`clamp(${ae}px, ${pe}, ${$}px)`:`${$}px`,me=et("span",{className:`font-display font-bold tracking-[0.18em] ${ae===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:Le,lineHeight:1,...C?{color:C}:{}},"aria-label":E,children:[E,ve("span",{className:"text-accent",style:C?{color:C}:void 0,children:"."})]});return et("span",{ref:S,className:ht("inline-flex items-center",m??""),...O,children:[!H&&me,C&&D&&ve("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:et("filter",{id:W,colorInterpolationFilters:"sRGB",children:[ve("feFlood",{style:{floodColor:C}}),ve("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),D&&ve("img",{ref:fe,src:D,alt:E,width:Re,height:$,className:"shrink-0 object-contain",style:{...H?{height:`${$}px`,width:"auto",...d?{maxWidth:"100cqi"}:{}}:{display:"none"},..._e?{filter:mr}:{},...C?{filter:`url(#${W})`}:{}},onLoad:()=>ie(D),onError:()=>re(R=>R+1)},D)]})}import{jsx as gr}from"react/jsx-runtime";function Li({tone:e="bad",role:t,children:n}){return gr("div",{role:t,className:["border bg-surface px-4 py-3 text-[14px] leading-relaxed text-fg",e==="good"?"border-accent":e==="bad"?"border-alert":"border-line"].join(" "),children:n})}import{jsx as Ee,jsxs as yr}from"react/jsx-runtime";function hr({spokes:e,mesh:t=!1,className:n}){let s=u=>Math.round(u*1e3)/1e3,l=[];for(let u=0;u<e;u++){let c=u/e*Math.PI*2-Math.PI/2;if(l.push({x1:s(100+Math.cos(c)*22),y1:s(100+Math.sin(c)*22),x2:s(100+Math.cos(c)*86),y2:s(100+Math.sin(c)*86),main:!0}),t){let f=c+Math.PI/e;l.push({x1:s(100+Math.cos(f)*22*1.4),y1:s(100+Math.sin(f)*22*1.4),x2:s(100+Math.cos(f)*78),y2:s(100+Math.sin(f)*78),main:!1})}}return yr("svg",{viewBox:"0 0 200 200",fill:"none",stroke:"currentColor",className:n??"block h-[70%] w-[70%] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",children:[Ee("circle",{cx:100,cy:100,r:92,strokeWidth:2}),Ee("circle",{cx:100,cy:100,r:84,strokeWidth:1,opacity:.4}),Ee("circle",{cx:100,cy:100,r:22,strokeWidth:2}),Ee("circle",{cx:100,cy:100,r:6,fill:"currentColor"}),l.map((u,c)=>Ee("line",{x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,stroke:"currentColor",strokeWidth:u.main?6:3,strokeLinecap:"round",opacity:u.main?1:.5},c))]})}var Oi="#c9a461",nn=[{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"}],Mi={name:"",color:"var(--fg)",family:"silver",src:""};function br(e,t){let n=r=>{let o=nn.findIndex(i=>i.f===r);return o===-1?nn.length:o};return n(e)-n(t)||e.localeCompare(t)}function Di(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(br)}import{useState as Cr}from"react";import{jsx as te,jsxs as tt}from"react/jsx-runtime";function xr({customerEmail:e}){let{coupon:t,applyCoupon:n,removeCoupon:r,couponBusy:o}=Qt(),[i,s]=Cr("");async function l(){o||!i.trim()||(await n(i,e),s(""))}return tt("div",{className:"flex flex-col gap-2",children:[t===null?tt("div",{className:"flex border border-line",children:[te("input",{type:"text",value:i,onChange:u=>s(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.preventDefault(),l())},placeholder:"Coupon code","aria-label":"Coupon code",className:"flex-1 bg-transparent px-4 py-4 font-mono text-[11px] uppercase tracking-[0.18em] text-fg outline-none placeholder:text-fg-dim"}),te("button",{type:"button",onClick:()=>{l()},disabled:o,className:"border-l border-line px-4 font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-wait disabled:opacity-60",children:o?"\u2026":"Apply"})]}):tt("div",{className:["flex items-center justify-between gap-3 border px-4 py-3",t.valid?"border-accent":"border-line"].join(" "),style:t.valid?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[te("span",{className:["font-mono text-[11px] uppercase tracking-[0.22em]",t.valid?"text-accent":t.deferred||t.unchecked?"text-fg":"text-fg-dim line-through"].join(" "),children:t.code}),t.unchecked&&te("button",{type:"button",onClick:()=>{n(t.code,e)},disabled:o,className:"ml-auto font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:text-fg disabled:cursor-wait disabled:opacity-60",children:o?"\u2026":"Try again"}),te("button",{type:"button",onClick:r,"aria-label":`Remove coupon ${t.code}`,className:"font-mono text-[12px] text-fg-dim transition-colors hover:text-fg",children:"\u2715"})]}),t?.deferred?te("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-fg-dim",children:Mt}):t&&!t.valid&&t.message&&te("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-alert",children:t.message})]})}var nt="Ads on. Shopper can opt out.",Ue="Ads and analytics off until Accept",Sr={us:{region:"us",name:"United States",model:"opt-out",law:"California CCPA / CPRA, other state laws",beforeChoice:nt,footerLink:"Do Not Sell or Share My Personal Information",panelEyebrow:"Do not sell or share",adsRowName:"Sale or sharing for ads"},ca:{region:"ca",name:"Canada",model:"opt-in",law:"PIPEDA, Quebec Law 25",beforeChoice:Ue,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},au:{region:"au",name:"Australia",model:"opt-out",law:"Privacy Act 1988 (APPs)",beforeChoice:nt,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},nz:{region:"nz",name:"New Zealand",model:"opt-out",law:"Privacy Act 2020",beforeChoice:nt,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},uk:{region:"uk",name:"United Kingdom",model:"opt-in",law:"PECR, UK GDPR",beforeChoice:Ue,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},eu:{region:"eu",name:"European Union",model:"opt-in",law:"ePrivacy Directive, GDPR",beforeChoice:Ue,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},other:{region:"other",name:"All other countries",model:"opt-in",law:"Safe default",beforeChoice:Ue,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"}};function vr(e){let t=[...e.googleAds?["Google"]:[],...e.meta?["Facebook","Instagram"]:[]];return t.length<=1?t.join(""):`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}function Wi(e,t,n){let r=vr(n),o=r?`We use cookies to count visits and to show you ${t} ads on ${r}.`:"We use cookies to count visits.";return e.model==="opt-in"?{heading:r?"Cookies and ads":"Cookies",before:`${o} Nothing loads until you choose. You can change this at any time with `,link:e.footerLink,after:" at the bottom of every page."}:{heading:r?"Cookies and ads":"Cookies",before:`${o} You can say no at any time: choose Privacy choices, or use `,link:e.footerLink,after:" at the bottom of every page."}}var Gi={accept:"Accept all",reject:"Reject all",choose:"Choose",save:"Save",ok:"OK",privacyChoices:"Privacy choices",privacyPolicy:"Privacy Policy",alwaysOn:"Always on"};var Er={asked:!1,region:"other",model:"opt-in",analytics:!0,ads:!0,chosen:!0,gpc:!1};var Pr=Er;function Vi(e=Pr){if(e.asked)return e.ads?"granted":"denied"}function Qi(){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)}`}import{Children as _r,isValidElement as Rr,useEffect as on,useId as Nr,useLayoutEffect as ln,useRef as j,useState as an}from"react";var $e=(e,t)=>!!e[t]&&!e[t].disabled;function rt(e,t,n){let r=e.length;for(let o=1;o<=r;o++){let i=((t+n*o)%r+r)%r;if($e(e,i))return i}return t}function ot(e,t){return rt(e,t===1?-1:e.length,t)}function it(e,t){return $e(e,t)?t:Math.max(ot(e,1),0)}function rn(e,t,n){let{open:r,focus:o}=e,i=s=>({...e,...s});if(t.length===1&&/\S/.test(t)){let s=e.typed+t.toLowerCase(),l=n.findIndex((u,c)=>$e(n,c)&&u.label.toLowerCase().startsWith(s));return{state:i({open:!0,typed:s,focus:l>=0?l:o}),handled:!0}}if(!r)return t==="ArrowDown"||t==="ArrowUp"||t==="Enter"||t===" "?{state:i({open:!0,typed:""}),handled:!0}:{state:e,handled:!1};switch(t){case"ArrowDown":return{state:i({focus:rt(n,o,1)}),handled:!0};case"ArrowUp":return{state:i({focus:rt(n,o,-1)}),handled:!0};case"Home":return{state:i({focus:ot(n,1)}),handled:!0};case"End":return{state:i({focus:ot(n,-1)}),handled:!0};case"Enter":case" ":return $e(n,o)?{state:i({open:!1,typed:""}),commit:o,refocus:!0,handled:!0}:{state:e,handled:!0};case"Escape":return{state:i({open:!1,typed:""}),refocus:!0,handled:!0};case"Tab":return{state:i({open:!1,typed:""}),handled:!1};default:return{state:e,handled:!1}}}import{placeMenu as Lr}from"efficient-shell/ui";import{Fragment as Dr,jsx as Z,jsxs as un}from"react/jsx-runtime";var sn={body:"text-[length:var(--size-body,14px)]",label:"text-[length:var(--size-label,13px)]"};function kr({items:e,value:t,onPick:n,open:r,onOpen:o,onClose:i}){let[s,l]=an(!1),u=r!==void 0,c=u?r:s,[f,x]=an(0),d=j({text:"",timer:0}),N=j(null),w=j(null),m=j(null),O=Nr(),E=j(null),F=e.findIndex(y=>y.value===t),L=y=>{y!==c&&(u||l(y),y?o?.():i?.())},_=y=>{let C=e[y];!C||C.disabled||(n(C.value),L(!1),w.current?.focus())},S=y=>{let C={open:c,focus:c?f:it(e,F),typed:d.current.text},b=rn(C,y,e);return!b.handled&&b.state.open===c?!1:(b.state.typed!==C.typed&&(d.current.text=b.state.typed,window.clearTimeout(d.current.timer),d.current.timer=window.setTimeout(()=>{d.current.text=""},500)),x(b.state.focus),b.commit!==void 0?_(b.commit):L(b.state.open),b.refocus&&w.current?.focus(),b.handled)},z=j(S);z.current=S;let A=j(()=>L(!1));A.current=()=>L(!1);let X=y=>{c||(E.current=y.nativeEvent,z.current(y.key)&&y.preventDefault())};return on(()=>{if(!c)return;let y=b=>{N.current?.contains(b.target)||A.current()},C=b=>{b!==E.current&&z.current(b.key)&&b.preventDefault()};return document.addEventListener("mousedown",y),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",C)}},[c]),on(()=>{c&&(d.current.text||x(it(e,F)))},[c]),ln(()=>{if(!c||!m.current)return;m.current.children.item(f)?.scrollIntoView({block:"nearest"})},[f,c]),{open:c,toggle:()=>L(!c),close:()=>L(!1),focusIdx:f,setFocusIdx:x,pick:y=>_(e.findIndex(C=>C.value===y)),wrapRef:N,triggerRef:w,listRef:m,listId:O,onTriggerKeyDown:X,activeId:c?`${O}-${f}`:void 0}}var Ir={select:{list:"absolute left-0 top-full z-50 mt-1 max-h-[280px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:(e,t,n)=>["px-3 py-3 font-mono text-[13px] font-semibold uppercase tracking-[0.1em] transition-colors whitespace-nowrap",n?"cursor-not-allowed opacity-40":"cursor-pointer",e&&!n?"bg-accent text-bg":"bg-bg text-fg"].join(" ")},cell:{list:"absolute left-0 top-full z-50 mt-1 max-h-[320px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:e=>[`cursor-pointer whitespace-nowrap px-6 py-3 font-mono ${sn.label} font-semibold uppercase tracking-[0.1em] transition-colors`,e?"bg-accent text-bg":"bg-bg text-fg"].join(" "),pickerMarker:!0},hairline:{list:"absolute left-0 top-full z-50 max-h-[320px] w-full overflow-y-auto border border-line bg-bg shadow-[0_6px_20px_rgba(0,0,0,0.10)]",item:(e,t)=>[`flex cursor-pointer items-center justify-between gap-4 border-b border-line px-4 py-3 text-left ${sn.body} transition-colors last:border-b-0`,t?"border-fg font-medium text-fg":e?"border-fg text-fg":"text-fg-dim"].join(" "),pickerMarker:!0},region:{list:"absolute right-0 top-full z-[200] mt-2 flex min-w-[240px] flex-col border border-line bg-surface text-fg",item:(e,t,n,r)=>["flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors","font-mono text-[13px] uppercase tracking-[0.18em]",e?"bg-surface-2 text-fg":"",r?"":"border-b border-line",t?"text-accent":""].join(" "),itemStyle:e=>e?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"}}};function Ar(e,t){ln(()=>{let n=e.current,r=n?.ownerDocument.defaultView;if(!n||!r)return;let o=()=>{let i=n.style;i.top=i.bottom=i.marginTop=i.marginBottom=i.maxHeight=i.overflowY=i.translate="";let s=n.offsetParent??n.parentElement;if(!s)return;let l=s.getBoundingClientRect(),u=n.getBoundingClientRect(),c=Math.abs(u.right-l.right)<Math.abs(u.left-l.left)?"end":"start",f=Lr({trigger:{left:l.left,right:l.right,top:l.top,bottom:l.bottom},menu:{width:u.width,height:u.height},bounds:{left:0,top:0,right:r.innerWidth,bottom:r.innerHeight},align:c,side:"bottom"});if(f.side==="top"){i.top="auto",i.bottom="100%",i.marginTop="0px";let d=f.top+Math.min(u.height,f.maxHeight);i.marginBottom=`${Math.max(0,l.top-d)}px`}f.maxHeight<u.height&&(i.maxHeight=`${f.maxHeight}px`,i.overflowY="auto");let x=f.left-u.left;x&&(i.translate=`${x}px`)};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o,!0),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o,!0)}},[e,t])}function Tr(e){return e.split(" ").map(t=>t==="left-0"?"right-0":t).join(" ")}function Or({id:e,tone:t,items:n,value:r,focusIdx:o,onFocus:i,onPick:s,listRef:l,ariaLabel:u,align:c="start"}){let f=Ir[t],x=j(null);return Ar(x,n.length),Z("ul",{ref:d=>{x.current=d,l&&(l.current=d)},id:e,role:"listbox","aria-label":u,...f.pickerMarker?{"data-picker-menu":""}:{},className:c==="end"?Tr(f.list):f.list,children:n.map((d,N)=>{let w=d.value===r;return Z("li",{id:`${e}-${N}`,role:"option","aria-selected":w,"aria-disabled":d.disabled||void 0,onMouseEnter:()=>!d.disabled&&i(N),onMouseDown:m=>{m.preventDefault(),d.disabled||s(d.value)},className:f.item(N===o,w&&d.value!=="",!!d.disabled,N===n.length-1),style:f.itemStyle?.(w),children:d.meta===void 0?d.label:un(Dr,{children:[d.lead,Z("span",{className:"flex-1 whitespace-nowrap",children:d.label}),Z("span",{className:"ml-auto text-[12px] opacity-50",children:d.meta})]})},`${d.value}_${N}`)})})}function Mr({value:e,onChange:t,disabled:n,children:r,className:o,style:i,name:s,id:l,"aria-label":u,align:c}){let f=_r.toArray(r).flatMap(m=>{if(!Rr(m))return[];if(m.type!=="option")return[];let E=m.props,F=E.value!==void 0?String(E.value):"",L=E.children,_=typeof L=="string"||typeof L=="number"?String(L):F;return[{value:F,label:_,disabled:!!E.disabled}]}),x=e??"",d=kr({items:f,value:x,onPick:m=>t?.({target:{value:m}})}),w=f.find(m=>m.value===x)?.label??f[0]?.label??"";return un("div",{ref:d.wrapRef,className:"relative",children:[s&&Z("input",{type:"hidden",name:s,value:x}),Z("button",{ref:m=>{d.triggerRef.current=m},type:"button",disabled:n,"aria-haspopup":"listbox","aria-expanded":d.open,"aria-controls":d.open?d.listId:void 0,"aria-activedescendant":d.activeId,"aria-label":u,id:l,onClick:()=>!n&&d.toggle(),onKeyDown:m=>!n&&d.onTriggerKeyDown(m),className:`block w-full ${o??""}`,style:i,children:Z("span",{className:"block w-full truncate text-left",children:w})}),d.open&&Z(Or,{id:d.listId,tone:"select",items:f,value:x,focusIdx:d.focusIdx,onFocus:d.setFocusIdx,onPick:d.pick,listRef:d.listRef,align:c})]})}import{jsx as Pe,jsxs as He}from"react/jsx-runtime";var Fr="font-mono text-[length:var(--size-label,12px)]",Ur="font-semibold uppercase tracking-[0.22em] text-fg";function cn(e){return`${e??Fr} ${Ur}`}function dn(){return Pe("span",{className:"text-accent",children:" *"})}function $r({children:e,required:t,labelFace:n}){return He("span",{className:cn(n),children:[e,t?Pe(dn,{}):null]})}function Hr({label:e,required:t,hint:n,separate:r,htmlFor:o,labelFace:i,className:s,children:l}){let u=s?`flex flex-col gap-2 ${s}`:"flex flex-col gap-2",c=n?Pe("span",{className:"font-mono text-[11px] uppercase tracking-[0.22em] text-fg-dim",children:n}):null;return r||n?He("div",{className:u,children:[He("label",{htmlFor:o,className:cn(i),children:[e,t?Pe(dn,{}):null]}),l,c]}):He("label",{htmlFor:o,className:u,children:[Pe($r,{required:t,labelFace:i,children:e}),l]})}var la="w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent";export{At as a,io as b,ao as c,so as d,wt as e,Xe as f,Br as g,qr as h,Wr as i,Gr as j,Cn as k,xn as l,Kr as m,zr as n,Ve as o,Ae as p,ce as q,Xr as r,Vr as s,Te as t,Ln as u,kn as v,fo as w,po as x,Ft as y,je as z,mo as A,go as B,An as C,ho as D,yo as E,Tn as F,bo as G,Mn as H,Co as I,xo as J,Ut as K,_o as L,Ro as M,No as N,Io as O,Ao as P,Jr as Q,It as R,eo as S,Oe as T,Je as U,Ko as V,Qt as W,si as X,ar as Y,ui as Z,_i as _,Ri as $,hr as aa,Oi as ba,nn as ca,Mi as da,br as ea,Di as fa,xr as ga,Li as ha,Sr as ia,Wi as ja,Gi as ka,Er as la,Vi as ma,Qi as na,kr as oa,Or as pa,Mr as qa,$r as ra,Hr as sa,la as ta};
@@ -1 +0,0 @@
1
- import{b as U,c as j,f as Z,h as T,l as Q,n as O}from"./chunk-UFEEFZ5M.js";var B="".replace(/\/+$/,"");var N="x-forwarded-for";function X(e){let t=(e??"").split(",").map(n=>n.trim()).filter(Boolean);return t.length>0?t[t.length-1]:null}var Ue="x-forwarded-host";function Y(e,t,n){let s={};return e&&(s[Ue]=e),t&&n==="uncached"&&(s[N]=t),s}function ee(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 te="x-storefront-site",ne="x-storefront-host",re="x-storefront-preview";var Be="shop_access_token",se="shop_refresh_token",L=null;function M(){O.removeItem(Be),O.removeItem(se)}var w={getAccess(){return L},takeLegacyRefresh(){let e=O.getItem(se);return M(),e},setTokens(e){L=e,M()},clear(){L=null,M()}};import{efficientClientOpen as tt}from"efficient-easel/screen/lib/session";function Ne(e){return!!e.src}function A(e){let t=e.finishes.filter(Ne);if(t.length===e.finishes.length)return e;let n=e.defaultFinish&&t.some(s=>s.name===e.defaultFinish)?e.defaultFinish:null;return{...e,finishes:t,defaultFinish:n}}function Le(e){return e.listable!==!1}function R(e){return e.map(A).filter(Le)}var ce=["fill","stroke","stop-color","color","flood-color","lighting-color","solid-color"],le=new Set(["none","transparent","currentcolor","inherit","initial","unset","context-fill","context-stroke"]),v={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]},ue=12,me=/\burl\(/i,de=new RegExp(`(?<![-\\w])(${ce.join("|")})(\\s*=\\s*)(["'])([^"']*)\\3`,"gi"),pe=new RegExp(`((?:^|[;{\\s"'])(?:${ce.join("|")})\\s*:\\s*)([^;}"'<>]+)`,"gi"),Me=/<svg\b([^>]*)>/i,De=/\bfill\s*[=:]/i;function He(e){let t=e.replace(de,(n,s,a,l,p)=>{let r=ie(p);return r===null?n:`${s}${a}${l}${r}${l}`}).replace(pe,(n,s,a)=>{let l=ie(a);return l===null?n:`${s}${l}`});return t=t.replace(Me,(n,s)=>De.test(s)?n:`<svg fill="#ffffff"${s}>`),t}function ie(e){let t=/!important/i.test(e),n=e.replace(/!important/gi,"").trim().toLowerCase();if(!n||me.test(n)||le.has(n))return null;let s=n in v?[...v[n],1]:ge(n);if(!s)return null;let[a,l,p,r]=s;if(Math.max(a,l,p)-Math.min(a,l,p)>ue)return null;let i=We(255-a,255-l,255-p,r);return t?`${i} !important`:i}function We(e,t,n,s){if(s<1)return`rgba(${e}, ${t}, ${n}, ${s})`;let a=l=>l.toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(n)}`}function ge(e){return e.startsWith("#")?Je(e):e.startsWith("rgb")?Ge(e):e.startsWith("hsl")?Ve(e):null}function Je(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(s=>s+s).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 Ge(e){let t=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),[n,s]=t.split("/"),a=n.split(/[\s,]+/).filter(Boolean).slice(0,3);if(a.length<3)return null;let l=a.map(r=>r.endsWith("%")?Math.round(parseFloat(r)/100*255):Math.round(parseFloat(r)));if(l.some(r=>Number.isNaN(r)))return null;let p=s?E(s):Ke(n);return[l[0],l[1],l[2],p]}function Ke(e){let t=e.split(/[\s,]+/).filter(Boolean);return t.length>=4?E(t[3]):1}function E(e){let t=e.trim().endsWith("%")?parseFloat(e)/100:parseFloat(e);return Number.isNaN(t)?1:t}function Ve(e){let t=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),[n,s]=t.split("/"),a=n.split(/[\s,]+/).filter(Boolean);if(a.length<3)return null;let l=parseFloat(a[0]),p=parseFloat(a[1])/100,r=parseFloat(a[2])/100;if([l,p,r].some(P=>Number.isNaN(P)))return null;let i=s?E(s):a.length>=4?E(a[3]):1,[o,u,g]=ze(l,p,r);return[o,u,g,i]}function ze(e,t,n){let s=(1-Math.abs(2*n-1))*t,a=(e%360+360)%360/60,l=s*(1-Math.abs(a%2-1)),p=0,r=0,i=0;a<1?[p,r,i]=[s,l,0]:a<2?[p,r,i]=[l,s,0]:a<3?[p,r,i]=[0,s,l]:a<4?[p,r,i]=[0,l,s]:a<5?[p,r,i]=[l,0,s]:[p,r,i]=[s,0,l];let o=n-s/2;return[Math.round((p+o)*255),Math.round((r+o)*255),Math.round((i+o)*255)]}var oe=512*1024;function D(e){return/\.svg(\?|$)/i.test(e)}function je(e){return`data:image/svg+xml,${encodeURIComponent(He(e))}`}function Ze(e){let t=e.replace(/!important/gi,"").trim().toLowerCase();if(!t||me.test(t)||le.has(t))return null;let n=t in v?[...v[t],1]:ge(t);if(!n)return null;let[s,a,l]=n;return Math.max(s,a,l)-Math.min(s,a,l)>ue?null:(.2126*s+.7152*a+.0722*l)/255}function Qe(e){let t=[],n=s=>{let a=Ze(s);a!==null&&t.push(a)};for(let s of e.matchAll(de))n(s[4]);for(let s of e.matchAll(pe))n(s[2]);return t.length?t.reduce((s,a)=>s+a,0)/t.length<.5:null}var ae=/^(?:\uFEFF|\s+|<\?xml[^>]*\?>|<!--[\s\S]*?-->|<!DOCTYPE\s+svg[^>[]*>)/i;function Xe(e){let t=e;for(let n=ae.exec(t);n&&n[0].length>0;n=ae.exec(t))t=t.slice(n[0].length);return/^<svg[\s>/]/i.test(t)}async function Ye(e,t){if(!D(e))return null;try{let n=await fetch(e,{signal:t,redirect:"manual"});if(!n.ok)return null;let s=Number(n.headers.get("content-length"));if(Number.isFinite(s)&&s>oe)return null;let a=await n.text();return a.length>oe?null:Xe(a)?a:null}catch{return null}}async function he(e,t){let n=await Ye(e,t);return n===null?null:{reversed:je(n),inkIsDark:Qe(n)}}import{currentEaselSession as et,setSessionBridgedSite as Jt,setSessionDocumentSite as Gt}from"efficient-easel/screen/lib/session";function ye(){return et().siteId()}var nt="",S=class extends Error{constructor(t,n,s){super(n),this.status=t,this.data=s}},G="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.",rt=new Set([502,503,504]),H=0,st="This editor runs on its host's own backend, which does not serve this request.",it=5e3,ot=15e3,at=()=>typeof window>"u"?it:ot;function Ce(e){let t=(e.method??"GET").toUpperCase();if(!(e.body!=null||t!=="GET"&&t!=="HEAD")&&!(e.audience!=null&&e.audience!=="shop")&&typeof AbortSignal?.timeout=="function")return AbortSignal.timeout(at())}var fe=e=>e instanceof Error&&e.name==="TimeoutError",Se=(e,t)=>rt.has(e)?G:t,ct=["admin","venue"],Te="admin";function tn(e){Te=ct.includes(e)?e:"admin"}function lt(){return Te}var ut=/^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{1,8})*$/,Oe=null;function nn(e){Oe=e&&ut.test(e)?e:null}function mt(){return Oe}function dt(e){if(typeof window>"u"||!e.startsWith("/api/v1/"))return e;let t=U();return!t||/[?&]site=/.test(e)?e:$(e,`site=${encodeURIComponent(t)}`)}async function c(e,t={}){let{token:n,baseUrl:s,headers:a,audience:l,...p}=t;if(typeof window<"u"&&!tt())throw new S(H,st,null);if(typeof window>"u"&&s===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 r=typeof FormData<"u"&&p.body instanceof FormData,i;try{i=await fetch(`${s??nt}${dt(e)}`,{...p,headers:{...r?{}:{"Content-Type":"application/json"},...n?{Authorization:`Bearer ${n}`}:{},...l===null?{}:{"X-Portal-Audience":l??"shop"},...a},signal:p.signal??Ce({...p,audience:l})})}catch(g){throw g instanceof TypeError||fe(g)?new S(H,G,null):g}let o;try{o=await i.text()}catch(g){throw fe(g)?new S(H,G,null):g}let u=null;if(o)try{u=JSON.parse(o)}catch{throw new S(i.status,i.ok?"Expected JSON but received a non-JSON response":Se(i.status,i.statusText),o)}if(!i.ok){let g=(u&&typeof u=="object"&&"detail"in u&&typeof u.detail=="string"?u.detail:null)??Se(i.status,i.statusText);throw new S(i.status,g,u)}return u}var _=null;async function ve(){return _||(_=pt().finally(()=>{_=null}),_)}async function pt(){let e=w.takeLegacyRefresh(),t=await gt.refresh(e??void 0);return w.setTokens(t.access),t.access}async function Ee(){return w.getAccess()??ve()}async function y(e,t={}){let n;try{n=await Ee()}catch{throw w.clear(),new S(401,"Not signed in",null)}try{return await c(e,{...t,token:n})}catch(s){if(!(s instanceof S)||s.status!==401)throw s;try{let a=await ve();return await c(e,{...t,token:a})}catch{throw w.clear(),s}}}async function Pe(e,t={}){if(w.getAccess())try{return{data:await y(e,t),asShopper:!0}}catch(n){if(!(n instanceof S)||n.status!==401)throw n}return{data:await c(e,t),asShopper:!1}}async function we(){let e=await y("/api/auth/me/");if(e.portal!=="shop")throw w.clear(),new S(403,"This session is not valid for this shop.",null);return e}var gt={login:(e,t)=>c("/api/auth/login/",{method:"POST",body:JSON.stringify({email:e,password:t,portal:"shop"}),credentials:"include"}),refresh:e=>c("/api/auth/refresh/",{method:"POST",body:JSON.stringify(e?{refresh:e,portal:"shop"}:{portal:"shop"}),credentials:"include"}),logout:async()=>{w.clear();try{await c("/api/auth/logout/",{method:"POST",body:JSON.stringify({portal:"shop"}),credentials:"include"})}catch{}},restoreSession:async()=>{let e=await Ee();return await we(),e},me:we,updateMe:e=>y("/api/auth/me/",{method:"PATCH",body:JSON.stringify(e)}),changePassword:(e,t)=>y("/api/auth/me/",{method:"PATCH",body:JSON.stringify({password:t,old_password:e})}),changeEmail:(e,t)=>y("/api/shop-portal/change-email/",{method:"POST",body:JSON.stringify({new_email:e,current_password:t})}),myProfile:()=>y("/api/shop-portal/profile/"),updateMyProfile:e=>y("/api/shop-portal/profile/",{method:"PATCH",body:JSON.stringify(e)}),myAddresses:()=>y("/api/shop-portal/delivery-locations/"),createAddress:e=>y("/api/shop-portal/delivery-locations/",{method:"POST",body:JSON.stringify(e)}),updateAddress:(e,t)=>y(`/api/shop-portal/delivery-locations/${e}/`,{method:"PATCH",body:JSON.stringify(t)}),deleteAddress:e=>y(`/api/shop-portal/delivery-locations/${e}/`,{method:"DELETE"}),passwordResetRequest:e=>c("/api/auth/password-reset/",{method:"POST",body:JSON.stringify({email:e})}),passwordResetConfirm:(e,t,n)=>c("/api/auth/password-reset/confirm/",{method:"POST",body:JSON.stringify({uid:e,token:t,new_password:n})}),brands:()=>y("/api/products/brands/"),myOrders:()=>y("/api/shop-portal/orders/").then(e=>e.results),myOrder:e=>y(`/api/shop-portal/orders/${e}/`),cancelOrder:e=>y(`/api/shop-portal/orders/${e}/cancel/`,{method:"POST"}),myReturns:e=>y(`/api/shop-portal/returns/${e?`?order=${encodeURIComponent(e)}`:""}`).then(t=>t.results),createReturn:e=>y("/api/shop-portal/returns/",{method:"POST",body:JSON.stringify(e)}),withdrawReturn:e=>y(`/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"),y("/api/shop-portal/return-media/",{method:"POST",body:n})}};function f(e){if(typeof e=="string")return e.startsWith("/media/")?Z(e):e;if(Array.isArray(e))return e.map(f);if(e&&typeof e=="object"){let t={};for(let[n,s]of Object.entries(e))t[n]=n==="captions"&&s&&typeof s=="object"&&!Array.isArray(s)?Object.fromEntries(Object.entries(s).map(([a,l])=>[f(a),l])):f(s);return t}return e}var Fe=typeof window>"u"&&B!=="",ht=Fe?B:"",yt=j,b=()=>({baseUrl:yt(),audience:null});function m(e,t){let n=t?`?process=${encodeURIComponent(t)}`:"";return`/api/v1${e}${n}`}var Ie=100,be=50;function z(e,t,n){let s=new URLSearchParams;for(let[a,l]of Object.entries(t))l!=null&&l!==""&&s.set(a,String(l));return s.set("pageSize",String(Ie)),n&&s.set("cursor",n),`/api/v1${e}?${s.toString()}`}function ft(e,t){return z("/wheels",{process:e},t)}var Ae=Ie;function St(e,t){return z("/wheels",{slug:e.join(",")},t)}function Pt(e,t,n){return z("/products",{kind:e.join(","),make:t?.make,model:t?.model,year:t?.year,modification:t?.modification},n)}function wt(e){if(!e)return null;try{return new URL(e,"http://cursor.invalid").searchParams.get("cursor")}catch{return null}}async function W(e,t,n=()=>!1,s=()=>!1){let a=[],l=null;try{for(let p=0;p<be;p++){let r=await c(await t(l),await d());if(a.push(...r.results),l=wt(r.next),!l)break;if(s(a))return a}l&&console.warn(`[${e}] stopped at ${be} pages (${a.length} rows); catalog may be truncated`)}catch(p){if(n(p))throw p;console.warn(`[${e}] product API unavailable, returning []`,p)}return a}var Re=e=>e instanceof S&&e.status===400;function _e(e){return e.flatMap(t=>t.kind==="alloy-wheel"?R([t]):[t])}async function qe(){return(await bt()).host}async function bt(){try{let{headers:e}=await import("./headers-UYHEZDAT.js"),t=await e(),n=l=>l?.split(",")[0]?.split(":")[0]?.trim().toLowerCase()||null,s=n(t.get(ne)??t.get("x-forwarded-host")??t.get("host")),a=n(t.get("host"));return{host:s,matchesRequestHost:s!==null&&s===a}}catch{return{host:null,matchesRequestHost:!1}}}async function At(){try{let{headers:e}=await import("./headers-UYHEZDAT.js");return X((await e()).get(N))}catch{return null}}async function Rt(){try{let{headers:e}=await import("./headers-UYHEZDAT.js");return(await e()).get(te)||null}catch{return null}}async function _t(){let e=await Rt();if(e)return`site=${encodeURIComponent(e)}`;let t=await qe();return t?`host=${encodeURIComponent(t)}`:""}async function h(e){if(typeof window<"u"){let t=U();return t?$(e,`site=${encodeURIComponent(t)}`):e}return $(e,await _t())}function $(e,t){return t?`${e}${e.includes("?")?"&":"?"}${t}`:e}var kt="preview";async function xt(){if(typeof window<"u")return null;try{let{headers:e}=await import("./headers-UYHEZDAT.js");return(await e()).get(re)}catch{return null}}async function Ct(){try{let{headers:e}=await import("./headers-UYHEZDAT.js");return(await e()).get("user-agent")}catch{return null}}async function J(e,t){let n=await xt();if(n===null)return[await h(e),await d(t)];let s=$(await h(e),`${kt}=${encodeURIComponent(n)}`),{next:a,cache:l,...p}=t??{},r=await d({...p,cache:"no-store"}),i=await Ct();return i&&(r.headers={...r.headers,"user-agent":i}),[s,r]}async function Tt(e){if(!Fe)return;let[t,n]=await Promise.all([qe(),At()]),s=Y(t,n,e);return Object.keys(s).length>0?s:void 0}async function d(e){let t=await Tt(ee(e)),n={baseUrl:ht,...e};return t&&(n.headers={...t,...e?.headers}),n}var k=typeof window>"u";function x(e,t){let n=new URLSearchParams;for(let[a,l]of Object.entries(t))l!==void 0&&l!==""&&n.set(a,String(l));let s=n.toString();return`/api/v1/fitment${e}${s?`?${s}`:""}`}var cn={listMakes:async e=>{if(k){let{fitmentData:n}=await import("./fitment-data-MCGKHSA4.js");return n.makes(e)}return(await c(x("/makes",{region:e}),b())).results},listModels:async(e,t)=>{if(k){let{fitmentData:s}=await import("./fitment-data-MCGKHSA4.js");return s.models(e,t)}return(await c(x("/models",{make:e,region:t}),b())).results},listYears:async(e,t,n)=>{if(k){let{fitmentData:a}=await import("./fitment-data-MCGKHSA4.js");return a.years(e,t,n)}return(await c(x("/years",{make:e,model:t,region:n}),b())).results},listModifications:async(e,t,n,s)=>{if(k){let{fitmentData:l}=await import("./fitment-data-MCGKHSA4.js");return l.modifications(e,t,n,s)}return(await c(x("/modifications",{make:e,model:t,year:n,region:s}),b())).results},getStockFitment:async(e,t,n,s,a)=>{if(k){let{fitmentData:l}=await import("./fitment-data-MCGKHSA4.js");return l.stockFitment(e,t,n,s,a)}return c(x("/stock-fitment",{make:e,model:t,year:n,modification:s,region:a}),b())}},ln={listWheels:async(e,t={})=>{let n=await W("products.listWheels",async s=>await h(ft(e,s)),t.throwOnFailure?()=>!0:void 0,t.maxRows===void 0?void 0:s=>R([...s]).length>=t.maxRows);return R(f(n))},listWheelsBySlug:async(e,t={})=>{let n=[...new Set(e.map(r=>r.trim()).filter(Boolean))];if(n.length===0)return[];let s=[];for(let r=0;r<n.length;r+=Ae)s.push(n.slice(r,r+Ae));let a=await Promise.all(s.map(r=>W("products.listWheelsBySlug",async i=>await h(St(r,i)),t.throwOnFailure?()=>!0:Re))),l=new Set(n),p=a.flat().filter(r=>l.has(r.slug));return R(f(p))},listCatalog:async(e,t,n={})=>{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 s=await W("products.listCatalog",async a=>await h(Pt(e,t,a)),Re,n.maxRows===void 0?void 0:a=>_e([...a]).length>=n.maxRows);return _e(f(s))},getWheel:async e=>A(f(await c(await h(m(`/wheels/${e}`)),await d()))),getTyre:async e=>f(await c(await h(m(`/tyres/${e}`)),await d())),listBundles:async(e={})=>{try{return await c(await h(m("/bundles")),await d())}catch(t){if(e.throwOnFailure)throw t;return[]}},getBundle:async e=>c(await h(m(`/bundles/${e}`)),await d()),listGalleryBuilds:async(e={})=>{let{process:t=null,wheelSlug:n=null}=e;if(typeof window>"u"){let{listGalleryBuilds:s}=await import("./gallery-builds-data-TD3QJK7L.js");return f(s(t,n))}try{let s=new URLSearchParams;t&&s.set("process",t),n&&s.set("wheelSlug",n);let a=s.toString(),l=await c(`/api/v1/gallery-builds${a?`?${a}`:""}`,b());return f(l.results)}catch(s){return console.warn("[products.listGalleryBuilds] product API unavailable, returning []",s),[]}},getSite:async()=>c(await h(m("/site")),await d()),getSiteBySlug:async e=>c(`${m("/site")}?${new URLSearchParams({site:e})}`,typeof window>"u"?await d():void 0),listPages:async()=>f(await c(await h(m("/pages")),await d())),listPopups:async()=>c(await h(m("/popups")),await d()),listProductTemplates:async()=>{try{return await c(await h(m("/product-templates")),await d())}catch(e){return console.warn("[products.listProductTemplates] unavailable, returning []",e),[]}},listDynamicPages:async e=>{let t=e?`?recordType=${encodeURIComponent(e)}`:"";try{return await c(await h(`${m("/dynamic-pages")}${t}`),await d())}catch(n){if(n instanceof S&&n.status===404)return[];throw n}},getRecord:async(e,t)=>{try{return await c(await h(m(`/records/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)),await d())}catch(n){if(n instanceof S&&n.status===404)return null;throw n}},listRecordKeys:async e=>{try{let t=await c(await h(m(`/records/${encodeURIComponent(e)}`)),await d({cache:"no-store"}));return Array.isArray(t?.keys)?t.keys.filter(n=>typeof n=="string"&&n!==""):[]}catch(t){if(t instanceof S&&t.status===404)return[];throw t}},listProductTypeChoices:async()=>{try{return await c(await h(m("/product-type-choices")),await d())}catch(e){return console.warn("[products.listProductTypeChoices] unavailable, returning []",e),[]}},listFieldUsage:async()=>{try{return await c(await h(m("/field-usage")),await d())}catch(e){return console.warn("[products.listFieldUsage] unavailable, returning []",e),[]}},getPage:async(e,t={})=>{let n=t.record?`?record=${encodeURIComponent(t.record)}`:"",[s,a]=await J(m(`/pages/${e}`)+n,t.revalidate!==void 0?{next:{revalidate:t.revalidate}}:void 0);return f(await c(s,a))},listBlogPosts:async(e={},{throwOnFailure:t=!1}={})=>{let n=e.category?`?category=${encodeURIComponent(e.category)}`:"";try{return(await c(m("/blog-posts")+n,await d())).map(a=>({...a,coverImage:T(a.coverImage)??""}))}catch(s){if(t)throw s;return console.warn("[products.listBlogPosts] blog API unavailable, returning []",s),[]}},getBlogPost:async e=>{let t=await c(m(`/blog-posts/${e}`),await d());return{...t,coverImage:T(t.coverImage)??""}},createOrder:async e=>c(m("/orders"),await d({method:"POST",body:JSON.stringify(e)})),createOrderAuthed:async e=>y(m("/orders"),await d({method:"POST",body:JSON.stringify(e)})),lookupOrder:async e=>c(m("/orders/lookup"),await d({method:"POST",body:JSON.stringify(e)})),createPaymentIntent:async e=>c(m("/payments/intent"),await d({method:"POST",body:JSON.stringify(e)})),releaseCheckout:async e=>c(m("/checkouts/release"),await d({method:"POST",body:JSON.stringify(e)})),createPaypalOrder:async e=>c(m("/payments/paypal/order"),await d({method:"POST",body:JSON.stringify(e)})),capturePaypalOrder:async e=>c(m("/payments/paypal/capture"),await d({method:"POST",body:JSON.stringify(e)})),createAfterpayCheckout:async e=>c(m("/payments/afterpay/checkout"),await d({method:"POST",body:JSON.stringify(e)})),captureAfterpayPayment:async e=>c(m("/payments/afterpay/capture"),await d({method:"POST",body:JSON.stringify(e)})),chargeSquare:async e=>c(m("/payments/square/charge"),await d({method:"POST",body:JSON.stringify(e)})),createGocardlessBillingRequest:async e=>c(m("/payments/gocardless/billing-request"),await d({method:"POST",body:JSON.stringify(e)})),completeGocardlessPayment:async e=>c(m("/payments/gocardless/complete"),await d({method:"POST",body:JSON.stringify(e)})),createZipCheckout:async e=>c(m("/payments/zip/checkout"),await d({method:"POST",body:JSON.stringify(e)})),captureZipPayment:async e=>c(m("/payments/zip/capture"),await d({method:"POST",body:JSON.stringify(e)})),createKlarnaCheckout:async e=>c(m("/payments/klarna/checkout"),await d({method:"POST",body:JSON.stringify(e)})),captureKlarnaPayment:async e=>c(m("/payments/klarna/capture"),await d({method:"POST",body:JSON.stringify(e)})),createStockAlert:async e=>c(m("/stock-alerts"),await d({method:"POST",body:JSON.stringify(e)})),createPreOrderIntent:async e=>c(m("/pre-order-intents"),await d({method:"POST",body:JSON.stringify(e)})),createNewsletterSubscription:async e=>c(m("/newsletter-subscriptions"),await d({method:"POST",body:JSON.stringify(e)})),unsubscribeNewsletter:async e=>c(m("/newsletter-unsubscribe"),await d({method:"POST",body:JSON.stringify(e)})),captureCart:async e=>c(m("/carts"),await d({method:"POST",body:JSON.stringify(e)})),restoreCart:async e=>c(m("/carts/restore"),await d({method:"POST",body:JSON.stringify(e)})),unsubscribeCartReminders:async e=>c(m("/carts/unsubscribe"),await d({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=m("/reviews"),s=t.toString();try{return await c(await h(s?`${n}?${s}`:n),await d())}catch(a){return console.warn("[products.listReviews] product API unavailable, returning []",a),[]}},submitReview:async e=>c(m("/reviews"),await d({method:"POST",body:JSON.stringify(e)})),getForm:async e=>c(m(`/forms/${encodeURIComponent(e)}`),await d()),submitForm:async(e,t)=>c(m(`/forms/${encodeURIComponent(e)}/submissions`),await d({method:"POST",body:JSON.stringify(t)})),listShippingMethods:async()=>{try{return await c(m("/shipping-methods"),await d())}catch(e){return console.warn("[products.listShippingMethods] product API unavailable, returning []",e),[]}},listCountrySubdivisions:async e=>{try{return await c(m(`/countries/${encodeURIComponent(e)}/subdivisions`),await d())}catch(t){return console.warn("[products.listCountrySubdivisions] unavailable, returning []",t),[]}},quoteCart:async e=>{let t=m("/cart/quote"),n=await d({method:"POST",body:JSON.stringify(e)});return e.couponCode?(await Pe(t,n)).data:c(t,n)},validateCoupon:async e=>{let{data:t,asShopper:n}=await Pe(m("/coupons/validate"),await d({method:"POST",body:JSON.stringify(e)}));return{...t,askedAsShopper:n}},getHeaderSettings:async()=>{let e=Ce({method:"GET"}),t=await c(...await J(m("/header-settings"),{signal:e})),n=T(t.logoUrl),s=null,a=null;if(n&&D(n)){let l=await he(n,e);l&&(s=l.reversed,a=l.inkIsDark)}return{...t,logoUrl:n,logoReversed:s,logoInkIsDark:a}},getThemeSettings:async()=>c(...await J(m("/theme-settings"))),getChatSettings:async()=>c(await h(m("/chat-settings")),await d())},un={listServices:async()=>{try{return await c(m("/bookings/services"),await d())}catch(e){return console.warn("[bookings.listServices] API unavailable, returning []",e),{results:[],currency:"USD"}}},getAvailability:async(e,t)=>c(m(`/bookings/availability?service=${encodeURIComponent(e)}&date=${t}`),await d()),create:async e=>c(m("/bookings"),await d({method:"POST",body:JSON.stringify(e)})),get:async e=>c(m(`/bookings/manage/${encodeURIComponent(e)}`),await d()),cancel:async e=>c(m(`/bookings/manage/${encodeURIComponent(e)}/cancel`),await d({method:"POST"})),createPaymentIntent:async e=>c(m("/bookings/payments/intent"),await d({method:"POST",body:JSON.stringify({manageToken:e})}))},K=class extends Error{constructor(n,s){super(`Slug "${n}" exists on ${s} websites; a site is required to pick one.`);this.slug=n;this.count=s;this.name="AmbiguousPageSlugError"}},F=(e,t,n)=>{let s=new URLSearchParams({...t?{site:t}:{},...n?{draft:"1"}:{}}).toString();return`/api/storefront/${e}/${s?`?${s}`:""}`},q=e=>`/api/storefront/sites/${encodeURIComponent(e)}/`,Ot=e=>`${q(e)}currencies/`,vt="/api/storefront/media/ingest/",V=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 Et(){let e=ye();if(!e)throw new V;return`${vt}?${new URLSearchParams({site:e})}`}var Ft="X-Puck-Media-Manifest",ke=Q.contentHash,I={"X-Media-Manifest":ke,[Ft]:ke},mn=$e({});function $e(e){return(t,n={})=>{let s=mt(),a=e.headers||s?{...s?{"Accept-Language":s}:{},...e.headers,...n.headers}:void 0;return c(t,{...n,...e.baseUrl!==void 0?{baseUrl:e.baseUrl}:{},...a?{headers:a}:{},audience:e.audience??lt()})}}function It(e={}){let t=$e(e),n=e.siteDrafts===!0,s=r=>F("header-settings",r,n),a=r=>F("theme-settings",r,n),l=r=>F("chat-settings",r,n),p=r=>F("social-settings",r,n);return{findPageBySlug:async(r,i,o)=>{let u=new URLSearchParams({slug:r});o&&u.set("site",o);let g=await t(`/api/storefront/pages/?${u.toString()}`,{token:i}),P=Array.isArray(g)?g:g.results??[];if(!o&&P.length>1)throw new K(r,P.length);return P[0]??null},getPageById:(r,i)=>t(`/api/storefront/pages/${r}/`,{token:i}),saveLayout:(r,i,o,u,g)=>t(`/api/storefront/pages/${r}/`,{method:"PATCH",body:JSON.stringify({layout:i,expected_updated_at:u,...g?{client_id:g}:{}}),token:o}),duplicatePage:(r,i,o)=>t(`/api/storefront/pages/${r}/duplicate/`,{method:"POST",body:JSON.stringify({title:i.title,slug:i.slug}),token:o}),geocode:(r,i,o)=>t(`/api/storefront/geocode/?${new URLSearchParams(o?{q:r,country:o}:{q:r})}`,{token:i}),listBlockSources:r=>t("/api/storefront/block-sources/",{token:r}),listRecordTypes:r=>t("/api/storefront/record-types/",{token:r}),createPagePreviewLink:(r,i)=>t(`/api/storefront/pages/${r}/preview-link/`,{method:"POST",token:i}),claimPageEditLock:(r,i,o,u=!1)=>t(`/api/storefront/pages/${r}/edit-lock/`,{method:"POST",body:JSON.stringify({client_id:o,takeover:u}),token:i}),releasePageEditLock:(r,i)=>t(`/api/storefront/pages/${r}/edit-lock/`,{method:"DELETE",token:i}),createTemplate:(r,i,o)=>t("/api/storefront/page-templates/",{method:"POST",body:JSON.stringify({name:r,layout:i}),headers:I,token:o}),getTemplate:(r,i)=>t(`/api/storefront/page-templates/${r}/`,{token:i}),saveTemplateLayout:(r,i,o)=>t(`/api/storefront/page-templates/${r}/`,{method:"PATCH",body:JSON.stringify({layout:i}),headers:I,token:o}),listTemplatePages:async(r,i)=>{let o=await t(`/api/storefront/template-pages/?template=${encodeURIComponent(r)}`,{token:i});return Array.isArray(o)?o:o.results??[]},findTemplatePageBySlug:async(r,i,o)=>{let u=await t(`/api/storefront/template-pages/?template=${encodeURIComponent(r)}&slug=${encodeURIComponent(i)}`,{token:o});return(Array.isArray(u)?u:u.results??[])[0]??null},createTemplatePage:(r,i,o)=>t("/api/storefront/template-pages/",{method:"POST",body:JSON.stringify({template:r,...i}),headers:I,token:o}),saveTemplatePageLayout:(r,i,o)=>t(`/api/storefront/template-pages/${r}/`,{method:"PATCH",body:JSON.stringify({layout:i}),headers:I,token:o}),deleteTemplatePage:(r,i,o)=>t(`/api/storefront/template-pages/${r}/`,{method:"DELETE",token:i,...o?.keepalive?{keepalive:!0}:{}}),listPages:async(r,i)=>{let o=new URLSearchParams({no_page:"true"});i&&o.set("site",i);let u=await t(`/api/storefront/pages/?${o.toString()}`,{token:r});return Array.isArray(u)?u:u.results??[]},createPage:(r,i,o,u)=>t("/api/storefront/pages/",{method:"POST",body:JSON.stringify({title:r,slug:i,layout:o}),token:u}),deletePage:(r,i)=>t(`/api/storefront/pages/${r}/`,{method:"DELETE",token:i}),getHeaderSettings:(r,i)=>t(s(i),{token:r}),listMenus:async(r,i)=>{let o=new URLSearchParams({no_page:"true"});i&&o.set("site",i);let u=await t(`/api/storefront/menus/?${o}`,{token:r});return Array.isArray(u)?u:u.results??[]},listBlogPosts:async(r,i={})=>{let o=new URLSearchParams({no_page:"true"});i.visibleOnly&&o.set("is_visible","true"),i.siteId&&o.set("site",i.siteId);let u=await t(`/api/storefront/blog-posts/?${o.toString()}`,{token:r});return Array.isArray(u)?u:u.results??[]},listFieldUsage:async(r,i)=>{let o=await t(`/api/storefront/field-usage/?site=${encodeURIComponent(i)}`,{token:r});return Array.isArray(o?.entries)?o.entries:[]},listCategories:async(r,i={})=>{let o=new URLSearchParams({no_page:"true"});i.visibleOnly&&o.set("is_visible","true"),i.siteId&&o.set("site",i.siteId);let u=await t(`/api/storefront/categories/?${o.toString()}`,{token:r});return[...Array.isArray(u)?u:u.results??[]].sort((P,C)=>P.sort_order-C.sort_order||P.name.localeCompare(C.name))},listForms:async(r,i={})=>{let o=new URLSearchParams({no_page:"true"});i.siteId&&o.set("site",i.siteId);let u=await t(`/api/storefront/forms/?${o.toString()}`,{token:r});return[...Array.isArray(u)?u:u.results??[]].sort((P,C)=>P.title.localeCompare(C.title))},listWheelSummaries:async(r,i={})=>{let o=new URLSearchParams;i.siteId&&o.set("site",i.siteId);let u=o.toString(),g=await t(`/api/storefront/wheel-curations/summaries/${u?`?${u}`:""}`,{token:r});return f(g)},listProducts:async(r,i={})=>{let o=new URLSearchParams;i.kinds?.length&&o.set("kind",i.kinds.join(",")),i.siteId&&o.set("site",i.siteId);let u=o.toString(),g=await t(`/api/storefront/products/${u?`?${u}`:""}`,{token:r});return f(g)},getWheelDetail:async(r,i,o={})=>{let u=new URLSearchParams({slug:i});return o.siteId&&u.set("site",o.siteId),A(f(await t(`/api/storefront/wheel-curations/detail/?${u.toString()}`,{token:r})))},updateHeaderSettings:(r,i,o)=>t(s(o),{method:"PATCH",body:JSON.stringify(r),token:i}),getSite:(r,i)=>t(q(r),{token:i}),listSites:async r=>{let i=await t("/api/storefront/sites/?no_page=true",{token:r});return Array.isArray(i)?i:i.results??[]},listSiteCurrencies:async(r,i)=>{let o=await t(Ot(r),{token:i});return Array.isArray(o)?o:[]},publishSite:(r,i)=>t(`${q(r)}publish/`,{method:"POST",token:i}),getSiteLiveState:(r,i)=>t(`${q(r)}live-state/`,{token:i}),getThemeSettings:(r,i)=>t(a(i),{token:r}),updateThemeSettings:(r,i,o)=>t(a(o),{method:"PATCH",body:JSON.stringify(r),token:i}),getMyPreferences:async r=>(await t("/api/auth/me/",{token:r})).preferences??{},updateMyPreferences:(r,i)=>t("/api/auth/me/",{method:"PATCH",body:JSON.stringify({preferences:r}),token:i}),getChatSettings:(r,i)=>t(l(i),{token:r}),updateChatSettings:(r,i,o)=>t(l(o),{method:"PATCH",body:JSON.stringify(r),token:i}),getSocialSettings:(r,i)=>t(p(i),{token:r}),updateSocialSettings:(r,i,o)=>t(p(o),{method:"PATCH",body:JSON.stringify(r),token:i}),uploadHeaderLogo:(r,i,o)=>{let u=new FormData;return u.append("logo",r),t(s(o),{method:"PATCH",body:u,token:i})},clearHeaderLogo:(r,i)=>t(s(i),{method:"PATCH",body:JSON.stringify({logo:null}),token:r}),setHeaderLogoFromAsset:(r,i,o)=>t(s(o),{method:"PATCH",body:JSON.stringify({logo_asset_id:r}),token:i}),uploadMedia:async(r,i)=>{let o=new FormData;return o.append("file",r),t(Et(),{method:"POST",body:o,token:i})},listMedia:async(r,i)=>{let o=new URLSearchParams({no_page:"true"});i&&o.set("kind",i);let u=await t(`/api/storefront/media-assets/?${o.toString()}`,{token:r});return Array.isArray(u)?u:u.results??[]}}}var dn=It({siteDrafts:!0});export{B as a,Y as b,ee as c,w as d,Ne as e,D as f,ye as g,nt as h,S as i,G as j,H as k,tn as l,nn as m,c as n,gt as o,qe as p,bt as q,At as r,Rt as s,xt as t,cn as u,ln as v,un as w,K as x,mn as y,dn as z};
@@ -1 +0,0 @@
1
- import{jsx as Gt}from"react/jsx-runtime";import{createContext as Gs,useCallback as d,useContext as Fs,useMemo as Bs,useState as $s}from"react";import{createContext as bt,useContext as le}from"react";import{createContext as Vn}from"react";var vt=Vn(null);var Yn=bt(null),ce=bt({logo:null,placeholder:!1,wordmark:null});function lr(){let e=le(vt),t=le(Yn),a=le(ce),n=!e&&a.placeholder,s=e?e.logoUrl:a.logo?.logoUrl??t?.logoUrl??null;return{src:n?null:s,reversedSrc:e?e.logoReversed:a.logo?.logoReversed??t?.logoReversed??null,inkIsDark:e?e.logoInkIsDark:a.logo?.logoInkIsDark??t?.logoInkIsDark??null,wordmark:e?null:a.wordmark,siteName:e?.siteName??t?.siteName}}import{contrastRatio as hr,hexToRgb as j,parseHexColor as b,readableInk as Et,relativeLuminance as X}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as jn,pictureShadowColor as Xn}from"efficient-easel/screen/lib/document/shadow-values";import{DEFAULT_SHADOW_COLOR as $r}from"efficient-easel/screen/lib/document/shadow-values";var fr="storefront-theme",mr="sf:theme-mode",wr="sf:theme-switch",pr="hide",pe="light",ge=!1,zn=7,Kn=18;function qn(e){return e>=zn&&e<Kn}function gr(e){let{mode:t,override:a,switchShown:n,hour:s}=e;return n&&(a==="light"||a==="dark")?a:t==="auto"?qn(s)?"light":"dark":t==="light"?"light":"dark"}var y={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},Zn=[{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"}],z={selected:0,themes:Zn};function St(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...z}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function de(e,t,a){let n=j(e),s=j(t);if(n===null||s===null)return e;let i=(o,l)=>Math.max(0,Math.min(255,Math.round(o+(l-o)*a))).toString(16).padStart(2,"0");return`#${i(n.r,s.r)}${i(n.g,s.g)}${i(n.b,s.b)}`}var Jn={light:"#ffffff",dark:"#0a0a0a"},vr=["light","dark"];function br(e,t){let a=Jn[t],n=t==="light"?"#ffffff":"#000000";return{text:a,accent:a,background:e,surface:de(e,n,.1),line:de(e,n,.22),muted:de(a,e,.35),brandInk:t}}function O(e){let t=St(e);return t.themes[t.selected]}function A(e){return{text:e.text,accent:e.accent,background:e.background||y.background,surface:e.surface||y.surface,line:e.line||y.line,muted:e.muted||y.muted}}var Qn=.4,es="#f5f1e8",_t="#0a0a0a";function ts(e){let t=O(e).text,a=X(t);return a===null||a>=Qn?t:null}var as=4.5,ns=3,_r={good:"Good","large-only":"Large text only",hard:"Hard to read"};function xr(e){return e>=as?"good":e>=ns?"large-only":"hard"}var ss=["#000000","#ffffff"];function K(e){return Et(e,ss)}function Tt(e,t){let a=t!==void 0&&X(t)!==null?t:es;return Et(e,[_t,a])===a&&a!==_t}var is=[.25,.4,.55];function Er(e){let t=j(e);return t===null?[]:is.map(a=>"#"+[t.r,t.g,t.b].map(n=>Math.round(n*(1-a)).toString(16).padStart(2,"0")).join(""))}function Sr(e){let t={"--theme-fg":O(e).text},a=ts(e);return a!==null&&(t["--overlay-fg"]=a),t}var os=82;function ve(e){return`color-mix(in srgb, ${e} ${os}%, #000)`}function Tr(e){let t=O(e);return{"--theme-accent":t.accent,"--theme-accent-2":ve(t.accent),"--theme-accent-ink":K(t.accent)}}function be(e){let t=e?.button;return t&&b(t)===t.toLowerCase()?t.toLowerCase():null}function kr(e){let t=O(e),a=be(t),n=kt(t);if(a===null&&n===null)return{};let s={};return a!==null&&(s["--theme-btn"]=a,s["--theme-btn-2"]=ve(a)),s["--theme-btn-ink"]=n??K(a),s}function kt(e){let t=e?.buttonInk;return t&&b(t)===t.toLowerCase()?t.toLowerCase():null}function rs(e,t){return kt(e)??K(be(e)??t)}function Cr(e){let t=O(e);return{fill:be(t)??t.accent.toLowerCase(),ink:rs(t,t.accent)}}function yr(e){let t={};return St(e).themes.forEach((a,n)=>{let s=A(a);t[`--theme-preset-${n}-accent`]=s.accent,t[`--theme-preset-${n}-accent-2`]=ve(s.accent),t[`--theme-preset-${n}-accent-ink`]=K(s.accent),t[`--theme-preset-${n}-bg`]=s.background,t[`--theme-preset-${n}-fg`]=s.text,t[`--theme-preset-${n}-surface`]=s.surface,t[`--theme-preset-${n}-surface-2`]=`color-mix(in srgb, ${s.surface} 60%, ${s.line})`,t[`--theme-preset-${n}-line`]=s.line,t[`--theme-preset-${n}-muted`]=s.muted}),t}var he=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},ue=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function xt([e,t,a]){let[n,s,i]=[he(e),he(t),he(a)],o=Math.cbrt(.4122214708*n+.5363325363*s+.0514459929*i),l=Math.cbrt(.2119034982*n+.6806995451*s+.1073969566*i),c=Math.cbrt(.0883024619*n+.2817188376*s+.6299787005*i);return[.2104542553*o+.793617785*l-.0040720468*c,1.9779984951*o-2.428592205*l+.4505937099*c,.0259040371*o+.7827717662*l-.808675766*c]}function ls([e,t,a]){let n=(e+.3963377774*t+.2158037573*a)**3,s=(e-.1055613458*t-.0638541728*a)**3,i=(e-.0894841775*t-1.291485548*a)**3;return[ue(4.0767416621*n-3.3077115913*s+.2309699292*i),ue(-1.2684380046*n+2.6097574011*s-.3413193965*i),ue(-.0041960863*n-.7034186147*s+1.707614701*i)]}var we=e=>{let t=j(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},Ct=(e,t,a)=>[e[0]*a+t[0]*(1-a),e[1]*a+t[1]*(1-a),e[2]*a+t[2]*(1-a)],yt=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,At=e=>Ct(we(e.surface),we(e.line),.6);function Ar(e){return yt(At(A(e)))}function cs(e){let t=A(e);return yt(ls(Ct(xt(At(t)),xt(we(t.text)),.92)))}function Ot(e,t,a,n){let s=e[t];if(!s)return-1;let i=a(s);if(!i)return-1;let o=A(s);return e.findIndex((l,c)=>{if(c===t)return!1;let h=A(l);return b(h.background)!==i?!1:!n||b(h.text??"")===b(o.text??"")&&b(h.accent??"")===b(o.accent??"")})}function Or(e,t){return Ot(e,t,cs,!1)}function Ir(e,t){return Ot(e,t,a=>b(a.surface??""),!0)}var ds=1;function hs(e,t){let a=(e??[]).flatMap((n,s)=>{let i=X(n.background??""),o=X(n.text??"");return i!==null&&o!==null&&i<o?[s]:[]});return a.find(n=>n!==t)??a[0]??ds}function Nr(e){return hs(e?.themes,e?.selected)}var Lr=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Rr(e){let t=A(O(e)),a=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,n={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==y.surface||t.line!==y.line)&&(n["--theme-surface-2"]=a),n}var us=["heading","body","label"];function Hr(e){if(!e)return null;for(let t of us)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}var It=["headingLarge","headingMedium","headingSmall","accent","body","label"];var _e={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},fs=8,ms=200;function ws(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.round(e);return t>=fs&&t<=ms?t:null}function ps(e){let t={};for(let a of It)t[a]=ws(e?.[a]);return t}function Pr(e){let t=ps(e),a={};for(let n of It){let s=t[n];s!==null&&(a[`--size-${n}`]=`${s}px`)}return a}var gs=["square","small","large"],vs="small";function Mr(e){return gs.includes(e??"")?e:vs}var xe=0,bs=40,Dr={square:0,small:null,large:16},Nt={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function Ee(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(bs,Math.max(xe,Math.round(t))):null}function _s(e){let t=Ee(e);return t===null?{}:Object.fromEntries(Object.entries(Nt).map(([a,n])=>{let s=t*n/16;return[a,s===0?"0":`${s}rem`]}))}function Gr(e){return(Ee(e)??xe)*Nt["--sf-button-radius"]}function Fr(e){return _s(Ee(e)??xe)}var xs=["none","soft","lifted"],Es="soft",Lt="none",Ss=["tight","normal","roomy"],Ts="normal",q="normal",ks=["none","lift","highlight"],Cs="lift",ys="highlight";function Rt(e){return xs.includes(e??"")?e:Es}function As(e){return Ss.includes(e??"")?e:Ts}function Ht(e){return ks.includes(e??"")?e:Cs}function Ur(e){let t=Rt(e);return t===Lt?void 0:t}function Wr(e){let t=As(e);return t===q?void 0:t}function Vr(e){let t=Ht(e);return t===ys?void 0:t}function Yr(e,t,a){let n=Xn(t);return n===jn?{}:Rt(e)!==Lt||Ht(a)==="lift"?{"--sf-shadow-color":n}:{}}var Os=["normal","tight","compressed"],G="normal";function Pt(e){return Os.includes(e??"")?e:G}function jr(e){let t=Pt(e);return t===G?void 0:t}function Xr(e){switch(Pt(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}var Se={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},fe=100,me=900,Is=24,Ns=200;function Y(e,t,a){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),a))}function Mt(e){let t=Y(e?.weight,fe,me),a=e?.case==="sentence"?"sentence":"authored",n=i=>i==null?t:Y(i,fe,me),s=i=>i==="sentence"?"sentence":i==="authored"?"authored":a;return{case:a,weight:t,weightStrong:Y(e?.weightStrong,fe,me),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:Y(e?.maxPx,Is,Ns),weight2:n(e?.weight2),weight3:n(e?.weight3),case2:s(e?.case2),case3:s(e?.case3)}}function zr(e){let t=Mt(e),a={};return t.case==="sentence"&&(a["--sf-heading-case"]="none"),t.weight!==null&&(a["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(a["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(a["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(a["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(a["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(a["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(a["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),a}function Kr(e){return Mt({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,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})}var Dt=[{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:"assistant",label:"Assistant",cssVar:"--font-assistant",category:"sans",italic:!1,italicLoaded:!1},{key:"jost",label:"Jost",cssVar:"--font-jost",category:"sans",italic:!0,italicLoaded:!0},{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}],N=new Map(Dt.map(e=>[e.key,e]));function Zr(e){return N.get(e)}var Te=["heading","heading2","heading3","body","accent","label"];function Jr(e){return typeof e=="string"&&Te.includes(e)?e:null}var Qr={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Emphasis",label:"Labels"},Ls=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],Rs=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,el={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},Hs={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function tl(e){let t=e?Rs.exec(e):null;return t?Hs[t[1]]??null:Ps(e)}function Ps(e){if(!e)return null;let t=e.split(/\s+/).filter(a=>!a.slice(0,a.lastIndexOf(":")+1).includes("&")).map(a=>a.slice(a.lastIndexOf(":")+1));for(let[a,n]of Ls)if(t.includes(a))return n;return null}var E={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function Ms(e){let t=a=>{let n=e?.[a];if(n&&N.has(n))return n;if(a==="heading2"||a==="heading3"){let s=e?.heading;return s&&N.has(s)?s:E.heading}return E[a]};return Object.fromEntries(Te.map(a=>[a,t(a)]))}function Ds(e,t){return N.get(e[t])??N.get(E[t])}function I(e,t){return`var(${Ds(e,t).cssVar})`}var al=[...new Set(Te.map(e=>N.get(E[e]).cssVar))],nl=[...new Set(Dt.map(e=>e.cssVar))];function sl(e){let t=Ms(e);return{"--font-role-heading":I(t,"heading"),"--font-role-heading2":I(t,"heading2"),"--font-role-heading3":I(t,"heading3"),"--font-role-body":I(t,"body"),"--font-role-accent":I(t,"accent"),"--font-role-label":I(t,"label"),fontFamily:"var(--font-role-body)"}}var Ft=Gs({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:pe,setThemeMode:()=>{},themeSwitchShown:ge,setThemeSwitchShown:()=>{},theme:z,themeRow:"none",setTheme:()=>{},fonts:E,setFonts:()=>{},sizes:_e,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:q,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:G,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,siteGutterPhone:null,blockGap:null,blockGapPhone:null,setSiteGutter:()=>{},setSiteGutterPhone:()=>{},setBlockGap:()=>{},setBlockGapPhone:()=>{},headingTypography:Se,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1});function hl({children:e,websiteName:t=null,templateChrome:a=!1,templateName:n=null,chromePlaceholder:s=!1,themeMode:i=pe,onThemeModeChange:o,themeSwitchShown:l=ge,onThemeSwitchShownChange:c,theme:h=z,themeRow:w="none",onThemeChange:u,fonts:_=E,onFontsChange:p,sizes:x=_e,onSizesChange:W,cornerRadiusPx:oe=null,onCornerRadiusPxChange:V,cardShadow:re=null,onCardShadowChange:qe,shadowColor:Qa=null,onShadowColorChange:Ze,cardGap:en=q,onCardGapChange:Je,hoverEffect:tn=null,onHoverEffectChange:Qe,headingCompression:an=G,onHeadingCompressionChange:et,siteWidth:nn=null,onSiteWidthChange:tt,siteGutter:sn=null,siteGutterPhone:on=null,blockGap:rn=null,blockGapPhone:ln=null,onSiteGutterChange:at,onSiteGutterPhoneChange:nt,onBlockGapChange:st,onBlockGapPhoneChange:it,headingTypography:cn=Se,onHeadingTypographyChange:ot,textStyles:dn=null,onTextStylesChange:rt,wordStyles:hn=null,heroBackgroundFollowsWidth:un=null,onHeroBackgroundFollowsWidthChange:lt,sectionBackgroundWidth:fn=null,onSectionBackgroundWidthChange:ct,sectionContentWidth:mn=null,onSectionContentWidthChange:dt,photographyGrayscale:wn=null,onPhotographyGrayscaleChange:ht,shareButtonOnPosts:pn=null,onShareButtonOnPostsChange:ut,themeFromDocument:gn=!1}){let[D,ft]=$s(null),vn=d(r=>ft(Wn=>Wn??r),[]),bn=d(r=>o?.(r),[o]),_n=d(r=>c?.(r),[c]),xn=d(r=>u?.(r),[u]),En=d(r=>p?.(r),[p]),Sn=d(r=>W?.(r),[W]),Tn=d(r=>tt?.(r),[tt]),kn=d(r=>at?.(r),[at]),Cn=d(r=>nt?.(r),[nt]),yn=d(r=>st?.(r),[st]),An=d(r=>it?.(r),[it]),On=d(r=>lt?.(r),[lt]),In=d(r=>ct?.(r),[ct]),Nn=d(r=>dt?.(r),[dt]),Ln=d(r=>ht?.(r),[ht]),Rn=d(r=>ut?.(r),[ut]),Hn=d(r=>V?.(r),[V]),Pn=d(r=>qe?.(r),[qe]),Mn=d(r=>Ze?.(r),[Ze]),Dn=d(r=>Je?.(r),[Je]),Gn=d(r=>Qe?.(r),[Qe]),Fn=d(r=>et?.(r),[et]),Bn=d(r=>ot?.(r),[ot]),$n=d(r=>rt?.(r),[rt]),mt=D?.logoUrl,wt=D?.logoReversed,pt=D?.logoInkIsDark,gt=D!==null,Un=Bs(()=>({logo:gt?{logoUrl:mt,logoReversed:wt,logoInkIsDark:pt}:null,placeholder:a||s,wordmark:a?n:t}),[gt,mt,wt,pt,a,s,n,t]);return Gt(ce.Provider,{value:Un,children:Gt(Ft.Provider,{value:{settings:D,setSettings:ft,primeSettings:vn,websiteName:t,templateChrome:a,templateName:n,chromePlaceholder:s,themeMode:i,setThemeMode:bn,themeSwitchShown:l,setThemeSwitchShown:_n,theme:h,themeRow:w,setTheme:xn,fonts:_,setFonts:En,sizes:x,setSizes:Sn,cornerRadiusPx:oe,setCornerRadiusPx:Hn,cardShadow:re,setCardShadow:Pn,shadowColor:Qa,setShadowColor:Mn,cardGap:en,setCardGap:Dn,hoverEffect:tn,setHoverEffect:Gn,headingCompression:an,setHeadingCompression:Fn,siteWidth:nn,setSiteWidth:Tn,siteGutter:sn,siteGutterPhone:on,blockGap:rn,blockGapPhone:ln,setSiteGutter:kn,setSiteGutterPhone:Cn,setBlockGap:yn,setBlockGapPhone:An,headingTypography:cn,setHeadingTypography:Bn,textStyles:dn,setTextStyles:$n,wordStyles:hn,heroBackgroundFollowsWidth:un,setHeroBackgroundFollowsWidth:On,sectionBackgroundWidth:fn,setSectionBackgroundWidth:In,sectionContentWidth:mn,setSectionContentWidth:Nn,photographyGrayscale:wn,setPhotographyGrayscale:Ln,shareButtonOnPosts:pn,setShareButtonOnPosts:Rn,themeFromDocument:gn},children:e})})}var Us=()=>Fs(Ft);function ul(e,t,a){return e?t===a?"read":"loading":"none"}function fl(e,t){return{value:e,readFor:t}}function ml(e,t,a){return{value:t,readFor:e.readFor===a?a:null}}function wl(){let{sectionContentWidth:e,themeFromDocument:t}=Us();return t?null:e}import{isNodeList as Ws}from"efficient-easel/data";var Z=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],$t="bottom-left",L=4,Vs=L+1,Bt=40,Ys=30,js=100,Xs=60,vl=100;var ke={"top-left":"Top left","top-center":"Top center","top-right":"Top right",left:"Left",center:"Center",right:"Right","bottom-left":"Bottom left","bottom-center":"Bottom center","bottom-right":"Bottom right"};function zs(e){let t=Z.indexOf(F(e));return{band:Math.floor(t/3),column:["start","center","end"][t%3]}}function Ks(e){return 1+zs(e).band*(Vs+1)}function bl(e){return Ks(e)+1}function F(e){return Z.includes(e)?e:$t}function _l(e){let t=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-Bt,Math.min(Bt,Math.round(t)))}function xl(e,t=Xs){let a=typeof e=="number"&&Number.isFinite(e)?e:t;return Math.max(Ys,Math.min(js,Math.round(a)))}function Ce(e,t){let a=F(t);return e.filter(n=>F(n?.props?.placement)===a).length}function Ut(e){return`${ke[F(e)]} already holds ${L} boxes. Move one somewhere else first.`}function El(e,t){let a=e.filter(n=>n?.props?.id!==t);return Z.map(n=>{let s=Ce(a,n)>=L,i=ke[n];return s?{value:n,label:i,disabled:!0,title:Ut(n)}:{value:n,label:i}})}function qs(e,t){let a=t===void 0?$t:F(t?.props?.placement);return Ce(e,a)>=L?Ut(a):null}var Wt="HeroGroup";function Zs(e){return Z.map(t=>{let a=Ce(e,t);return{anchor:t,total:a,hidden:a-L}}).filter(t=>t.hidden>0)}function Sl(e){let t=Zs(e);return t.length===0?null:t.map(({anchor:a,total:n,hidden:s})=>{let i=ke[a],o=s===1?"1 is not shown":`${s} are not shown`;return`${i} holds ${n} boxes. The published page draws the first ${L}, so ${o}. ${s===1?"Move it":"Move them"} somewhere else.`}).join(" ")}function Tl(e,t){let a=t;if(a?.type!==Wt)return null;let n=a.props?.id===void 0?"":String(a.props.id);return n?qs(Js(e,n),a):null}function Js(e,t){let a=Vt(e,t);return a&&a.ownerType===ei?a.siblings:[]}function kl(e,t){let a=Vt(e,t);return a?a.ancestorTypes.filter(n=>n===Wt).length:Qs}var Qs=1,ei="HeroSlide";function Vt(e,t){let a=(n,s,i)=>{if(s>12||!n||typeof n!="object")return null;if(Ws(n)){if(n.some(o=>o?.props?.id===t))return{siblings:n,ownerType:i.at(-1)??null,ancestorTypes:i};for(let o of n){let l=o.type,c=a(o,s+1,[...i,String(l)]);if(c)return c}return null}for(let o of Object.values(n)){let l=a(o,s+1,i);if(l)return l}return null};return a(e,0,[])}import{forwardRef as ti}from"react";import{jsx as si}from"react/jsx-runtime";function ai(e){if(typeof e=="string")return e;let t=e.query?`?${new URLSearchParams(e.query).toString()}`:"",a=e.hash?e.hash.startsWith("#")?e.hash:`#${e.hash}`:"";return`${e.pathname??""}${t}${a}`}var ni=ti(function({href:t,prefetch:a,replace:n,scroll:s,shallow:i,legacyBehavior:o,passHref:l,locale:c,onClick:h,children:w,...u},_){let p=x=>{h?.(x),!(x.defaultPrevented||u.target==="_blank")&&x.preventDefault()};return si("a",{ref:_,href:ai(t),onClick:p,...u,children:w})}),Al=ni;var ii="Website";function Nl(e){return e?.trim()||ii}var Yt=["instagram","facebook","tiktok","youtube","x","linkedin","pinterest","whatsapp","telegram","line","wechat"],oi={instagram:"Instagram",facebook:"Facebook",tiktok:"TikTok",youtube:"YouTube",x:"X",linkedin:"LinkedIn",pinterest:"Pinterest",whatsapp:"WhatsApp",telegram:"Telegram",line:"LINE",wechat:"WeChat"},ri={};function Rl(e){if(!e||typeof e!="object")return ri;let t={};for(let a of Yt){let n=e[a];if(typeof n!="string")continue;let s=n.trim();!s||!/^https?:\/\//i.test(s)||(t[a]=s)}return t}function Hl(e){return Yt.flatMap(t=>{let a=e[t];return a?[{platform:t,href:a,label:oi[t]}]:[]})}var Pl=e=>`${e}_url`;import{AUTO_RULES as hi,FOLLOW_RULES as ui,isAuto as fi,resolveViewValue as mi}from"efficient-easel/screen/lib/content/view-tiers";import{VIEW_DESKTOP_MIN as li,VIEW_TABLET_MIN as ci}from"efficient-easel/screen/lib/content/view-tiers";var Xt="v1",di=800,jt={"view-tablet":ci,"view-desktop":li,"view-wide":di};function Gl(e){let t=e.startsWith("max-"),a=t?e.slice(4):e;if(a in jt)return{px:jt[a],max:t};let n=/^(max|min)-\[(\d+)px\]$/.exec(e);return n?{px:Number(n[2]),max:n[1]==="max"}:void 0}function wi(){return Xt==="v2"?hi:ui}function zt(e,t,a,n,s=wi()){let i=mi(e,t,a,n,s),o={},l=(c,h)=>!fi(c)||h!=null&&h!==t;return l(a,i.tablet)&&(o.tablet=i.tablet),l(n,i.phone)&&(o.phone=i.phone),o}import{parseHexColor as pi}from"efficient-shell/format";var ye=[{role:"bg",token:"--bg",ink:!1},{role:"fg",token:"--fg",ink:!0},{role:"surface",token:"--site-surface",ink:!1},{role:"surface-2",token:"--site-surface-2",ink:!1},{role:"line",token:"--site-line",ink:!0},{role:"muted",token:"--fg-dim",ink:!0}],gi=ye.filter(e=>e.ink);function Kt(e){let t={color:e.fg};for(let{role:a,token:n}of gi)t[n]=e[a];return t}var vi={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},bi=Object.freeze(Kt(vi)),_i={fg:"var(--overlay-fg-on-light)",line:"color-mix(in srgb, var(--overlay-fg-on-light) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg-on-light) 76%, transparent)"},xi=Object.freeze(Kt(_i));function Yl(e,t){let a=e?pi(e):null;return a?Tt(a,t)?bi:xi:null}var qt=-1,Ei="sf-section-accent",zl="Color",Zt=new Set(["CategoryBar","DocTabs"]),Kl=new Set(["Flex"]),Si=0;function Ti(e){return e===qt?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:Si}function ql(e){return e??qt}function ki(e){let t=`--theme-preset-${e}`,a={"--sf-sec-accent":`var(${t}-accent)`,"--sf-sec-accent-2":`var(${t}-accent-2)`,"--sf-sec-accent-ink":`var(${t}-accent-ink)`};for(let{role:n}of ye)a[`--sf-sec-${n}`]=`var(${t}-${n}, var(--theme-${n}))`;return a}function Zl(e){let t=Ti(e.sectionAccent);return t===null?null:{className:Ei,style:ki(t)}}import{FOLLOW_RULES as Ci,phoneKey as yi,resolveViewValue as Ai,tabletKey as Oi}from"efficient-easel/screen/lib/content/view-tiers";var Ie=["desktop","tablet","phone"],Oe=(e,t)=>t==="phone"?yi(e):t==="tablet"?Oi(e):e,Jt=e=>e.flatMap(t=>Ie.map(a=>Oe(t,a))),Ae=e=>e===null||e===""?void 0:e,Ii=(e,t,a)=>Ai("same",Ae(e),Ae(t),Ae(a),Ci);function Qt(e,t,a,n=e[t]){return Ii(n,e[Oe(t,"tablet")],e[Oe(t,"phone")])[a]}import{createContext as qo,createElement as ja,useContext as ie}from"react";import{jsx as v}from"react/jsx-runtime";import{createContext as je,useContext as m}from"react";import{jsx as P,Fragment as Ia}from"react/jsx-runtime";import{createContext as Co,useContext as Na,useEffect as yo,useRef as Ao,useState as Oo}from"react";import{SCROLL_ZOOM_VAR as Aa}from"efficient-shell/format";import{readEntrance as Li}from"efficient-shell/format";var B={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},Ne="sectionAnimation",Ni=Jt(Object.values(B));var ea="sf-entrance",Ri=e=>e!=null&&e!=="";function Hi(e,t){let a=e[B[t]];return t==="kind"&&!Ri(a)?e[Ne]:a}var J=(e,t,a)=>Qt(e,B[t],a,Hi(e,t));function Le(e,t){return Li(J(e,"kind",t),J(e,"from",t),J(e,"duration",t),J(e,"delay",t))}var Pi=e=>({desktop:Le(e,"desktop"),tablet:Le(e,"tablet"),phone:Le(e,"phone")});function lc(e){let t=Pi(e);return Ie.every(a=>t[a].kind==="none")?null:t}var Mi={...Object.fromEntries([...Zt].map(e=>[e,"a root position: sticky bar; an outer box becomes its sticky containing block and the pin collapses (the same fact every wrapper pass excludes it for, lib/content/section-surface)"])),HeroSlide:"a slide is a direct child of the Hero's transform track ([&>*]:basis-full); a wrapper would take its width, and the Hero already moves one slide in at a time",HeroGroup:"a slide box is placed by grid-item properties on its own root (--sf-hg-row, justify-self); a wrapper becomes the grid item and the box loses its anchor (lib/document/blocks/general/HeroGroup/meta)"},cc=new Set(Object.keys(Mi));function ta(e,t,a,n){return t<=0?1/0:n?2*(e-4)/(t+a):2*(e-a/2-4)/t}function aa(e,t,a){let n=l=>l.width>0&&l.height>0;if(!n(e)||t.some(l=>l.mark&&!n(l.rect)))return 1;let s=e.left+e.width/2,i=e.top+e.height/2,o=a;for(let{rect:l,mark:c}of t){let h=Math.abs(l.left+l.width/2-s),w=Math.abs(l.top+l.height/2-i),u=Math.max(ta(h,e.width,l.width,c),ta(w,e.height,l.height,c));o=Math.min(o,Math.max(1,u))}return o}var Re="rowImageField",Di="boxOutsideCopy",Gi={all:[{field:Re,set:!0},{not:{context:Di,is:!0}}]},uc={any:[{field:"bgImage",set:!0},Gi]},na="boxInCopy",Fi={any:[{not:{field:Re,set:!0}},{not:{context:na,is:!0}}]},fc={all:[{not:{field:"bgImage",set:!0}},Fi]},sa={all:[{not:{context:"parent.bgImage",set:!0}},{any:[{not:{context:`parent.${Re}`,set:!0}},{not:{context:na,is:!0}}]}]};function He(e,t,a){return e.some(n=>(typeof n=="object"?n.value:n)===a)?a:t}var Bi="small",$i="dot",Ui=[{label:"Small",value:"small"},{label:"Display",value:"display"}],Pe=[{label:"Dot \u25CF",value:"dot"},{label:"Cross \u2715",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle \u25BC",value:"triangle"},{label:"None",value:"none"}],ia={dot:"\u25CF",cross:"\u2715",slash:"/",triangle:"\u25BC",none:""},Wi={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-view-wide:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-view-wide:text-[length:var(--size-headingMedium,28px)]"},Vi={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function gc(e){return He(Ui,Bi,e)}function oa(e){return He(Pe,$i,e)}function vc(e){return Wi[e]}function ra(e,t){return Vi[e][t]}var xc=[{value:"none"},{value:"dot"},{value:"cross"},{value:"slash"},{value:"triangle"}];function la(e){return Pe.some(t=>t.value===e)?oa(e):void 0}var Yi="overflow-x-clip [&>*]:shrink-0 [&>[data-sf-box-items]>*]:shrink-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content] [&>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>[data-sf-box-items]>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>*_:is(.sf-button-block>div)]:font-mono [&>[data-sf-box-items]>*_:is(.sf-button-block>div)]:font-mono [&>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>[data-sf-box-items]>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>[data-sf-box-items]>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)]";function S(e,t){return e==="row"&&la(t)!==void 0}function Ec(e,t){return S(e,t)?Yi:""}var ji="[&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:inline-flex [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:items-center [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:align-top [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:h-[calc(1lh/var(--sf-sep-k,1))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:ml-[var(--sf-gap-len,0px)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:after:ml-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-accent [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-[var(--sf-sep-mark)] [&>[data-sf-box-items]:last-child>*:not(:last-child)_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-none";function Sc(e,t){return S(e,t)?ji:""}function Tc(e,t){if(!S(e,t))return{};let a=la(t),n=/^text-\[([\d.]+)em\]$/.exec(ra("small",a))?.[1],s=ia[a];return{"--sf-sep-mark":s===""?"none":JSON.stringify(s),...n?{"--sf-sep-k":n}:{}}}var Oc={sectionPaddingTop:0,sectionPaddingBottom:0},$={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},U={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function Ic(e,t){let a=typeof e=="string"&&e in $?$[e]:"",n=typeof t=="string"&&t in U?U[t]:"";return[a,n].filter(Boolean).join(" ")}function Xi(e){return e===!0||e==="wrap"?"flex-wrap":""}var zi={start:"view-wide:max-view-desktop:justify-start!",center:"view-wide:max-view-desktop:justify-center!",between:"view-wide:max-view-desktop:justify-between!",end:"view-wide:max-view-desktop:justify-end!"},Ki={start:"max-view-wide:justify-start",center:"max-view-wide:justify-center",between:"max-view-wide:justify-between",end:"max-view-wide:justify-end"},qi={start:"view-wide:max-view-desktop:items-start!",center:"view-wide:max-view-desktop:items-center!",end:"view-wide:max-view-desktop:items-end!",stretch:"view-wide:max-view-desktop:items-stretch!"},Zi={start:"max-view-wide:items-start",center:"max-view-wide:items-center",end:"max-view-wide:items-end",stretch:"max-view-wide:items-stretch"},Ji={wrap:"view-wide:max-view-desktop:flex-wrap!",nowrap:"view-wide:max-view-desktop:flex-nowrap!"};function C(e,t){return typeof t=="string"&&Object.prototype.hasOwnProperty.call(e,t)?t:void 0}function De(e,t,a){let n=zt("same",e,t,a),s={};return n.tablet!==void 0&&n.tablet!==e&&(s.tablet=n.tablet),n.phone!==void 0&&n.phone!==e&&(s.phone=n.phone),s}function Ge(e,t,a){return[e.tablet?t[e.tablet]:"",e.phone?a[e.phone]:""].filter(Boolean).join(" ")}function Qi(e,t,a){return De(C($,e)??"start",C($,t),C($,a))}function Nc(e,t,a){return Ge(Qi(e,t,a),zi,Ki)}function Lc(e,t,a){let n=C(U,e)??"stretch";if(n==="stretch")return"";let s=De(n,C(U,t),C(U,a));return Ge(s,qi,Zi)}function Me(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function Rc(e,t){let a=Xi(e)===""?"nowrap":"wrap",n=Me(t);return n&&n!==a?Ji[n]:""}var Hc="Block widths",ua=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],eo="data-sf-box-items",Pc=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${eo}\\][^\\s"'\`]*`,"g");var Mc=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function Dc(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in Q?"custom":"content"}var fa=4,ca=10;function to(e,t){if(!Number.isInteger(t)||t<2||t>fa||e.length!==t-1||!e.every(s=>typeof s=="number"&&Number.isFinite(s)))return;let a=[],n=0;return e.forEach((s,i)=>{let o=100-n-ca*(t-1-i),l=Math.min(o,Math.max(ca,Math.round(s)));a.push(l),n+=l}),a}function da(e,t,a){if(!Array.isArray(t))return;let n=to(t,a),s=n?[...n,100-n.reduce((o,l)=>o+l,0)]:[],i={};for(let o=0;o<fa;o+=1)i[`--${e}-${o+1}`]=s[o]??1;return i}function Gc(e,t,a){let n=da("sf-share",e,a),s=da("sf-share-tablet",t,a);return n||s?{...n,...s}:void 0}function ao(e,t){let a=Array.from({length:t},()=>1),n=ua.find(o=>o.value===e);if(!n?.weights||t<1)return a;let[s,i]=n.weights;return s>1&&(a[0]=s),i>1&&(a[t-1]=i),a}function Fc(e,t){if(typeof e!="string"||!(e in Q)||e==="equal")return e;let a=ao(e,t),n=a.reduce((s,i)=>s+i,0);return a.slice(0,-1).map(s=>Math.round(s/n*100))}var T="[&>*]:min-w-0 [&>[data-sf-box-items]>*]:min-w-0 [&>*]:flex-1 [&>[data-sf-box-items]>*]:flex-1 [&>*]:basis-0 [&>[data-sf-box-items]>*]:basis-0",Q={equal:T,bigLeft:`${T} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${T} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${T} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${T} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${T} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`},no=`${T} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>[data-sf-box-items]>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>[data-sf-box-items]>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>[data-sf-box-items]>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)] [&>[data-sf-box-items]>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function so(e){return Array.isArray(e)?no:typeof e=="string"?Q[e]??"":""}var ma={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},sa,{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(Q)}]}]}]},wa="view-wide:max-view-desktop:flex-row!",k=`${wa} [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-0!`,pa={content:`${wa} [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]!`,equal:k,bigLeft:`${k} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,bigRight:`${k} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,biggerLeft:`${k} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,biggerRight:`${k} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,twoThree:`${k} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`},io=`${k} [&>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function oo(e){return Array.isArray(e)||typeof e=="string"&&e in pa?e:null}function Bc(e){if(e.direction!=="row"||S(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||ga(e.columns)!==""||va(e.columnsTablet)!=="")return"";let t=oo(e.shareTablet);return t===null?"":typeof t=="string"?pa[t]:io}var ro="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function $c(e){return so(e)===""?ro:""}var Uc="Columns",Wc=1,Vc=3,Fe={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},Yc=ua.filter(e=>e.value==="content"||e.value==="equal"),jc="equal",Xc=1,zc=6,R="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>[data-sf-box-items]>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0! [&>[data-sf-box-items]>*]:view-wide:grow-0!",lo={1:`${R} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${R} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${R} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${R} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${R} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${R} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function ga(e){return typeof e=="number"?lo[e]??"":""}var co={1:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]!",2:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function va(e){return typeof e=="number"?co[e]??"":""}function Kc(e){return e.direction!=="row"||S(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":va(e.columnsTablet)}function qc(e){return e.direction!=="row"||S(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":ga(e.columns)}var ba={2:"view-wide:grid view-wide:grid-cols-2",3:"view-wide:grid view-wide:grid-cols-3",4:"view-wide:grid view-wide:grid-cols-4",5:"view-wide:grid view-wide:grid-cols-5",6:"view-wide:grid view-wide:grid-cols-6"},_a={2:"max-view-wide:grid max-view-wide:grid-cols-2",3:"max-view-wide:grid max-view-wide:grid-cols-3"},Zc=Object.keys(ba).map(Number),Jc=Object.keys(_a).map(Number);function Qc(e,t,a=!1){let n=typeof e=="number"?ba[e]??"":"",s=_a[Number(t)]??"";return!n&&!s?"":[n,s,a?"gap-y-0!":""].filter(Boolean).join(" ")}var ho="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]",uo={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},fo="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]";function mo(e,t){return(Me(e)??Me(t)??"wrap")==="nowrap"}function ed(e,t,a,n){let s=Fe[Number(e)];if(!s)return"max-view-wide:flex-col";let i=mo(a,n);return xa(e,t)?i?fo:ho:i?uo[Number(e)]:s}function td(e,t){return Number(e)in Fe&&!xa(e,t)}function xa(e,t){return Number(e)in Fe&&t==="content"}var ad="Block spacing",nd=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],wo="sf-box-gap-only";function sd(e){return e==="gap"?wo:""}var ha={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},po={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function id(e,t,a){let n=i=>C(ha,i),s=De(e==="gap"?"gap":"each",n(t),n(a));return Ge(s,ha,po)}var Ea=["cover","contain"],go={cover:"Cover",contain:"Contain"},rd="Image fit";function Be(e,t){return Ea.includes(e)?e:t}function ld(){return Ea.map(e=>({label:go[e],value:e}))}function cd(e){return e==="contain"?"object-contain":"object-cover"}function $e(e,t){return e!=="auto"&&t==="cover"}function ee(e){return`color-mix(in srgb, var(--overlay-scrim) ${Math.round(Math.min(1,Math.max(0,e))*1e3)/10}%, transparent)`}function fd(e){switch(e){case"tall":return"aspect-[3/4]";case"wide":return"aspect-[2/1]";case"landscape":return"aspect-[4/3]";case"screen":return"aspect-[16/10]";case"portrait":return"aspect-[4/5]";case"video":return"aspect-[16/9]";case"panorama":return"aspect-[21/9]";case"story":return"aspect-[9/16]";case"poster":return"aspect-[2/3]";case"auto":return"";default:return"aspect-square"}}var te=[{shape:"auto",image:"auto",ratio:null,label:"Auto"},{shape:"story",image:"9/16",ratio:[9,16],label:"Story 9:16"},{shape:"poster",image:"2/3",ratio:[2,3],label:"Poster 2:3"},{shape:"tall",image:"3/4",ratio:[3,4],label:"Tall 3:4"},{shape:"portrait",image:"4/5",ratio:[4,5],label:"Portrait 4:5"},{shape:"square",image:"1/1",ratio:[1,1],label:"Square 1:1"},{shape:"landscape",image:"4/3",ratio:[4,3],label:"Landscape 4:3"},{shape:"screen",image:"16/10",ratio:[16,10],label:"Screen 16:10"},{shape:"video",image:"16/9",ratio:[16,9],label:"Video 16:9"},{shape:"wide",image:"2/1",ratio:[2,1],label:"Wide 2:1"},{shape:"panorama",image:"21/9",ratio:[21,9],label:"Panorama 21:9"}];function md(e){return te.filter(t=>e.includes(t.shape))}function wd(e){return e==="below"}var pd=`linear-gradient(180deg, transparent 40%, ${ee(.85)} 100%)`,gd=`linear-gradient(0deg, transparent 40%, ${ee(.85)} 100%)`,vd=ee(.45);var vo=te.map(e=>e.image),g="fill",Sd={label:"Fill row",value:g,showWhen:ma},Ue="4/3",Sa={frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},ka={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:Sa,tablet:Sa,desktop:{frame:"view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]",img:"view-desktop:absolute view-desktop:inset-0",figure:"view-desktop:h-full"}};function Td(e,t,a){return t&&!H(a)?"all":e??"wide"}function Ta(e){return ka[e]}var kd=ka.all;function Ca(e){return e?`${e.img} h-full w-full`:"relative h-full w-full"}var bo={auto:"","3/4":"aspect-[3/4]","2/1":"aspect-[2/1]","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","16/10":"aspect-[16/10]","1/1":"aspect-square","9/16":"aspect-[9/16]","2/3":"aspect-[2/3]","4/5":"aspect-[4/5]"},_o={auto:"","3/4":"view-wide:aspect-[3/4]","2/1":"view-wide:aspect-[2/1]","21/9":"view-wide:aspect-[21/9]","16/9":"view-wide:aspect-[16/9]","4/3":"view-wide:aspect-[4/3]","16/10":"view-wide:aspect-[16/10]","1/1":"view-wide:aspect-square","9/16":"view-wide:aspect-[9/16]","2/3":"view-wide:aspect-[2/3]","4/5":"view-wide:aspect-[4/5]"},xo={auto:"","3/4":"max-view-wide:aspect-[3/4]","2/1":"max-view-wide:aspect-[2/1]","21/9":"max-view-wide:aspect-[21/9]","16/9":"max-view-wide:aspect-[16/9]","4/3":"max-view-wide:aspect-[4/3]","16/10":"max-view-wide:aspect-[16/10]","1/1":"max-view-wide:aspect-square","9/16":"max-view-wide:aspect-[9/16]","2/3":"max-view-wide:aspect-[2/3]","4/5":"max-view-wide:aspect-[4/5]"},Eo={auto:"max-view-wide:aspect-auto!","3/4":"max-view-wide:aspect-[3/4]!","2/1":"max-view-wide:aspect-[2/1]!","21/9":"max-view-wide:aspect-[21/9]!","16/9":"max-view-wide:aspect-[16/9]!","4/3":"","16/10":"max-view-wide:aspect-[16/10]!","1/1":"max-view-wide:aspect-square!","9/16":"max-view-wide:aspect-[9/16]!","2/3":"max-view-wide:aspect-[2/3]!","4/5":"max-view-wide:aspect-[4/5]!"},We=e=>vo.includes(e),H=We;function Cd(e){let t=We(e)?te.find(a=>a.image===e)?.ratio:null;return t?`${t[0]} / ${t[1]}`:null}function yd(e,t,a){return a==="contain"?!0:[e,t??e].every(n=>n!==g&&(!We(n)||n==="auto"))}function Ad(e,t){return e===g&&!t?Ue:e}function Od(e){return e===g?Ue:H(e)?e:void 0}function ya(e,t){return H(t)?t===e?null:t:e===g?Ue:null}function So(e,t){let a=ya(e,t);return $e(e,"cover")||a!==null&&$e(a,"cover")}function To(e,t,a){return Be(e,"cover")==="cover"&&So(t,a)}function Id(e,t,a,n){return e==="desktop"?To(t,a,n):Be(t,"cover")!=="cover"?!1:ko(e==="tablet"?a:ya(a,n)??a)}var ko=e=>e===g||H(e)&&e!=="auto";function Nd(e,t,a="wide"){return e===g&&a==="all"?Ta("all").frame:t===null?H(e)?bo[e]:"":[e===g?Ta(a).frame:H(e)?_o[e]:"",e===g&&a==="desktop"?Eo[t]:xo[t]].filter(Boolean).join(" ")}var ne=Co(null);function Fd({attrs:e,style:t,children:a}){return P(ne.Provider,{value:{attrs:e,style:t},children:a})}function La({children:e}){return P(ne.Provider,{value:null,children:e})}function Bd({fill:e=null,children:t}){let a=Na(ne);return a?P("div",{className:Ca(e),...a.attrs,style:a.style,children:t}):P(Ia,{children:t})}var ae="data-sf-mark";function Oa(e){let t=e.getBoundingClientRect(),a=e.firstElementChild,n=a&&typeof a.offsetWidth=="number"?a:e,s=Math.max(n.offsetWidth,e.offsetWidth),i=Math.max(n.offsetHeight,e.offsetHeight);return{left:t.left+t.width/2-s/2,top:t.top+t.height/2-i/2,width:s,height:i}}function Io(e){return e.closest(`[${ae}]`)||e.closest("style, script")?!1:[...e.childNodes].some(t=>t.nodeType===3&&(t.textContent??"").trim()!=="")}var Ra=e=>e.closest(`.${ea}`)??e.ownerDocument.body;function No(e,t){let a=Ra(e),n=[];for(let s of a.querySelectorAll(`[${ae}]`))s!==e&&n.push({rect:Oa(s),mark:!0});for(let s of a.querySelectorAll("*")){if(s.contains(e)||!Io(s))continue;let i=s.getBoundingClientRect();i.width===0||i.height===0||n.push({rect:{left:i.left,top:i.top,width:i.width,height:i.height},mark:!1})}return aa(Oa(e),n,t)}function $d({inCell:e=!1,children:t}){let a=Na(ne),n=Ao(null),[s,i]=Oo(null),o=a?Number.parseFloat(String(a.style[Aa])):Number.NaN;if(yo(()=>{let c=n.current;if(!c||!Number.isFinite(o))return;let h=()=>i(No(c,o));h();let w=c.ownerDocument.defaultView?.ResizeObserver;if(!w)return;let u=new w(h),_=Ra(c);u.observe(c),u.observe(_);for(let p of _.querySelectorAll(`[${ae}]`))p!==c&&u.observe(p);return()=>u.disconnect()},[o]),!a)return P(Ia,{children:t});let l=Number.isFinite(o)?{...a.style,[Aa]:String(s??1)}:a.style;return P("span",{ref:n,className:e?"inline-flex min-w-0 max-w-full items-center justify-center":"inline-flex items-center justify-center",[ae]:"",...a.attrs,style:l,children:t})}import{LENGTH_UNITS as Lo}from"efficient-easel/screen/lib/content/length-units";var Ro=["auto","fixed","screen"],Ho=Lo.filter(e=>e==="px"||e==="%"),Po="svh",Mo="vh",Do="var(--sf-header-h, 88px)",Go={min:40,max:2e3,step:10,fallback:600},Fo={min:10,max:200,step:5,fallback:100},Bo="sf-section-minh",se="grid-cols-[minmax(0,1fr)]",Ha={base:"--sf-section-minh",small:"--sf-section-minh-s"},Ve=e=>typeof e=="string"&&Ro.includes(e),$o=e=>typeof e=="string"&&Ho.includes(e);function Da(e){let t=Ve(e.sectionHeightMode)?e.sectionHeightMode:"auto",a=t==="screen"?"%":$o(e.sectionHeightUnit)?e.sectionHeightUnit:"px",n=t==="screen"?Fo.fallback:Go.fallback,s=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:n;return{mode:t,value:s,unit:a}}function Ga(e){let{mode:t,value:a,unit:n}=Da(e);if(t==="auto")return;if(t==="fixed"&&n==="px")return[`${a}px`,null];let s=a/100,i=o=>t==="screen"?`(100${o} - ${Do})`:`100${o}`;return[`calc(${i(Mo)} * ${s})`,`calc(${i(Po)} * ${s})`]}function Fa(e){let t=Ga(e);if(!t)return;let[a,n]=t;return{display:"grid",[Ha.base]:a,...n?{[Ha.small]:n}:{}}}var Vd=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),Yd="Height",Ba="sf-section-minh-phone",Pa={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function Uo(e){return Ve(e.sectionHeightModePhone)}var $a="sf-section-minh-tablet",Ma={base:"--sf-section-minh-t",small:"--sf-section-minh-ts"};function Wo(e){return Ve(e.sectionHeightModeTablet)}function jd(e){return Da({sectionHeightMode:e.sectionHeightModeTablet,sectionHeightValue:e.sectionHeightValueTablet,sectionHeightUnit:e.sectionHeightUnitTablet})}function Ua(e){let t=Fa(e),a=(l,c,h)=>Ga({sectionHeightMode:l,sectionHeightValue:c,sectionHeightUnit:h})??(t?["auto",null]:void 0),n=Wo(e)?a(e.sectionHeightModeTablet,e.sectionHeightValueTablet,e.sectionHeightUnitTablet):void 0,s=Uo(e)?a(e.sectionHeightModePhone,e.sectionHeightValuePhone,e.sectionHeightUnitPhone):n;if(!t&&!n&&!s)return null;let i=[Bo,se],o={...t??{}};return n&&(i.push($a),o[Ma.base]=n[0],n[1]&&(o[Ma.small]=n[1])),s&&(i.push(Ba),o[Pa.base]=s[0],s[1]&&(o[Pa.small]=s[1])),{className:i.join(" "),style:o}}function Xd(e){return Ua(e)!==null}var Vo=`grid ${se}`,Wa="h-full",Yo="view-tablet:max-view-desktop:grid",Va="max-view-tablet:grid",jo=`${Va} ${se}`;function zd(e){let t=Ua(e);if(!t)return"";if(Fa(e))return Vo;let a=t.className.split(" ");if(!a.includes($a))return jo;let n=a.includes(Ba);return[Yo,n?Va:"",se].filter(Boolean).join(" ")}var Ya={stretchedRow:!1,fillingColumn:!1},f=je(null),th=()=>m(f)!==null,ah=()=>m(f),nh=()=>m(f)?.id??null,M=je(!1);function Xo(){let e=m(f)?.stretchedRow===!0,t=m(M);return e&&!t}var zo=()=>m(M);function Ko(){let e=m(f),t=Xo(),a=zo();return{fill:a?` ${Wa}`:"",inner:n=>{let s=t||a?v(M.Provider,{value:!0,children:n}):n;return e?.columnsRow?v(f.Provider,{value:{...e,columnsRow:!1},children:s}):s}}}function sh({className:e,style:t,attrs:a,children:n}){let{fill:s,inner:i}=Ko(),o=Xe();return o.scope(v("div",{className:ze(`${e}${s}`,o.className),...t?{style:t}:{},...a,...o.attrs,children:i(n)}))}var Ye=je(!1);function ih({children:e}){return v(Ye.Provider,{value:!0,children:v(M.Provider,{value:!0,children:e})})}function oh({children:e,ownPictures:t=!1}){let a=m(f),n=m(Ye),s=m(M),i=n&&s,o=a===null?null:a.id===void 0?Ya:{...Ya,id:a.id};return v(f.Provider,{value:o,children:v(Ye.Provider,{value:!1,children:v(M.Provider,{value:i,children:t?e:v(La,{children:e})})})})}var Ke=qo(null),Zo="data-sf-view-hide",Xa=e=>ja(Ke.Provider,{value:null},e),za={className:"",attrs:{},scope:Xa},Jo=za,dh=(e,t,a={})=>e?{className:e,words:t,...a}:null,Ka=(e,t)=>e.sectionClassName===void 0?{className:e.className,words:e.words}:e.line==="edge"||e.line!=="section"&&t?{className:e.className,words:`${e.words} edge`}:{className:e.sectionClassName,words:e.words};function Xe(){let e=ie(Ke),t=ie(f)!==null;if(e===null)return Jo;let a=Ka(e,t);return{className:a.className,attrs:{[Zo]:a.words},scope:Xa}}function hh(){let e=ie(Ke),t=ie(f)!==null;return e===null?"":Ka(e,t).className}var ze=(e,t)=>t?e?`${e} ${t}`:t:e;function uh(e){let t=Xe(),a=e.takes===!1?za:t,n={},s=!1;for(let[i,o]of Object.entries(e))i==="as"||i==="takes"||i==="children"||(i==="className"?(n.className=ze(o,a.className),s=!0):n[i]=o);return!s&&a.className&&(n.className=a.className),a.scope(ja(e.as??"div",{...n,...a.attrs},e.children))}var mh={small:54,medium:66,large:84},Qo=44,wh=16,ph=140,gh=Qo*4;import{forwardRef as er}from"react";import{imageCopyUrl as qa,imageSrcSet as Za}from"efficient-shell/image-copies";import{jsx as nr}from"react/jsx-runtime";var tr={position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,color:"transparent"};function Ja(e,t,a){if(a){let n=Za(e);return n?{src:qa(e,1280),srcSet:n,sizes:a}:{src:e,sizes:a}}if(t&&t>0){let n=Za(e,{maxWidth:t*3});return n?{src:qa(e,t*2),srcSet:n,sizes:`${t}px`}:{src:e}}return{src:e}}var ar=er(function({src:t,width:a,height:n,fill:s,priority:i,loading:o,style:l,quality:c,placeholder:h,blurDataURL:w,unoptimized:u,loader:_,overrideSrc:p,sizes:x,...W},oe){let V=p??(typeof t=="string"?t:t.src),re=Ja(V,s?void 0:Number(a)||void 0,x??(s?"100vw":void 0));return nr("img",{ref:oe,...re,width:s?void 0:a,height:s?void 0:n,loading:i?"eager":o??"lazy",fetchPriority:i?"high":void 0,decoding:"async",style:s?{...tr,...l}:{color:"transparent",...l},...W})}),xh=ar;function Eh(e){let t=e.overrideSrc??(typeof e.src=="string"?e.src:e.src.src),a=e.fill?void 0:Number(e.width)||void 0;return{props:Ja(t,a,e.sizes??(e.fill?"100vw":void 0))}}export{Dt as a,Zr as b,Te as c,Jr as d,Qr as e,el as f,tl as g,Ps as h,E as i,Ms as j,sl as k,Re as l,Di as m,uc as n,na as o,fc as p,He as q,Bi as r,$i as s,Ui as t,ia as u,gc as v,oa as w,vc as x,ra as y,xc as z,la as A,S as B,Ec as C,Sc as D,Tc as E,di as F,jt as G,Gl as H,wi as I,zt as J,Oc as K,U as L,Ic as M,Xi as N,Qi as O,Nc as P,Lc as Q,Me as R,Rc as S,Hc as T,eo as U,Mc as V,Dc as W,Gc as X,Fc as Y,so as Z,oo as _,Bc as $,$c as aa,Uc as ba,Wc as ca,Vc as da,Yc as ea,jc as fa,Xc as ga,zc as ha,ga as ia,va as ja,Kc as ka,qc as la,Zc as ma,Jc as na,Qc as oa,mo as pa,ed as qa,td as ra,xa as sa,ad as ta,nd as ua,wo as va,sd as wa,id as xa,hr as ya,fr as za,mr as Aa,wr as Ba,pr as Ca,pe as Da,ge as Ea,gr as Fa,y as Ga,Zn as Ha,St as Ia,vr as Ja,br as Ka,O as La,A as Ma,ts as Na,_r as Oa,xr as Pa,K as Qa,Tt as Ra,Er as Sa,Sr as Ta,Tr as Ua,be as Va,kr as Wa,kt as Xa,rs as Ya,Cr as Za,yr as _a,Ar as $a,cs as ab,Or as bb,Ir as cb,Nr as db,Lr as eb,Rr as fb,Hr as gb,_e as hb,ps as ib,Pr as jb,Mr as kb,xe as lb,bs as mb,Dr as nb,Ee as ob,_s as pb,Gr as qb,Fr as rb,xs as sb,Es as tb,Lt as ub,q as vb,ks as wb,Cs as xb,ys as yb,Rt as zb,As as Ab,Ht as Bb,Ur as Cb,Wr as Db,Vr as Eb,Yr as Fb,G as Gb,Pt as Hb,jr as Ib,Xr as Jb,Se as Kb,Mt as Lb,zr as Mb,Kr as Nb,ye as Ob,gi as Pb,bi as Qb,Yl as Rb,qt as Sb,zl as Tb,Zt as Ub,Kl as Vb,Si as Wb,Ti as Xb,ql as Yb,ki as Zb,Zl as _b,Ie as $b,Oe as ac,Jt as bc,Ii as cc,Qt as dc,B as ec,Ne as fc,Ni as gc,ea as hc,Le as ic,Pi as jc,lc as kc,cc as lc,go as mc,rd as nc,Be as oc,ld as pc,cd as qc,Z as rc,$t as sc,Bt as tc,Ys as uc,js as vc,Xs as wc,vl as xc,zs as yc,bl as zc,F as Ac,_l as Bc,xl as Cc,El as Dc,qs as Ec,Wt as Fc,Sl as Gc,Tl as Hc,Js as Ic,kl as Jc,ee as Kc,fd as Lc,te as Mc,md as Nc,wd as Oc,g as Pc,Sd as Qc,Td as Rc,Ta as Sc,kd as Tc,Ca as Uc,Cd as Vc,yd as Wc,Ad as Xc,Od as Yc,ya as Zc,So as _c,To as $c,Id as ad,Nd as bd,Fd as cd,La as dd,Bd as ed,$d as fd,Go as gd,Fo as hd,se as id,Da as jd,Vd as kd,Yd as ld,Uo as md,Wo as nd,jd as od,Ua as pd,Xd as qd,Wa as rd,zd as sd,f as td,th as ud,ah as vd,nh as wd,M as xd,Xo as yd,zo as zd,Ko as Ad,sh as Bd,ih as Cd,oh as Dd,Ke as Ed,za as Fd,dh as Gd,Xe as Hd,hh as Id,ze as Jd,uh as Kd,mh as Ld,Qo as Md,wh as Nd,ph as Od,gh as Pd,xh as Qd,Eh as Rd,Al as Sd,vt as Td,lr as Ud,hl as Vd,Us as Wd,ul as Xd,fl as Yd,ml as Zd,wl as _d,ii as $d,Nl as ae,Yt as be,oi as ce,ri as de,Rl as ee,Hl as fe,Pl as ge};