efficient-storefront-blocks 0.135.1 → 0.136.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 (28) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-FKPYCXCD.js → CustomHtmlCodeWindow-I3KVLIVV.js} +1 -1
  3. package/dist/chunks/{EditorPreviewCheckout-FVJV7XRD.js → EditorPreviewCheckout-F34WZNJI.js} +1 -1
  4. package/dist/chunks/SiteEditorProvider-FYEVPZKT.js +1 -0
  5. package/dist/chunks/{chunk-RDWFRHEV.js → chunk-6AODAOZ5.js} +2 -2
  6. package/dist/chunks/{chunk-VLFGNHX5.js → chunk-HRFAKD3V.js} +1 -1
  7. package/dist/chunks/{chunk-XMX3KEE4.js → chunk-IONUM72D.js} +1 -1
  8. package/dist/chunks/{chunk-ESXERZQ3.js → chunk-NMX2Y4EJ.js} +1 -1
  9. package/dist/chunks/{chunk-75GXE5JB.js → chunk-P34EYTSF.js} +1 -1
  10. package/dist/chunks/{chunk-VBCLGIPA.js → chunk-R4EFOLOT.js} +1 -1
  11. package/dist/chunks/{chunk-S63MCVEE.js → chunk-WWLYHXN4.js} +1 -1
  12. package/dist/chunks/{chunk-Y3CRPIPD.js → chunk-Y7YKT7VT.js} +1 -1
  13. package/dist/chunks/{fitment-data-UPS55DR5.js → fitment-data-VXH4D2UD.js} +1 -1
  14. package/dist/chunks/{section-css-style-VSIE7KKW.js → section-css-style-GUVXWUWX.js} +1 -1
  15. package/dist/index.js +23 -23
  16. package/dist/render/built-with.json +1 -1
  17. package/dist/render/components/ProductHeroPanel.js +1 -1
  18. package/dist/render/components/product-hero/CarPickerRow.d.ts +2 -0
  19. package/dist/render/components/product-hero/CarPickerRow.js +1 -1
  20. package/dist/routine-index.json +1 -1
  21. package/dist/value-index.json +1 -1
  22. package/package.json +2 -2
  23. package/dist/chunks/SiteEditorProvider-QDGGCHUC.js +0 -1
  24. /package/dist/chunks/{chunk-RDWFRHEV.js.LEGAL.txt → chunk-6AODAOZ5.js.LEGAL.txt} +0 -0
  25. /package/dist/chunks/{chunk-GAND7LXQ.js → chunk-BA5HNYFW.js} +0 -0
  26. /package/dist/chunks/{chunk-RNSKQVLG.js → chunk-ERLKLMUX.js} +0 -0
  27. /package/dist/chunks/{chunk-62AOYUOH.js → chunk-PPCAEV32.js} +0 -0
  28. /package/dist/chunks/{chunk-S63MCVEE.js.LEGAL.txt → chunk-WWLYHXN4.js.LEGAL.txt} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.136.0 — 2026-12-01 — Build against web-builder 79.1.0
4
+
5
+ **For hosts:** the `efficient-web-builder` peer range moves from `^79.0.0`
6
+ to `^79.1.0` (the Hero On scroll wipe follows the scroll). Install
7
+ web-builder 79.1.0 or newer next to this release, then re-vendor `src/`
8
+ with `node scripts/sync-storefront-blocks.mjs`. No source change.
9
+
10
+ ## 0.135.2 — 2026-12-01 — The one-row car picker says the level still to answer
11
+
12
+ **For hosts:** no peer change. The storefront re-vendors `src/` with
13
+ `node scripts/sync-storefront-blocks.mjs`, then runs `just check`.
14
+
15
+ - **A make alone no longer reads as a picked car**: the Product Hero's one-row
16
+ car picker showed only the picks so far ("MINI") while it asked for the
17
+ model, so the car looked chosen. The closed row now says "MINI · Select
18
+ model" until all four levels are answered.
19
+ - **The Add to cart reminder names the missing level**: it said "Please
20
+ select vehicle fitment first." in mono capitals. It now says "Select your
21
+ MINI's model." (or "Select your car." before a make), in the site's body
22
+ text and the alert colour. Other missing answers read the same way
23
+ ("Select a finish and your car.").
24
+
3
25
  ## 0.135.1 — 2026-11-30 — Gallery wall tiles ask for a picture as wide as their cell
4
26
 
5
27
  - **Gallery tile picture sizes**: in a Gallery wall (a Layout such as Mosaic), each tile's picture now declares its own cell's share of the screen as `sizes` (`wallTileSizes`, read from the builder's cell table, the tail included), in the server's first HTML: a half tile on a phone asks for 50vw, a small Mosaic tile on a computer 25vw. Before, every tile asked for `100vw`, so a half tile on a 390 px phone at 2x took the 828 px file. The image sets tile, the plain tile and its hover photo all follow it. A Gallery with no wall asks what it asked before.
@@ -1,4 +1,4 @@
1
- "use client";import{b as ee,d as te,e as se}from"./chunk-S63MCVEE.js";import{Ie as re,Mk as ce,Pk as de,Vk as me,Wb as oe,g as i,le as ne,ne as I,pe as ae,pl as ue,ql as fe,rl as he,vl as pe,zh as ie}from"./chunk-ESXERZQ3.js";import{d as Z}from"./chunk-XMX3KEE4.js";import{Ci as le,Lf as J,Tg as B,cg as Y,la as X,yb as K}from"./chunk-Y3CRPIPD.js";import"./chunk-GAND7LXQ.js";import"./chunk-RNSKQVLG.js";import"./chunk-Y6SLVHK3.js";import{jsx as n,jsxs as w,Fragment as Ue}from"react/jsx-runtime";import{Suspense as We,useContext as Ve,useEffect as Te,useMemo as _,useRef as Ne,useState as S}from"react";import{AccordionHeading as H,Banner as qe,Button as D,Card as Qe,Dialog as Xe,DropdownMenu as Ke,Segmented as Je,Text as b,buttonClasses as Ye,colorFill as Ze,colorSwatchClasses as et,fitFrameStyle as tt,fitScale as st}from"efficient-shell/ui";import{CodeEditor as ot}from"efficient-shell/code";import{ChevronDownIcon as nt}from"efficient-shell/icons/efficient";import{AlignSeparateIcon as at}from"efficient-easel/icons";import{ScreenDocumentContext as rt}from"efficient-easel/screen/components/ScreenDocumentContext";var ye=".my-part";function ve(e,t,o,s){let a=De(e,t);if(a)return Pe(e,t,o,s,a);let r=je(e,t);return r?Be(e,t,o,s,r):A(e,t,we(s))}function De(e,t){let o=/<style\b[^>]*>/gi;for(let s=o.exec(e);s;s=o.exec(e)){let a=s.index+s[0].length,r=e.toLowerCase().indexOf("</style",a),c=r<0?e.length:r;if(t>=a&&t<=c)return{start:a,end:c,close:r};o.lastIndex=c}return null}function Le(e){return e.replace(/\/\*[\s\S]*?(\*\/|$)/g,t=>" ".repeat(t.length))}function Pe(e,t,o,s,a){let r=Le(e.slice(a.start,a.end)),c=t-a.start,m=r[c-1]===" "&&e.slice(a.start,a.end)[c-1]!==" ",d=0,u="";for(let v=0;v<c;v++){let k=r[v];k==="{"?(d++,u=k):k==="}"?(d=Math.max(0,d-1),u=k):(k===";"||k===":")&&(u=k)}let f=r.slice(r.lastIndexOf(":",c-1)+1,c).trim();if(s.kind==="value"&&d>0&&u===":"&&!m&&(f===""||o>t))return{from:t,to:o,insert:s.value,selectFrom:t,selectTo:t+s.value.length};if(s.kind!=="value"){let v=a.close<0?e.length:e.indexOf(">",a.close)+1;return A(e,v-1,s.kind==="class"?we(s):s.code)}let h=-1;if(d>0)h=ge(r,c,d);else{let v=r.slice(c).search(/[{}]/);v>=0&&r[c+v]==="{"&&(h=ge(r,c+v+1,1))}let p=h<0?t:a.start+h,g=h<0?-1:Fe(r,h),x=g<0?ye:Re(r,g)||ye,$=be(e,g<0?p:a.start+g);return A(e,p,`${$}${x} { ${s.property}: ${s.value}; }`,!0)}function ge(e,t,o){for(let s=t;s<e.length;s++)if(e[s]==="{")o++;else if(e[s]==="}"&&--o===0)return s;return-1}function Fe(e,t){let o=0;for(let s=t;s>=0;s--)if(e[s]==="}")o++;else if(e[s]==="{"&&--o===0)return s;return-1}function Re(e,t){let o=Math.max(e.lastIndexOf("}",t-1),e.lastIndexOf(";",t-1),e.lastIndexOf("{",t-1))+1;return e.slice(o,t).replace(/\s+/g," ").trim()}function je(e,t){let o=e.lastIndexOf("<",t-1);if(o<0||e.lastIndexOf(">",t-1)>o||/[/!?]/.test(e[o+1]??""))return null;let s=e.indexOf(">",t);return s<0?null:{lt:o,gt:s}}function Be(e,t,o,s,a){if(s.kind==="block")return A(e,a.gt,s.code);let r=s.kind==="value"?"style":"class",c=e.slice(a.lt,a.gt),m=new RegExp(`\\s${r}\\s*=\\s*(["'])([\\s\\S]*?)\\1`,"i").exec(c);if(m){let f=a.lt+m.index+m[0].length-1-m[2].length,h=f+m[2].length;if(t>=f&&t<=h){let $=e.slice(f,t);if(s.kind==="value"&&(/:\s*$/.test($)||o>t&&/:[^;]*$/.test($)))return M(t,o,s.value);if(s.kind==="class"&&!(/\S$/.test($)&&/^\S/.test(e.slice(t,h)))){let v=`${/\S$/.test($)?" ":""}${s.className}${/^\S/.test(e.slice(t,h))?" ":""}`;return M(t,t,v)}}let p=m[2].trimEnd(),g=s.kind==="value"?`${p&&!p.endsWith(";")?";":""}${p?" ":""}${s.property}: ${s.value}`:`${p?" ":""}${s.className}`,x=f+p.length;return M(x,x,g)}let d=e[a.gt-1]==="/"?a.gt-1:a.gt,u=s.kind==="value"?` style="${s.property}: ${s.value}"`:` class="${s.className}"`;return M(d,d,u)}function we(e){return e.kind==="block"?e.code:e.kind==="class"?`<p class="${e.className}">Text</p>`:`<div style="${e.property}: ${e.value}">Text</div>`}function M(e,t,o){return{from:e,to:t,insert:o,selectFrom:e,selectTo:e+o.length}}function be(e,t){let o=e.lastIndexOf(`
1
+ "use client";import{b as ee,d as te,e as se}from"./chunk-WWLYHXN4.js";import{Ie as re,Mk as ce,Pk as de,Vk as me,Wb as oe,g as i,le as ne,ne as I,pe as ae,pl as ue,ql as fe,rl as he,vl as pe,zh as ie}from"./chunk-NMX2Y4EJ.js";import{d as Z}from"./chunk-IONUM72D.js";import{Ci as le,Lf as J,Tg as B,cg as Y,la as X,yb as K}from"./chunk-Y7YKT7VT.js";import"./chunk-BA5HNYFW.js";import"./chunk-ERLKLMUX.js";import"./chunk-Y6SLVHK3.js";import{jsx as n,jsxs as w,Fragment as Ue}from"react/jsx-runtime";import{Suspense as We,useContext as Ve,useEffect as Te,useMemo as _,useRef as Ne,useState as S}from"react";import{AccordionHeading as H,Banner as qe,Button as D,Card as Qe,Dialog as Xe,DropdownMenu as Ke,Segmented as Je,Text as b,buttonClasses as Ye,colorFill as Ze,colorSwatchClasses as et,fitFrameStyle as tt,fitScale as st}from"efficient-shell/ui";import{CodeEditor as ot}from"efficient-shell/code";import{ChevronDownIcon as nt}from"efficient-shell/icons/efficient";import{AlignSeparateIcon as at}from"efficient-easel/icons";import{ScreenDocumentContext as rt}from"efficient-easel/screen/components/ScreenDocumentContext";var ye=".my-part";function ve(e,t,o,s){let a=De(e,t);if(a)return Pe(e,t,o,s,a);let r=je(e,t);return r?Be(e,t,o,s,r):A(e,t,we(s))}function De(e,t){let o=/<style\b[^>]*>/gi;for(let s=o.exec(e);s;s=o.exec(e)){let a=s.index+s[0].length,r=e.toLowerCase().indexOf("</style",a),c=r<0?e.length:r;if(t>=a&&t<=c)return{start:a,end:c,close:r};o.lastIndex=c}return null}function Le(e){return e.replace(/\/\*[\s\S]*?(\*\/|$)/g,t=>" ".repeat(t.length))}function Pe(e,t,o,s,a){let r=Le(e.slice(a.start,a.end)),c=t-a.start,m=r[c-1]===" "&&e.slice(a.start,a.end)[c-1]!==" ",d=0,u="";for(let v=0;v<c;v++){let k=r[v];k==="{"?(d++,u=k):k==="}"?(d=Math.max(0,d-1),u=k):(k===";"||k===":")&&(u=k)}let f=r.slice(r.lastIndexOf(":",c-1)+1,c).trim();if(s.kind==="value"&&d>0&&u===":"&&!m&&(f===""||o>t))return{from:t,to:o,insert:s.value,selectFrom:t,selectTo:t+s.value.length};if(s.kind!=="value"){let v=a.close<0?e.length:e.indexOf(">",a.close)+1;return A(e,v-1,s.kind==="class"?we(s):s.code)}let h=-1;if(d>0)h=ge(r,c,d);else{let v=r.slice(c).search(/[{}]/);v>=0&&r[c+v]==="{"&&(h=ge(r,c+v+1,1))}let p=h<0?t:a.start+h,g=h<0?-1:Fe(r,h),x=g<0?ye:Re(r,g)||ye,$=be(e,g<0?p:a.start+g);return A(e,p,`${$}${x} { ${s.property}: ${s.value}; }`,!0)}function ge(e,t,o){for(let s=t;s<e.length;s++)if(e[s]==="{")o++;else if(e[s]==="}"&&--o===0)return s;return-1}function Fe(e,t){let o=0;for(let s=t;s>=0;s--)if(e[s]==="}")o++;else if(e[s]==="{"&&--o===0)return s;return-1}function Re(e,t){let o=Math.max(e.lastIndexOf("}",t-1),e.lastIndexOf(";",t-1),e.lastIndexOf("{",t-1))+1;return e.slice(o,t).replace(/\s+/g," ").trim()}function je(e,t){let o=e.lastIndexOf("<",t-1);if(o<0||e.lastIndexOf(">",t-1)>o||/[/!?]/.test(e[o+1]??""))return null;let s=e.indexOf(">",t);return s<0?null:{lt:o,gt:s}}function Be(e,t,o,s,a){if(s.kind==="block")return A(e,a.gt,s.code);let r=s.kind==="value"?"style":"class",c=e.slice(a.lt,a.gt),m=new RegExp(`\\s${r}\\s*=\\s*(["'])([\\s\\S]*?)\\1`,"i").exec(c);if(m){let f=a.lt+m.index+m[0].length-1-m[2].length,h=f+m[2].length;if(t>=f&&t<=h){let $=e.slice(f,t);if(s.kind==="value"&&(/:\s*$/.test($)||o>t&&/:[^;]*$/.test($)))return M(t,o,s.value);if(s.kind==="class"&&!(/\S$/.test($)&&/^\S/.test(e.slice(t,h)))){let v=`${/\S$/.test($)?" ":""}${s.className}${/^\S/.test(e.slice(t,h))?" ":""}`;return M(t,t,v)}}let p=m[2].trimEnd(),g=s.kind==="value"?`${p&&!p.endsWith(";")?";":""}${p?" ":""}${s.property}: ${s.value}`:`${p?" ":""}${s.className}`,x=f+p.length;return M(x,x,g)}let d=e[a.gt-1]==="/"?a.gt-1:a.gt,u=s.kind==="value"?` style="${s.property}: ${s.value}"`:` class="${s.className}"`;return M(d,d,u)}function we(e){return e.kind==="block"?e.code:e.kind==="class"?`<p class="${e.className}">Text</p>`:`<div style="${e.property}: ${e.value}">Text</div>`}function M(e,t,o){return{from:e,to:t,insert:o,selectFrom:e,selectTo:e+o.length}}function be(e,t){let o=e.lastIndexOf(`
2
2
  `,t-1)+1;return/^[ \t]*/.exec(e.slice(o))[0]}function A(e,t,o,s=!1){let a=e.lastIndexOf(`
3
3
  `,t-1)+1,r=e.indexOf(`
4
4
  `,t);r<0&&(r=e.length);let c=be(e,t),m=s?o:o.split(`
@@ -1,4 +1,4 @@
1
- "use client";import{$a as ne,Aa as bn,Ia as Vr,W as Mt,X as Kt,b as Mr,c as hn,cb as Jr,d as Kr,db as Xr,e as Ft,ib as Zr,jb as pe,kb as Qr,la as Dr,lb as ea,ma as Ur,na as jr,oa as Wr,pa as Yr,qa as $r,qb as ta,ra as Br,rb as xt,sa as be,ua as vt,ub as vn,va as Hr,wa as zr,wb as ae,xa as Dt,ya as Gr}from"./chunk-VLFGNHX5.js";import{S as de,Y as tt,da as K,o as _r,p as Fr}from"./chunk-VBCLGIPA.js";import{fa as Ir,ha as Te}from"./chunk-75GXE5JB.js";import{i as qr,j as bt,k as qe}from"./chunk-62AOYUOH.js";import{Ci as Tr}from"./chunk-Y3CRPIPD.js";import"./chunk-GAND7LXQ.js";import"./chunk-RNSKQVLG.js";import{a as gn,b as Ri}from"./chunk-Y6SLVHK3.js";var oa=gn((sc,aa)=>{"use strict";var Li="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";aa.exports=Li});var la=gn((cc,ca)=>{"use strict";var Ii=oa();function ia(){}function sa(){}sa.resetWarningCache=ia;ca.exports=function(){function e(r,i,s,d,p,m){if(m!==Ii){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:sa,resetWarningCache:ia};return n.PropTypes=n,n}});var da=gn((dc,ua)=>{"use strict";ua.exports=la()();var lc,uc});import{useEffect as Do,useMemo as Fo,useRef as it,useState as He}from"react";import{formatTime as Oi}from"efficient-shell/format";function na(e,t){let n=Fr(t);return!n||Number.isNaN(new Date(e).getTime())?"":Oi(e,{locale:_r(),timeZone:n})}import{rootIsDark as Ai}from"efficient-shell/format";function ra(){if(typeof document>"u")return;let e=getComputedStyle(document.documentElement),t=(r,i)=>e.getPropertyValue(r).trim()||i,n=Ai({whenUnset:!0});return{theme:n?"night":"stripe",variables:{colorPrimary:t("--accent",n?"#c9a461":"#8a6a2a"),colorBackground:t("--site-surface",n?"#131313":"#ffffff"),colorText:t("--fg",n?"#f5f1e8":"#0a0a0a"),borderRadius:"0px"}}}import{userZone as Us,parseOption as js}from"efficient-shell/format";var D=Ri(da(),1);import T from"react";function pa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ti(e){if(Array.isArray(e))return e}function ha(e,t,n){return(t=Di(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qi(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,d,p=[],m=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(m=(r=s.call(n)).done)&&(p.push(r.value),p.length!==t);m=!0);}catch(h){f=!0,i=h}finally{try{if(!m&&n.return!=null&&(d=n.return(),Object(d)!==d))return}finally{if(f)throw i}}return p}}function _i(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ "use client";import{$a as ne,Aa as bn,Ia as Vr,W as Mt,X as Kt,b as Mr,c as hn,cb as Jr,d as Kr,db as Xr,e as Ft,ib as Zr,jb as pe,kb as Qr,la as Dr,lb as ea,ma as Ur,na as jr,oa as Wr,pa as Yr,qa as $r,qb as ta,ra as Br,rb as xt,sa as be,ua as vt,ub as vn,va as Hr,wa as zr,wb as ae,xa as Dt,ya as Gr}from"./chunk-HRFAKD3V.js";import{S as de,Y as tt,da as K,o as _r,p as Fr}from"./chunk-R4EFOLOT.js";import{fa as Ir,ha as Te}from"./chunk-P34EYTSF.js";import{i as qr,j as bt,k as qe}from"./chunk-PPCAEV32.js";import{Ci as Tr}from"./chunk-Y7YKT7VT.js";import"./chunk-BA5HNYFW.js";import"./chunk-ERLKLMUX.js";import{a as gn,b as Ri}from"./chunk-Y6SLVHK3.js";var oa=gn((sc,aa)=>{"use strict";var Li="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";aa.exports=Li});var la=gn((cc,ca)=>{"use strict";var Ii=oa();function ia(){}function sa(){}sa.resetWarningCache=ia;ca.exports=function(){function e(r,i,s,d,p,m){if(m!==Ii){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:sa,resetWarningCache:ia};return n.PropTypes=n,n}});var da=gn((dc,ua)=>{"use strict";ua.exports=la()();var lc,uc});import{useEffect as Do,useMemo as Fo,useRef as it,useState as He}from"react";import{formatTime as Oi}from"efficient-shell/format";function na(e,t){let n=Fr(t);return!n||Number.isNaN(new Date(e).getTime())?"":Oi(e,{locale:_r(),timeZone:n})}import{rootIsDark as Ai}from"efficient-shell/format";function ra(){if(typeof document>"u")return;let e=getComputedStyle(document.documentElement),t=(r,i)=>e.getPropertyValue(r).trim()||i,n=Ai({whenUnset:!0});return{theme:n?"night":"stripe",variables:{colorPrimary:t("--accent",n?"#c9a461":"#8a6a2a"),colorBackground:t("--site-surface",n?"#131313":"#ffffff"),colorText:t("--fg",n?"#f5f1e8":"#0a0a0a"),borderRadius:"0px"}}}import{userZone as Us,parseOption as js}from"efficient-shell/format";var D=Ri(da(),1);import T from"react";function pa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ti(e){if(Array.isArray(e))return e}function ha(e,t,n){return(t=Di(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qi(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,d,p=[],m=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(m=(r=s.call(n)).done)&&(p.push(r.value),p.length!==t);m=!0);}catch(h){f=!0,i=h}finally{try{if(!m&&n.return!=null&&(d=n.return(),Object(d)!==d))return}finally{if(f)throw i}}return p}}function _i(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ma(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ma(Object(n),!0).forEach(function(r){ha(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ma(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fi(e,t){if(e==null)return{};var n,r,i=Mi(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Mi(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ba(e,t){return Ti(e)||qi(e,t)||Ui(e,t)||_i()}function Ki(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Di(e){var t=Ki(e,"string");return typeof t=="symbol"?t:t+""}function xn(e){"@babel/helpers - typeof";return xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xn(e)}function Ui(e,t){if(e){if(typeof e=="string")return pa(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pa(e,t):void 0}}var Z=function(t,n,r){var i=!!r,s=T.useRef(r);T.useEffect(function(){s.current=r},[r]),T.useEffect(function(){if(!i||!t)return function(){};var d=function(){if(s.current)return s.current.apply(s,arguments)};return t.on(n,d),function(){t.off(n,d)}},[i,n,t,s])},kn=function(t){var n=T.useRef(t);return T.useEffect(function(){n.current=t},[t]),n.current},nt=function(t){return t!==null&&xn(t)==="object"},ji=function(t){return nt(t)&&typeof t.then=="function"},Wi=function(t){return nt(t)&&typeof t.elements=="function"&&typeof t.createToken=="function"&&typeof t.createPaymentMethod=="function"&&typeof t.confirmCardPayment=="function"},ya="[object Object]",Yi=function e(t,n){if(t===n)return!0;if(!nt(t)||!nt(n))return t===n;var r=Array.isArray(t),i=Array.isArray(n);if(r!==i)return!1;var s=Object.prototype.toString.call(t)===ya,d=Object.prototype.toString.call(n)===ya;if(s!==d)return!1;if(!s&&!r)return t===n;var p=Object.keys(t),m=Object.keys(n);if(p.length!==m.length)return!1;for(var f={},h=0;h<p.length;h+=1)f[p[h]]=!0;for(var g=0;g<m.length;g+=1)f[m[g]]=!0;var b=Object.keys(f);if(b.length!==p.length)return!1;var x=t,E=n,C=function(G){return e(x[G],E[G])};return b.every(C)},va=function(t,n,r){return nt(t)?Object.keys(t).reduce(function(i,s){var d=!nt(n)||!Yi(t[s],n[s]);return r.includes(s)?(d&&console.warn("Unsupported prop change: options.".concat(s," is not a mutable property.")),i):d?fa(fa({},i||{}),{},ha({},s,t[s])):i},null):null},xa="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",ga=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xa;if(t===null||Wi(t))return t;throw new Error(n)},$i=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xa;if(ji(t))return{tag:"async",stripePromise:Promise.resolve(t).then(function(i){return ga(i,n)})};var r=ga(t,n);return r===null?{tag:"empty"}:{tag:"sync",stripe:r}},Bi=function(t){!t||!t._registerWrapper||!t.registerAppInfo||(t._registerWrapper({name:"react-stripe-js",version:"6.12.0"}),t.registerAppInfo({name:"react-stripe-js",version:"6.12.0",url:"https://stripe.com/docs/stripe-js/react"}))},Ut=T.createContext(null);Ut.displayName="ElementsContext";var ka=function(t,n){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(n," in an <Elements> provider."));return t},Pn=function(t){var n=t.stripe,r=t.options,i=t.children,s=T.useMemo(function(){return $i(n)},[n]),d=T.useState(function(){return{stripe:s.tag==="sync"?s.stripe:null,elements:s.tag==="sync"?s.stripe.elements(r):null}}),p=ba(d,2),m=p[0],f=p[1];T.useEffect(function(){var b=!0,x=function(C){f(function(O){return O.stripe?O:{stripe:C,elements:C.elements(r)}})};return s.tag==="async"&&!m.stripe?s.stripePromise.then(function(E){E&&b&&x(E)}):s.tag==="sync"&&!m.stripe&&x(s.stripe),function(){b=!1}},[s,m,r]);var h=kn(n);T.useEffect(function(){h!==null&&h!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[h,n]);var g=kn(r);return T.useEffect(function(){if(m.elements){var b=va(r,g,["clientSecret","fonts"]);b&&m.elements.update(b)}},[r,g,m.elements]),T.useEffect(function(){Bi(m.stripe)},[m.stripe]),T.createElement(Ut.Provider,{value:m},i)};Pn.propTypes={stripe:D.default.any,options:D.default.object};var Ca=function(t){var n=T.useContext(Ut);return ka(n,t)},Pa=function(){var t=Ca("calls useElements()"),n=t.elements;return n},Hi=function(t){var n=t.children,r=Ca("mounts <ElementsConsumer>");return n(r)};Hi.propTypes={children:D.default.func.isRequired};var zi=T.createContext(null);zi.displayName="CheckoutContext";var Na=T.createContext(null);Na.displayName="CheckoutSdkContext";var Cn=function(t){var n=T.useContext(Na),r=T.useContext(Ut);if(n){if(r)throw new Error("You cannot wrap the part of your app that ".concat(t," in both a checkout provider and <Elements> provider."));return n}else return ka(r,t)},Gi=["mode"],Vi=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},U=function(t,n,r){var i="".concat(Vi(t),"Element"),s=function(f){var h=f.id,g=f.className,b=f.options,x=b===void 0?{}:b,E=f.onBlur,C=f.onFocus,O=f.onReady,G=f.onChange,R=f.onEscape,w=f.onClick,I=f.onLoadError,Q=f.onLoaderStart,ce=f.onNetworksChange,oe=f.onConfirm,ke=f.onCancel,Ne=f.onShippingAddressChange,$=f.onShippingRateChange,ye=f.onSavedPaymentMethodRemove,we=f.onSavedPaymentMethodUpdate,Fe=f.onAvailablePaymentMethodsChange,V=Cn("mounts <".concat(i,">")),ee="elements"in V?V.elements:null,k="checkoutSdk"in V?V.checkoutSdk:null,J=T.useState(null),le=ba(J,2),W=le[0],Se=le[1],te=T.useRef(null),Ee=T.useRef(null);Z(W,"blur",E),Z(W,"focus",C),Z(W,"escape",R),Z(W,"click",w),Z(W,"loaderror",I),Z(W,"loaderstart",Q),Z(W,"networkschange",ce),Z(W,"confirm",oe),Z(W,"cancel",ke),Z(W,"shippingaddresschange",Ne),Z(W,"shippingratechange",$),Z(W,"savedpaymentmethodremove",ye),Z(W,"savedpaymentmethodupdate",we),Z(W,"availablepaymentmethodschange",Fe),Z(W,"change",G);var Me;O&&(t==="expressCheckout"?Me=O:Me=function(){O(W)}),Z(W,"ready",Me),T.useLayoutEffect(function(){if(te.current===null&&Ee.current!==null&&(ee||k)){var q=null;if(k){var ie=k,Ke=k;switch(t){case"paymentForm":q=Ke.createForm(x);break;case"payment":q=ie.createPaymentElement(x);break;case"address":if("mode"in x){var ge=x.mode,Oe=Fi(x,Gi);if(ge==="shipping")q=ie.createShippingAddressElement(Oe);else if(ge==="billing")q=ie.createBillingAddressElement(Oe);else throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":q=ie.createExpressCheckoutElement(x);break;case"currencySelector":q=k.createCurrencySelectorElement();break;case"taxId":q=ie.createTaxIdElement(x);break;case"contactDetails":q=ie.createContactDetailsElement();break;case"linkSignup":if("createLinkSignupElement"in k)q=k.createLinkSignupElement(x);else throw new Error("<LinkSignupElement> requires <CheckoutElementsProvider> and is not supported inside <CheckoutFormProvider>.");break;case"terms":q=ie.createTermsElement(x);break;default:throw new Error("<".concat(i,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}}else ee&&(q=ee.create(t,x));te.current=q,Se(q),q&&q.mount(Ee.current)}},[ee,k,x]);var Re=kn(x);return T.useEffect(function(){if(te.current){var q=va(x,Re,["paymentRequest"]);q&&"update"in te.current&&te.current.update(q)}},[x,Re]),T.useLayoutEffect(function(){return function(){if(te.current&&typeof te.current.destroy=="function")try{te.current.destroy(),te.current=null}catch{}}},[]),T.createElement("div",{id:h,className:g,ref:Ee})},d=function(f){Cn("mounts <".concat(i,">"));var h=f.id,g=f.className;return T.createElement("div",{id:h,className:g})},p=n?d:s;return p.propTypes={id:D.default.string,className:D.default.string,onChange:D.default.func,onBlur:D.default.func,onFocus:D.default.func,onReady:D.default.func,onEscape:D.default.func,onClick:D.default.func,onLoadError:D.default.func,onLoaderStart:D.default.func,onNetworksChange:D.default.func,onConfirm:D.default.func,onCancel:D.default.func,onShippingAddressChange:D.default.func,onShippingRateChange:D.default.func,onSavedPaymentMethodRemove:D.default.func,onSavedPaymentMethodUpdate:D.default.func,onAvailablePaymentMethodsChange:D.default.func,options:D.default.object},p.displayName=i,p.__elementType=t,p},j=typeof window>"u",Ji=T.createContext(null);Ji.displayName="EmbeddedCheckoutProviderContext";var wa=function(){var t=Cn("calls useStripe()"),n=t.stripe;return n},mc=U("auBankAccount",j),fc=U("card",j),yc=U("cardNumber",j),gc=U("cardExpiry",j),hc=U("cardCvc",j),bc=U("currencySelector",j),vc=U("iban",j),Sa=U("payment",j),xc=U("expressCheckout",j),kc=U("paymentRequestButton",j),Cc=U("linkAuthentication",j),Pc=U("linkSignup",j),Nc=U("contactDetails",j),wc=U("address",j),Sc=U("shippingAddress",j),Ec=U("paymentMethodMessaging",j),Rc=U("taxId",j),Oc=U("issuingCardNumberDisplay",j),Ac=U("issuingCardCvcDisplay",j),Lc=U("issuingCardExpiryDisplay",j),Ic=U("issuingCardPinDisplay",j),Tc=U("issuingCardCopyButton",j),qc=U("terms",j);function Yt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Yt=function(t){return typeof t}:Yt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(e)}var Oa="dahlia",Xi=function(t){return t===3?"v3":t},Aa="https://js.stripe.com",Zi="".concat(Aa,"/").concat(Oa,"/stripe.js"),Qi=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,es=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,Ea="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",ts=function(t){return Qi.test(t)||es.test(t)},ns=function(){for(var t=document.querySelectorAll('script[src^="'.concat(Aa,'"]')),n=0;n<t.length;n++){var r=t[n];if(ts(r.src))return r}return null},Ra=function(t){var n=t&&!t.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(Zi).concat(n);var i=document.head||document.body;if(!i)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(r),r},rs=function(t,n){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"9.17.0",startTime:n})},kt=null,jt=null,Wt=null,as=function(t){return function(n){t(new Error("Failed to load Stripe.js",{cause:n}))}},os=function(t,n){return function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))}},is=function(t){return kt!==null?kt:(kt=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe&&t&&console.warn(Ea),window.Stripe){n(window.Stripe);return}try{var i=ns();if(i&&t)console.warn(Ea);else if(!i)i=Ra(t);else if(i&&Wt!==null&&jt!==null){var s;i.removeEventListener("load",Wt),i.removeEventListener("error",jt),(s=i.parentNode)===null||s===void 0||s.removeChild(i),i=Ra(t)}Wt=os(n,r),jt=as(r),i.addEventListener("load",Wt),i.addEventListener("error",jt)}catch(d){r(d);return}}),kt.catch(function(n){return kt=null,Promise.reject(n)}))},ss=function(t,n,r){if(t===null)return null;var i=n[0];if(typeof i!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(Yt(i)," instead."));var s=i.match(/^pk_test/),d=Xi(t.version),p=Oa;s&&d!==p&&console.warn("Stripe.js@".concat(d," was loaded on the page, but @stripe/stripe-js@").concat("9.17.0"," expected Stripe.js@").concat(p,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var m=t.apply(void 0,n);return rs(m,r),m},Ct,La=!1,Ia=function(){return Ct||(Ct=is(null).catch(function(t){return Ct=null,Promise.reject(t)}),Ct)};Promise.resolve().then(function(){return Ia()}).catch(function(e){La||console.warn(e)});var $t=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];La=!0;var i=Date.now();return Ia().then(function(s){return ss(s,n,i)})};var Bt=2;function Ta(e){return e==="card"}var cs="checkout_unavailable",ls="checkout_waiting",qa="committed",_e="We could not check your payment. Please try again.",Ht="Your last change was not saved. This is your order as placed.",_a="Your bank is still waiting for you to approve this payment, so your order stays as it was. Finish the approval, or try again in a few minutes.",Fa=1e4;async function Ma(e,t=Fa){let n,r=new Promise(s=>{n=setTimeout(()=>s(void 0),t)}),i=(async()=>{try{return(await(await $t(e.publishableKey))?.retrievePaymentIntent(e.clientSecret))?.paymentIntent?.status}catch{return}})();try{return await Promise.race([i,r])}finally{clearTimeout(n)}}var Ka=new Set(["none","requires_payment_method","canceled"]);async function Nn(e,t=Fa){let n,r=new Promise(i=>{n=setTimeout(()=>i(void 0),t)});try{return await Promise.race([K.releaseCheckout({idempotencyKey:e}).then(i=>i.status,()=>{}),r])}finally{clearTimeout(n)}}function Da(e,t){return e instanceof de&&typeof e.data=="object"&&e.data!==null&&e.data.code===t}function zt(e){return Da(e,cs)}function wn(e){return Da(e,ls)}function Sn(e){return e instanceof de&&e.status>=400&&e.status<500&&e.status!==408}function Ua(e){return JSON.stringify([e.email,e.firstName,e.lastName,e.phone,e.address,e.city,e.subdivision,e.postcode,e.country,e.lines,e.shippingMethodId,e.couponCode,e.currency,e.shopperId,e.company])}function Gt(e){return e.orderNumber||e.checkoutNumber}function us(e){return e.orderNumber?{kind:"placed",order:e}:{kind:e.status==="released"?"refunded":e.status==="expired"?"expired":"pending",checkoutNumber:e.checkoutNumber}}async function ja({checkoutNumber:e,resend:t,page:n}){n.setConfirming(!0);let r;try{r=us(await t())}catch{r={kind:"pending",checkoutNumber:e}}r.kind==="placed"?(n.markPaid(),n.track(r.order),n.land(r.order)):n.unplaced({...r,checkoutNumber:r.checkoutNumber||e}),n.setConfirming(!1)}import{createContext as Es,useContext as Rs,useEffect as H,useMemo as yo,useRef as B,useState as N}from"react";var ds="sf:gclid",ps="sf:fbclid",ms=2160*60*60*1e3;function $a(){return typeof window<"u"}function Wa(e){let t=bt.getItem(e);if(!t)return"";try{let{v:n,t:r}=JSON.parse(t);return!n||typeof r!="number"||Date.now()-r>ms?"":n}catch{return""}}function Ya(e){if(!$a())return"";let t=e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1"),n=document.cookie.match(new RegExp(`(?:^|; )${t}=([^;]*)`));return n?decodeURIComponent(n[1]):""}function Ba(){if(!$a())return{};let e=Wa(ds),t=Wa(ps),n=Ya("_fbp"),r=Ya("_fbc");!r&&t&&(r=`fb.1.${Date.now()}.${t}`);let i={};return e&&(i.gclid=e),t&&(i.fbclid=t),n&&(i.fbp=n),r&&(i.fbc=r),i}var Ha="sf:meta-purchases",fs=20;function Ga(){return typeof window>"u"||window.parent!==window}function ys(...e){try{if(Ga()||typeof window.fbq!="function")return;window.fbq(...e)}catch{}}var za=new Set;function gs(e){if(za.has(e))return!1;za.add(e);try{let t=JSON.parse(bt.getItem(Ha)??"[]");if(t.includes(e))return!1;bt.setItem(Ha,JSON.stringify([...t,e].slice(-fs)))}catch{}return!0}function hs(e){return[...new Set(e.filter(vt).flatMap(t=>t.components.map(n=>n.partNumber)))]}function Va(e){let t=e.confirmation;Ga()||!gs(t.orderNumber)||ys("track","Purchase",{value:Number(t.grandTotal),currency:t.currency,content_type:"product",content_ids:hs(e.lines)},{eventID:t.orderNumber})}var En="checkout-afterpay-context",Rn="checkout-gocardless-context",On="checkout-zip-context",An="checkout-klarna-context",Ln="checkout-worldpay-context";function bs(e){return e?.lostChange===!0}function vs({evidence:e,parked:t}){return e?{action:"capture",evidence:e,parked:t}:t?{action:"settle",parked:t}:{action:"ignore"}}function xs(e,t){let n=e.getItem(t);if(e.removeItem(t),!n)return null;try{return JSON.parse(n)}catch{return null}}function ks(e){let t=e.words?.declined??`${e.name} declined the payment \u2014 our team will follow up on payment.`;return{settled:e.words?.settled??`The ${e.name} payment was not completed \u2014 our team will follow up on payment.`,declined:t,collecting:e.words?.collecting??t,unconfirmed:e.words?.unconfirmed??`We could not confirm the ${e.name} payment \u2014 our team will follow up on payment.`}}var Ja={name:"Afterpay",legParam:"afterpay",legValues:["confirm","cancel"],storageKey:En,evidenceFrom(e,t){return t==="cancel"||(e.get("status")??"").toUpperCase()==="CANCELLED"?null:e.get("orderToken")},requestFrom:e=>({token:e})},Xa={name:"Zip",legParam:"zip",legValues:["return"],storageKey:On,evidenceFrom(e){let t=(e.get("result")??"").toLowerCase();return t==="cancelled"||t==="declined"?null:e.get("checkoutId")},requestFrom:e=>({checkoutId:e})},Za={name:"Worldpay",legParam:"worldpay",legValues:["return","cancel"],storageKey:Ln,evidenceFrom:(e,t)=>t==="cancel"?null:e.get("worldpayRef"),requestFrom:e=>({transactionReference:e}),words:{declined:"Worldpay did not take the payment \u2014 our team will follow up on payment.",collecting:"We're confirming your payment with Worldpay \u2014 we'll email you once it's through."}},Qa={name:"GoCardless",legParam:"gocardless",legValues:["confirm","cancel"],storageKey:Rn,evidenceFrom:(e,t)=>t==="confirm"?t:null,requestFrom:(e,t)=>({idempotencyKey:t?.idempotencyKey??""}),keyedByParked:!0,words:{settled:"The direct debit was not set up \u2014 our team will follow up on payment.",declined:"The direct debit was declined \u2014 our team will follow up on payment.",collecting:"Your direct debit is set up \u2014 the payment is collecting and will clear in a few days.",unconfirmed:"We could not confirm the direct debit \u2014 our team will follow up on payment."}},eo={name:"Klarna",legParam:"klarna",legValues:["confirm","cancel"],storageKey:An,evidenceFrom:(e,t)=>t==="confirm"?e.get("authorization_token"):null,requestFrom:(e,t)=>({idempotencyKey:t?.idempotencyKey??"",authorizationToken:e}),keyedByParked:!0,words:{collecting:"Your Klarna payment is being reviewed \u2014 we'll confirm the outcome shortly."}};async function rt(e,t){let n=new URLSearchParams(t.search),r=n.get(e.legParam);if(!r||!e.legValues.includes(r))return;let i=xs(t.storage,e.storageKey),s=e.evidenceFrom(n,r);t.scrubQuery();let d=vs({evidence:s,parked:i});if(d.action==="ignore"||e.keyedByParked&&!d.parked)return;let p=ks(e);if(t.page.clearCart(),bs(d.parked)&&t.page.lostChange(),d.action==="settle"){t.page.note(p.settled,!0),t.page.land(d.parked.confirmation);return}t.page.setConfirming(!0);try{let m=await t.capture(e.requestFrom(d.evidence,d.parked));m.status==="paid"?t.page.markPaid():m.status==="collecting"?t.page.note(p.collecting,!e.words?.collecting):t.page.note(p.declined,!0),t.page.land(d.parked?.confirmation??m)}catch{d.parked?(t.page.note(p.unconfirmed,!0),t.page.land(d.parked.confirmation)):t.page.fail(`We could not confirm your ${e.name} payment. Please contact us before trying again \u2014 your payment may already have been taken.`)}finally{t.page.setConfirming(!1)}}function to(e,t,n){let r=(t??"").trim();if(!r)return"";if(n.length===0)return r;let i=r.toUpperCase(),s=`${e.toUpperCase()}-${i}`,d=n.find(p=>p.code&&p.code.toUpperCase()===i)??n.find(p=>p.code&&p.code.toUpperCase()===s)??n.find(p=>p.name.toUpperCase()===i);return d?d.code||d.name:""}var Tn="checkout-memory-context",ao="Prices have changed since this checkout started. The total shows today's prices.",oo="We couldn't check today's prices for your basket. Try again in a moment \u2014 you can place the order once the total is confirmed.",io=3,Cs=3600*1e3;function Ps(e){return{id:e.id,slug:e.slug,name:{lead:e.name?.lead,accent:e.name?.accent},process:e.process,positionNo:e.positionNo,config:(e.config??[]).map(t=>({label:t.label,gold:t.gold})),finishName:e.finishName,size:e.size,qty:e.qty,href:e.href,kind:e.kind,sku:e.sku,components:e.components.map(t=>({partNumber:t.partNumber,wheels:t.wheels,prices:{...t.prices},hand:t.hand}))}}var Vt=e=>e.map(Ps);function so(e,t){let n=r=>JSON.stringify(r.map(i=>[i.id,i.qty]).sort(([i],[s])=>i<s?-1:i>s?1:0));return n(e)===n(t)}function co(e){let t=e.customer;return{customer:{email:t.email,name:t.name,phone:t.phone,companyName:t.companyName,address:t.address,city:t.city,state:t.state,zipCode:t.zipCode,country:t.country},items:e.items.flatMap(n=>Ft([{partNumber:n.partNumber,wheels:n.quantity,prices:{}}],1)),currency:e.currency,idempotencyKey:e.idempotencyKey,shippingMethodId:e.shippingMethodId,couponCode:e.couponCode}}function qn(e){return{...co(e),payFirst:!!e.checkoutFlow}}function lo(e){return co(e)}var Ns={lastPress:null,keptCardKey:null,placedShape:null,placedRequest:null,unpaidOrder:null};function _n(e){let t=n=>typeof n=="string"?n:"";return{email:t(e.email),firstName:t(e.firstName),lastName:t(e.lastName),company:t(e.company),address1:t(e.address1),address2:t(e.address2),city:t(e.city),postcode:t(e.postcode),phone:t(e.phone),country:t(e.country),subdivision:t(e.subdivision),selectedAddressId:t(e.selectedAddressId),shippingMethodId:typeof e.shippingMethodId=="string"?e.shippingMethodId:null,couponCode:typeof e.couponCode=="string"?e.couponCode:null}}function Fn(e){return{orderNumber:e.orderNumber,checkoutNumber:e.checkoutNumber,expiresAt:e.expiresAt,status:e.status,total:e.total,currency:e.currency,freightCharge:e.freightCharge,discountAmount:e.discountAmount,grandTotal:e.grandTotal,shippingMethod:e.shippingMethod,couponCode:e.couponCode}}function Mn(e){return e.lastPress!==null||e.unpaidOrder!==null||e.keptCardKey!==null}function ws(e){let t=e.parkedAt+Cs,n=e.press.unpaidOrder,r=n&&!n.orderNumber?n.expiresAt:null,i=r?Date.parse(r):NaN;return Number.isNaN(i)?t:Math.min(t,i)}function uo(e){try{let t={...e,lines:Vt(e.lines),press:mo(e.press)};qe.setItem(Tn,JSON.stringify({v:io,...t}))}catch{}}var $e=e=>!!e&&typeof e=="object"&&!Array.isArray(e),po=e=>$e(e)&&typeof e.idempotencyKey=="string"&&Array.isArray(e.items)&&e.items.every(t=>$e(t)&&typeof t.partNumber=="string"&&typeof t.quantity=="number")&&$e(e.customer)&&typeof e.payFirst=="boolean",In=e=>$e(e)&&typeof e.id=="string"&&typeof e.qty=="number"&&Array.isArray(e.components);function Ss(e){return $e(e)&&typeof e.key=="string"&&po(e.request)&&Array.isArray(e.lines)&&e.lines.every(In)&&Array.isArray(e.plainLines)&&e.plainLines.every(In)?{key:e.key,request:e.request,lines:Vt(e.lines),goods:typeof e.goods=="string"?e.goods:"",plainPressed:e.plainPressed===!0,plainLines:Vt(e.plainLines),plainGoods:typeof e.plainGoods=="string"?e.plainGoods:""}:null}var no=e=>typeof e=="string"?e:null,ro={lastPress:Ss,keptCardKey:no,placedShape:no,placedRequest:e=>po(e)?e:null,unpaidOrder:e=>$e(e)?Fn(e):null};function mo(e){let t=$e(e)?e:{},n={...Ns};for(let r of Object.keys(ro))n[r]=ro[r](t[r]);return n}function fo(){let e;try{e=qe.getItem(Tn)}catch{return null}if(!e)return null;try{let t=JSON.parse(e);if(t.v!==io||typeof t.key!="string"||!t.key||!Array.isArray(t.lines)||!t.lines.every(In)||typeof t.parkedAt!="number")return null;let n={key:t.key,authed:t.authed===!0,parkedAt:t.parkedAt,press:mo(t.press),lines:Vt(t.lines),form:t.form&&typeof t.form=="object"?_n(t.form):null};return Date.now()>=ws(n)?(Kn(),null):Mn(n.press)?n:null}catch{return null}}function Kn(){try{qe.removeItem(Tn)}catch{}}import{jsx as ve}from"react/jsx-runtime";function go(e){let t=e.indexOf(`
3
3
  `);return t===-1?[e,""]:[e.slice(0,t),e.slice(t+1)]}function ho(e,{canParkContext:t}={canParkContext:!0}){let n=e.paymentMethods,r=[];return n.includes("card")&&r.push({key:"card",title:"Card",body:null,price:ve("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"VISA \xB7 MC \xB7 AMEX"})}),n.includes("paypal")&&e.paypalClientId&&r.push({key:"paypal",title:"PayPal",body:null,price:ve("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAYPAL \xB7 CARDS"})}),n.includes("afterpay")&&r.push({key:"afterpay",title:"Afterpay",body:null,price:ve("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"4 \xD7 INTEREST-FREE"})}),n.includes("square")&&e.squareApplicationId&&e.squareLocationId&&r.push({key:"square",title:"Card (Square)",body:null,price:ve("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"VISA \xB7 MC \xB7 AMEX"})}),n.includes("gocardless")&&t&&r.push({key:"gocardless",title:"Bank Direct Debit",body:null,price:ve("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY BY BANK"})}),n.includes("zip")&&r.push({key:"zip",title:"Zip",body:null,price:ve("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY IN 4"})}),n.includes("klarna")&&t&&r.push({key:"klarna",title:"Klarna",body:null,price:ve("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY LATER"})}),n.includes("worldpay")&&r.push({key:"worldpay",title:"Visa / Mastercard / American Express",body:null,price:ve("span",{className:"font-mono text-xs uppercase tracking-[0.2em] text-accent",children:"VIA WORLDPAY"})}),n.includes("bank")&&r.push({key:"bank",title:"Bank transfer",body:null,price:ve("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Invoiced"})}),r}var Co="This shop does not take payment online yet. Please contact the shop to order.",at=class extends Error{};function bo(e,t){if(!e.orderNumber&&zt(t))return t.message;let n=t instanceof de?` (${t.message})`:"";return e.orderNumber?`Your order ${e.orderNumber} is saved, but the payment did not start${n}. Try the payment again \u2014 your order will not be placed twice.`:`Your items are held under ${e.checkoutNumber}, but the payment did not start${n}. Try the payment again \u2014 you will not be charged twice.`}var Os=3e3,As=.005,vo=new Set(["paypal","square","afterpay","gocardless","zip","klarna","worldpay"]);function xo(){let e=ta();return{...e==="denied"?{}:Ba(),...e?{adConsent:e}:{}}}var xe=e=>JSON.parse(e),Ls={lastPress:null,keptCardKey:null,placedShape:null,placedRequest:null,unpaidOrder:null},Is={lastPress:e=>e&&{key:e.key,request:qn(e.request),lines:e.lines,goods:xe(e.shape)[0],plainPressed:!!e.plainMethod,plainLines:e.plainLines,plainGoods:xe(e.plainShape)[0]},keptCardKey:e=>e,placedShape:e=>e===null?null:xe(e)[0],placedRequest:e=>e&&qn(e.body),unpaidOrder:e=>e&&Fn(e)};function ko(e,t){let n={};for(let r of Object.keys(e))n[r]=e[r](t[r]);return n}var Po="Shipping cannot be calculated right now. Please try again.";function No(e){return`Your order is saved, so its contact, address, delivery and discount can't change here. To change any of them, contact the shop and quote ${e}.`}function Ts({site:e,logo:t,signInHref:n=null,preview:r=!1,textCase:i}){let{items:s,basketRead:d,totals:p,coupon:m,refuseCoupon:f,deliveryOptions:h,shippingMethodId:g,setShippingMethodId:b,setQuoteDestination:x,courier:E,requote:C,identify:O,clearCapturedCart:G,replaceItems:R,removeCoupon:w,applyCoupon:I}=Dt(),Q=h.find(a=>a.id===g)?.pickupLocation??null,{country:ce,countries:oe,activeCountry:ke,formatMoney:Ne}=be(),[$,ye]=N(()=>ho(e)[0]?.key??null),[we,Fe]=N(!0);H(()=>{Fe(qr(qe))},[]);let[V,ee]=N(!1),[k,J]=N(""),[le,W]=N(""),[Se,te]=N(""),[Ee,Me]=N(""),[Re,q]=N(""),[ie,Ke]=N(""),[ge,Oe]=N(""),[Ae,st]=N(""),[ze,ct]=N(""),[Y,lt]=N(()=>ce||oe[0]?.code||""),[Ce,Pt]=N(""),[ut,Yn]=N([]),[en,tn]=N(null),[Nt,Ge]=N(null),$n=yo(()=>oe.find(a=>a.code===Y)??ke,[oe,Y,ke]),Uo=$n?.postalLabel||"Postal Code",jo=ut[0]?.divisionType||"State / Province";H(()=>{if(!Y){Yn([]),tn(Y);return}tn(null);let a=!1;return K.listCountrySubdivisions(Y).then(l=>{a||(Yn(l),tn(Y),Pt(""))}),()=>{a=!0}},[Y]);let Bn=Re.trim()!==""&&ge.trim()!==""&&Ae.trim()!==""&&en===Y&&(ut.length===0||Ce!=="")?Ae.trim():"";H(()=>{x(Y?{country:Y,subdivision:Ce,postcode:Bn}:null)},[Y,Ce,Bn,x]),H(()=>()=>x(null),[x]);let Wo=E?.status==="unavailable",Yo=C,[dt,Hn]=N(null),[$o,zn]=N([]),[nn,wt]=N("new"),[Gn,Vn]=N(!1),[rn,Bo]=N("Home"),[Ho,Jn]=N(null),[zo,an]=N(null),[De,St]=N(()=>xt()),Xn=B(null),[on,Ve]=N(null),[Go,se]=N(null),[Zn,Et]=N(null),[Qn,Vo]=N(!1),[er,Jo]=N(!1),[Le,Je]=N(null),[Xo,Rt]=N(!1),[X,ue]=N(null),tr=!!X?.orderNumber,Zo=tr||V,[Qo,ei]=N(null),[ti,ni]=N(!1),[ri,ai]=N(!1),[oi,ii]=N(!1),[si,ci]=N(!1),[li,ui]=N(!1),[nr,di]=N(!1),[pi,sn]=N(!1),[pt,rr]=N(null),A=B({...Ls});A.current.unpaidOrder=X;let cn=B(!1),Ue=B(s),ar=!!(on||pt&&pt.kind!=="processing"||nr||Qn||er||Zn&&Le?.orderNumber);H(()=>{ar&&(R([]),w())},[ar,R,w]);let or=B(!1);H(()=>{r||or.current||!s.some(vt)||(or.current=!0,Dr({lines:s,currency:p.currency,value:p.subtotal-p.discount,coupon:m?.valid?m.code:void 0}))},[s,p,m,r]),H(()=>{O(k,le.trim()||void 0)},[k,le,O]);let ir=B(null),[Ot,mi]=N(null);H(()=>{let a=ir.current;if(!Ot||!a)return;let l=()=>a.style.setProperty("--sf-checkout-header-h",`${Ot.offsetHeight}px`);l();let y=new ResizeObserver(l);return y.observe(Ot),()=>y.disconnect()},[Ot]),H(()=>{let a=y=>({setConfirming:y,land:Ve,markPaid:()=>Rt(!0),note:(S,u)=>ei({text:S,warning:u}),fail:se,clearCart:G,lostChange:()=>an(Ht)}),l={search:window.location.search,storage:qe,scrubQuery:()=>window.history.replaceState(null,"",window.location.pathname)};rt(Ja,{...l,capture:K.captureAfterpayPayment,page:a(ni)}),rt(Xa,{...l,capture:K.captureZipPayment,page:a(ii)}),rt(Qa,{...l,capture:K.completeGocardlessPayment,page:a(ai)}),rt(eo,{...l,capture:K.captureKlarnaPayment,page:a(ci)}),rt(Za,{...l,capture:K.confirmWorldpayPayment,page:a(ui)})},[]);function sr(a){let[l,y]=go(a.address);q(l),Ke(y),Oe(a.city),st(a.zip_code),a.country&&lt(a.country),a.phone&&ct(a.phone),Ge({country:a.country||null,state:a.state??""})}H(()=>{if(Nt){if((Nt.country||Y)!==Y){Ge(null);return}en===Y&&(Pt(to(Y,Nt.state,ut)),Ge(null))}},[Nt,Y,en,ut]),H(()=>{let a=!1;return(async()=>{try{let[l,y,S]=await Promise.all([tt.me(),tt.myProfile().catch(()=>null),tt.myAddresses().catch(()=>[])]);if(a)return;Hn(l);let u=S.filter(M=>M.is_active);zn(u),J(l.email);let L=(y?.contact_name??"").split(/\s+/);W(l.first_name||L[0]||""),te(l.last_name||L.slice(1).join(" "));let F=l.phone||y?.phone;F&&ct(F);let _=u.find(M=>M.id===l.default_delivery_location)??u[0];if(_)wt(_.id),sr(_);else if(y){let[M,et]=go(y.address??"");q(M),Ke(et),Oe(y.city??""),st(y.zip_code??""),y.country&&lt(y.country),Ge({country:y.country||null,state:y.state??""})}_t.current&&fr(_t.current,!1)}catch{}})(),()=>{a=!0}},[]);function fi(){tt.logout(),ft.current=!0,_t.current=null,qt.current=null,yt(),Hn(null),zn([]),wt("new"),Vn(!1),J(""),W(""),te(""),Me(""),q(""),Ke(""),Oe(""),st(""),ct(""),lt(ce||oe[0]?.code||""),Pt(""),Ge(null)}let Xe=yo(()=>ho(e,{canParkContext:we}),[e,we]);H(()=>{Xe.some(a=>a.key===$)||ye(Xe[0]?.key??null)},[Xe,$]);let yi=Xe.length===0,At=ie.trim()?`${Re}
4
4
  ${ie.trim()}`:Re,gi=Ua({email:k,firstName:le,lastName:Se,company:Ee.trim(),phone:ze,address:At,city:ge,subdivision:Ce,postcode:Ae,country:Y,lines:s.map(a=>[a.id,a.qty]),shippingMethodId:g,couponCode:hn(m),currency:p.currency,shopperId:dt?.id??null}),re=JSON.stringify([gi,$]),ln=B(null),Lt=B(!1),Ie=B(!1),Ze=B(null),It=B(!1),he=B(re);he.current=re;let cr=B(V);cr.current=V;let Tt=B(null);H(()=>{let a=()=>{let l=Tt.current;l&&(Tt.current=null,ue(l),ee(!1))};return window.addEventListener("pageshow",a),()=>window.removeEventListener("pageshow",a)},[]);function mt(a,l,y,S){let u={idempotencyKey:l,confirmation:y};xr()&&(u.lostChange=!0),qe.setItem(a,JSON.stringify(u)),window.location.assign(S),Tt.current=y}async function lr(a){ee(!0);try{await a()}finally{Tt.current||ee(!1)}}let ur=B(!1),dr=!!(on||pt&&pt.kind!=="processing");H(()=>{dr&&(ur.current=!0,yt())},[dr]);let qt=B(null),ft=B(!1),un=B(null);function yt(){un.current=null,Kn()}let _t=B(null),[Qe,hi]=N(!1);function dn(a){if(ur.current||r||ft.current)return;let l={key:a,authed:cn.current,parkedAt:un.current??=Date.now(),press:ko(Is,A.current),lines:s.length>0?s:Ue.current,form:_n({email:k,firstName:le,lastName:Se,company:Ee,address1:Re,address2:ie,city:ge,postcode:Ae,phone:ze,country:Y,subdivision:Ce,selectedAddressId:nn,shippingMethodId:g,couponCode:m?.valid?m.code:null})};Mn(l.press)?uo(l):yt()}let pr=B($);pr.current=$;function pn(a){return{...lo(a),...xo(),...a.payFirst?{checkoutFlow:Bt}:{}}}function bi(a,l){let y=a.request.payFirst?"":null,S=a.plainPressed?null:"",u=()=>pr.current??"";return{key:a.key,send:()=>l(pn(a.request)),request:pn(a.request),lines:a.lines,shape:JSON.stringify([a.goods,null]),get method(){return y??u()},set method(L){y=L},get plainMethod(){return S??u()},set plainMethod(L){S=L},plainLines:a.plainLines,plainShape:JSON.stringify([a.plainGoods,null])}}let[vi,xi]=N(!1),mr=vi?!p.quoted||p.serverSubtotal===null?"waiting":Math.abs(p.serverSubtotal-p.subtotal)<As?"same":"changed":null,mn=!X&&mr==="waiting",ki=mn?{...p,repricing:!0}:p,fn=mn&&p.quoteFailed;H(()=>{if(!fn)return;let a=setInterval(C,Os);return()=>clearInterval(a)},[fn,C]);let Ci=C;function fr(a,l=!0){J(a.email),W(a.firstName),te(a.lastName),Me(a.company),q(a.address1),Ke(a.address2),Oe(a.city),st(a.postcode),ct(a.phone),a.country&&lt(a.country),Ge({country:a.country||null,state:a.subdivision}),wt(a.selectedAddressId),a.shippingMethodId&&b(a.shippingMethodId),l&&(qt.current=a.couponCode)}H(()=>{let a=r?null:fo(),l=!!(a&&s.length>0);if(a&&l&&!so(a.lines,s)&&(yt(),a=null),a){let y=a.authed?K.createOrderAuthed:K.createOrder;St(a.key),un.current=a.parkedAt,cn.current=a.authed;let S={lastPress:u=>u&&bi(u,y),keptCardKey:u=>u,placedShape:u=>u===null?null:JSON.stringify([u,null]),placedRequest:u=>{if(!u)return null;let L=pn(u);return{body:L,send:()=>y(L)}},unpaidOrder:u=>u};A.current=ko(S,a.press),a.press.unpaidOrder&&ue(a.press.unpaidOrder),a.lines.length>0&&!l&&(R(a.lines),Ue.current=a.lines,xi(!0)),a.form&&(_t.current=a.form,fr(a.form))}hi(!0)},[]),H(()=>{!Qe||s.length>0||A.current.unpaidOrder||V||(ft.current=!0,yt())},[Qe,s.length]),H(()=>{let a=qt.current;!Qe||!a||s.length===0||(qt.current=null,I(a,k||void 0))},[Qe,s.length]),H(()=>{!Qe||V||dn(De)},[Qe,V,De,X]);let je=B(null);H(()=>{cr.current||(re!==je.current&&(je.current=null),!(!Ie.current||!X||X.orderNumber)&&(re===A.current.placedShape||re===je.current||lr(()=>yr(X))))},[re,X]);async function yr(a){if(It.current)return null;It.current=!0;try{let l=Ze.current?await Ma(Ze.current):"none";if(l==="succeeded"||l==="processing")return Ie.current=!1,ue(null),Pe("card"),l==="succeeded"?await We(void 0,a):wr(a),null;if(l===void 0||!Ka.has(l))return je.current=he.current,ue(a),se(l==="requires_action"?_a:_e),null;let y=await Nn(De);if(y==="committed")return Ie.current=!1,ue(null),Pe("card"),await We(void 0,a),null;if(y!=="released")return je.current=he.current,ue(a),se(_e),null;Ie.current=!1,Ze.current=null,je.current=null,se(null),ue(null);let S=xt();return St(S),S}finally{It.current=!1}}async function Pi(){r||V||It.current||await lr(Ni)}async function Ni(){if(X){if((Ie.current?re!==A.current.placedShape:gt())&&!X.orderNumber){let S=await yr(X);S&&he.current===re&&await gr(S);return}se(null),Lt.current=!1,await yn();let l=xe(he.current)[1],y=X.orderNumber?l:"card";if(y&&vo.has(y)&&gt()&&xe(he.current)[0]!==ln.current){hr(X);return}Pe(y),y!==$&&ye(y),await Sr(X,y,!X.orderNumber);return}await gr(De)}async function gr(a){if(s.length===0||p.repricing||mn||!$||!Xe.some(F=>F.key===$))return;let l=s.filter(vt).flatMap(F=>Ft(F.components,F.qty));if(l.length===0){se("Pick a size on each wheel's product page before checking out.");return}se(null);let y,S=a,u=$,L=!1;try{let F=dt?K.createOrderAuthed:K.createOrder,_={customer:{email:k,name:`${le} ${Se}`.trim(),phone:ze.trim()||void 0,companyName:Ee.trim()||void 0,address:At,city:ge,state:Ce||void 0,zipCode:Ae,country:Y},items:l,currency:p.currency,idempotencyKey:a,shippingMethodId:g??void 0,couponCode:hn(m),...xo(),...Ta($)?{checkoutFlow:Bt}:{}};A.current.placedRequest={body:_,send:()=>F(_)},cn.current=!!dt,ft.current=!1,an(null),ln.current=null,Lt.current=!1,Ze.current=null,Ie.current=!1,je.current=null,A.current.placedShape=re,Ue.current=s;let M=A.current.lastPress,et=M?.key===_.idempotencyKey&&(M.shape!==re&&(!!_.checkoutFlow||!!M.method||!!M.plainMethod)||!!_.checkoutFlow&&!!M.plainMethod);et&&(A.current.keptCardKey=_.idempotencyKey);let Or=Cr(_,F),Ar=et||!_.checkoutFlow&&A.current.keptCardKey===_.idempotencyKey,Lr=!Or&&!Ar&&!_.checkoutFlow&&!!M&&!M.method;Lr&&(M.plainMethod=$,M.plainLines=s,M.plainShape=re,dn(_.idempotencyKey));let Ye=await(Ar?vr(_,F):F(_).then(ht=>({answer:ht,request:_})).catch(ht=>(Or?br(ht,_.idempotencyKey):Lr&&Sn(ht)&&(M.plainMethod=""),wi(ht,_,F))));if(!Ye)return;y=Ye.answer,S=Ye.request.idempotencyKey,u=Ye.method??u,Pe(u),L=gt()||u!==xe(he.current)[1],Ye.method&&Ye.method!==$&&ye(Ye.method),y.orderNumber&&(Pr(y),G()),await yn()}catch(F){let _=Kr(F);_?(f(_),se(`${_} Your order has not been placed. Place it again to continue without the code.`)):F instanceof at?se(_e):se(F instanceof de?F.message:"Could not place the order. Please try again.");return}if(u&&vo.has(u)&&(L||gt())){hr(y);return}await Sr(y,u,!1,S)}function hr(a){ln.current=xe(he.current)[0],se(`${bo(a,null)} ${Ht}`),ue(a)}function br(a,l){Sn(a)&&!wn(a)&&A.current.lastPress?.key===l&&(A.current.lastPress=null)}async function wi(a,l,y){if(zt(a))return kr(l,y);if(!wn(a))throw a;return A.current.keptCardKey=l.idempotencyKey,vr(l,y,!0)}async function vr(a,l,y=!1){let S=await Nn(a.idempotencyKey);if(S==="released")return kr(a,l);if(S!=="committed")throw new at;let u=A.current.lastPress?.key===a.idempotencyKey?A.current.lastPress:null;if(Ue.current=u?.lines??s,u?.method&&!y){A.current.keptCardKey=null,A.current.placedRequest={body:u.request,send:u.send};let et=await u.send().catch(()=>{throw new at});return A.current.placedShape=u.shape,{answer:et,request:a,method:u.method}}let L={...a,checkoutFlow:Bt},F=u&&!u.method?{body:u.request,send:u.send}:{body:L,send:()=>l(L)};A.current.placedRequest=F;let _=F.send,M=await _().catch(()=>null);if(!M&&u?.plainMethod)throw new at;return M?.orderNumber&&M.status!==qa?(A.current.keptCardKey=null,u?.plainMethod&&(Ue.current=u.plainLines),u&&(A.current.placedShape=u.plainMethod?u.plainShape:u.shape),{answer:M,request:a,method:u?.plainMethod||void 0}):(u&&(A.current.placedShape=u.shape),Pe("card"),await Nr("",M?async()=>M:()=>Promise.reject(new Error("The order request did not answer."))),await yn(),null)}function gt(){let a=A.current.placedShape;return a!==null&&xe(a)[0]!==xe(he.current)[0]}function Pe(a){a!==xe(he.current)[1]&&(Lt.current=!0),an(xr()?Ht:null)}function xr(){return Lt.current||gt()}async function kr(a,l){let y={...a,idempotencyKey:xt()};A.current.keptCardKey=null,St(y.idempotencyKey),A.current.placedRequest={body:y,send:()=>l(y)},Cr(y,l);try{return{answer:await l(y),request:y}}catch(S){throw br(S,y.idempotencyKey),S}}function Cr(a,l){return A.current.lastPress?.key===a.idempotencyKey?!1:(A.current.lastPress={key:a.idempotencyKey,send:()=>l(a),request:a,lines:s,shape:re,method:a.checkoutFlow?"":$??"",plainMethod:"",plainLines:s,plainShape:re},ft.current=!1,dn(a.idempotencyKey),!0)}function Pr(a){Ur({confirmation:a,lines:Ue.current,adsSendTo:e.googleAdsId&&e.googleAdsConversionLabel?`${e.googleAdsId}/${e.googleAdsConversionLabel}`:null}),Va({confirmation:a,lines:Ue.current})}async function We(a,l=Le){if(!l)return;let y=a?async()=>a:A.current.placedRequest?.send;if(l.orderNumber||!y){Rt(!0),Ve(l);return}await Nr(l.checkoutNumber,y)}async function Nr(a,l){G(),await ja({checkoutNumber:a,resend:l,page:{setConfirming:di,land:Ve,markPaid:()=>Rt(!0),track:Pr,unplaced:rr}})}function wr(a=Le){if(a){if(a.orderNumber){Ve(a);return}G(),rr({kind:"processing",checkoutNumber:a.checkoutNumber})}}async function yn(){let a=JSON.stringify([rn.trim(),le,Se,ze.trim(),At,ge,Ce,Ae,Y]);if(!(!dt||!Gn||nn!=="new"||Xn.current===a))try{await tt.createAddress({label:rn.trim()||"Home",contact_name:`${le} ${Se}`.trim(),phone:ze.trim(),address:At,city:ge,zip_code:Ae,state:Ce,country:Y}),Xn.current=a,Jn("Address saved to your account.")}catch{Jn("We couldn't save the address to your account \u2014 you can add it under Account \u2192 Addresses.")}}async function Sr(a,l=$,y=!1,S=De){ue(null);try{if(l==="card"&&e.paymentMethods.includes("card")){let u=await K.createPaymentIntent({idempotencyKey:S});Ze.current=u;let L=a;if(y){let F=await A.current.placedRequest?.send().catch(()=>null);if(F?.orderNumber){Pe("card"),await We(F,a);return}L=Er(a,F)??{...a,expiresAt:null}}Pe("card"),Je(L),sn(!1),Et(u)}else if(l==="paypal"&&e.paymentMethods.includes("paypal"))Je(a),Vo(!0);else if(l==="afterpay"&&e.paymentMethods.includes("afterpay")){let u=window.location.origin,L=await K.createAfterpayCheckout({idempotencyKey:S,confirmUrl:`${u}/checkout?afterpay=confirm`,cancelUrl:`${u}/checkout?afterpay=cancel`});mt(En,S,a,L.redirectCheckoutUrl);return}else if(l==="square"&&e.paymentMethods.includes("square"))Je(a),Jo(!0);else if(l==="gocardless"&&e.paymentMethods.includes("gocardless")){let u=window.location.origin,L=await K.createGocardlessBillingRequest({idempotencyKey:S,confirmUrl:`${u}/checkout?gocardless=confirm`,cancelUrl:`${u}/checkout?gocardless=cancel`});mt(Rn,S,a,L.authorisationUrl);return}else if(l==="zip"&&e.paymentMethods.includes("zip")){let u=window.location.origin,L=await K.createZipCheckout({idempotencyKey:S,redirectUrl:`${u}/checkout?zip=return`});mt(On,S,a,L.redirectUrl);return}else if(l==="klarna"&&e.paymentMethods.includes("klarna")){let u=window.location.origin,L=await K.createKlarnaCheckout({idempotencyKey:S,confirmUrl:`${u}/checkout?klarna=confirm`,cancelUrl:`${u}/checkout?klarna=cancel`});mt(An,S,a,L.redirectUrl);return}else if(l==="worldpay"&&e.paymentMethods.includes("worldpay")){let u=window.location.origin,L=await K.createWorldpayCheckout({idempotencyKey:S,successUrl:`${u}/checkout?worldpay=return`,cancelUrl:`${u}/checkout?worldpay=cancel`});mt(Ln,S,a,L.redirectUrl);return}else Pe(l),Ve(a)}catch(u){if((y||l==="card")&&u instanceof de&&u.status===409){Pe(l),await We(void 0,a);return}Rr(a,u)}}function Er(a,l){return l&&!l.orderNumber&&l.status==="open"&&l.checkoutNumber===a.checkoutNumber?l:null}function Rr(a,l){se(bo(a,l)),!a.orderNumber&&zt(l)?(Ie.current=!1,St(xt())):ue(a)}async function Si(a){if(!Le)return;let l=Le;try{let y=await K.createPaymentIntent({idempotencyKey:De}),S=await A.current.placedRequest?.send().catch(()=>null);if(S?.orderNumber){await We(S);return}let u=Er(l,S);Je(u??{...l,expiresAt:null}),sn(a&&u!==null),Ze.current=y,Et(y)}catch(y){if(y instanceof de&&y.status===409){await We();return}Et(null),Je(null),Rr(l,y)}}function Ei(){Le&&(Ie.current=!0,ue(Le),Et(null),Je(null),sn(!1))}return{site:e,logo:t,signInHref:n,capitalised:Vr(i)==="capitalised",items:s,totals:ki,coupon:m,deliveryOptions:h,courierUnavailable:Wo,retryCourier:Yo,shippingMethodId:g,setShippingMethodId:b,pickupLocation:Q,servedCountries:oe,formatMoney:Ne,payChoice:$,setPayChoice:ye,placing:V,email:k,setEmail:J,firstName:le,setFirstName:W,lastName:Se,setLastName:te,company:Ee,setCompany:Me,address1:Re,setAddress1:q,address2:ie,setAddress2:Ke,city:ge,setCity:Oe,postcode:Ae,setPostcode:st,phone:ze,setPhone:ct,country:Y,setCountry:lt,subdivision:Ce,setSubdivision:Pt,subdivisions:ut,destination:$n,postcodeLabel:Uo,subdivisionLabel:jo,me:dt,savedAddresses:$o,selectedAddressId:nn,setSelectedAddressId:wt,saveAddress:Gn,setSaveAddress:Vn,saveLabel:rn,setSaveLabel:Bo,addressSaveNote:Ho,lostChangeNote:zo,idemKey:De,confirmation:on,setConfirmation:Ve,orderError:Go,payment:Zn,paypalStep:Qn,squareStep:er,pendingConf:Le,paid:Xo,setPaid:Rt,unpaidOrder:X,orderLocked:tr,formLocked:Zo,restoredPrices:mr,basketRead:d,quoteFailed:fn,retryQuote:Ci,payNote:Qo,afterpayConfirming:ti,gocardlessConfirming:ri,zipConfirming:oi,klarnaConfirming:si,worldpayConfirming:li,cardConfirming:nr,checkoutResult:pt,confirmCardPayment:We,cardStillProcessing:wr,renewCardPayment:Si,holdRenewed:pi,leaveCardPayment:Ei,checkoutRootRef:ir,setCheckoutHeaderEl:mi,fillFromAddress:sr,checkoutSignOut:fi,payOptions:Xe,noPaymentMethod:yi,placeOrder:Pi}}var wo=Es(null);function So({children:e,...t}){let n=Ts(t);return ve(wo.Provider,{value:n,children:e})}function me(){let e=Rs(wo);if(!e)throw new Error("useCheckout must be used inside CheckoutStateProvider");return e}import{useId as Dn}from"react";import{Fragment as fe,jsx as o,jsxs as P}from"react/jsx-runtime";var qs="Loading your order",Eo=["py-8","text-center","font-serif","text-[16px]","italic","leading-[1.5]","text-fg-dim"].join(" ");function Ao(){let{email:e,setEmail:t,firstName:n,setFirstName:r,lastName:i,setLastName:s,company:d,setCompany:p,me:m,signInHref:f,checkoutSignOut:h,orderLocked:g,unpaidOrder:b}=me(),x=Dn();return P(Zt,{num:1,title:"Contact",children:[g&&b&&o(Fs,{orderNumber:b.orderNumber}),o(ae,{label:"Email",htmlFor:x,hint:m?P(fe,{children:["Signed in \xB7"," ",o("button",{type:"button",onClick:h,className:"underline transition-colors enabled:hover:text-accent",children:"Not you? Sign out"})]}):f?P(fe,{children:["Have an account?"," ",o(ot,{href:f,className:"underline transition-colors hover:text-accent",children:"Sign in"})]}):void 0,children:o("input",{id:x,type:"email",value:e,onChange:E=>t(E.target.value),placeholder:"you@example.com",readOnly:m!==null,className:ne})}),P(_o,{children:[o(ae,{label:"First name",children:o("input",{type:"text",value:n,onChange:E=>r(E.target.value),className:ne})}),o(ae,{label:"Last name",children:o("input",{type:"text",value:i,onChange:E=>s(E.target.value),className:ne})})]}),o(ae,{label:"Company (optional)",children:o("input",{type:"text",value:d,onChange:E=>p(E.target.value),autoComplete:"organization",className:ne})})]})}function Lo(){let{pickupLocation:e,servedCountries:t,address1:n,setAddress1:r,address2:i,setAddress2:s,city:d,setCity:p,postcode:m,setPostcode:f,phone:h,setPhone:g,country:b,setCountry:x,subdivision:E,setSubdivision:C,subdivisions:O,destination:G,postcodeLabel:R,subdivisionLabel:w,me:I,savedAddresses:Q,selectedAddressId:ce,setSelectedAddressId:oe,saveAddress:ke,setSaveAddress:Ne,saveLabel:$,setSaveLabel:ye,fillFromAddress:we,orderLocked:Fe}=me(),V=Dn(),ee=Dn();return P(Zt,{num:2,title:e?"Collection":"Shipping address",children:[e?P("div",{className:"grid gap-2 text-[14px] leading-[1.6]",children:[o("span",{className:"font-medium",children:e.name}),[e.address,e.city,e.state,e.zipCode,e.country].filter(Boolean).length>0&&o("span",{className:"opacity-80",children:[e.address,e.city,e.state,e.zipCode,e.country].filter(Boolean).join(", ")}),e.openingHours&&o("span",{className:"opacity-80",children:e.openingHours}),e.readyIn&&o("span",{className:"opacity-80",children:e.readyIn}),e.instructions&&o("span",{className:"opacity-80",children:e.instructions}),o("span",{className:"mt-1 font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"No delivery address needed"})]}):P(fe,{children:[I!==null&&Q.length>0&&P("div",{className:"grid gap-3",children:[Q.map(k=>o(Jt,{active:ce===k.id,onClick:()=>{oe(k.id),we(k)},title:k.label,body:k.formatted_address,price:null},k.id)),o(Jt,{active:ce==="new",onClick:()=>oe("new"),title:"New address",body:null,price:null})]}),o(ae,{label:"Address line 1",children:o("input",{type:"text",value:n,onChange:k=>r(k.target.value),className:ne})}),o(ae,{label:"Address line 2",children:o("input",{type:"text",value:i,onChange:k=>s(k.target.value),placeholder:"Apartment, unit, garage bay\u2026",className:ne})}),P(_o,{cols:"three",children:[o(ae,{label:"City",children:o("input",{type:"text",value:d,onChange:k=>p(k.target.value),className:ne})}),o(ae,{label:R,children:o("input",{type:"text",value:m,onChange:k=>f(k.target.value),className:ne})}),o(ae,{label:"Country",separate:!0,htmlFor:V,children:o(vn,{id:V,value:b,onChange:k=>x(k.target.value),className:ne+" pr-10",style:Ro,children:t.map(k=>o("option",{value:k.code,children:k.name},k.code))})})]}),o(ae,{label:w,separate:!0,htmlFor:ee,children:O.length>0?P(vn,{id:ee,value:E,onChange:k=>C(k.target.value),className:ne+" pr-10",style:Ro,children:[o("option",{value:"",children:"Select\u2026"}),O.map(k=>o("option",{value:k.code||k.name,children:k.name},k.code||k.name))]}):o("input",{id:ee,type:"text",value:E,onChange:k=>C(k.target.value),className:ne})})]}),o(ae,{label:"Phone",children:o("input",{type:"tel",value:h,onChange:k=>g(k.target.value),className:ne})}),!e&&I!==null&&ce==="new"&&!Fe&&P(fe,{children:[o(Ms,{checked:ke,onChange:Ne,label:"Save this address to my account"}),ke&&o(ae,{label:"Address label",children:o("input",{type:"text",value:$,onChange:k=>ye(k.target.value),placeholder:"Home",className:ne})})]})]})}function Io(){let{totals:e,coupon:t,deliveryOptions:n,shippingMethodId:r,setShippingMethodId:i,pickupLocation:s,formatMoney:d,city:p,destination:m,courierUnavailable:f,retryCourier:h}=me();return o(Zt,{num:3,title:"Shipping",children:P("div",{className:"grid gap-3",children:[n.map(g=>{let b=g.pickupLocation,x=b?[b.address,b.city,b.state,b.zipCode].filter(Boolean).join(", "):null;return o(Jt,{active:r===g.id,onClick:()=>i(g.id),title:b?`${g.name} \u2014 ${b.name}`:g.name,body:b?[x,b.openingHours,b.readyIn,b.instructions,g.description].filter(Boolean).join(" \xB7 "):g.description||null,price:e.freeShipping||g.amount===0?Mt:e.deliveryDiscountPercent>0?P(fe,{children:[o("s",{className:"text-fg-dim",children:d(g.amount,e.currency)})," ",d(Wr(g.amount,e.deliveryDiscountPercent),e.currency)]}):d(g.amount,e.currency),tag:g.tag||void 0},g.id)}),f?P("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:[Po," ",o("button",{type:"button",onClick:h,className:"underline transition-colors enabled:hover:text-accent",children:"Try again"})]}):n.length===0&&o("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Shipping is arranged after your order is reviewed."})]})})}function To(){let{payChoice:e,setPayChoice:t,payment:n,payOptions:r,noPaymentMethod:i}=me();return P(Zt,{num:4,title:"Payment",children:[i&&o("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:Co}),o("div",{className:"grid gap-3",children:r.map(s=>o(Jt,{active:e===s.key,onClick:()=>t(s.key),title:s.title,body:s.body,price:s.price,tag:s.tag},s.key))}),e==="card"?o("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter card details on the secure payment step after placing the order."}):e==="paypal"?o("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll approve the payment with PayPal on the payment step after placing the order."}):e==="afterpay"?o("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Afterpay to approve four interest-free payments, then brought straight back."}):e==="square"?o("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter card details on the secure payment step after placing the order."}):e==="gocardless"?o("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll set up a bank direct debit with GoCardless, then be brought straight back. Direct debits clear in a few days."}):e==="zip"?o("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Zip to approve four instalments, then brought straight back."}):e==="klarna"?o("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Klarna to choose how to pay, then brought straight back."}):e==="worldpay"?o("p",{className:"font-mono text-xs uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter your card on Worldpay\u2019s secure page, then be brought straight back."}):e==="bank"?o("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Our team emails you the invoice and bank details after review."}):null]})}function qo(){let{site:e,items:t,totals:n,coupon:r,formatMoney:i,payChoice:s,placing:d,email:p,orderError:m,payment:f,noPaymentMethod:h,unpaidOrder:g,formLocked:b,restoredPrices:x,basketRead:E,quoteFailed:C,retryQuote:O,placeOrder:G}=me(),R=x==="waiting"||!E,w=x==="changed";return P("aside",{className:"sticky top-[var(--sf-checkout-header-h,88px)] border border-line max-view-desktop:static",style:{background:"linear-gradient(180deg, color-mix(in oklab, var(--site-surface) 70%, var(--bg)) 0%, var(--bg) 100%)"},children:[P("header",{className:"flex items-center justify-between border-b border-accent bg-accent px-6 py-4 font-mono text-[13px] font-bold uppercase tracking-[0.28em] text-bg",children:[o("span",{children:"Your order"}),o(ot,{href:"/wheels",className:"text-bg/80 transition-colors hover:text-bg",children:"Edit \u2197"})]}),o("div",{className:"flex flex-col px-6 py-2",children:E?t.length===0?P("div",{className:Eo,children:["Your cart is empty. ",o(ot,{href:"/wheels",className:"text-accent underline-offset-4 hover:underline",children:"Browse the catalog \u2192"})]}):t.map(I=>o(Ks,{slug:I.slug,name:I.name,qty:I.qty,config:I.config,configSummary:Ds(I.config),price:w||R?null:Hr(I,n.currency)??0,currency:n.currency},I.id)):o("div",{role:"status",className:Eo,children:qs})}),o(Xt,{locked:b,className:"border-t border-line px-6 pt-5",children:o(Zr,{customerEmail:p,disabled:b})}),P("div",{className:"flex flex-col gap-2 border-t border-line mt-5 px-6 pt-5",children:[o(Be,{label:"Subtotal",value:R?Kt:i(w?n.serverSubtotal??0:n.subtotal,n.currency)}),(n.discount>0||n.deliverySaving>0)&&r?.valid&&o(Be,{label:`Coupon \xB7 ${r.code}`,value:o("span",{className:"font-semibold text-green",children:Yr(n,I=>i(I,n.currency))})}),r?.deferred&&o(Be,{label:`Coupon \xB7 ${r.code}`,value:Mr}),r?.valid&&r.effects?.gift&&o(Be,{label:`Free gift \xB7 ${r.effects.gift.partNumber}${r.effects.gift.quantity>1?` \xD7${r.effects.gift.quantity}`:""}`,value:o("span",{className:"font-semibold text-green",children:Mt})}),o(Be,{label:"Shipping",value:n.shippingStatus==="free"?o("span",{className:"font-semibold text-green",children:Mt}):$r(n.shippingStatus)??i(n.shipping,n.currency)}),n.tax&&(n.tax.charged?o(Be,{label:n.tax.inclusive?`${n.tax.name} included \xB7 ${n.tax.rate}%`:n.tax.name,value:i(n.tax.amount,n.currency)}):n.tax.name?o(Be,{label:n.tax.name,value:jr}):null)]}),P("div",{className:"mt-4 flex items-end justify-between border-y-2 border-accent px-6 py-4",style:{background:"color-mix(in oklab, var(--accent) 10%, var(--bg))"},children:[o("span",{className:"font-display text-[20px] font-bold uppercase tracking-[0.04em] text-fg",children:"Total"}),o("span",{className:"text-right font-display text-[34px] font-bold leading-none tracking-[-0.025em] text-fg",children:n.repricing||!E?Kt:i(n.grand,n.currency)})]}),P("div",{className:"flex flex-col gap-3 px-6 pt-5 pb-6",children:[w&&o(pe,{tone:"quiet",children:ao}),C&&P(pe,{role:"alert",children:[oo," ",o("button",{type:"button",onClick:O,className:"underline transition-colors enabled:hover:text-accent",children:"Try again"})]}),m&&o(pe,{role:"alert",children:m}),n.hasUnpricedLine&&P(pe,{role:"status",children:["One or more items have no price in ",n.currency,". Remove them, or switch region, to continue."]}),o("button",{type:"button",onClick:G,disabled:d||!g&&(h||t.length===0||n.hasUnpricedLine||n.repricing),className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all max-[640px]:gap-3 max-[640px]:whitespace-nowrap max-[640px]:px-4 max-[640px]:text-xs max-[640px]:tracking-normal",d||!g&&(t.length===0||h||n.hasUnpricedLine||n.repricing)?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:d?P(fe,{children:["Building order\u2026 ",o("span",{children:"\xB7"})]}):h?P(fe,{children:["No online payment ",o("span",{children:"\xB7"})]}):g?P(fe,{children:[P("span",{children:["Try payment again",P(Oo,{children:[" \xB7 ",Gt(g)]})]}),o("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]}):C?P(fe,{children:["Total not confirmed ",o("span",{children:"\xB7"})]}):n.repricing||!E?P(fe,{children:[Kt," ",o("span",{children:"\xB7"})]}):P(fe,{children:[P("span",{children:[s==="bank"?"Place order":"Continue to payment",P(Oo,{children:[" \xB7 ",i(n.grand,n.currency)]})]}),P("span",{className:"flex items-center gap-3",children:[o("span",{"aria-hidden":"true",className:"max-[359px]:hidden min-[641px]:hidden",children:i(n.grand,n.currency)}),o("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})]})})]})]})}var _s=" [&:disabled_:disabled]:cursor-not-allowed! [&:disabled_:disabled]:opacity-70! [&_input[readonly]]:cursor-not-allowed [&_input[readonly]]:opacity-70";function Xt({locked:e,className:t="",children:n}){return o("fieldset",{disabled:e,className:"m-0 min-w-0 border-0 p-0 "+t+_s,children:n})}function ot({href:e,className:t="",children:n,...r}){let{placing:i}=me();return i?o("span",{"aria-disabled":"true","aria-label":r["aria-label"],className:t+" pointer-events-none",children:n}):o(Te,{href:e,"aria-label":r["aria-label"],className:t,children:n})}function Fs({orderNumber:e}){return o(pe,{tone:"quiet",role:"status",children:P("span",{className:"flex items-start gap-2",children:[P("svg",{"aria-hidden":!0,viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"mt-[3px] shrink-0",children:[o("rect",{x:"3",y:"7",width:"10",height:"7",rx:"1"}),o("path",{d:"M5 7V5a3 3 0 0 1 6 0v2"})]}),o("span",{children:No(e)})]})})}var Ro={backgroundImage:"linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%)",backgroundPosition:"calc(100% - 18px) 50%, calc(100% - 12px) 50%",backgroundSize:"6px 6px",backgroundRepeat:"no-repeat"};function Zt({num:e,title:t,children:n}){let{capitalised:r}=me();return P("section",{className:"mb-6 border border-line bg-bg",children:[P("header",{className:"flex items-center gap-4 border-b border-line bg-surface px-6 py-4",children:[o("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:r?String(e):`N\xB0 ${String(e).padStart(2,"0")}`}),o("h2",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:t})]}),o("div",{className:"flex flex-col gap-4 px-6 py-6",children:n})]})}function _o({cols:e="two",children:t}){return o("div",{className:["grid gap-3 max-[640px]:grid-cols-1",e==="two"?"grid-cols-2":"grid-cols-[1.2fr_1fr_1fr]"].join(" "),children:t})}function Jt({active:e,onClick:t,title:n,body:r,price:i,tag:s}){return P("button",{type:"button",onClick:t,"aria-pressed":e,className:["relative grid grid-cols-[auto_1fr_auto] items-center gap-5 border bg-bg px-6 py-5 text-left transition-colors",e?"border-accent outline outline-1 outline-accent -outline-offset-1":"border-line enabled:hover:border-[color-mix(in_oklab,var(--accent)_50%,var(--site-line))]"].join(" "),style:e?{background:"color-mix(in oklab, var(--accent) 14%, var(--bg))"}:void 0,children:[e&&o("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-[3px] bg-accent"}),o("span",{className:["flex h-[18px] w-[18px] items-center justify-center rounded-full border-2",e?"border-accent":"border-fg-dim"].join(" "),children:e&&o("span",{className:"block h-2.5 w-2.5 rounded-full bg-accent"})}),P("span",{className:"flex min-w-0 flex-col gap-1",children:[P("span",{className:"flex flex-wrap items-baseline gap-3 font-display text-[18px] font-medium tracking-[-0.01em] text-fg",children:[n,s&&o("span",{className:"border px-2 py-0.5 font-mono text-[11px] font-normal uppercase tracking-[0.24em] text-accent",style:{background:"color-mix(in oklab, var(--accent) 14%, transparent)",borderColor:"color-mix(in oklab, var(--accent) 45%, var(--site-line))"},children:s})]}),r&&o("span",{className:"font-mono text-[12px] uppercase tracking-[0.22em] text-fg-dim",children:r})]}),o("span",{className:"whitespace-nowrap font-display text-[18px] font-medium tracking-[-0.01em] text-fg",children:i})]})}function Ms({checked:e,onChange:t,label:n,sub:r}){return P("div",{className:"flex items-start gap-3 border-t border-line py-4 first:border-t-0 first:pt-0",children:[o("button",{type:"button",onClick:()=>t(!e),"aria-pressed":e,"aria-label":n,className:["mt-px flex h-5 w-5 flex-shrink-0 items-center justify-center border transition-colors",e?"border-accent":"border-line"].join(" "),style:e?{background:"color-mix(in oklab, var(--accent) 18%, transparent)"}:void 0,children:e&&o("span",{className:"text-[13px] text-accent",children:"\u2713"})}),P("span",{className:"flex-1 font-display text-[16px] leading-[1.5] text-fg",children:[n,r&&o("small",{className:"mt-1 block font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim",children:r})]})]})}function Ks({slug:e,name:t,qty:n,config:r,configSummary:i,price:s,currency:d}){let{catalog:p}=Dt(),{formatMoney:m}=be(),f=p.find(C=>C.slug===e),h=f?.spokes??5,g=f?.mesh??!1,b=r.find(C=>C.gold)?.label,x=f?.finishes.find(C=>C.name===b&&C.src)??f?.finishes.find(C=>C.src),E=f?.finishes[0]?.color??Xr;return P("div",{className:"grid grid-cols-[60px_1fr_auto] items-center gap-4 border-b border-line py-4 last:border-b-0",children:[P("div",{className:"relative aspect-square",children:[o("div",{className:"flex h-full w-full items-center justify-center overflow-hidden border border-line bg-surface",children:x?.src?o(Ir,{src:x.src,alt:`${t.lead}${t.accent} \u2014 ${x.name}`,width:120,height:120,sizes:"60px",className:"block h-full w-full object-contain p-2"}):o("div",{className:"block w-[78%]",style:{color:E},children:o(Jr,{spokes:h,mesh:g,className:"block w-full"})})}),o("span",{className:"absolute -right-1.5 -top-1.5 z-[2] flex h-[18px] w-[18px] items-center justify-center rounded-full bg-accent font-mono text-[11px] font-bold text-bg",children:n})]}),P("div",{className:"flex min-w-0 flex-col gap-0.5",children:[P("span",{className:"font-display text-[17px] font-bold uppercase leading-none tracking-[-0.005em] text-fg",children:[t.lead,o("em",{className:"font-serif font-normal italic text-accent tracking-[-0.005em] normal-case",children:t.accent})]}),o("span",{className:"font-mono text-[12px] uppercase leading-[1.5] tracking-[0.18em] text-fg-dim",children:i})]}),o("span",{className:"text-right font-display text-[17px] font-bold tracking-[-0.005em] text-fg",children:s===null?null:m(s,d)})]})}function Oo({children:e}){return o("span",{className:"max-[640px]:sr-only",children:e})}function Be({label:e,value:t}){return P("div",{className:"flex items-center justify-between font-mono text-[13px] font-medium uppercase tracking-[0.18em] text-fg",children:[o("span",{children:e}),o("strong",{className:"font-display text-[16px] font-medium tracking-[-0.005em] normal-case text-fg",children:t})]})}function Ds(e){return e.map(t=>t.label).join(" \xB7 ")}import{Fragment as z,jsx as c,jsxs as v}from"react/jsx-runtime";function Wn(e){return c(So,{...e,children:c(Ws,{children:c(Bs,{})})})}function Ws({children:e}){let{capitalised:t}=me();return t?c("div",{"data-checkout-case":"capitalised",className:"contents",children:e}):c(z,{children:e})}function Ys({order:e,paid:t}){let{formatMoney:n}=be();if(!e.grandTotal||!e.currency)return null;let r=d=>n(Number(d),e.currency),i=Number(e.freightCharge??0),s=Number(e.discountAmount??0);return v("dl",{className:"grid w-full max-w-sm grid-cols-[1fr_auto] gap-x-6 gap-y-1 border-y border-line py-3 text-left text-sm",children:[(e.shippingMethod||i>0)&&v(z,{children:[v("dt",{className:"text-fg-dim",children:["Delivery",e.shippingMethod?` \xB7 ${e.shippingMethod}`:""]}),c("dd",{className:"text-right font-mono",children:r(e.freightCharge??"0")})]}),s>0&&v(z,{children:[v("dt",{className:"text-fg-dim",children:["Discount",e.couponCode?` \xB7 ${e.couponCode}`:""]}),v("dd",{className:"text-right font-mono",children:["\u2212",r(e.discountAmount??"0")]})]}),c("dt",{className:"text-fg",children:t?"Total paid":"Order total"}),c("dd",{className:"text-right font-mono text-fg",children:r(e.grandTotal)})]})}function $s({result:e,lostChangeNote:t=null}){let n=c("span",{className:"font-mono text-fg",children:e.checkoutNumber});return v("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:e.kind==="refunded"||e.kind==="expired"?"Order not placed":e.kind==="processing"?"Payment processing":"Payment received"}),c("p",{className:"text-fg-dim",children:e.kind==="refunded"?v(z,{children:["An item sold out or an offer ended while you paid for checkout ",n,". Your payment goes back to your card."]}):e.kind==="expired"?v(z,{children:["The hold on checkout ",n," ran out before your payment arrived. Your payment goes back to your card."]}):e.kind==="processing"?v(z,{children:["Your payment for checkout ",n," is being processed. When it goes through, we will email your order confirmation."]}):v(z,{children:["Thank you \u2014 your payment",e.checkoutNumber?v(z,{children:[" for checkout ",n]}):null," has gone through. We will email you the order number shortly."]})}),t&&e.kind!=="refunded"&&e.kind!=="expired"&&c("p",{className:"text-sm text-fg-dim",children:t}),c(Te,{href:"/wheels",className:"mt-2 border-2 border-line px-6 py-3 font-mono text-[12px] uppercase tracking-[0.24em] hover:border-accent",children:"Continue browsing"})]})}function Bs(){let{site:e,logo:t,items:n,placing:r,formLocked:i,email:s,me:d,addressSaveNote:p,lostChangeNote:m,idemKey:f,confirmation:h,setConfirmation:g,payment:b,paypalStep:x,squareStep:E,pendingConf:C,paid:O,setPaid:G,payNote:R,afterpayConfirming:w,gocardlessConfirming:I,zipConfirming:Q,klarnaConfirming:ce,worldpayConfirming:oe,cardConfirming:ke,checkoutResult:Ne,confirmCardPayment:$,cardStillProcessing:ye,renewCardPayment:we,holdRenewed:Fe,leaveCardPayment:V,checkoutRootRef:ee,setCheckoutHeaderEl:k}=me();return h?v("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:O?"Payment received":"Order received"}),v("p",{className:"text-fg-dim",children:[O?v(z,{children:["Thank you \u2014 your payment for order"," ",c("span",{className:"font-mono text-fg",children:h.orderNumber})," has gone through."," "]}):v(z,{children:["Thank you \u2014 your order ",c("span",{className:"font-mono text-fg",children:h.orderNumber})," is being reviewed by our team."," "]}),d?v(z,{children:["Track it under"," ",c(Te,{href:"/account/orders",className:"text-accent underline",children:"your orders"}),"."]}):h.accountLinkSent?c(z,{children:"We\u2019ve emailed you a link to set a password and track it."}):v(z,{children:["Already have an account?"," ",c(Te,{href:"/login?next=%2Faccount%2Forders",className:"text-accent underline",children:"Sign in"})," ","to see it under your orders."]})]}),c(Ys,{order:h,paid:O}),m&&c("p",{className:"text-sm text-fg-dim",children:m}),R&&(R.warning?c("div",{className:"w-full max-w-sm text-left",children:c(pe,{tone:"bad",role:"alert",children:R.text})}):c("p",{className:"text-sm text-fg-dim",children:R.text})),p&&c("p",{className:"text-sm text-fg-dim",children:p}),!d&&v("p",{className:"text-sm text-fg-dim",children:["You can also"," ",c(Te,{href:`/track?order=${encodeURIComponent(h.orderNumber)}`,className:"text-accent underline",children:"track this order"})," ","anytime with just your order number and email \u2014 no password needed."]}),c(Te,{href:"/wheels",className:"mt-2 border-2 border-line px-6 py-3 font-mono text-[12px] uppercase tracking-[0.24em] hover:border-accent",children:"Continue browsing"})]}):Ne?c($s,{result:Ne,lostChangeNote:m}):ke?v("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Placing your order \u2014 one moment."})]}):w?v("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Afterpay \u2014 one moment."})]}):I?v("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:"Setting up your direct debit\u2026"}),c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Confirming with GoCardless \u2014 one moment."})]}):Q?v("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Zip \u2014 one moment."})]}):ce?v("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Klarna \u2014 one moment."})]}):oe?v("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),c("p",{className:"font-mono text-xs uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Worldpay \u2014 one moment."})]}):b&&C?c(Hs,{payment:b,checkout:C,holdRenewed:Fe,onPaid:$,onProcessing:ye,onRenew:we,onBack:V}):x&&C?c(Js,{confirmation:C,clientId:e.paypalClientId??"",idemKey:f,onPaid:()=>{G(!0),g(C)},onSkip:()=>g(C)}):E&&C?c(Qs,{confirmation:C,applicationId:e.squareApplicationId??"",locationId:e.squareLocationId??"",environment:e.squareEnvironment??"production",idemKey:f,onPaid:()=>{G(!0),g(C)},onSkip:()=>g(C)}):v("div",{ref:ee,className:"bg-bg text-fg",children:[v("header",{ref:k,className:"sticky top-0 z-30 grid grid-cols-[1fr_auto_1fr] items-center gap-8 max-[640px]:grid-cols-[auto_minmax(0,1fr)_auto] max-[640px]:gap-3 border-b border-line px-[var(--sf-site-gutter,40px)] py-6 backdrop-blur-md max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[640px]:py-4",style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[v(ot,{href:"/",className:"inline-flex items-center gap-3 font-mono text-[14px] uppercase tracking-[0.26em] text-fg-dim transition-colors hover:text-accent",children:["\u2190",c("span",{className:"max-[640px]:hidden",children:"Back to shop"})]}),c("div",{className:"flex min-w-0 justify-center max-[640px]:[container-type:inline-size]",children:c(ot,{href:"/","aria-label":`${e.name} home`,className:"inline-flex max-w-full items-center justify-center max-[640px]:overflow-x-clip",children:[!0,!1].map(J=>c(ea,{hideClass:J?"min-[641px]:hidden":"max-[640px]:hidden",variant:"header",scrolled:!0,src:t?.url??null,reverse:t?.reverse??!1,reversedSrc:t?.reversed??null,inkIsDark:t?.inkIsDark??null,size:t?.size??"medium",sizePx:t?.sizePx??null,sizeUnit:t?.sizeUnit??null,siteName:e.name,fitWordmarkToContainer:J,fitFloorPx:J?Qr:void 0},J?"phone":"wide"))})}),e.cardPayments?v("span",{className:"flex items-center justify-end gap-3 font-mono text-[12px] uppercase tracking-[0.26em] text-fg-dim",children:[c("span",{className:"text-green",children:"\u25CF"}),c("span",{className:"max-[640px]:hidden",children:"Encrypted \xB7"})," Stripe"]}):c("span",{})]}),v("section",{className:"mx-auto flex max-w-[var(--sf-site-width,1600px)] flex-wrap items-center justify-between gap-x-8 gap-y-3 border-b border-line bg-surface px-[var(--sf-site-gutter,40px)] py-4 font-mono text-[13px] font-medium uppercase tracking-[0.24em] text-fg max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",children:[c("span",{className:"inline-flex items-center bg-accent px-3 py-1 font-bold text-bg",children:"Checkout"}),c("nav",{"aria-label":"Checkout steps",className:"flex flex-wrap items-center gap-5 max-[640px]:flex-nowrap max-[640px]:gap-3 max-[640px]:whitespace-nowrap max-[640px]:text-xs max-[640px]:tracking-[0.04em]",children:[{n:"01",label:"Cart",state:"done"},{n:"02",label:"Ship & pay",state:"active"},{n:"03",label:"Confirmed",state:"pending"}].map(J=>v("span",{className:["relative flex items-center gap-2 transition-colors",J.state==="pending"?"text-fg-dim":"text-fg",J.state==="active"?"font-bold after:absolute after:inset-x-0 after:-bottom-1 after:h-[2px] after:bg-accent":""].join(" "),children:[c("span",{className:J.state==="done"?"text-accent font-bold":"",children:J.n}),c("span",{children:J.label})]},J.n))})]}),v("main",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[1fr_420px] items-start gap-16 px-[var(--sf-site-gutter,40px)] pt-10 pb-[100px] max-view-desktop:grid-cols-1 max-view-desktop:gap-10 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-desktop:pt-8 max-view-desktop:pb-20",children:[v("div",{children:[v(Xt,{locked:i,children:[c(Ao,{}),c(Lo,{}),c(Io,{})]}),c(Xt,{locked:r,children:c(To,{})})]}),c(qo,{})]}),c("footer",{className:"flex flex-wrap items-center justify-between gap-4 border-t border-line px-[var(--sf-site-gutter,40px)] py-6 font-mono text-[12px] uppercase tracking-[0.22em] text-fg-dim max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))]",children:c("span",{children:Gr({legalName:e.legalName,foundedYear:e.foundedYear,siteName:e.name})})})]})}function Hs({payment:e,checkout:t,holdRenewed:n,onPaid:r,onProcessing:i,onRenew:s,onBack:d}){let{formatMoney:p}=be(),m=c("span",{className:"text-fg",children:p(Number(e.amount),e.currency)}),f=Fo(()=>$t(e.publishableKey),[e.publishableKey]),h=Fo(()=>ra(),[]),g=na(t.expiresAt??"",Us()??"");return c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:v("div",{className:"w-full max-w-xl border border-line bg-bg",children:[v("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[c("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:Gt(t)}),c("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Payment"})]}),v("div",{className:"flex flex-col gap-4 px-6 py-6",children:[c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:t.orderNumber?v(z,{children:["Your order is placed. Pay ",m," by card to confirm it now."]}):n?v(z,{children:["Your hold ran out, so your items are held again",g?` until ${g}`:"",". Enter your card again, then pay ",m,"."]}):v(z,{children:["Your items are held",g?` until ${g}`:"",". Pay ",m," by card to place your order."]})}),c(Pn,{stripe:f,options:{clientSecret:e.clientSecret,appearance:h},children:c(Gs,{payment:e,checkout:t,onPaid:r,onProcessing:i,onRenew:s,onBack:d})},e.clientSecret)]})]})})}var zs=5;function Gs({payment:e,checkout:t,onPaid:n,onProcessing:r,onRenew:i,onBack:s}){let{formatMoney:d}=be(),p=wa(),m=Pa(),[f,h]=He(!1),[g,b]=He(null),x=it(!1);async function E(){try{return(await p.retrievePaymentIntent(e.clientSecret)).paymentIntent?.status}catch{return}}async function C(R){let w=R;for(let I=0;w==="processing"&&I<zs;I+=1)await new Promise(Q=>setTimeout(Q,1e3)),w=await E()??w;if(w==="succeeded"){n();return}if(w==="processing"){r();return}b("Payment did not complete. Please try again."),h(!1)}async function O(){if(!p||!m||f)return;h(!0),b(null),x.current=!0;let R=await p.confirmPayment({elements:m,redirect:"if_required"}).catch(()=>null);if(!R){let w=await E();if(w==="succeeded"||w==="processing"){await C(w);return}b(w===void 0?_e:"Payment failed. Please try again."),h(!1);return}if(R.error){if(!t.orderNumber&&R.error.code==="payment_intent_unexpected_state"){let w=await E();if(w==="succeeded"||w==="processing"){await C(w);return}if(w===void 0){b(_e),h(!1);return}await i(w==="canceled"),h(!1);return}b(R.error.message??"Payment failed. Please try again."),h(!1);return}await C(R.paymentIntent?.status)}async function G(){if(f)return;if(!x.current){s();return}h(!0),b(null);let R=await E();if(R==="succeeded"||R==="processing"){await C(R);return}if(h(!1),R===void 0){b(_e);return}s()}return v("div",{className:"flex flex-col gap-4",children:[c(Sa,{}),g&&c(pe,{role:"alert",children:g}),c("button",{type:"button",onClick:O,disabled:!p||!m||f,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!p||!m||f?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:f?v(z,{children:["Processing\u2026 ",c("span",{children:"\xB7"})]}):v(z,{children:["Pay ",d(Number(e.amount),e.currency),c("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})}),!t.orderNumber&&!f&&v("button",{type:"button",onClick:G,className:"inline-flex items-center gap-3 self-start font-mono text-[12px] uppercase tracking-[0.26em] text-fg-dim transition-colors hover:text-accent",children:["\u2190",c("span",{children:"Back to checkout"})]})]})}var Mo="paypal-sdk-js",Un=null;function Vs(e,t){let n=`${e}|${t}`;if(Un?.key===n)return Un.promise;let r=new Promise((i,s)=>{document.getElementById(Mo)?.remove();let d=document.createElement("script");d.id=Mo;let p=new URLSearchParams({"client-id":e,currency:t,intent:"capture"});d.src=`https://www.paypal.com/sdk/js?${p}`,d.onload=()=>{let m=window.paypal;m?i(m):s(new Error("PayPal SDK loaded without its namespace"))},d.onerror=()=>s(new Error("PayPal SDK failed to load")),document.head.appendChild(d)});return Un={key:n,promise:r},r}function Js({confirmation:e,clientId:t,idemKey:n,onPaid:r,onSkip:i}){let{formatMoney:s}=be(),d=it(null),[p,m]=He(!1),[f,h]=He(null),g=it(r);return g.current=r,Do(()=>{let b=!1,x=null;return Vs(t,e.currency).then(E=>{if(!(b||!d.current))return x=E.Buttons({style:{layout:"vertical",color:"gold",shape:"rect",label:"paypal"},createOrder:async()=>(await K.createPaypalOrder({idempotencyKey:n})).paypalOrderId,onApprove:async C=>{try{if((await K.capturePaypalOrder({idempotencyKey:n,paypalOrderId:C.orderID})).status==="paid"){g.current();return}h("PayPal did not complete the payment. Please try again.")}catch(O){h(O instanceof de?O.message:"PayPal payment failed. Please try again.")}},onError:()=>{h("PayPal could not process the payment. Please try again.")}}),x.render(d.current).then(()=>{b||m(!0)})}).catch(()=>{b||h("PayPal could not be loaded. You can pay later \u2014 your order stands either way.")}),()=>{b=!0,x?.close?.()}},[t,e.currency,n]),c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:v("div",{className:"w-full max-w-xl border border-line bg-bg",children:[v("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[c("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:e.orderNumber}),c("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"PayPal"})]}),v("div",{className:"flex flex-col gap-4 px-6 py-6",children:[v("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",c("span",{className:"text-fg",children:s(Number(e.grandTotal),e.currency)})," ","with PayPal to confirm it now."]}),!p&&!f&&c("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading PayPal\u2026"}),c("div",{ref:d}),f&&c(pe,{role:"alert",children:f}),c("button",{type:"button",onClick:i,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later \u2014 our team will be in touch"})]})]})})}var Ko="square-web-sdk",jn=null,Xs=["sandbox","production"];function Zs(e){let t=js(Xs,"production",e);if(jn?.key===t)return jn.promise;let n=new Promise((r,i)=>{document.getElementById(Ko)?.remove();let s=document.createElement("script");s.id=Ko,s.src=t==="sandbox"?"https://sandbox.web.squarecdn.com/v1/square.js":"https://web.squarecdn.com/v1/square.js",s.onload=()=>{let d=window.Square;d?r(d):i(new Error("Square SDK loaded without its namespace"))},s.onerror=()=>i(new Error("Square SDK failed to load")),document.head.appendChild(s)});return jn={key:t,promise:n},n}function Qs({confirmation:e,applicationId:t,locationId:n,environment:r,idemKey:i,onPaid:s,onSkip:d}){let{formatMoney:p}=be(),m=it(null),f=it(null),h=it(null),[g,b]=He(!1),[x,E]=He(!1),[C,O]=He(null);Do(()=>{let R=!1,w=null;return Zs(r).then(async I=>{if(R||!m.current)return;let Q=I.payments(t,n);h.current=Q,w=await Q.card(),await w.attach(m.current),f.current=w,R||b(!0)}).catch(()=>{R||O("Square could not be loaded. You can pay later \u2014 your order stands either way.")}),()=>{R=!0,w?.destroy?.()}},[t,n,r]);async function G(){let R=f.current;if(!(!R||x)){E(!0),O(null);try{let w=await R.tokenize();if(w.status!=="OK"||!w.token){O(w.errors?.[0]?.message??"Please check the card details and try again."),E(!1);return}let I;try{I=(await h.current?.verifyBuyer?.(w.token,{amount:String(e.grandTotal),currencyCode:e.currency,intent:"CHARGE"}))?.token}catch{}if((await K.chargeSquare({idempotencyKey:i,sourceId:w.token,...I?{verificationToken:I}:{}})).status==="paid"){s();return}O("Square did not complete the payment. Please try again.")}catch(w){O(w instanceof de?w.message:"Square payment failed. Please try again.")}E(!1)}}return c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:v("div",{className:"w-full max-w-xl border border-line bg-bg",children:[v("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[c("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:e.orderNumber}),c("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Card"})]}),v("div",{className:"flex flex-col gap-4 px-6 py-6",children:[v("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",c("span",{className:"text-fg",children:p(Number(e.grandTotal),e.currency)})," ","by card to confirm it now."]}),!g&&!C&&c("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading card form\u2026"}),c("div",{ref:m}),C&&c(pe,{role:"alert",children:C}),c("button",{type:"button",onClick:G,disabled:!g||x,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!g||x?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:x?v(z,{children:["Processing\u2026 ",c("span",{children:"\xB7"})]}):v(z,{children:["Pay ",p(Number(e.grandTotal),e.currency),c("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})}),c("button",{type:"button",onClick:d,disabled:x,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later \u2014 our team will be in touch"})]})]})})}import{jsx as Qt}from"react/jsx-runtime";function ec(){let{settings:e,websiteName:t}=Tr(),n=t?{...bn,name:t}:bn,r=e?{url:e.logoUrl,reversed:e.logoReversed??null,inkIsDark:e.logoInkIsDark??null,reverse:e.reverseLogo,size:e.logoSize,sizePx:e.logoSizePx,sizeUnit:e.logoSizeUnit??null}:null;return Qt("div",{style:{position:"fixed",inset:0,zIndex:2147482e3,overflowY:"auto",background:"var(--bg)",color:"var(--fg)"},children:Qt(Br,{children:Qt(zr,{preview:!0,children:Qt(Wn,{site:n,logo:r,textCase:e?.navTextCase,preview:!0})})})})}export{ec as default};
@@ -0,0 +1 @@
1
+ "use client";import{Xh as r}from"./chunk-6AODAOZ5.js";import"./chunk-P34EYTSF.js";import"./chunk-PPCAEV32.js";import"./chunk-NMX2Y4EJ.js";import"./chunk-IONUM72D.js";import"./chunk-Y7YKT7VT.js";import"./chunk-BA5HNYFW.js";import"./chunk-ERLKLMUX.js";import"./chunk-Y6SLVHK3.js";import{jsx as o}from"react/jsx-runtime";import e from"efficient-easel/screen/components/ScreenStoreProvider";function a(t){return o(e,{...t,parts:r})}export{a as default};
@@ -1,4 +1,4 @@
1
- import{$ as lf,D as Bk,E as Lk,F as tf,G as Rk,H as zk,I as Or,J as Uk,K as jk,L as Gk,M as nt,N as rf,O as ko,P as fe,R as af,S as Er,T as nf,X as Kk,Y as sf,Z as _r,_ as qk,a as Xo,b as Xs,ba as aP,c as Kd,d as Sn,e as Js,f as ik,fa as xP,g as bn,h as qd,ha as hP,ia as Mf,ja as UT,ka as jT,r as al,t as Fk}from"./chunk-75GXE5JB.js";import{a as bP,d as bf,e as st,f as wf,g as Cf,h as Tf,l as Kx}from"./chunk-62AOYUOH.js";import{$ as ix,$a as Xd,$c as wv,$d as fa,$e as vf,$f as Of,$j as Ln,A as kC,Aa as YC,Ab as Qd,Ac as sv,Ad as Hv,Ae as dP,Ag as oT,Aj as _n,B as vC,Ba as XC,Bb as ef,Bc as lv,Bd as Wv,Be as fP,Bf as WP,Bg as tT,Bj as TT,C as PC,Ca as JC,Cb as Ok,Cc as iv,Cd as $v,Ce as cP,Cg as rT,D as rt,Da as px,Db as ho,Dc as mf,Dd as zv,De as pP,Dg as Bx,Dk as ml,E as TC,Ea as ZC,Eb as hx,Ec as dv,Ed as Cx,Ee as yf,Eg as aT,Ej as Hx,Ek as Nf,F as OC,Fa as QC,Fb as tl,Fc as fv,Fd as Uv,Fe as uP,Fg as Lx,Fj as pl,Fk as Ux,G as EC,Ga as ek,Gb as zt,Gc as cv,Gd as jv,Ge as mP,Gg as dr,Gk as HT,H as _C,Ha as ok,Hb as Cn,Hc as pv,Hd as Gv,Hg as Rx,Hk as ua,I as AC,Ia as tk,Ib as rl,Ic as jt,Id as Kv,Ie as kt,Ig as _f,Ij as An,Ik as WT,J as FC,Ja as rk,Jc as Ue,Jd as qv,Jg as nT,Jk as $T,K as BC,Ka as vr,Kc as Ar,Kd as kx,Ke as je,Kf as $P,Kg as sT,Kj as OT,Kk as zT,La as ak,Lb as Ix,Lc as Sx,Ld as Vv,Le as vt,Lf as zP,Lg as lT,M as LC,Mb as na,Mc as uv,Md as vx,Me as Oe,Mf as UP,Mg as iT,Mk as GT,N as RC,Na as nk,Nb as of,Nc as mv,Nd as Yv,Ne as yP,Nf as jP,Ng as dT,Nk as jx,O as DC,Oa as Vd,Ob as Ek,Oc as xv,Od as Xv,Of as Ax,P as Wd,Pa as Zs,Pb as _k,Pc as xf,Pd as Jv,Pf as GP,Pk as KT,Q as NC,Qa as Yd,Qb as Ak,Qc as sl,Qd as Gt,Qf as KP,Qg as fT,Qk as qT,R as MC,Ra as dk,Rb as df,Rc as hv,Rd as Zv,Re as Px,Rf as Fx,Rg as cT,Rk as VT,Sb as Xk,Sc as Iv,Sd as da,Sj as ET,Sk as YT,Tb as ff,Tc as gv,Tj as Wx,Tk as XT,Ub as yx,Uc as hf,Ud as Qv,Ue as fl,Uj as _T,Uk as JT,Va as fk,Vb as cf,Vc as yv,Vd as Tn,Vf as ir,Vi as pa,Vj as AT,W as lx,Wa as ck,Wc as Sv,Xa as Qs,Xc as bx,Xd as lr,Xf as On,Xi as fr,Xj as Df,Y as Vs,Yc as bv,Yd as eP,Ye as SP,Yj as Fn,Z as $d,Za as wn,Zc as Pn,Zd as dl,Ze as Tx,Zf as qP,Zh as gT,Zj as Bn,_ as Ao,_a as pk,_b as kn,_d as oP,_e as wP,_f as VP,_g as Af,_h as yT,_j as ul,a as _o,aa as In,ab as uk,ad as Cv,ae as tP,ag as Lr,ak as FT,b as mn,ba as HC,bb as el,bc as Jk,bd as kv,bf as _P,bg as Ef,ca as WC,cb as mk,cc as Zk,cd as vv,ce as If,cj as Lf,d as sC,da as $C,db as xk,dc as Qk,dd as Pv,de as Br,dg as En,e as rx,ea as zC,eb as hk,ec as nl,ed as sa,ee as rP,ef as Ex,eh as pT,ej as wT,f as lC,fa as UC,fb as Ik,fd as Tv,g as c,ga as dx,gb as mx,gd as wx,gh as uT,h as $t,hb as gk,hd as Ov,hk as BT,i as hn,ia as jC,ib as ol,id as Ev,ii as ST,ik as LT,j as Ks,ja as zd,jb as yk,jd as _v,jf as AP,ji as bT,jl as Gx,k as No,kb as xx,kd as Av,kf as FP,l as qs,ld as Fv,lf as Pf,mb as Sk,md as Fr,me as nP,mf as BP,mg as Rr,n as xC,nb as bk,nd as ll,nf as LP,ng as YP,o as hC,od as la,og as XP,p as IC,pb as Jd,pc as vn,pd as Bv,pe as sP,pg as JP,pk as $x,q as gC,qb as wk,qc as Ut,qe as lP,qh as Dx,qj as CT,r as yC,rb as Ck,rc as ev,rd as ia,re as iP,rh as Ff,rk as RT,rl as ZT,s as SC,sb as kk,sc as ov,sd as il,sh as ca,sk as DT,sl as QT,t as bC,tb as vk,tc as tv,td as Lv,th as Bf,tj as kT,tk as NT,tl as Hf,u as wC,ub as Zd,uc as rv,ud as Rv,uf as RP,ug as ZP,uj as Rf,ul as e0,v as Hd,vb as Pk,vc as av,vf as _x,vh as mT,vj as Nx,vk as MT,w as kr,wc as pf,wd as Dv,we as Mo,wf as DP,wh as xT,wj as vT,wl as Rn,xc as uf,xd as Nv,xe as ao,xf as NP,xh as hT,xj as PT,xk as zx,xl as Wf,y as sx,yb as Tk,yc as nv,yd as Mv,yf as MP,yg as QP,yh as IT,yj as Mx,z as CC,za as VC,zb as Pr,ze as gf,zf as HP,zg as eT}from"./chunk-ESXERZQ3.js";import{a as uC,b as Md,c as mC,g as Vk,h as gx,i as Yk}from"./chunk-XMX3KEE4.js";import{$ as Ib,$a as Mb,$c as R,$e as Zm,$g as cC,A as io,Ab as Zb,Ad as pw,B as tn,Be as Xm,Bf as ox,Ca as ye,Cb as $s,Cd as Vm,Ce as ww,Ci as vo,D as Ms,Db as Qb,E as fd,Ed as uw,Ee as Jm,F as Nt,Fd as Cd,G as rn,Ga as ot,Gg as Zw,Gi as cl,H as ze,Ha as bt,Hb as Sd,Hd as tt,Hg as Qw,I as Xe,Ia as Em,Ic as nw,Id as Do,Ie as Pd,If as Dw,Ig as eC,J as an,Ja as _m,Jd as ro,Je as Td,Jg as oC,K as cd,Kc as Um,Kd as Ht,Ke as Cw,Kh as ux,L as fb,La as Am,Ld as nr,Le as Od,Lf as sr,Lh as gn,M as cb,Ma as Fm,Mb as ew,Md as Ct,Me as Ed,Mg as tC,Mh as sk,Nd as fn,Ne as kw,Nh as at,O as pb,Od as mw,Oe as vw,Oh as Yo,P as pd,Pd as cn,Pe as _d,Pg as rC,Ph as Gd,Q as ub,Qa as Bm,Qd as xw,Qe as Ad,Qg as aC,Qh as lk,R as ea,Ra as _b,Rb as bd,Rc as sw,Re as aa,Rf as Nw,Rh as yn,S as mb,Sa as Ab,Se as Pw,Sg as nC,T as xb,Ta as Ke,U as Hs,Ua as Fb,Ub as ow,Ud as ra,Ug as iC,Uh as Dk,V as Tm,Va as Id,Vb as tw,Vd as hw,Vg as dC,W as Ce,Wa as Bb,Wd as Iw,We as Tw,X as q,Xa as Lb,Xb as rw,Xd as pn,Xf as Mw,Xg as Cr,Y as hb,Ya as Rb,Yc as U,Yd as Us,Yf as Hw,Yh as Nk,Za as Db,Zb as Wm,Zc as oe,Zd as js,Ze as Wt,Zf as Ww,Zg as fC,_ as ud,_a as Nb,_c as jm,_d as Ym,_e as Gs,_f as $w,_g as ax,a as on,ab as Hb,ad as Co,ae as gw,af as Qm,ah as nx,b as xo,ba as gb,bb as Wb,bd as rr,be as yw,bf as Ow,bh as Nd,c as lo,ca as md,cb as gd,cd as lw,ce as Sw,cf as Ew,cg as zw,d as or,da as yb,db as yd,dd as H,df as Fd,dg as Uw,dh as pC,di as Mk,ea as Sb,eb as $b,ed as wd,ee as bw,ef as _w,ei as Tr,f as Vo,fa as Om,fb as zb,fd as Ro,fg as jw,g as Ns,ga as bb,gc as $m,gd as iw,ge as kd,gg as Gw,gi as Hk,h as tb,ha as wb,hb as Ub,hd as wt,hf as Aw,hg as Rd,hi as Wk,i as rb,ia as Cb,ib as jb,id as Mt,ie as vd,if as Bd,ig as Kw,ii as $k,j as ab,jb as Lm,jd as Gm,jf as Fw,jg as Dd,k as nb,kb as Gb,kd as br,kf as ex,kg as tx,la as kb,lb as Kb,ld as ar,lf as Bw,ma as vb,mb as Rm,md as dw,mf as Lw,na as Pb,nb as sn,nf as Ld,ng as qw,o as sb,od as Be,of as un,og as Vw,pa as Tb,pb as oa,pd as ta,pf as xn,pi as CP,qb as Dm,qd as zs,qf as wr,qi as kP,ra as Ob,rb as Nm,rd as ln,rg as Yw,rh as fx,ri as kf,s as lb,sa as xd,sb as Mm,sd as fw,sg as Xw,sh as Ud,si as vP,ta as Eb,tb as qb,td as Km,th as GC,ti as Ox,u as Me,ua as hd,ub as Vb,ud as dn,uf as Rw,uh as cx,ui as PP,v as ib,vb as Yb,vc as zm,vd as qm,vg as Jw,vh as KC,w as dd,wb as Hm,wi as TP,x as db,xb as Xb,xc as aw,xh as jd,xi as OP,ya as Ws,yb as tr,yh as qC,yi as EP,z as Te,za as nn,zb as Jb,zd as cw,zh as Ys}from"./chunk-Y3CRPIPD.js";import{a as z,b as eo}from"./chunk-GAND7LXQ.js";import{c as IP,d as gP,e as Sf}from"./chunk-RNSKQVLG.js";import{jsx as qx,Fragment as g6,jsxs as y6}from"react/jsx-runtime";import{createContext as S6,useContext as b6}from"react";var w6={mirrorHostStyles:!0,css:null,fontHrefs:[]},o0=S6(w6);function ise({value:e,children:o}){return qx(o0.Provider,{value:e,children:o})}function xl(){return b6(o0)}function t0(){let{css:e,fontHrefs:o}=xl();return y6(g6,{children:[o.map(t=>qx("link",{rel:"stylesheet",href:t},t)),e?qx("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as C6}from"react/jsx-runtime";import{createContext as k6,useContext as v6}from"react";var r0=k6(void 0);function pse({metadata:e,children:o}){return C6(r0.Provider,{value:e,children:o})}var a0=()=>v6(r0);import{jsx as uo,Fragment as n6,jsxs as rd}from"react/jsx-runtime";import{useCallback as As,useEffect as Jt,useRef as Lne,useState as o6}from"react";import{SettingsSwitch as Rne}from"efficient-easel/panel";import{PagesIcon as Dne,StylesIcon as Nne}from"efficient-easel/rail";import{PaletteIcon as Mne}from"efficient-shell/icons/efficient";import{Subtree as Hne,TreeRow as s6}from"efficient-easel/tree";import{useEasel as l6}from"efficient-easel/easel";import{toItemSelector as Wne}from"efficient-easel/node-ops";import{useEaselStrings as i6}from"efficient-easel/strings";import{createContext as P6,useContext as T6}from"react";var Vx=P6(!1),xse=()=>T6(Vx);import{useMemo as O6,useRef as E6}from"react";import{useEaselApi as _6}from"efficient-easel/easel";import{useSectionOps as A6}from"efficient-easel/screen/lib/document/use-section-ops";function $f(){let e=_6(),o=A6(),t=E6(o);return t.current=o,O6(()=>({getItemById:r=>e.getState().getItemById(r),getSelectorForId:r=>e.getState().getSelectorForId(r),get components(){return e.getState().config.components},replace:(r,a,n)=>t.current.replaceComponent(r,a,n)}),[e])}import{encodePartId as Z6}from"efficient-easel/draw";import{insertAt as Q6,moveTo as e3,removeAt as o3}from"efficient-easel/fields";import{useSyncExternalStore as G6}from"react";import{isNodeList as n0}from"efficient-easel/data";var s0="Flex";function Dn(e,o){return Wt(e)?typeof e?.[Vo]=="string"?Yx(o?.[Vo]):"":Yx(e?.[Vo])}var Yx=e=>typeof e=="string"?e.trim():"",F6=e=>e.type===io&&Array.isArray(e.props?.[Jm])&&e.props[Jm].some(o=>Yx(o?.[Vo])!==""),B6=new Intl.NumberFormat("en-US");function L6(e){return/^\d+$/.test(e)?B6.format(Number(e)):e}function vse(e,o){let t=o?o.find(r=>r.key===e)?.value:lb(Ns).find(r=>r.key===e)?.value;return t===void 0?null:L6(t)}var R6={[Vo]:"any"};function Xx(e,o=!1){let t=e.props;if(!t)return{node:e,names:!1};let r=e.type==="Text"&&(Dn(t)!==""||o&&Dn(t,R6)!==""),a=o||F6(e),n=Xe(e,l=>ze(l,i=>{let d=Xx(i,a);return d.names&&(r=!0),d.node})).props;if(e.type!==s0)return{node:n===t?e:{...e,props:n},names:r};let s=Me(n);if(r&&!s&&(n={...n,[lo]:Ns}),!r&&s===Ns){let{[lo]:l,...i}=n;n=i}return{node:n===t?e:{...e,props:n},names:!1}}function l0(e,o,t){for(let r of e){if(r?.props?.id===o)return t;for(let a of rn(r??{})){let n=l0(a,o,r.type===s0?r:t);if(n!==void 0)return n}}}function Pse(e,o){if(!n0(e))return!0;let t=l0(e,o,null);if(t===void 0)return!0;if(t===null)return!1;let r=Me(t.props);return!r||r===Ns}function i0(e){let o=e?.content;if(!n0(o))return e;let t=o.map(r=>Xx(r));return t.every((r,a)=>r.node===o[a])?e:{...e,content:t.map(r=>r.node)}}function d0(e){return Xx(e).node}import{decodePartId as K6}from"efficient-easel/draw";function Nn(e,o){let t=lv(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?DT(t,o.index):null:iv(e)?.[o.rowKey]??null}function zf(e,o,t){let r=e.node.props,{key:a,row:n}=Ut(e.propKey),s=n?fv(r,a,n,e.kind,o):sv(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}import{readHidable as p0}from"efficient-easel/draw";import{parseOption as D6}from"efficient-shell/format";var Jx=e=>String(e+1).padStart(2,"0"),N6=[{label:"01 \xB7",value:"two-digit"},{label:"1.",value:"plain"}],Zx="two-digit",f0=e=>D6(N6,Zx,e),Uf=(e,o)=>e==="plain"?`${o+1}.`:Jx(o);var oh="Contents",Qx="Flex",c0="Text",M6="numberForm",H6="_contentsEntries",W6="_kickerNumber",u0="data-sf-kicker-number",$6=e=>p0(e).text.trim(),m0=e=>fa(e?.anchor),eh=e=>String(e.props?.id??""),z6=e=>!p0(e.props?.text).hidden&&!Dn(e.props)&&!Wt(e.props),hl=e=>rn(e);function x0(e){for(let o of hl(e))for(let t of o){if(lr(t.props??{}))continue;if(t.type===c0&&z6(t))return t;if(t.type===c0)continue;let r=x0(t);if(r)return r}}function h0(e){return hl(e).some(o=>o.some(t=>t&&!lr(t.props??{})&&(t.type===oh||h0(t))))}var I0=e=>e.type===Qx&&On(Qx,e.props?.direction)==="row";function g0(e){return hl(e).some(o=>o.some(t=>t&&!lr(t.props??{})&&(t.type===oh||!I0(t)&&g0(t))))}function U6(e){let o=[],t=(r,a)=>{for(let n of r){if(!n||lr(n.props??{}))continue;if(n.type===oh){a.open={contents:n,sections:a.waiting??[]},a.waiting=null,o.push(a.open);continue}if(I0(n)&&g0(n)){let l={inRow:!0,open:null,waiting:[]};for(let i of hl(n))t(i,l);a.inRow||(a.open=null);continue}let s=a.open?.sections??a.waiting;if(n.type===Qx&&m0(n.props)&&s&&!h0(n)){s.push({box:n,kicker:x0(n)});continue}for(let l of hl(n))t(l,a)}};return t(e,{inRow:!1,open:null,waiting:null}),o}function j6(e){return e.map(o=>({label:o.kicker?nn($6(o.kicker.props?.text)):"",anchor:m0(o.box.props)}))}function th(e){let o=e?.length?U6(e):[];if(!o.length)return null;let t=new Map,r=new Map;for(let a of o){let n=eh(a.contents);n&&t.set(n,j6(a.sections));let s=f0(a.contents.props?.[M6]);a.sections.forEach((l,i)=>{let d=l.kicker?eh(l.kicker):"";d&&r.set(d,Uf(s,i))})}return{entries:t,numbers:r}}var Gse=e=>e.endsWith(".")?`${e} `:`${e} \xB7 `;function y0(e){let o=e;if(!o?.content?.length)return e;let t=th(o.content);if(!t)return e;let{entries:r,numbers:a}=t,n=s=>{let l=Xe(s,h=>ze(h,n)),i=l.props??{},d=l!==s,f=eh(s),m=f?r.get(f):void 0;m&&(i={...i,[H6]:m},d=!0);let u=f?a.get(f):void 0;return u&&(i={...i,[W6]:u},d=!0),d?{...s,props:i}:s};return{...o,content:o.content.map(n)}}var q6=`[${u0}]`,V6=["bold","italic","underline","strike","link","sup","sub"],Y6=["bullet","number"];function nh(e,o){return e?[...V6,...o?Y6:[]]:[]}function S0(e,o){let t=K6(e);if(!t?.propKey)return null;let{nodeId:r,propKey:a}=t,n=o.getItemById(r),s=o.getSelectorForId(r);if(!n||!s)return null;let{key:l,row:i}=Ut(a),d=o.components[n.type]?.fields?.[l],f=i?Nn(d,i):d,m=pf(f);if(!m)return null;let u=n.props??{};if(gT(u)!==null||!i&&Fd(n.type,u,l)||n.type==="Text"&&l==="text"&&Dn(u)||i&&!(Array.isArray(u[l])&&i.index<u[l].length))return null;let h=i?mf(u[l],i):u[l];return{node:n,selector:s,propKey:a,kind:m,stored:h,offPage:Lf(f),panelOnly:av(f)}}function jf(e,o){let t=S0(e,o);if(!t)return null;let{text:r,hidden:a}=pa(t.stored);if(!Sv({offPage:t.offPage,hidden:!!a,panelOnly:t.panelOnly}))return null;let n=uf(t.kind);return{partId:e,value:r,rules:xd,multiline:n,skip:q6,offered:nh(t.kind!=="plainText",n),write:s=>{let l=S0(e,o);l&&zf({node:l.node,propKey:l.propKey,kind:l.kind,zone:l.selector.zone,index:l.selector.index},s,o.replace)}}}function sh(e,o,t){return e?.isConnected&&e.getAttribute(Ue)===t?e:o?.querySelector(`[${Ue}="${Gf(t)}"]`)??null}function Gf(e){return e.replace(/["\\]/g,"\\$&")}function b0(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var rh=null,ah=new Set;function X6(){return rh}function lh(e){if(e!==rh){rh=e;for(let o of ah)o()}}function J6(e){return ah.add(e),()=>{ah.delete(e)}}function w0(){return G6(J6,X6,()=>null)}function C0(e,o){if(e.outer)return null;let t=o.getItemById(e.ownerId);if(!t)return null;let r=kw(t.type);return!r||Me(t.props)?null:{node:t,rows:r}}function t3(e,o){let t=C0(e,o),r=o.getItemById(e.nodeId);if(!t||!r)return null;let a=_w(r.type,r.props,e.key);if(!a)return null;let n=t.node.props[t.rows];return!Array.isArray(n)||e.index<0||e.index>=n.length?null:Z6(e.ownerId,vn(t.rows,{index:e.index,rowKey:a}))}function Kf(e,o){let t=t3(e,o);return t?jf(t,o):null}function k0(e,o){return Kf(e,o)?.value}function v0(e,o){let t=Kf(e,o);return t?(t.write(e.text),!0):!1}function P0(e,o){let t=C0(e,o),r=t&&o.getSelectorForId(e.ownerId);if(!t||!r)return!1;let a=t.node.props,n=a[t.rows],s=e.index;if(!Array.isArray(n)||s<0||s>=n.length)return!1;let l;switch(e.action){case"addAfter":{let i=o.components[t.node.type]?.fields?.[t.rows];l=Q6(n,s+1,{...i?.defaultItemProps??{}});break}case"moveEarlier":case"moveLater":{let i=e.action==="moveEarlier"?s-1:s+1;if(i<0||i>=n.length)return!1;l=e3(n,s,i);break}case"delete":l=o3(n,s);break;default:return!1}return o.replace(r.zone,r.index,{...t.node,props:{...a,[t.rows]:l}}),!0}import{jsx as Pe,Fragment as VZ,jsxs as Wu}from"react/jsx-runtime";import{Fragment as YZ,useEffect as kH,useMemo as vH,useRef as XZ,useState as Ua}from"react";import{useScreenDocument as _H}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Wy}from"efficient-easel/draw/client";import JZ from"efficient-easel/screen/components/SidePanelHead";import{InspectorIconButton as ZZ}from"efficient-easel/chrome";import{Input as QZ,LoadingSpinner as eQ,PopupMenu as oQ,PopupMenuItem as PH,toast as TH}from"efficient-shell/ui";import{LayersTree as tQ,TreeGroupLabel as rQ,TreeRow as OH,TreeRowAction as $u}from"efficient-easel/tree";import{AddIcon as aQ,DuplicateIcon as nQ,PageIcon as sQ,SettingsIcon as lQ}from"efficient-easel/icons";import{PagesIcon as iQ}from"efficient-easel/rail";import{useEaselHost as dQ}from"efficient-easel/screen/lib/host";import{useEaselSession as $y}from"efficient-easel/screen/lib/session-context";import{useCallback as qf,useEffect as r3,useSyncExternalStore as a3}from"react";import{useScreenDocument as _0}from"efficient-easel/screen/components/ScreenDocumentContext";var T0=new WeakMap;function Il(e){let o=T0.get(e);return o||(o={rows:null,loading:null,listeners:new Set},T0.set(e,o)),o}function ih(e,o){e.rows=o;for(let t of e.listeners)t()}var Vf=new Set;function Yf(e,o){o?Vf.add(e):Vf.delete(e)}function O0(e){let o=Il(e),t=e.listPages().then(r=>ih(o,Vf.size?r.filter(a=>!Vf.has(a.id)):r),()=>ih(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var E0=()=>null,n3=()=>()=>{};function gl(){let{adapter:e,ready:o}=_0(),t=qf(l=>{let{listeners:i}=Il(e);return i.add(l),()=>i.delete(l)},[e]),r=qf(()=>Il(e).rows,[e]),a=a3(o?t:n3,o?r:E0,E0);r3(()=>{if(!o)return;let l=Il(e);l.rows===null&&!l.loading&&O0(e)},[e,o]);let n=qf(()=>o?O0(e):Promise.resolve(),[e,o]),s=qf(l=>ih(Il(e),l),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function s3(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function A0(){let{currentSlug:e}=_0(),{rows:o}=gl();return s3(o,e)}import{canDuplicatePage as fQ,DuplicatePageDialog as cQ}from"efficient-easel/page-copy";import{jsx as Oo,jsxs as hH}from"react/jsx-runtime";import{useEffect as AZ,useId as FZ,useMemo as BZ,useRef as LZ,useState as Ny}from"react";import{useScreenDocument as RZ}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as DZ}from"efficient-easel/screen/lib/session-context";import{uniqueSlug as IH}from"efficient-easel/page-copy";import{AddIcon as NZ}from"efficient-easel/icons";import{Button as MZ,Dialog as HZ,EmptyState as WZ,LoadingSpinner as $Z,Paragraph as zZ,SidebarLayout as UZ,SidebarNavItem as My,Title as jZ,toast as gH}from"efficient-shell/ui";import{jsx as Ot,jsxs as BR}from"react/jsx-runtime";import{useEffect as _q,useState as Ag}from"react";import{CanvasFrame as Aq}from"efficient-easel/easel";import{Button as Fq,Card as Bq,FitFrame as Lq,Text as Rq}from"efficient-shell/ui";import{jsx as D0,Fragment as g3,jsxs as y3}from"react/jsx-runtime";import{useEffect as N0,useLayoutEffect as S3}from"react";var Xf="data-theme",F0="light";function l3(e){return e.getAttribute(Xf)===F0?"light":"dark"}function i3(e,o){return l3(e)===o?!1:(o==="light"?e.setAttribute(Xf,F0):e.removeAttribute(Xf),!0)}function d3(e){return Kx(e).getItem(ox)}function Sle(e,o){Kx(e).setItem(ox,o)}function f3(e,o,t=new Date().getHours()){return Dw({mode:o.mode,override:d3(e),switchShown:o.switchShown,hour:t})}function B0(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>i3(t,f3(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[Xf]}),()=>n.disconnect()}var c3="style";function p3(e,o){let t=Dd(o),r=!1;for(let a of Kw){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function L0(e,o){let t=e.body;if(!t)return()=>{};let r=()=>p3(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[c3]}),()=>n.disconnect()}import{VIEW_DESKTOP_MIN as u3,VIEW_TABLET_MIN as m3}from"efficient-easel/screen/lib/content/view-tiers";var cr={fit:"data-fit",fitTablet:"data-fit-tablet",fitPhone:"data-fit-phone",min:"data-fit-min",minTablet:"data-fit-min-tablet",minPhone:"data-fit-min-phone",edge:"data-fit-edge"},Jo=cr,x3=e=>e.flatMap(o=>[`[${o}] p`,`[${o}] li`]).join(","),h3=String.raw`(function (doc) {
1
+ import{$ as lf,D as Bk,E as Lk,F as tf,G as Rk,H as zk,I as Or,J as Uk,K as jk,L as Gk,M as nt,N as rf,O as ko,P as fe,R as af,S as Er,T as nf,X as Kk,Y as sf,Z as _r,_ as qk,a as Xo,b as Xs,ba as aP,c as Kd,d as Sn,e as Js,f as ik,fa as xP,g as bn,h as qd,ha as hP,ia as Mf,ja as UT,ka as jT,r as al,t as Fk}from"./chunk-P34EYTSF.js";import{a as bP,d as bf,e as st,f as wf,g as Cf,h as Tf,l as Kx}from"./chunk-PPCAEV32.js";import{$ as ix,$a as Xd,$c as wv,$d as fa,$e as vf,$f as Of,$j as Ln,A as kC,Aa as YC,Ab as Qd,Ac as sv,Ad as Hv,Ae as dP,Ag as oT,Aj as _n,B as vC,Ba as XC,Bb as ef,Bc as lv,Bd as Wv,Be as fP,Bf as WP,Bg as tT,Bj as TT,C as PC,Ca as JC,Cb as Ok,Cc as iv,Cd as $v,Ce as cP,Cg as rT,D as rt,Da as px,Db as ho,Dc as mf,Dd as zv,De as pP,Dg as Bx,Dk as ml,E as TC,Ea as ZC,Eb as hx,Ec as dv,Ed as Cx,Ee as yf,Eg as aT,Ej as Hx,Ek as Nf,F as OC,Fa as QC,Fb as tl,Fc as fv,Fd as Uv,Fe as uP,Fg as Lx,Fj as pl,Fk as Ux,G as EC,Ga as ek,Gb as zt,Gc as cv,Gd as jv,Ge as mP,Gg as dr,Gk as HT,H as _C,Ha as ok,Hb as Cn,Hc as pv,Hd as Gv,Hg as Rx,Hk as ua,I as AC,Ia as tk,Ib as rl,Ic as jt,Id as Kv,Ie as kt,Ig as _f,Ij as An,Ik as WT,J as FC,Ja as rk,Jc as Ue,Jd as qv,Jg as nT,Jk as $T,K as BC,Ka as vr,Kc as Ar,Kd as kx,Ke as je,Kf as $P,Kg as sT,Kj as OT,Kk as zT,La as ak,Lb as Ix,Lc as Sx,Ld as Vv,Le as vt,Lf as zP,Lg as lT,M as LC,Mb as na,Mc as uv,Md as vx,Me as Oe,Mf as UP,Mg as iT,Mk as GT,N as RC,Na as nk,Nb as of,Nc as mv,Nd as Yv,Ne as yP,Nf as jP,Ng as dT,Nk as jx,O as DC,Oa as Vd,Ob as Ek,Oc as xv,Od as Xv,Of as Ax,P as Wd,Pa as Zs,Pb as _k,Pc as xf,Pd as Jv,Pf as GP,Pk as KT,Q as NC,Qa as Yd,Qb as Ak,Qc as sl,Qd as Gt,Qf as KP,Qg as fT,Qk as qT,R as MC,Ra as dk,Rb as df,Rc as hv,Rd as Zv,Re as Px,Rf as Fx,Rg as cT,Rk as VT,Sb as Xk,Sc as Iv,Sd as da,Sj as ET,Sk as YT,Tb as ff,Tc as gv,Tj as Wx,Tk as XT,Ub as yx,Uc as hf,Ud as Qv,Ue as fl,Uj as _T,Uk as JT,Va as fk,Vb as cf,Vc as yv,Vd as Tn,Vf as ir,Vi as pa,Vj as AT,W as lx,Wa as ck,Wc as Sv,Xa as Qs,Xc as bx,Xd as lr,Xf as On,Xi as fr,Xj as Df,Y as Vs,Yc as bv,Yd as eP,Ye as SP,Yj as Fn,Z as $d,Za as wn,Zc as Pn,Zd as dl,Ze as Tx,Zf as qP,Zh as gT,Zj as Bn,_ as Ao,_a as pk,_b as kn,_d as oP,_e as wP,_f as VP,_g as Af,_h as yT,_j as ul,a as _o,aa as In,ab as uk,ad as Cv,ae as tP,ag as Lr,ak as FT,b as mn,ba as HC,bb as el,bc as Jk,bd as kv,bf as _P,bg as Ef,ca as WC,cb as mk,cc as Zk,cd as vv,ce as If,cj as Lf,d as sC,da as $C,db as xk,dc as Qk,dd as Pv,de as Br,dg as En,e as rx,ea as zC,eb as hk,ec as nl,ed as sa,ee as rP,ef as Ex,eh as pT,ej as wT,f as lC,fa as UC,fb as Ik,fd as Tv,g as c,ga as dx,gb as mx,gd as wx,gh as uT,h as $t,hb as gk,hd as Ov,hk as BT,i as hn,ia as jC,ib as ol,id as Ev,ii as ST,ik as LT,j as Ks,ja as zd,jb as yk,jd as _v,jf as AP,ji as bT,jl as Gx,k as No,kb as xx,kd as Av,kf as FP,l as qs,ld as Fv,lf as Pf,mb as Sk,md as Fr,me as nP,mf as BP,mg as Rr,n as xC,nb as bk,nd as ll,nf as LP,ng as YP,o as hC,od as la,og as XP,p as IC,pb as Jd,pc as vn,pd as Bv,pe as sP,pg as JP,pk as $x,q as gC,qb as wk,qc as Ut,qe as lP,qh as Dx,qj as CT,r as yC,rb as Ck,rc as ev,rd as ia,re as iP,rh as Ff,rk as RT,rl as ZT,s as SC,sb as kk,sc as ov,sd as il,sh as ca,sk as DT,sl as QT,t as bC,tb as vk,tc as tv,td as Lv,th as Bf,tj as kT,tk as NT,tl as Hf,u as wC,ub as Zd,uc as rv,ud as Rv,uf as RP,ug as ZP,uj as Rf,ul as e0,v as Hd,vb as Pk,vc as av,vf as _x,vh as mT,vj as Nx,vk as MT,w as kr,wc as pf,wd as Dv,we as Mo,wf as DP,wh as xT,wj as vT,wl as Rn,xc as uf,xd as Nv,xe as ao,xf as NP,xh as hT,xj as PT,xk as zx,xl as Wf,y as sx,yb as Tk,yc as nv,yd as Mv,yf as MP,yg as QP,yh as IT,yj as Mx,z as CC,za as VC,zb as Pr,ze as gf,zf as HP,zg as eT}from"./chunk-NMX2Y4EJ.js";import{a as uC,b as Md,c as mC,g as Vk,h as gx,i as Yk}from"./chunk-IONUM72D.js";import{$ as Ib,$a as Mb,$c as R,$e as Zm,$g as cC,A as io,Ab as Zb,Ad as pw,B as tn,Be as Xm,Bf as ox,Ca as ye,Cb as $s,Cd as Vm,Ce as ww,Ci as vo,D as Ms,Db as Qb,E as fd,Ed as uw,Ee as Jm,F as Nt,Fd as Cd,G as rn,Ga as ot,Gg as Zw,Gi as cl,H as ze,Ha as bt,Hb as Sd,Hd as tt,Hg as Qw,I as Xe,Ia as Em,Ic as nw,Id as Do,Ie as Pd,If as Dw,Ig as eC,J as an,Ja as _m,Jd as ro,Je as Td,Jg as oC,K as cd,Kc as Um,Kd as Ht,Ke as Cw,Kh as ux,L as fb,La as Am,Ld as nr,Le as Od,Lf as sr,Lh as gn,M as cb,Ma as Fm,Mb as ew,Md as Ct,Me as Ed,Mg as tC,Mh as sk,Nd as fn,Ne as kw,Nh as at,O as pb,Od as mw,Oe as vw,Oh as Yo,P as pd,Pd as cn,Pe as _d,Pg as rC,Ph as Gd,Q as ub,Qa as Bm,Qd as xw,Qe as Ad,Qg as aC,Qh as lk,R as ea,Ra as _b,Rb as bd,Rc as sw,Re as aa,Rf as Nw,Rh as yn,S as mb,Sa as Ab,Se as Pw,Sg as nC,T as xb,Ta as Ke,U as Hs,Ua as Fb,Ub as ow,Ud as ra,Ug as iC,Uh as Dk,V as Tm,Va as Id,Vb as tw,Vd as hw,Vg as dC,W as Ce,Wa as Bb,Wd as Iw,We as Tw,X as q,Xa as Lb,Xb as rw,Xd as pn,Xf as Mw,Xg as Cr,Y as hb,Ya as Rb,Yc as U,Yd as Us,Yf as Hw,Yh as Nk,Za as Db,Zb as Wm,Zc as oe,Zd as js,Ze as Wt,Zf as Ww,Zg as fC,_ as ud,_a as Nb,_c as jm,_d as Ym,_e as Gs,_f as $w,_g as ax,a as on,ab as Hb,ad as Co,ae as gw,af as Qm,ah as nx,b as xo,ba as gb,bb as Wb,bd as rr,be as yw,bf as Ow,bh as Nd,c as lo,ca as md,cb as gd,cd as lw,ce as Sw,cf as Ew,cg as zw,d as or,da as yb,db as yd,dd as H,df as Fd,dg as Uw,dh as pC,di as Mk,ea as Sb,eb as $b,ed as wd,ee as bw,ef as _w,ei as Tr,f as Vo,fa as Om,fb as zb,fd as Ro,fg as jw,g as Ns,ga as bb,gc as $m,gd as iw,ge as kd,gg as Gw,gi as Hk,h as tb,ha as wb,hb as Ub,hd as wt,hf as Aw,hg as Rd,hi as Wk,i as rb,ia as Cb,ib as jb,id as Mt,ie as vd,if as Bd,ig as Kw,ii as $k,j as ab,jb as Lm,jd as Gm,jf as Fw,jg as Dd,k as nb,kb as Gb,kd as br,kf as ex,kg as tx,la as kb,lb as Kb,ld as ar,lf as Bw,ma as vb,mb as Rm,md as dw,mf as Lw,na as Pb,nb as sn,nf as Ld,ng as qw,o as sb,od as Be,of as un,og as Vw,pa as Tb,pb as oa,pd as ta,pf as xn,pi as CP,qb as Dm,qd as zs,qf as wr,qi as kP,ra as Ob,rb as Nm,rd as ln,rg as Yw,rh as fx,ri as kf,s as lb,sa as xd,sb as Mm,sd as fw,sg as Xw,sh as Ud,si as vP,ta as Eb,tb as qb,td as Km,th as GC,ti as Ox,u as Me,ua as hd,ub as Vb,ud as dn,uf as Rw,uh as cx,ui as PP,v as ib,vb as Yb,vc as zm,vd as qm,vg as Jw,vh as KC,w as dd,wb as Hm,wi as TP,x as db,xb as Xb,xc as aw,xh as jd,xi as OP,ya as Ws,yb as tr,yh as qC,yi as EP,z as Te,za as nn,zb as Jb,zd as cw,zh as Ys}from"./chunk-Y7YKT7VT.js";import{a as z,b as eo}from"./chunk-BA5HNYFW.js";import{c as IP,d as gP,e as Sf}from"./chunk-ERLKLMUX.js";import{jsx as qx,Fragment as g6,jsxs as y6}from"react/jsx-runtime";import{createContext as S6,useContext as b6}from"react";var w6={mirrorHostStyles:!0,css:null,fontHrefs:[]},o0=S6(w6);function ise({value:e,children:o}){return qx(o0.Provider,{value:e,children:o})}function xl(){return b6(o0)}function t0(){let{css:e,fontHrefs:o}=xl();return y6(g6,{children:[o.map(t=>qx("link",{rel:"stylesheet",href:t},t)),e?qx("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as C6}from"react/jsx-runtime";import{createContext as k6,useContext as v6}from"react";var r0=k6(void 0);function pse({metadata:e,children:o}){return C6(r0.Provider,{value:e,children:o})}var a0=()=>v6(r0);import{jsx as uo,Fragment as n6,jsxs as rd}from"react/jsx-runtime";import{useCallback as As,useEffect as Jt,useRef as Lne,useState as o6}from"react";import{SettingsSwitch as Rne}from"efficient-easel/panel";import{PagesIcon as Dne,StylesIcon as Nne}from"efficient-easel/rail";import{PaletteIcon as Mne}from"efficient-shell/icons/efficient";import{Subtree as Hne,TreeRow as s6}from"efficient-easel/tree";import{useEasel as l6}from"efficient-easel/easel";import{toItemSelector as Wne}from"efficient-easel/node-ops";import{useEaselStrings as i6}from"efficient-easel/strings";import{createContext as P6,useContext as T6}from"react";var Vx=P6(!1),xse=()=>T6(Vx);import{useMemo as O6,useRef as E6}from"react";import{useEaselApi as _6}from"efficient-easel/easel";import{useSectionOps as A6}from"efficient-easel/screen/lib/document/use-section-ops";function $f(){let e=_6(),o=A6(),t=E6(o);return t.current=o,O6(()=>({getItemById:r=>e.getState().getItemById(r),getSelectorForId:r=>e.getState().getSelectorForId(r),get components(){return e.getState().config.components},replace:(r,a,n)=>t.current.replaceComponent(r,a,n)}),[e])}import{encodePartId as Z6}from"efficient-easel/draw";import{insertAt as Q6,moveTo as e3,removeAt as o3}from"efficient-easel/fields";import{useSyncExternalStore as G6}from"react";import{isNodeList as n0}from"efficient-easel/data";var s0="Flex";function Dn(e,o){return Wt(e)?typeof e?.[Vo]=="string"?Yx(o?.[Vo]):"":Yx(e?.[Vo])}var Yx=e=>typeof e=="string"?e.trim():"",F6=e=>e.type===io&&Array.isArray(e.props?.[Jm])&&e.props[Jm].some(o=>Yx(o?.[Vo])!==""),B6=new Intl.NumberFormat("en-US");function L6(e){return/^\d+$/.test(e)?B6.format(Number(e)):e}function vse(e,o){let t=o?o.find(r=>r.key===e)?.value:lb(Ns).find(r=>r.key===e)?.value;return t===void 0?null:L6(t)}var R6={[Vo]:"any"};function Xx(e,o=!1){let t=e.props;if(!t)return{node:e,names:!1};let r=e.type==="Text"&&(Dn(t)!==""||o&&Dn(t,R6)!==""),a=o||F6(e),n=Xe(e,l=>ze(l,i=>{let d=Xx(i,a);return d.names&&(r=!0),d.node})).props;if(e.type!==s0)return{node:n===t?e:{...e,props:n},names:r};let s=Me(n);if(r&&!s&&(n={...n,[lo]:Ns}),!r&&s===Ns){let{[lo]:l,...i}=n;n=i}return{node:n===t?e:{...e,props:n},names:!1}}function l0(e,o,t){for(let r of e){if(r?.props?.id===o)return t;for(let a of rn(r??{})){let n=l0(a,o,r.type===s0?r:t);if(n!==void 0)return n}}}function Pse(e,o){if(!n0(e))return!0;let t=l0(e,o,null);if(t===void 0)return!0;if(t===null)return!1;let r=Me(t.props);return!r||r===Ns}function i0(e){let o=e?.content;if(!n0(o))return e;let t=o.map(r=>Xx(r));return t.every((r,a)=>r.node===o[a])?e:{...e,content:t.map(r=>r.node)}}function d0(e){return Xx(e).node}import{decodePartId as K6}from"efficient-easel/draw";function Nn(e,o){let t=lv(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?DT(t,o.index):null:iv(e)?.[o.rowKey]??null}function zf(e,o,t){let r=e.node.props,{key:a,row:n}=Ut(e.propKey),s=n?fv(r,a,n,e.kind,o):sv(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}import{readHidable as p0}from"efficient-easel/draw";import{parseOption as D6}from"efficient-shell/format";var Jx=e=>String(e+1).padStart(2,"0"),N6=[{label:"01 \xB7",value:"two-digit"},{label:"1.",value:"plain"}],Zx="two-digit",f0=e=>D6(N6,Zx,e),Uf=(e,o)=>e==="plain"?`${o+1}.`:Jx(o);var oh="Contents",Qx="Flex",c0="Text",M6="numberForm",H6="_contentsEntries",W6="_kickerNumber",u0="data-sf-kicker-number",$6=e=>p0(e).text.trim(),m0=e=>fa(e?.anchor),eh=e=>String(e.props?.id??""),z6=e=>!p0(e.props?.text).hidden&&!Dn(e.props)&&!Wt(e.props),hl=e=>rn(e);function x0(e){for(let o of hl(e))for(let t of o){if(lr(t.props??{}))continue;if(t.type===c0&&z6(t))return t;if(t.type===c0)continue;let r=x0(t);if(r)return r}}function h0(e){return hl(e).some(o=>o.some(t=>t&&!lr(t.props??{})&&(t.type===oh||h0(t))))}var I0=e=>e.type===Qx&&On(Qx,e.props?.direction)==="row";function g0(e){return hl(e).some(o=>o.some(t=>t&&!lr(t.props??{})&&(t.type===oh||!I0(t)&&g0(t))))}function U6(e){let o=[],t=(r,a)=>{for(let n of r){if(!n||lr(n.props??{}))continue;if(n.type===oh){a.open={contents:n,sections:a.waiting??[]},a.waiting=null,o.push(a.open);continue}if(I0(n)&&g0(n)){let l={inRow:!0,open:null,waiting:[]};for(let i of hl(n))t(i,l);a.inRow||(a.open=null);continue}let s=a.open?.sections??a.waiting;if(n.type===Qx&&m0(n.props)&&s&&!h0(n)){s.push({box:n,kicker:x0(n)});continue}for(let l of hl(n))t(l,a)}};return t(e,{inRow:!1,open:null,waiting:null}),o}function j6(e){return e.map(o=>({label:o.kicker?nn($6(o.kicker.props?.text)):"",anchor:m0(o.box.props)}))}function th(e){let o=e?.length?U6(e):[];if(!o.length)return null;let t=new Map,r=new Map;for(let a of o){let n=eh(a.contents);n&&t.set(n,j6(a.sections));let s=f0(a.contents.props?.[M6]);a.sections.forEach((l,i)=>{let d=l.kicker?eh(l.kicker):"";d&&r.set(d,Uf(s,i))})}return{entries:t,numbers:r}}var Gse=e=>e.endsWith(".")?`${e} `:`${e} \xB7 `;function y0(e){let o=e;if(!o?.content?.length)return e;let t=th(o.content);if(!t)return e;let{entries:r,numbers:a}=t,n=s=>{let l=Xe(s,h=>ze(h,n)),i=l.props??{},d=l!==s,f=eh(s),m=f?r.get(f):void 0;m&&(i={...i,[H6]:m},d=!0);let u=f?a.get(f):void 0;return u&&(i={...i,[W6]:u},d=!0),d?{...s,props:i}:s};return{...o,content:o.content.map(n)}}var q6=`[${u0}]`,V6=["bold","italic","underline","strike","link","sup","sub"],Y6=["bullet","number"];function nh(e,o){return e?[...V6,...o?Y6:[]]:[]}function S0(e,o){let t=K6(e);if(!t?.propKey)return null;let{nodeId:r,propKey:a}=t,n=o.getItemById(r),s=o.getSelectorForId(r);if(!n||!s)return null;let{key:l,row:i}=Ut(a),d=o.components[n.type]?.fields?.[l],f=i?Nn(d,i):d,m=pf(f);if(!m)return null;let u=n.props??{};if(gT(u)!==null||!i&&Fd(n.type,u,l)||n.type==="Text"&&l==="text"&&Dn(u)||i&&!(Array.isArray(u[l])&&i.index<u[l].length))return null;let h=i?mf(u[l],i):u[l];return{node:n,selector:s,propKey:a,kind:m,stored:h,offPage:Lf(f),panelOnly:av(f)}}function jf(e,o){let t=S0(e,o);if(!t)return null;let{text:r,hidden:a}=pa(t.stored);if(!Sv({offPage:t.offPage,hidden:!!a,panelOnly:t.panelOnly}))return null;let n=uf(t.kind);return{partId:e,value:r,rules:xd,multiline:n,skip:q6,offered:nh(t.kind!=="plainText",n),write:s=>{let l=S0(e,o);l&&zf({node:l.node,propKey:l.propKey,kind:l.kind,zone:l.selector.zone,index:l.selector.index},s,o.replace)}}}function sh(e,o,t){return e?.isConnected&&e.getAttribute(Ue)===t?e:o?.querySelector(`[${Ue}="${Gf(t)}"]`)??null}function Gf(e){return e.replace(/["\\]/g,"\\$&")}function b0(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var rh=null,ah=new Set;function X6(){return rh}function lh(e){if(e!==rh){rh=e;for(let o of ah)o()}}function J6(e){return ah.add(e),()=>{ah.delete(e)}}function w0(){return G6(J6,X6,()=>null)}function C0(e,o){if(e.outer)return null;let t=o.getItemById(e.ownerId);if(!t)return null;let r=kw(t.type);return!r||Me(t.props)?null:{node:t,rows:r}}function t3(e,o){let t=C0(e,o),r=o.getItemById(e.nodeId);if(!t||!r)return null;let a=_w(r.type,r.props,e.key);if(!a)return null;let n=t.node.props[t.rows];return!Array.isArray(n)||e.index<0||e.index>=n.length?null:Z6(e.ownerId,vn(t.rows,{index:e.index,rowKey:a}))}function Kf(e,o){let t=t3(e,o);return t?jf(t,o):null}function k0(e,o){return Kf(e,o)?.value}function v0(e,o){let t=Kf(e,o);return t?(t.write(e.text),!0):!1}function P0(e,o){let t=C0(e,o),r=t&&o.getSelectorForId(e.ownerId);if(!t||!r)return!1;let a=t.node.props,n=a[t.rows],s=e.index;if(!Array.isArray(n)||s<0||s>=n.length)return!1;let l;switch(e.action){case"addAfter":{let i=o.components[t.node.type]?.fields?.[t.rows];l=Q6(n,s+1,{...i?.defaultItemProps??{}});break}case"moveEarlier":case"moveLater":{let i=e.action==="moveEarlier"?s-1:s+1;if(i<0||i>=n.length)return!1;l=e3(n,s,i);break}case"delete":l=o3(n,s);break;default:return!1}return o.replace(r.zone,r.index,{...t.node,props:{...a,[t.rows]:l}}),!0}import{jsx as Pe,Fragment as VZ,jsxs as Wu}from"react/jsx-runtime";import{Fragment as YZ,useEffect as kH,useMemo as vH,useRef as XZ,useState as Ua}from"react";import{useScreenDocument as _H}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Wy}from"efficient-easel/draw/client";import JZ from"efficient-easel/screen/components/SidePanelHead";import{InspectorIconButton as ZZ}from"efficient-easel/chrome";import{Input as QZ,LoadingSpinner as eQ,PopupMenu as oQ,PopupMenuItem as PH,toast as TH}from"efficient-shell/ui";import{LayersTree as tQ,TreeGroupLabel as rQ,TreeRow as OH,TreeRowAction as $u}from"efficient-easel/tree";import{AddIcon as aQ,DuplicateIcon as nQ,PageIcon as sQ,SettingsIcon as lQ}from"efficient-easel/icons";import{PagesIcon as iQ}from"efficient-easel/rail";import{useEaselHost as dQ}from"efficient-easel/screen/lib/host";import{useEaselSession as $y}from"efficient-easel/screen/lib/session-context";import{useCallback as qf,useEffect as r3,useSyncExternalStore as a3}from"react";import{useScreenDocument as _0}from"efficient-easel/screen/components/ScreenDocumentContext";var T0=new WeakMap;function Il(e){let o=T0.get(e);return o||(o={rows:null,loading:null,listeners:new Set},T0.set(e,o)),o}function ih(e,o){e.rows=o;for(let t of e.listeners)t()}var Vf=new Set;function Yf(e,o){o?Vf.add(e):Vf.delete(e)}function O0(e){let o=Il(e),t=e.listPages().then(r=>ih(o,Vf.size?r.filter(a=>!Vf.has(a.id)):r),()=>ih(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var E0=()=>null,n3=()=>()=>{};function gl(){let{adapter:e,ready:o}=_0(),t=qf(l=>{let{listeners:i}=Il(e);return i.add(l),()=>i.delete(l)},[e]),r=qf(()=>Il(e).rows,[e]),a=a3(o?t:n3,o?r:E0,E0);r3(()=>{if(!o)return;let l=Il(e);l.rows===null&&!l.loading&&O0(e)},[e,o]);let n=qf(()=>o?O0(e):Promise.resolve(),[e,o]),s=qf(l=>ih(Il(e),l),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function s3(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function A0(){let{currentSlug:e}=_0(),{rows:o}=gl();return s3(o,e)}import{canDuplicatePage as fQ,DuplicatePageDialog as cQ}from"efficient-easel/page-copy";import{jsx as Oo,jsxs as hH}from"react/jsx-runtime";import{useEffect as AZ,useId as FZ,useMemo as BZ,useRef as LZ,useState as Ny}from"react";import{useScreenDocument as RZ}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as DZ}from"efficient-easel/screen/lib/session-context";import{uniqueSlug as IH}from"efficient-easel/page-copy";import{AddIcon as NZ}from"efficient-easel/icons";import{Button as MZ,Dialog as HZ,EmptyState as WZ,LoadingSpinner as $Z,Paragraph as zZ,SidebarLayout as UZ,SidebarNavItem as My,Title as jZ,toast as gH}from"efficient-shell/ui";import{jsx as Ot,jsxs as BR}from"react/jsx-runtime";import{useEffect as _q,useState as Ag}from"react";import{CanvasFrame as Aq}from"efficient-easel/easel";import{Button as Fq,Card as Bq,FitFrame as Lq,Text as Rq}from"efficient-shell/ui";import{jsx as D0,Fragment as g3,jsxs as y3}from"react/jsx-runtime";import{useEffect as N0,useLayoutEffect as S3}from"react";var Xf="data-theme",F0="light";function l3(e){return e.getAttribute(Xf)===F0?"light":"dark"}function i3(e,o){return l3(e)===o?!1:(o==="light"?e.setAttribute(Xf,F0):e.removeAttribute(Xf),!0)}function d3(e){return Kx(e).getItem(ox)}function Sle(e,o){Kx(e).setItem(ox,o)}function f3(e,o,t=new Date().getHours()){return Dw({mode:o.mode,override:d3(e),switchShown:o.switchShown,hour:t})}function B0(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>i3(t,f3(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[Xf]}),()=>n.disconnect()}var c3="style";function p3(e,o){let t=Dd(o),r=!1;for(let a of Kw){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function L0(e,o){let t=e.body;if(!t)return()=>{};let r=()=>p3(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[c3]}),()=>n.disconnect()}import{VIEW_DESKTOP_MIN as u3,VIEW_TABLET_MIN as m3}from"efficient-easel/screen/lib/content/view-tiers";var cr={fit:"data-fit",fitTablet:"data-fit-tablet",fitPhone:"data-fit-phone",min:"data-fit-min",minTablet:"data-fit-min-tablet",minPhone:"data-fit-min-phone",edge:"data-fit-edge"},Jo=cr,x3=e=>e.flatMap(o=>[`[${o}] p`,`[${o}] li`]).join(","),h3=String.raw`(function (doc) {
2
2
  if (doc.__sfFitWords) return;
3
3
  var win = doc.defaultView;
4
4
  var SELECTOR = "h1,h2,h3,h4,h5,h6,[class*='font-heading'],[class*='font-display']";
@@ -301,7 +301,7 @@ import{$ as lf,D as Bk,E as Lk,F as tf,G as Rk,H as zk,I as Or,J as Uk,K as jk,L
301
301
  doc.__sfFitWords.floorOf = floorOf;
302
302
  })(document);`,I3="storefront-fit-words";function R0(e){let o=e.createElement("script");return o.id=I3,o.textContent=h3,(e.head??e.documentElement).appendChild(o),()=>{e.__sfFitWords?.(),o.remove()}}var b3=`
303
303
  [${Ue}][${Ue}] { cursor: text; }
304
- `;function Jf({children:e,document:o}){let{theme:t,themeMode:r,themeSwitchShown:a}=vo(),n=sr(t);return N0(()=>{if(o)return B0(o,{mode:r,switchShown:a})},[o,r,a]),N0(()=>{if(o)return L0(o,n)},[o,n]),S3(()=>{if(o)return R0(o)},[o]),y3(g3,{children:[D0(t0,{}),D0("style",{children:b3}),e]})}import{jsx as _L}from"react/jsx-runtime";import{memo as f7}from"react";import{Render as c7}from"efficient-easel/render";import{jsx as Mn}from"react/jsx-runtime";import{createContext as w3,useContext as C3,useMemo as k3}from"react";var dh=w3(null);function v3({children:e}){return Mn(dh.Provider,{value:"first",children:e})}function Qf({children:e}){return Mn(dh.Provider,{value:"below",children:e})}function yl(){return C3(dh)}function fh(){return yl()==="below"?{loading:"lazy"}:{}}function ec(e){let o=fh();return Mn("img",{...e,...o})}var M0="laterSlideIds",P3=new Set(["Breadcrumb","CategoryBar","Divider","Spacer","Ticker"]);function H0(e){return kf(e?.filter(o=>!o?.type||!P3.has(o.type)))}function Zf(e,o=[]){if(Array.isArray(e))for(let t of e)Zf(t,o);else if(e&&typeof e=="object"){let{slides:t}=e;if(Array.isArray(t))for(let r of t.slice(1))typeof r?.props?.id=="string"&&o.push(r.props.id);for(let r of Object.values(e))Zf(r,o)}return o}function W0(e,o){let t=o?.type,r=o?.props?.id;return k3(()=>{let a=t?e.components[t]:void 0;if(!t||!a)return e;let n=a.render,s=l=>l.id===r?Mn(v3,{children:Mn(n,{...l})}):Mn(n,{...l});return{...e,components:{...e.components,[t]:{...a,render:s}}}},[e,t,r])}function $0(e){return e.props?Xe(e,o=>{let t=ze(o,$0),r=e.type===qC&&t.every(a=>a.type===Ud)?GC(t):t;return r.length!==o.length||r.some((a,n)=>a!==o[n])?r:o}):e}function z0(e){return cd(e,o=>ze(o,$0))}var T3="Flex",U0="ListSearch",j0=["FAQ"],O3="listKey";function G0(e,o){let t={search:e.type===U0,list:j0.includes(String(e.type))};return Xe(e,r=>{for(let a of r){let n=G0(a,o);t.search||=n.search,t.list||=n.list}return r}),e.type===T3&&t.search&&t.list&&String(e.props?.id??"")?(o.add(e),{search:!1,list:!1}):t}function K0(e,o,t){let r=o.has(e)?String(e.props?.id):t,a=Xe(e,n=>ze(n,s=>K0(s,o,r)));return r&&(e.type===U0||j0.includes(String(e.type)))?{...a,props:{...a.props,[O3]:r}}:a}function q0(e){return an(e,o=>{let t=new Set;for(let r of o)G0(r,t);return t.size?ze(o,r=>K0(r,t,"")):o})}import{isNode as D$,isNodeList as jE}from"efficient-easel/data";import{jsx as _e,Fragment as k$,jsxs as mr}from"react/jsx-runtime";import{jsx as gh}from"react/jsx-runtime";import{Fragment as L3,jsx as R3}from"react/jsx-runtime";import{jsx as ch}from"react/jsx-runtime";import{createContext as A3,Fragment as F3,useContext as B3}from"react";import{jsx as V0,jsxs as E3}from"react/jsx-runtime";import{lazy as _3}from"react";var Y0=_3(()=>import("./section-css-style-VSIE7KKW.js"));function X0({css:e,id:o,attr:t}){return V0(Y0,{css:e,id:o,attr:t})}var J0={name:"sectionCustomCss",applies:(e,o,t)=>o.isSection(e)&&!!t&&typeof t.render=="function",panel(e,o,t){e.fields={...e.fields,...t.customCssFields()}},draw(e){e.defaultProps={...e.defaultProps,[Md]:""};let o=e.render;e.render=t=>{let r=mC(t),a=typeof t.id=="string"?t.id:"";return!r||!a?o(t):E3(_r,{className:"sf-section-css",attrs:{[uC]:a},children:[V0(Y0,{css:r,id:a}),o(t)]})}}};var Z0=A3(null);function Q0({rootProps:e,children:o}){let t=e&&typeof e=="object"?e:null,r=_k(t),a=ch(F3,{children:o},"page");return ch(Z0.Provider,{value:t,children:r?[ch(X0,{css:r,id:Ek,attr:of},"css"),a]:a})}function eO(){return B3(Z0)}function Pt(){return Hd(eO())===wC}function oc({className:e,children:o}){let t=Pt();return R3(L3,{children:o(rt(e,t))})}import{SITE_SIDE as D3}from"efficient-easel/screen/lib/content/length-units";var oO="sideSpace",Sl=D3,ph="none",aie=[{value:"box",label:"Box"},{value:Sl,label:"Site"},{value:ph,label:"None"}],nie="box",sie="Box: on small screens the Box keeps its own side space, up to 24 px. Site: it uses the site's Side space, as the site's own sections do. None: from 800 px up the Box runs to the screen's edges; on small screens it keeps the site's Side space, up to 20 px.";function tO(e){return e===Sl||e===ph?e:"box"}function lie(e){return e===Sl||e===ph?e:void 0}import{parseOption as xh}from"efficient-shell/format";var tc="standard",sO=[{label:"Standard",value:"standard"},{label:"Editorial",value:"editorial"},{label:"Simple",value:"simple"},{label:"Statement",value:"statement"},{label:"Natural",value:"natural"},{label:"Essay",value:"essay"}],mh=["numStyle","logoSrc","logoAlt","linkText","linkHref","_gLogo"],uh=[...mh,"description"],rO={standard:["eyebrowLook"],editorial:[...mh,"eyebrowLook"],simple:uh,statement:uh,natural:mh,essay:uh},aO=["gap-5","gap-3"],nO=["text-[length:var(--size-body,16px)]","text-[15px]"];function cie(e){return xh(aO,aO[0],e)}function pie(e){return xh(nO,nO[0],e)}function lO(e){return xh(sO,tc,e)}function uie(e){let o=sO.map(r=>r.value),t=[...new Set(Object.values(rO).flat())];return tt(e,t.map(r=>[[r],Cd("headStyle",o,tc,o.filter(a=>!rO[a].includes(r)))]))}import{readHidable as N3,VIEW_TIERS as M3,viewKeyAt as H3}from"efficient-easel/draw";var ma={direction:"row",share:"content",align:"center"},xa={top:14,bottom:14,topPhone:12,bottomPhone:12},rc={wrap:"nowrap",loop:"scroll",sectionAccent:cC,gap:60,gapPhone:32,separator:"dot",sectionBorder:{top:1,bottom:1}},iO={gap:120,gapPhone:64},ac={...Ro,sizeToken:{step:"label",px:14,pxPhone:12},letterSpacing:.25,lineHeight:1.5},dO={textStyle:"heading-3",letterSpacing:.005,case:"upper",lineHeight:1},bl={top:24,bottom:24,topPhone:16,bottomPhone:16},ha={top:16,bottom:16,topPhone:12,bottomPhone:12},wl={justify:"between",wrap:"wrap",gap:32,separator:"none"},Cl={...Ro,letterSpacing:.1,lineHeight:1.5};var nc={top:24,bottom:24,topPhone:24,bottomPhone:24},sc={top:72,bottom:72,topPhone:72,bottomPhone:72},Hn={top:100,bottom:100,topPhone:60,bottomPhone:60},lc={top:120,bottom:120,topPhone:70,bottomPhone:70},W3={top:24,bottom:24,topPhone:24,bottomPhone:24},$3=40,ic={top:120,bottom:120,topTablet:80,bottomTablet:80,topPhone:80,bottomPhone:80},z3={top:24,bottom:24,topPhone:24,bottomPhone:24},dc={top:24,bottom:24,topPhone:24,bottomPhone:24},U3={top:84,bottom:84,topPhone:84,bottomPhone:84},fc={top:48,bottom:48,topPhone:48,bottomPhone:48},cc={top:80,bottom:80,topPhone:60,bottomPhone:60},pc={top:100,bottom:60,topPhone:60,bottomPhone:40},uc={top:60,bottom:60,topPhone:40,bottomPhone:40},mc={top:80,bottom:80,topTablet:60,bottomTablet:60,topPhone:60,bottomPhone:60},xc={top:76,bottom:76,topPhone:76,bottomPhone:76},hc={top:76,bottom:76,topPhone:76,bottomPhone:76},vl={top:80,bottom:40,topPhone:60,bottomPhone:32},Pl={top:76,bottom:76,topPhone:76,bottomPhone:76},Ic={top:72,bottom:72,topPhone:72,bottomPhone:72},gc={top:40,bottom:64,topPhone:24,bottomPhone:36},yc={top:120,bottom:120,topPhone:80,bottomPhone:80,topTablet:80,bottomTablet:80},Sc={top:48,bottom:48,topPhone:48,bottomPhone:48},Tl=e=>{let o=ye(e.bandPadding)??$3;return{top:o,bottom:o,topPhone:o,bottomPhone:o}},fO=(e,o,t)=>({desktop:e,tablet:o,mobile:t}),hh=e=>cn(e.headPlacement)==="own-box",Le=(e,o)=>({top:fO(e.top,o?.top??e.topTablet??e.top,e.topPhone),bottom:fO(e.bottom,o?.bottom??e.bottomTablet??e.bottom,e.bottomPhone)}),cO=e=>({top:e.topPhone,bottom:e.bottomPhone}),kl=e=>o=>hh(o)?{top:0,bottom:e.bottom}:e,j3=(e,o)=>{let t=N3(e[o]);return t.hidden?!1:!!t.text||e.editor?.isEditing===!0},bc={Banner:{frame:()=>Le(nc)},Cards:{frame:kl(Le(sc))},Chart:{frame:()=>Le(Pl)},ContactLocations:{frame:()=>Le(Hn,cO(Hn))},Countdown:{frame:()=>Le(fc)},DocBody:{frame:()=>Le(cc)},DocMasthead:{frame:()=>Le(pc)},DocMetaCards:{frame:()=>Le(uc)},FAQ:{frame:e=>{let o=hh(e)||!["num","title","linkText"].some(r=>j3(e,r)),t=Le(lc);return o?{top:0,bottom:t.bottom}:t},edge:!0},FeaturedCover:{frame:()=>Le(mc)},Grid:{frame:()=>Le(W3)},Integrations:{frame:()=>Le(xc)},KeyFeatures:{frame:()=>Le(hc)},Logos:{frame:e=>hh(e)?0:Le(Tl(e))},LongRead:{frame:kl(Le(ic))},Masthead:{frame:()=>Le(vl,cO(vl))},Mockup:{frame:()=>Le(Pl)},OrderSummary:{frame:()=>Le(z3)},PaymentBadges:{frame:()=>Le(dc)},Prose:{frame:kl(Le(Ic))},SectionHeader:{frame:e=>{let o=Le(gc);return lO(e.headStyle)==="standard"?o:{top:o.top,bottom:0}},edge:!0},Series:{frame:kl(Le(yc))},Stats:{frame:()=>Le(Sc)},Testimonials:{frame:kl(Le(U3))},Ticker:{frame:()=>Le(xa),edge:!0}};function vie(e,o,t){let r=z(bc,e)??t;return r?na({values:tl(o,ho,!0),frame:r.frame(o),drawsFrame:!0,edge:r.edge},!0).root:null}var pO=(e,o)=>typeof e=="object"&&"top"in e?e[o]:e;function G3(e,o){let t={...e};for(let r of M3)delete t[H3(o,r)];return t}function Pie(e,o,t,r){let a=z(bc,e)??t;if(!a)return{first:null,last:null};let n=a.frame(o),s=tl(o,ho,!0),l=(i,d)=>na({values:G3(s,i),frame:d,drawsFrame:!0,edge:a.edge},!0).root;return{first:l("bottom",{top:pO(n,"top"),bottom:r.firstBottom}),last:l("top",{top:r.lastTop,bottom:pO(n,"bottom")})}}var K3=/^(?:[^\s]*:)?p[ytb]-/;function uO(e,o,t){if(!o)return t?{className:e,style:t}:{className:e};let r=e.split(/\s+/).filter(n=>n&&!K3.test(n)),a={...t,...o.style};return{className:[...r,o.className].filter(Boolean).join(" "),...Object.keys(a).length?{style:a}:{},...o.attrs}}import{isNodeList as q3}from"efficient-easel/data";var Ih=new Set(["FAQ"]);function Zo(e,o){if(!Ih.has(e))return!1;let t=o.template;return typeof t=="function"?(t.blockCount??0)>0:q3(t)}var hO={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120}},IO=new Set(Object.keys(hO));function yh(e,o){return o?.innerPadding??z(hO,e)}var Wn=e=>yh(e)??{};var wc=new Set(["Flex","Text","Heading","ImageBlock","ButtonBlock"]),V3=new Set(["Divider"]),Y3=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),mO=new Set(["ProductGrid"]);function Sh(e,o,t=!1,r){let a=e.render;e.render=n=>{if(o?.(n))return a(n);let s={...tl(n,ho,t),sideSpace:tO(n.sideSpace)},l=r?na({values:s,frame:r(n)},!0).outer:Pk(s),i=a(n);if(!l)return i;let d=u=>gh(oc,{className:u?`${l.className} ${u}`:l.className,children:h=>gh(fe,{className:h,style:l.style,children:i})}),f=Tr(n,{atSectionLine:!0}),m=Tr(n);return f===m?d(f):gh(af,{line:"by-box",draw:u=>d(u?m:f)})}}var gO={name:"sectionPadding",applies:(e,o,t)=>o.isSection(e)&&!Y3.has(e)&&!!t&&typeof t.render=="function",panel(e,o,t){let r=yh(o,e);if(r){e.fields={...e.fields,...t.sidesPaddingFields({keys:Pr,unitKey:Qd,fallback:r,tablet:!0,siteSide:!0})};return}if(mO.has(o))return;let a=[Pr.top,Pr.bottom].filter(s=>e.fields!=null&&s in e.fields);if(a.length)throw new Error(`section-padding: ${o} declares its own ${a.join(" / ")} row; declare \`innerPadding: { top, bottom }\` in its meta and the one Padding row draws on its band`);let n=xO(o,e);if(n){SO(e,o,t,n);return}e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,o){if(!yh(o,e)){if(mO.has(o)){Sh(e);return}wc.has(o)||V3.has(o)||Sh(e,o==="Flex"?t=>Jk(t.bgImage):Ih.has(o)?t=>Zo(o,t):void 0,!0,xO(o,e))}}},X3=["Heading","Text","ImageBlock","ButtonBlock"],J3=["LogoBlock"],yO={Text:e=>Fr(e,"text").textStyle?.startsWith("heading-")?rl.heading:rl.text,Heading:()=>rl.heading,ButtonBlock:()=>rl.text,Breadcrumb:()=>Ix(bl),SpecStrip:()=>Ix(ha),...Object.fromEntries(Object.entries(bc).map(([e,o])=>[e,o.frame]))};function xO(e,o){return z(yO,e)??o?.ownPad?.frame}var Z3={ButtonBlock:"Outer padding"};function Q3(e,o){let t=e[zt],r=Array.isArray(t)?t.filter(i=>typeof i=="string"):[],a=Cn().filter(i=>o?.[i]);if(!a.length)return e;let n=[...r.filter(i=>!a.includes(i)),...a.filter(i=>typeof e[i]=="number")];if(n.length===r.length&&n.every((i,d)=>i===r[d]))return e;let{[zt]:s,...l}=e;return n.length?{...l,[zt]:n}:l}function eW(e,o,t){if(o<=0)return null;let r=Array.isArray(e[zt])?e[zt]:[];return(t?Cn().filter(a=>a.startsWith(ho[t])):Cn()).some(a=>typeof e[a]=="number"&&!r.includes(a))?c("plus {n} px (older setting)",{n:o}):null}function SO(e,o,t,r){e.fields={...e.fields,...t.ownPaddingFields?.(r,eW,z(Z3,o))??t.sidesPaddingFields({tablet:!0,siteSide:!0})};let a=e.resolveData;e.resolveData=(n,s)=>{let l=n.props??{},i=s?.trigger==="replace"?Q3(l,s.changed):l,d=i===l?n:{...n,props:i};return a?a(d,s):d}}var bO={name:"blockPadding",applies:(e,o,t)=>(X3.includes(e)||J3.includes(e))&&!!t&&typeof t.render=="function",panel(e,o,t){let r=z(yO,o);if(!r){e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0,siteSide:!0})};return}SO(e,o,t,r)},draw(e,o){wc.has(o)||Sh(e,void 0,!0)}};import{createContext as bh,useContext as Cc}from"react";var wO=bh(null);function Kie(){return Cc(wO)===!0}function qie(){return Cc(wO)!==null}var oW=bh(!1);function Vie(){return Cc(oW)}function Yie(e,o,t){let r=e.boxes;if(!r)return t;let a=r.indexOf(o);return a>=0?a:(r.push(o),r.length-1)}var kc=bh(null);function Xie(){return Cc(kc)}import{jsx as Ia}from"react/jsx-runtime";import{Component as dW,createContext as fW,lazy as pde,Suspense as ude,useContext as cW,useSyncExternalStore as pW}from"react";function tW(e,o){let t=e.trim();if(!vc(t))return!1;if(!o)return!0;let r;try{r=new URL(t,"https://x.invalid").host}catch{return!1}let a=n=>n.toLowerCase().replace(/^www\./,"");return a(r)!==a(o)}function Qie(e){return e.startsWith("/")||vc(e)}function vc(e){return/^(?:https?:)?\/\//i.test(e.trim())}var Ol=Object.freeze({target:"_blank",rel:"noopener noreferrer"});function CO(e,o){return tW(e,o)?{...Ol}:{}}function ede(e){return typeof e=="string"?e.trim():""}var ode="data-sf-box-link",kO="absolute inset-0 -z-[1] outline-none focus-visible:z-[2] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent",wh="relative isolate pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto [&_input]:pointer-events-auto [&_select]:pointer-events-auto [&_textarea]:pointer-events-auto [&_label]:pointer-events-auto [&_summary]:pointer-events-auto [&_iframe]:pointer-events-auto [&_video]:pointer-events-auto [&_audio]:pointer-events-auto [&_[role=button]]:pointer-events-auto [&_[tabindex]:not([tabindex='-1'])]:pointer-events-auto",rW="data-sf-box-jump";function aW(e){return`sf-box-jump-${e}`}function tde(e,o){return e===!0?fa(o):""}function nW({box:e,lit:o,first:t}){let r=s=>s.join(`,
304
+ `;function Jf({children:e,document:o}){let{theme:t,themeMode:r,themeSwitchShown:a}=vo(),n=sr(t);return N0(()=>{if(o)return B0(o,{mode:r,switchShown:a})},[o,r,a]),N0(()=>{if(o)return L0(o,n)},[o,n]),S3(()=>{if(o)return R0(o)},[o]),y3(g3,{children:[D0(t0,{}),D0("style",{children:b3}),e]})}import{jsx as _L}from"react/jsx-runtime";import{memo as f7}from"react";import{Render as c7}from"efficient-easel/render";import{jsx as Mn}from"react/jsx-runtime";import{createContext as w3,useContext as C3,useMemo as k3}from"react";var dh=w3(null);function v3({children:e}){return Mn(dh.Provider,{value:"first",children:e})}function Qf({children:e}){return Mn(dh.Provider,{value:"below",children:e})}function yl(){return C3(dh)}function fh(){return yl()==="below"?{loading:"lazy"}:{}}function ec(e){let o=fh();return Mn("img",{...e,...o})}var M0="laterSlideIds",P3=new Set(["Breadcrumb","CategoryBar","Divider","Spacer","Ticker"]);function H0(e){return kf(e?.filter(o=>!o?.type||!P3.has(o.type)))}function Zf(e,o=[]){if(Array.isArray(e))for(let t of e)Zf(t,o);else if(e&&typeof e=="object"){let{slides:t}=e;if(Array.isArray(t))for(let r of t.slice(1))typeof r?.props?.id=="string"&&o.push(r.props.id);for(let r of Object.values(e))Zf(r,o)}return o}function W0(e,o){let t=o?.type,r=o?.props?.id;return k3(()=>{let a=t?e.components[t]:void 0;if(!t||!a)return e;let n=a.render,s=l=>l.id===r?Mn(v3,{children:Mn(n,{...l})}):Mn(n,{...l});return{...e,components:{...e.components,[t]:{...a,render:s}}}},[e,t,r])}function $0(e){return e.props?Xe(e,o=>{let t=ze(o,$0),r=e.type===qC&&t.every(a=>a.type===Ud)?GC(t):t;return r.length!==o.length||r.some((a,n)=>a!==o[n])?r:o}):e}function z0(e){return cd(e,o=>ze(o,$0))}var T3="Flex",U0="ListSearch",j0=["FAQ"],O3="listKey";function G0(e,o){let t={search:e.type===U0,list:j0.includes(String(e.type))};return Xe(e,r=>{for(let a of r){let n=G0(a,o);t.search||=n.search,t.list||=n.list}return r}),e.type===T3&&t.search&&t.list&&String(e.props?.id??"")?(o.add(e),{search:!1,list:!1}):t}function K0(e,o,t){let r=o.has(e)?String(e.props?.id):t,a=Xe(e,n=>ze(n,s=>K0(s,o,r)));return r&&(e.type===U0||j0.includes(String(e.type)))?{...a,props:{...a.props,[O3]:r}}:a}function q0(e){return an(e,o=>{let t=new Set;for(let r of o)G0(r,t);return t.size?ze(o,r=>K0(r,t,"")):o})}import{isNode as D$,isNodeList as jE}from"efficient-easel/data";import{jsx as _e,Fragment as k$,jsxs as mr}from"react/jsx-runtime";import{jsx as gh}from"react/jsx-runtime";import{Fragment as L3,jsx as R3}from"react/jsx-runtime";import{jsx as ch}from"react/jsx-runtime";import{createContext as A3,Fragment as F3,useContext as B3}from"react";import{jsx as V0,jsxs as E3}from"react/jsx-runtime";import{lazy as _3}from"react";var Y0=_3(()=>import("./section-css-style-GUVXWUWX.js"));function X0({css:e,id:o,attr:t}){return V0(Y0,{css:e,id:o,attr:t})}var J0={name:"sectionCustomCss",applies:(e,o,t)=>o.isSection(e)&&!!t&&typeof t.render=="function",panel(e,o,t){e.fields={...e.fields,...t.customCssFields()}},draw(e){e.defaultProps={...e.defaultProps,[Md]:""};let o=e.render;e.render=t=>{let r=mC(t),a=typeof t.id=="string"?t.id:"";return!r||!a?o(t):E3(_r,{className:"sf-section-css",attrs:{[uC]:a},children:[V0(Y0,{css:r,id:a}),o(t)]})}}};var Z0=A3(null);function Q0({rootProps:e,children:o}){let t=e&&typeof e=="object"?e:null,r=_k(t),a=ch(F3,{children:o},"page");return ch(Z0.Provider,{value:t,children:r?[ch(X0,{css:r,id:Ek,attr:of},"css"),a]:a})}function eO(){return B3(Z0)}function Pt(){return Hd(eO())===wC}function oc({className:e,children:o}){let t=Pt();return R3(L3,{children:o(rt(e,t))})}import{SITE_SIDE as D3}from"efficient-easel/screen/lib/content/length-units";var oO="sideSpace",Sl=D3,ph="none",aie=[{value:"box",label:"Box"},{value:Sl,label:"Site"},{value:ph,label:"None"}],nie="box",sie="Box: on small screens the Box keeps its own side space, up to 24 px. Site: it uses the site's Side space, as the site's own sections do. None: from 800 px up the Box runs to the screen's edges; on small screens it keeps the site's Side space, up to 20 px.";function tO(e){return e===Sl||e===ph?e:"box"}function lie(e){return e===Sl||e===ph?e:void 0}import{parseOption as xh}from"efficient-shell/format";var tc="standard",sO=[{label:"Standard",value:"standard"},{label:"Editorial",value:"editorial"},{label:"Simple",value:"simple"},{label:"Statement",value:"statement"},{label:"Natural",value:"natural"},{label:"Essay",value:"essay"}],mh=["numStyle","logoSrc","logoAlt","linkText","linkHref","_gLogo"],uh=[...mh,"description"],rO={standard:["eyebrowLook"],editorial:[...mh,"eyebrowLook"],simple:uh,statement:uh,natural:mh,essay:uh},aO=["gap-5","gap-3"],nO=["text-[length:var(--size-body,16px)]","text-[15px]"];function cie(e){return xh(aO,aO[0],e)}function pie(e){return xh(nO,nO[0],e)}function lO(e){return xh(sO,tc,e)}function uie(e){let o=sO.map(r=>r.value),t=[...new Set(Object.values(rO).flat())];return tt(e,t.map(r=>[[r],Cd("headStyle",o,tc,o.filter(a=>!rO[a].includes(r)))]))}import{readHidable as N3,VIEW_TIERS as M3,viewKeyAt as H3}from"efficient-easel/draw";var ma={direction:"row",share:"content",align:"center"},xa={top:14,bottom:14,topPhone:12,bottomPhone:12},rc={wrap:"nowrap",loop:"scroll",sectionAccent:cC,gap:60,gapPhone:32,separator:"dot",sectionBorder:{top:1,bottom:1}},iO={gap:120,gapPhone:64},ac={...Ro,sizeToken:{step:"label",px:14,pxPhone:12},letterSpacing:.25,lineHeight:1.5},dO={textStyle:"heading-3",letterSpacing:.005,case:"upper",lineHeight:1},bl={top:24,bottom:24,topPhone:16,bottomPhone:16},ha={top:16,bottom:16,topPhone:12,bottomPhone:12},wl={justify:"between",wrap:"wrap",gap:32,separator:"none"},Cl={...Ro,letterSpacing:.1,lineHeight:1.5};var nc={top:24,bottom:24,topPhone:24,bottomPhone:24},sc={top:72,bottom:72,topPhone:72,bottomPhone:72},Hn={top:100,bottom:100,topPhone:60,bottomPhone:60},lc={top:120,bottom:120,topPhone:70,bottomPhone:70},W3={top:24,bottom:24,topPhone:24,bottomPhone:24},$3=40,ic={top:120,bottom:120,topTablet:80,bottomTablet:80,topPhone:80,bottomPhone:80},z3={top:24,bottom:24,topPhone:24,bottomPhone:24},dc={top:24,bottom:24,topPhone:24,bottomPhone:24},U3={top:84,bottom:84,topPhone:84,bottomPhone:84},fc={top:48,bottom:48,topPhone:48,bottomPhone:48},cc={top:80,bottom:80,topPhone:60,bottomPhone:60},pc={top:100,bottom:60,topPhone:60,bottomPhone:40},uc={top:60,bottom:60,topPhone:40,bottomPhone:40},mc={top:80,bottom:80,topTablet:60,bottomTablet:60,topPhone:60,bottomPhone:60},xc={top:76,bottom:76,topPhone:76,bottomPhone:76},hc={top:76,bottom:76,topPhone:76,bottomPhone:76},vl={top:80,bottom:40,topPhone:60,bottomPhone:32},Pl={top:76,bottom:76,topPhone:76,bottomPhone:76},Ic={top:72,bottom:72,topPhone:72,bottomPhone:72},gc={top:40,bottom:64,topPhone:24,bottomPhone:36},yc={top:120,bottom:120,topPhone:80,bottomPhone:80,topTablet:80,bottomTablet:80},Sc={top:48,bottom:48,topPhone:48,bottomPhone:48},Tl=e=>{let o=ye(e.bandPadding)??$3;return{top:o,bottom:o,topPhone:o,bottomPhone:o}},fO=(e,o,t)=>({desktop:e,tablet:o,mobile:t}),hh=e=>cn(e.headPlacement)==="own-box",Le=(e,o)=>({top:fO(e.top,o?.top??e.topTablet??e.top,e.topPhone),bottom:fO(e.bottom,o?.bottom??e.bottomTablet??e.bottom,e.bottomPhone)}),cO=e=>({top:e.topPhone,bottom:e.bottomPhone}),kl=e=>o=>hh(o)?{top:0,bottom:e.bottom}:e,j3=(e,o)=>{let t=N3(e[o]);return t.hidden?!1:!!t.text||e.editor?.isEditing===!0},bc={Banner:{frame:()=>Le(nc)},Cards:{frame:kl(Le(sc))},Chart:{frame:()=>Le(Pl)},ContactLocations:{frame:()=>Le(Hn,cO(Hn))},Countdown:{frame:()=>Le(fc)},DocBody:{frame:()=>Le(cc)},DocMasthead:{frame:()=>Le(pc)},DocMetaCards:{frame:()=>Le(uc)},FAQ:{frame:e=>{let o=hh(e)||!["num","title","linkText"].some(r=>j3(e,r)),t=Le(lc);return o?{top:0,bottom:t.bottom}:t},edge:!0},FeaturedCover:{frame:()=>Le(mc)},Grid:{frame:()=>Le(W3)},Integrations:{frame:()=>Le(xc)},KeyFeatures:{frame:()=>Le(hc)},Logos:{frame:e=>hh(e)?0:Le(Tl(e))},LongRead:{frame:kl(Le(ic))},Masthead:{frame:()=>Le(vl,cO(vl))},Mockup:{frame:()=>Le(Pl)},OrderSummary:{frame:()=>Le(z3)},PaymentBadges:{frame:()=>Le(dc)},Prose:{frame:kl(Le(Ic))},SectionHeader:{frame:e=>{let o=Le(gc);return lO(e.headStyle)==="standard"?o:{top:o.top,bottom:0}},edge:!0},Series:{frame:kl(Le(yc))},Stats:{frame:()=>Le(Sc)},Testimonials:{frame:kl(Le(U3))},Ticker:{frame:()=>Le(xa),edge:!0}};function vie(e,o,t){let r=z(bc,e)??t;return r?na({values:tl(o,ho,!0),frame:r.frame(o),drawsFrame:!0,edge:r.edge},!0).root:null}var pO=(e,o)=>typeof e=="object"&&"top"in e?e[o]:e;function G3(e,o){let t={...e};for(let r of M3)delete t[H3(o,r)];return t}function Pie(e,o,t,r){let a=z(bc,e)??t;if(!a)return{first:null,last:null};let n=a.frame(o),s=tl(o,ho,!0),l=(i,d)=>na({values:G3(s,i),frame:d,drawsFrame:!0,edge:a.edge},!0).root;return{first:l("bottom",{top:pO(n,"top"),bottom:r.firstBottom}),last:l("top",{top:r.lastTop,bottom:pO(n,"bottom")})}}var K3=/^(?:[^\s]*:)?p[ytb]-/;function uO(e,o,t){if(!o)return t?{className:e,style:t}:{className:e};let r=e.split(/\s+/).filter(n=>n&&!K3.test(n)),a={...t,...o.style};return{className:[...r,o.className].filter(Boolean).join(" "),...Object.keys(a).length?{style:a}:{},...o.attrs}}import{isNodeList as q3}from"efficient-easel/data";var Ih=new Set(["FAQ"]);function Zo(e,o){if(!Ih.has(e))return!1;let t=o.template;return typeof t=="function"?(t.blockCount??0)>0:q3(t)}var hO={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120}},IO=new Set(Object.keys(hO));function yh(e,o){return o?.innerPadding??z(hO,e)}var Wn=e=>yh(e)??{};var wc=new Set(["Flex","Text","Heading","ImageBlock","ButtonBlock"]),V3=new Set(["Divider"]),Y3=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),mO=new Set(["ProductGrid"]);function Sh(e,o,t=!1,r){let a=e.render;e.render=n=>{if(o?.(n))return a(n);let s={...tl(n,ho,t),sideSpace:tO(n.sideSpace)},l=r?na({values:s,frame:r(n)},!0).outer:Pk(s),i=a(n);if(!l)return i;let d=u=>gh(oc,{className:u?`${l.className} ${u}`:l.className,children:h=>gh(fe,{className:h,style:l.style,children:i})}),f=Tr(n,{atSectionLine:!0}),m=Tr(n);return f===m?d(f):gh(af,{line:"by-box",draw:u=>d(u?m:f)})}}var gO={name:"sectionPadding",applies:(e,o,t)=>o.isSection(e)&&!Y3.has(e)&&!!t&&typeof t.render=="function",panel(e,o,t){let r=yh(o,e);if(r){e.fields={...e.fields,...t.sidesPaddingFields({keys:Pr,unitKey:Qd,fallback:r,tablet:!0,siteSide:!0})};return}if(mO.has(o))return;let a=[Pr.top,Pr.bottom].filter(s=>e.fields!=null&&s in e.fields);if(a.length)throw new Error(`section-padding: ${o} declares its own ${a.join(" / ")} row; declare \`innerPadding: { top, bottom }\` in its meta and the one Padding row draws on its band`);let n=xO(o,e);if(n){SO(e,o,t,n);return}e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,o){if(!yh(o,e)){if(mO.has(o)){Sh(e);return}wc.has(o)||V3.has(o)||Sh(e,o==="Flex"?t=>Jk(t.bgImage):Ih.has(o)?t=>Zo(o,t):void 0,!0,xO(o,e))}}},X3=["Heading","Text","ImageBlock","ButtonBlock"],J3=["LogoBlock"],yO={Text:e=>Fr(e,"text").textStyle?.startsWith("heading-")?rl.heading:rl.text,Heading:()=>rl.heading,ButtonBlock:()=>rl.text,Breadcrumb:()=>Ix(bl),SpecStrip:()=>Ix(ha),...Object.fromEntries(Object.entries(bc).map(([e,o])=>[e,o.frame]))};function xO(e,o){return z(yO,e)??o?.ownPad?.frame}var Z3={ButtonBlock:"Outer padding"};function Q3(e,o){let t=e[zt],r=Array.isArray(t)?t.filter(i=>typeof i=="string"):[],a=Cn().filter(i=>o?.[i]);if(!a.length)return e;let n=[...r.filter(i=>!a.includes(i)),...a.filter(i=>typeof e[i]=="number")];if(n.length===r.length&&n.every((i,d)=>i===r[d]))return e;let{[zt]:s,...l}=e;return n.length?{...l,[zt]:n}:l}function eW(e,o,t){if(o<=0)return null;let r=Array.isArray(e[zt])?e[zt]:[];return(t?Cn().filter(a=>a.startsWith(ho[t])):Cn()).some(a=>typeof e[a]=="number"&&!r.includes(a))?c("plus {n} px (older setting)",{n:o}):null}function SO(e,o,t,r){e.fields={...e.fields,...t.ownPaddingFields?.(r,eW,z(Z3,o))??t.sidesPaddingFields({tablet:!0,siteSide:!0})};let a=e.resolveData;e.resolveData=(n,s)=>{let l=n.props??{},i=s?.trigger==="replace"?Q3(l,s.changed):l,d=i===l?n:{...n,props:i};return a?a(d,s):d}}var bO={name:"blockPadding",applies:(e,o,t)=>(X3.includes(e)||J3.includes(e))&&!!t&&typeof t.render=="function",panel(e,o,t){let r=z(yO,o);if(!r){e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0,siteSide:!0})};return}SO(e,o,t,r)},draw(e,o){wc.has(o)||Sh(e,void 0,!0)}};import{createContext as bh,useContext as Cc}from"react";var wO=bh(null);function Kie(){return Cc(wO)===!0}function qie(){return Cc(wO)!==null}var oW=bh(!1);function Vie(){return Cc(oW)}function Yie(e,o,t){let r=e.boxes;if(!r)return t;let a=r.indexOf(o);return a>=0?a:(r.push(o),r.length-1)}var kc=bh(null);function Xie(){return Cc(kc)}import{jsx as Ia}from"react/jsx-runtime";import{Component as dW,createContext as fW,lazy as pde,Suspense as ude,useContext as cW,useSyncExternalStore as pW}from"react";function tW(e,o){let t=e.trim();if(!vc(t))return!1;if(!o)return!0;let r;try{r=new URL(t,"https://x.invalid").host}catch{return!1}let a=n=>n.toLowerCase().replace(/^www\./,"");return a(r)!==a(o)}function Qie(e){return e.startsWith("/")||vc(e)}function vc(e){return/^(?:https?:)?\/\//i.test(e.trim())}var Ol=Object.freeze({target:"_blank",rel:"noopener noreferrer"});function CO(e,o){return tW(e,o)?{...Ol}:{}}function ede(e){return typeof e=="string"?e.trim():""}var ode="data-sf-box-link",kO="absolute inset-0 -z-[1] outline-none focus-visible:z-[2] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent",wh="relative isolate pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto [&_input]:pointer-events-auto [&_select]:pointer-events-auto [&_textarea]:pointer-events-auto [&_label]:pointer-events-auto [&_summary]:pointer-events-auto [&_iframe]:pointer-events-auto [&_video]:pointer-events-auto [&_audio]:pointer-events-auto [&_[role=button]]:pointer-events-auto [&_[tabindex]:not([tabindex='-1'])]:pointer-events-auto",rW="data-sf-box-jump";function aW(e){return`sf-box-jump-${e}`}function tde(e,o){return e===!0?fa(o):""}function nW({box:e,lit:o,first:t}){let r=s=>s.join(`,
305
305
  `),a=t(e),n=o.flatMap(t);return`
306
306
  ${e} {
307
307
  outline: 2px solid transparent;