1/*! 2 * @name: pwa 3 * @author: Silk Software Inc 4 * @date: Friday, September 4th, 2026, 5:38:31 AM 5 * @version: 0.0.1 6 * @license: 7 * @copyright: Silk Software Inc. All Rights Reserved 8 */ 9(this.webpackJsonppwa=this.webpackJsonppwa||[]).push([[37],{1020:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(304),i=n(997),a=n(2),s=Object(r.memo)((function(e){var t=function(e){var t=e.id,n=e.title,c=Object(r.useMemo)((function(){return"".concat(t?Object(i.b)({id:t}):n)}),[t,n]),a=Object(r.useMemo)((function(){return"".concat(c)}),[c]);return{metaTitle:c,pageTitle:a}}({id:e.id,title:e.title}),n=t.metaTitle,s=t.pageTitle;return Object(a.jsx)(c.a,{meta:[{name:"title",content:n}],children:Object(a.jsx)("title",{children:s})})}));s.defaultProps={id:"",title:""};var o=s},1065:function(e,t,n){"use strict";var r=n(4),c=n(17),i=(n(1046),n(1047)),a=n.n(i),s=n(2),o=["children","onFinish","initialValues","layout","onValuesChange"],l=a.a.Item,d=a.a.List,u=a.a.useForm,h=function(e){var t=e.children,n=e.onFinish,i=e.initialValues,l=e.layout,d=e.onValuesChange,u=Object(c.a)(e,o);return Object(s.jsx)(a.a,Object(r.a)(Object(r.a)({onFinish:n,initialValues:i,layout:l,onValuesChange:d},u),{},{children:t}))};h.defaultProps={onFinish:function(){},initialValues:{},layout:"horizontal",onValuesChange:function(){}},h.useForm=u,h.Item=l,h.List=d,t.a=h},1068:function(e,t,n){"use strict";var r=n(4),c=n(17),i=(n(1042),n(1031)),a=n.n(i),s=n(2),o=["children","checked","disabled","onChange"],l=a.a.Group,d=function(e){var t=e.children,n=e.checked,i=e.disabled,l=e.onChange,d=Object(c.a)(e,o);return Object(s.jsx)(a.a,Object(r.a)(Object(r.a)({checked:n,disabled:i,onChange:l},d),{},{children:t}))};d.defaultProps={checked:!1,disabled:!1,onChange:function(){}},d.Group=l,t.a=d},1078:function(e,t,n){"use strict";var r=n(4),c=n(17),i=(n(1043),n(1032)),a=n.n(i),s=n(2),o=["children","checked","defaultChecked","disabled"],l=a.a.Button,d=a.a.Group,u=function(e){var t=e.children,n=e.checked,i=e.defaultChecked,l=e.disabled,d=Object(c.a)(e,o);return Object(s.jsx)(a.a,Object(r.a)(Object(r.a)({checked:n,defaultChecked:i,disabled:l},d),{},{children:t}))};u.defaultProps={checked:!1,defaultChecked:!1,disabled:!1},u.Button=l,u.Group=d,t.a=u},1106:function(e,t,n){"use strict";var r,c,i=n(4),a=(n(1044),n(1033)),s=n.n(a),o=n(17),l=n(30),d=n(25),u=d.c.div(r||(r=Object(l.a)(["\n position: relative;\n"]))),h=d.c.div(c||(c=Object(l.a)(["\n display: grid;\n cursor: pointer;\n align-items: center;
9\n"]))),b=n(2),p=["overlay","menus","trigger","children"],j=function(e){var t=e.overlay,n=(e.menus,e.trigger),r=e.children,c=Object(o.a)(e,p);return Object(b.jsx)(u,{children:Object(b.jsx)(s.a,Object(i.a)(Object(i.a)({overlay:t,trigger:n,getPopupContainer:function(e){return e.parentNode}},c),{},{children:Object(b.jsx)(h,{children:r})}))})};j.defaultProps={overlay:"",menus:[],trigger:["click"]};t.a=j},1254:function(e,t,n){"use strict";var r,c=n(4),i=n(17),a=(n(1077),n(1051)),s=n.n(a),o=n(30),l=n(25).c.div(r||(r=Object(o.a)(["\n position: relative;\n width: 100%;\n"]))),d=n(2),u=["itemClick","children"],h=s.a.SubMenu,b=s.a.Item,p=function(e){var t=e.itemClick,n=e.children,r=Object(i.a)(e,u);return Object(d.jsx)(l,{children:Object(d.jsx)(s.a,Object(c.a)(Object(c.a)({onClick:function(e){t(e.item.props)},getPopupContainer:function(e){return e.parentNode}},r),{},{children:n}))})};p.defaultProps={mode:"vertical",theme:"light",itemClick:function(){}},p.SubMenu=h,p.Item=b;t.a=p},1277:function(e,t,n){"use strict";var r=n(4),c=n(17),i=(n(1074),n(1076)),a=n.n(i),s=n(2),o=["children","showSearch","filterOption","value","onChange"],l=a.a.Option,d=a.a.OptGroup,u=function(e){var t=e.children,n=e.showSearch,i=e.filterOption,l=e.value,d=e.onChange,u=Object(c.a)(e,o);return l?Object(s.jsx)(a.a,Object(r.a)(Object(r.a)({showSearch:n,filterOption:i,value:l,onChange:d,getPopupContainer:function(e){return e.parentNode}},u),{},{children:t})):Object(s.jsx)(a.a,Object(r.a)(Object(r.a)({showSearch:n,filterOption:i,onChange:d,getPopupContainer:function(e){return e.parentNode}},u),{},{children:t}))};u.defaultProps={showSearch:!1,filterOption:!0,value:null,onChange:function(){}},u.Option=l,u.OptGroup=d,t.a=u},1278:function(e,t,n){"use strict";var r=n(4),c=(n(1112),n(1113)),i=n.n(c),a=n(5),s=n(17),o=n(0),l=n(2),d=["children","title","trigger","okText","cancelText","centered","containerClassName","keyboard","maskClosable","destroyOnClose","onOk","onCancel","afterClose","visible"],u=function(e){var t=e.children,n=e.title,c=e.trigger,u=e.okText,h=e.cancelText,b=e.centered,p=e.containerClassName,j=e.keyboard,m=e.maskClosable,f=e.destroyOnClose,O=e.onOk,x=e.onCancel,g=e.afterClose,v=e.visible,y=Object(s.a)(e,d),k=Object(o.useState)(!1),C=Object(a.a)(k,2),w=C[0],_=C[1];return Object(l.jsxs)("div",{className:p,children:[Object(l.jsx)("span",{onClick:function(){_(!0)},onKeyDown:function(){},role:"button",tabIndex:0,children:c}),Object(l.jsx)(i.a,Object(r.a)(Object(r.a)({title:n,open:w||v,okText:u,cancelText:h,centered:b,destroyOnClose:f,keyboard:j,maskClosable:m,onOk:function(){_(!1),O()},onCancel:function(){_(!1),x()},afterClose:g},y),{},{children:t}))]})};u.defaultProps={title:"",trigger:"",okText:"Confirm",cancelText:"Cancel",centered:!0,containerClassName:"",keyboard:!0,maskClosable:!0,destroyOnClose:!0,onOk:function(){},onCancel:function(){},afterClose:function(){},visible:!1},t.a=u},1359:function(e,t,n){"use strict";var r=n(4),c=n(17),i=(n(1138),n(1140)),a=n.n(i),s=n(2),o=["type","children"],l=a.a.Title,d=a.a.Paragraph,u=a.a.Text;t.a=function(e){var t=e.type,n=e.children,i=Object(c.a)(e,o),a={title:l,paragraph:d,text:u}[t];return Object(s.jsx)(a,Object(r.a)(Object(r.a)({},i),{},{children:n}))}},1425:function(e,t,n){"use strict";n.r(t);var r=n(1015),c=n(1013),i=n(17),a=n(3),s=n(16),o=n(6),l=n(5),d=n(0),u=n(13),h=n(82),b=n.n(h),p=n(156),j=n.n(p),m=n(183),f=n(117),O=n(35),x=n(1e3),g=n(1355),v=n.n(g),y=n(997),k=n(1001),C=n(1111),w=n.n(C),_=["state_or_province","state_or_province_code"],S=n(4),I=n(1065),F=n(124),M=n(472),N=n(995),L=n(458),P=n(1020),T=n(303),E=n(2),z=function(){return Object(E.jsx)("div",{children:Object(E.jsx)("span",{children:"OneStep Checkout"})})},A=n(1014),q=function(){var e=function(){var e=Object(u.d)((function(e){return e.checkout.email})),t=Object(u.d)((function(e){return e.user.isLogin})),n=Object(u.d)((function(e){return e.user.userInfo}));return{customerEmail:Object(d.useMemo)((function(){return t?n.email:e}),[e,t,n.email])}}().customerEmail;return Object(E.jsx)("span",{children:e})},V=n(1278),B=n(1016),G=n(998),U=n(1006),D=n(1005),H=n(1068),Q=n(1409),R=n(25),Y=R.c.div.withConfig({componentId:"silk__sc-1e2kddy-0"})(["display:flex;flex-wrap:wrap;width:100%;margin-bottom:0.75rem;gap:1rem;justify-content:flex-start;.","{&-btn{text-transform:uppercase;min-height:45px;border-radius:8px;font-weight:500;font-size:18px;line-height:24px;:hover,:active,:focus{border-color:",";color:#fff;}}&-row{width:100%;}}> div{flex:1;margin-bottom:0;}> button{margin-top:31px;}input{min-height:45px;border-radius:8px;min-width:220px;}"],(function(e){return e.theme.namespace}),(function(e){return e.theme.colors.global.primary})),J=R.c.p.withConfig({componentId:"silk__sc-1e2kddy-1"})(["margin-bottom:0.75rem;"]),$=R.c.div.withConfig({componentId:"silk__sc-1e2kddy-2"})(["display:flex;flex-direction:column;align-items:center;> span{color:#fff;width:20%;height:20%;}svg{width:100%;height:100%;min-width:30px;min-height:30px;fill:",";}p{margin:20px 0;font-family:'Owners';font-style:normal;font-weight:500;font-size:18px;line-height:24px;}button{background:",";min-height:45px;color:#fff;font-family:'Owners';font-style:normal;font-weight:500;font-size:18px;line-height:24px;:hover{background:",";color:#fff;border-color:#fff;}}"],(function(e){return e.theme.colors.global.primary}),(function(e){return e.theme.colors.global.primary}),(function(e){return e.theme.colors.global.primary})),K=function(){var e=I.a.useForm(),t=Object(l.a)(e,1)[0],n=function(e){var t=Object(u.c)(),n=Object(u.d)((function(e){return e.checkout.email})),r=Object(u.d)((function(e){return e.checkout.subscribe})),c=Object(u.d)((function(e){var t,n,r;return null===(t=e.cart.cartDetail)||void 0===t||null===(n=t.lineItems)||void 0===n||null===(r=n.physicalItems[0])||void 0===r?void 0:r.quantity}))||0,i=Object(d.useState)(!1),s=Object(l.a)(i,2),h=s[0],b=s[1],p=Object(d.useState)(!1),j=Object(l.a)(p,2),f=j[0],x=j[1],g=Object(d.useCallback)(function(){var n=Object(o.a)(Object(a.a)().mark((function n(r){var i,s,o;return Object(a.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,x(!0),i=0,n.next=5,t(m.b.fetchAllOrder({email:r.email}));case 5:if(s=n.sent,null===(o=s.payload)||void 0===o||o.forEach((function(e){var t=e.items_total;i+=t}),[]),!(i>=2||c+i>2)){n.next=12;break}return b(!0),x(!1),n.abrupt("return");case 12:if(!r.subscribe){n.next=17;break}return n.next=15,t(O.b.emailSubscription(r.email)).then((function(e){e.payload&&(x(!1),t(m.a.setGuest(r)))})).catch((function(){x(!1),e.setFieldsValue({subscribe:!1})}
9));case 15:n.next=19;break;case 17:return n.next=19,t(m.a.setGuest(r));case 19:n.next=25;break;case 21:return n.prev=21,n.t0=n.catch(0),x(!1),n.abrupt("return",null);case 25:case"end":return n.stop()}}),n,null,[[0,21]])})));return function(e){return n.apply(this,arguments)}}(),[t,e,c]);return Object(d.useEffect)((function(){n&&e.setFieldsValue({email:n,subscribe:r})}),[n,e,r]),{isLoading:f,maxCount:h,handleFormFinish:g,handleCancel:function(){b(!1)}}}(t),r=n.isLoading,i=n.maxCount,s=n.handleFormFinish,h=n.handleCancel;return Object(E.jsxs)(E.Fragment,{children:[Object(E.jsx)(V.a,{visible:i,footer:null,closable:!1,onCancel:h,children:Object(E.jsxs)($,{children:[Object(E.jsx)(B.a,{src:Q.a}),Object(E.jsx)("p",{children:"The maximum number of Style & Color Guides have already been purchased under this account"}),Object(E.jsx)(A.a,{children:Object(E.jsx)(G.a,{href:"/marketing-tools",children:"Go Marketing Tools"})})]})}),Object(E.jsxs)(U.a,{spinning:r,children:[Object(E.jsx)(J,{children:Object(E.jsx)(c.a,{id:"checkout.guest"})}),Object(E.jsxs)(I.a,{layout:"vertical",form:t,initialValues:{subscribe:!1},onFinish:s,children:[Object(E.jsxs)(Y,{children:[Object(E.jsx)(I.a.Item,{name:"email",label:Object(y.b)({id:"checkout.email"}),rules:[{required:!0},{type:"email"}],children:Object(E.jsx)(D.a,{})}),Object(E.jsx)(A.a,{type:"primary",htmlType:"submit",children:Object(E.jsx)("span",{children:Object(E.jsx)(c.a,{id:"checkout.guestContinue"})})})]}),Object(E.jsx)(I.a.Item,{name:"subscribe",valuePropName:"checked",children:Object(E.jsx)(H.a,{children:Object(E.jsx)(c.a,{id:"checkout.subscribe"})})})]})]})]})},W=n(1359),X=n(1078),Z=n(1277),ee=R.c.div.withConfig({componentId:"silk__sc-q78p4i-0"})(["margin-top:0.5rem;display:none;"]),te=R.c.div.withConfig({componentId:"silk__sc-q78p4i-1"})(["margin-top:1rem;border-radius:0.2rem;border:0.05rem solid #e1e6eb;> .","-form-item{margin-bottom:0;}
9.methods{display:block;> .","{&-radio-wrapper{display:block;margin-right:0;padding:0.75rem 1rem;border-top:1px dashed ",";&:first-child{border-top:unset;}&-checked{background-color:#f5f5f5;}}}}"],(function(e){return e.theme.namespace}),(function(e){return e.theme.namespace}),(function(e){return e.theme.colors.global.dashed})),ne=R.c.div.withConfig({componentId:"silk__sc-q78p4i-2"})(["display:flex;margin-top:1rem;min-height:6.5rem;padding:0.75rem;justify-content:center;align-items:center;border-radius:0.2rem;border:0.05rem solid #e1e6eb;"]),re=R.c.div.withConfig({componentId:"silk__sc-q78p4i-3"})(["padding:1rem 2rem;"]),ce=R.c.div.withConfig({componentId:"silk__sc-q78p4i-4"})(["display:grid;grid-template-columns:1fr 1fr;grid-column-gap:1rem;align-items:flex-start;input,.","-select{&-selector,&-selection-placeholder,&-selection-item{height:2rem !important;line-height:2rem !important;}}"],(function(e){return e.theme.namespace})),ie=R.c.div.withConfig({componentId:"silk__sc-q78p4i-5"})(["font-size:",";color:",";"],(function(e){return e.theme.fontSize.xs}),(function(e){return e.theme.colors.global.error})),ae=Object(d.memo)((function(e){var t=function(e){var t=Object(u.d)((function(e){return e.checkout.paymentMethods})),n=Object(d.useState)("cheque"),r=Object(l.a)(n,2),c=r[0],i=r[1],a=Object(d.useState)(!1),s=Object(l.a)(a,2),o=s[0],h=s[1],b=Object(d.useMemo)((function(){return(new Date).getFullYear()}),[]),p=Object(d.useMemo)((function(){return new Array(11).fill({value:b,name:b}).map((function(e,t){return{value:e.value+t,name:e.name+t}}))}),[b]);return{cardMonth:Object(d.useMemo)((function(){return new Array(12).fill({value:"",name:""}).map((function(e,t){var n=t+1;return{value:e.value+n,name:n>=10?e.name+n:"0".concat(e.name).concat(n)}}))}),[]),cardYear:p,paymentMethods:t,selectPayment:c,validateCardNumber:Object(d.useCallback)((function(e,t){if(j()(t))return Promise.reject()}),[]),validateCardCvc:function(){return{validator:function(e,t){return t?Promise.reject(Object(y.b)({id:"checkoutPage.invalidCvc"})):Promise.resolve()}}},validateCardExpiry:function(){return{validator:function(t,n){if(!n)return Promise.resolve();var r=e.getFieldValue(["card","year"]),c=e.getFieldValue(["card","month"]);return r&&c?v.a.fns.validateCardExpiry(c,r)?(h(!1),Promise.resolve()):(h(!0),Promise.reject()):Promise.resolve()}}},handleMethodChange:Object(d.useCallback)((function(e){var t=e.target.params.code;i(t)}),[]),expiryErrorVisible:o}}(e.form),n=t.cardMonth,r=t.cardYear,i=t.paymentMethods,a=t.selectPayment,s=t.validateCardNumber,o=t.validateCardCvc,h=t.validateCardExpiry,b=t.handleMethodChange,p=t.expiryErrorVisible;return Object(E.jsxs)(ee,{children:[Object(E.jsx)(W.a,{type:"title",level:5,children:Object(E.jsx)("span",{children:"Payment Method"})}),i.length>0?Object(E.jsx)(te,{children:Object(E.jsx)(I.a.Item,{name:"payment_method",children:Object(E.jsx)(X.a.Group,{className:"methods",onChange:b,children:i.map((function(e){return Object(E.jsxs)(d.Fragment,{children:[Object(E.jsx)(X.a,{params:e,value:e.code,children:Object(E.jsx)("span",{dangerouslySetInnerHTML:{__html:e.name}})}),a===e.code&&"braintree"===e.code&&Object(E.jsxs)(re,{children:[Object(E.jsx)(I.a.Item,{name:["card","number"],label:"Credit Card Number",rules:[{required:!0,validator:s}],children:Object(E.jsx)(D.a,{})}),Object(E.jsxs)(ce,{children:[Object(E.jsx)(I.a.Item,{name:["card","month"],label:"Expiration",dependencies:[["card","year"]],rules:[{required:!0},h],children:Object(E.jsx)(Z.a,{placeholder:"Month",children:n.map((function(e){var t=e.value,n=e.name;return Object(E.jsx)(Z.a.Option,{value:t,children:Object(E.jsx)("span",{dangerouslySetInnerHTML:{__html:n}})},"month__".concat(Math.random()))}))})}),Object(E.jsx)(I.a.Item,{className:"blank",name:["card","year"],label:" ",dependencies:[["card","month"]],rules:[{required:!0},h],children:Object(E.jsx)(Z.a,{placeholder:"Year",children:r.map((function(e){var t=e.value,n=e.name;return Object(E.jsx)(Z.a.Option,{value:t,children:Object(E.jsx)("span",{dangerouslySetInnerHTML:{__html:n}})},"year__".concat(Math.random()))}))})})]}),p&&Object(E.jsx)(ie,{children:Object(E.jsx)(c.a,{id:"checkoutPage.invali
9dExpiry"})}),Object(E.jsx)(I.a.Item,{name:["card","cvv"],label:"CVV",rules:[{required:!0},o],children:Object(E.jsx)(D.a,{})})]})]},e.code)}))})})}):Object(E.jsx)(ne,{children:Object(E.jsx)("p",{children:"There is no any avaliable payment method."})})]})})),se=R.c.div.withConfig({componentId:"silk__sc-1ms0c26-0"})(["margin-top:1rem;button{min-height:45px;border-radius:8px;font-weight:500;font-size:18px;line-height:24px;text-transform:uppercase;:hover,:active,:focus{border-color:",";color:#fff;}}"],(function(e){return e.theme.colors.global.primary})),oe=function(){var e=I.a.useForm(),t=Object(l.a)(e,1)[0],n=function(){var e=Object(u.c)(),t=Object(k.a)(),n=Object(d.useState)(!1),r=Object(l.a)(n,2),c=r[0],i=r[1],s=Object(d.useState)(!1),h=Object(l.a)(s,2),b=h[0],p=h[1],j=Object(u.d)((function(e){return e.app.langUrl})),O=Object(u.d)((function(e){return e.app.storeRegion})),x=Object(u.d)((function(e){return e.checkout.paymentMethods})),g=Object(d.useCallback)(Object(o.a)(Object(a.a)().mark((function n(){return Object(a.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,p(!0);case 3:return n.next=5,e(m.b.createAnOrder()).then(function(){var n=Object(o.a)(Object(a.a)().mark((function n(r){var c,i,s;return Object(a.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(c=r.payload)){n.next=12;break}return n.next=4,e(m.b.updatePlaceOrder({id:c,method:null!==(i=null===(s=x[0])||void 0===s?void 0:s.code)&&void 0!==i?i:"cheque"}));case 4:return n.next=6,t.push("/".concat(O,"/").concat(j,"/order-confirmation?orderId=").concat(c));case 6:return n.next=8,e(f.a.reset());case 8:return n.next=10,e(m.a.reset());case 10:return n.next=12,p(!1);case 12:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()).catch(Object(o.a)(Object(a.a)().mark((function e(){return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p(!1);case 2:case"end":return e.stop()}}),e)}))));case 5:n.next=11;break;case 7:return n.prev=7,n.t0=n.catch(0),n.next=11,p(!1);case 11:case"end":return n.stop()}}),n,null,[[0,7]])}))),[e,t,j,O,x]);return Object(d.useEffect)((function(){var t=function(){var t=Object(o.a)(Object(a.a)().mark((function t(){return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i(!0);case 3:return t.next=5,e(m.b.fetchPaymentMethods());case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.prev=10,t.next=13,i(!1);case 13:return t.finish(10);case 14:case"end":return t.stop()}}),t,null,[[0,7,10,14]])})));return function(){return t.apply(this,arguments)}}();t()}),[e]),{isFetching:c,isLoading:b,handleFormFinish:g}}(),r=n.isFetching,i=n.isLoading,s=n.handleFormFinish;return Object(E.jsx)(U.a,{spinning:i,children:r?Object(E.jsx)(T.a,{}):Object(E.jsxs)(I.a,{layout:"vertical",form:t,onFinish:s,children:[Object(E.jsx)(ae,{form:t}),Object(E.jsx)(se,{children:Object(E.jsx)(A.a,{type:"primary",htmlType:"submit",children:Object(E.jsx)("span",{children:Object(E.jsx)(c.a,{id:"checkout.placeOrder"})})})})]})})},le=["decimal","delimiter","digit","value","round"],de=Object(d.memo)((function(e){var t=e.decimal,n=e.delimiter,r=e.digit,c=e.value,a=e.round,s=Object(i.a)(e,le),o=function(e){var t=e.decimal,n=e.delimiter,r=e.digit,c=e.value,i=e.round,a=Object(u.d)((function(e){return e.app.currencies})),s=Object(d.useMemo)((function(){return a.find((function(e){return e.isActive}))}),[a]),o=Object(d.useMemo)((function(){var e,t;return null!==(e=null===s||void 0===s||null===(t=s.display)||void 0===t?void 0:t.symbol)&&void 0!==e?e:""}),[s]),l=Object(d.useMemo)((function(){var e,n;return null!==(e=null===s||void 0===s||null===(n=s.display)||void 0===n?void 0:n.decimalPlaces)&&void 0!==e?e:t}),[s,t]),h=Object(d.useMemo)((function(){var e,t;return null!==(e=null===s||void 0===s||null===(t=s.display)||void 0===t?void 0:t.thousandsToken)&&void 0!==e?e:n}),[s,n]);return{price:Object(d.useMemo)((function(){var e=c<0?"-":"",t=String(Number(Math.abs(c)).toFixed(l));if(!i){var n=String(Math.floor(parseFloat(String(c))*Math.pow(10,l))),a=n.substring(0,n.length-l),s=n.substr(n.length-l);t="".concat(a,".").concat(s)}var d=t.split(".")[0],u=t.split(".")[1],b=new RegExp("(\\d)(?=(\\d{".concat(r,"})+$)"),"gi"),p=d.replace(b,"$1".concat(h)),j="".concat(e).concat(o).concat(p);return u||"undefined"!==typeof u?"".concat(j,".").concat(u):j}),[r,l,h,i,o,c])}}({decimal:t,delimiter:n,digit:r,value:c,round:a}),l=o.price;return Object(E.jsx)("span",Object(S.a)(Object(S.a)({className:"price"},s),{},{children:l}))}));de.defaultProps={decimal:2,delimiter:",",digit:3,round:!0};var ue=de,he=function(){var e={shippingAddress:Object(u.d)((function(e){return e.checkout.shippingAddress})),selectShippingMethod:Object(u.d)((function(e){return e.checkout.selectShippingMethod}))},t=e.shippingAddress,n=e.selectShippingMethod;return Object(E.jsxs)("div",{children:[Object(E.jsxs)("p",{children:[t.first_name," ",t.last_name]}),Object(E.jsxs)("p",{children:[t.company," ",t.phone]}),Object(E.jsx)("p",{children:t.address1}),t.address2&&Object(E.jsx)("p",{children:t.address2}),Object(E.jsxs)("p",{children:[t.city,", ",t.state_or_province,",",t.postal_code," / ",t.country]}),Object(E.jsxs)("p",{children:[Object(E.jsx)("span",{children:null===n||void 0===n?void 0:n.description}),"\xa0\xa0",Object(E.jsx)("strong",{children:Object(E.jsx)(ue,{value:null===n||void 0===n?void 0:n.cost})})]})]})},be=n(1254),pe=n(1106),je=R.c.div.withConfig({componentId:"silk__sc-16fv20b-0"})(["position:relative;padding:0.75rem;border-radius:0.2rem;border:0.05rem solid #e1e6eb;> p{font-size:",";&:last-child{margin-bottom:0;}}&::after{position:absolute;top:50%;right:0.75rem;width:0;height:0;content:'';display:block;border-color:#999 transparent transparent transparent;border-width:0.325rem;border-style:solid;}"],(function(e){return e.theme.fontSize.xxs})),me=R.c.div.withConfig({componentId:"silk__sc-16fv20b-1"})(["padding:0 0.75rem;> p{font-size:",";margin-bottom:0.1rem;}"],(function(e){return e.theme.fontSize.xxs})),fe=R.c.div.withConfig({componentId:"silk__sc-16fv20b-2"})(["margin-top:0.75rem;margin-bottom:0.5rem;"]),Oe=R.c.div.withConfig({componentId:"silk__sc-16fv20b-3"})(["margin-top:1.5rem;"]),xe=Object(d.memo)((function(e){var t=e.children,n=e.addresses,r=e.addressMethod,c=function(e,t){var n=Object(u.c)(),r=Object(u.d)((function(e){return e.cart.cartDetail})),c=Object(u.d)((function(e){return e.checkout.loading})),i=Object(u.d)((function(e){return e.user.isBundle})),h=Object(d.useState)(!0),b=Object(l.a)(h,2),p=b[0],j=b[1],f=Object(d.useState)(),O=Object(l.a)(f,2),x=O[0],g=O[1],v=Object(d.useMemo)((function(){var e,t;return(null!==(e=null===r||void 0===r||null===(t=r.lineItems)||void 0===t?void 0:t.physicalItems)&&void 0!==e?e:[]).reduce((function(e,t){return[].concat(Object(s.a)(e),[{item_id:t.id,quantity:t.quantity}])}),[])}),[r]),y=Object(d.useCallback)(function(){var e=Object(o.a)(Object(a.a)().mark((function e(r){var c,i,s,o,l,d,u,h,b,p,j;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,c=r.addressLine1,i=r.addressLine2,s=r.city,o=r.company,l=r.countryCode,d=r.firstName,u=r.lastName,h=r.phoneNumber,b=r.zipCode,p=r.state,j=[{lineItems:v,shippingAddress:{firstName:d,lastName:u,company:o,phoneNumber:h,addressLine1:c,addressLine2:i,city:s,countryCode:l,state:p,zipCode:b}}],e.next=5,n(m.a.setLoading(!0));case 5:if("isShipping"!==t){e.next=8;break}return e.next=8,n(m.b.setShippingAddress(j));case 8:e.next=13;break;case 10:return e.prev=10,e.t0=e.catch(0),e.abrupt("return",null);case 13:return e.prev=13,e.next=16,n(m.a.setLoading(!1));case 16:return e.finish(13);case 17:case"end":return e.stop()}}),e,null,[[0,10,13,17]])})));return function(t){return e.apply(this,arguments)}}(),[t,n,v]),k=Object(d.useCallback)((function(t){var r=t.key,c=e.find((function(e){var t;return(null===e||void 0===e||null===(t=e.entityId)||void 0===t?void 0:t.toString())===r}));j("0"===r),c?(g(c),y(c)):n(m.a.setShippingMethods([]))}),[e,n,y]),C=Object(d.useCallback)(function(){var e=Object(o.a)(Object(a.a)().mark((function e(t){var r,c,i,s,o,l,d,u,h,b,p;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=t.addressLine1,c=t.addressLine2,i=t.city,s=t.company,o=t.countryCode,l=t.firstName,d=t.lastName,u=t.state,h=t.phoneNumber,b=t.zipCode,p={country_code:o,first_name:l,last_name:d,address1:r,address2:c,city:i,company:s,state_or_province:u,state_or_province_code:b,postal_code:b,phone:h},e.next=5,n(m.b.setBillingAddress(p));case 5:return e.next=7,n(m.a.setSteps(3));case 7:e.next=12;break;case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),[n]);return Object(d.useEffect)((function(){if(e.length>0){var n=("isShipping"===t?e[0].isShipping:e[0].isBilling)?e[0]:e[1],r=i?n:e[0];g(r),j(!1),y(r)}}),[t,e,y,i]),{loading:c,isBundle:i,showFields:p,currentAddress:x,handleFormFinish:C,handleAddressChange:k}}
9(n,r),i=c.loading,h=c.isBundle,b=c.showFields,p=c.currentAddress,j=c.handleFormFinish,f=c.handleAddressChange,O=Object(E.jsxs)(be.a,{onClick:f,children:[Object(E.jsx)(be.a.Item,{children:Object(E.jsx)(A.a,{type:"link",children:"Enter a new address"})},"0"),n.map((function(e){var t=e.addressLine1,n=e.addressLine2,c=e.city,i=e.company,a=e.country,s=e.entityId,o=e.firstName,l=e.lastName,d=e.phoneNumber,u=e.state,b=e.zipCode,p="isShipping"===r?e.isShipping:e.isBilling;return Object(E.jsx)(be.a.Item,{children:h?Object(E.jsx)(E.Fragment,{children:1===p&&Object(E.jsxs)(me,{children:[Object(E.jsxs)("p",{children:[o," ",l]}),Object(E.jsxs)("p",{children:[i," ",d]}),Object(E.jsxs)("p",{children:[t,", ",n]}),Object(E.jsxs)("p",{children:[c,", ",u,", ",b," / ",a]})]})}):Object(E.jsxs)(me,{children:[Object(E.jsxs)("p",{children:[o," ",l]}),Object(E.jsxs)("p",{children:[i," ",d]}),Object(E.jsxs)("p",{children:[t,", ",n]}),Object(E.jsxs)("p",{children:[c,", ",u,", ",b," / ",a]})]})},s)}))]});return Object(E.jsxs)(U.a,{spinning:i,children:[Object(E.jsx)(pe.a,{overlay:O,arrow:!0,children:Object(E.jsx)(je,{children:b?Object(E.jsx)("p",{children:"Enter a new address"}):Object(E.jsxs)(E.Fragment,{children:[Object(E.jsxs)("p",{children:[p.firstName," ",p.lastName]}),Object(E.jsxs)("p",{children:[p.company," ",p.phoneNumber]}),Object(E.jsxs)("p",{children:[p.addressLine1,", ",p.addressLine2]}),Object(E.jsxs)("p",{children:[p.city,", ",p.state,","," ",p.zipCode," / ",p.country]})]})})}),Object(E.jsx)(fe,{children:b?t:Object(E.jsxs)(E.Fragment,{children:[Object(E.jsx)("span",{children:"OR"}),Object(E.jsx)(A.a,{type:"link",onClick:function(){f({key:"0"})},children:"Enter a new address"})]})}),"isBilling"===r&&!b&&Object(E.jsx)(Oe,{children:Object(E.jsx)(A.a,{onClick:function(){j(p)},children:Object(E.jsx)("span",{children:"Continue"})})})]})})),ge=xe,ve=R.c.div.withConfig({componentId:"silk__sc-1hgu4j5-0"})(["display:grid;margin-top:1rem;margin-bottom:0.5rem;grid-template-columns:repeat(2,1fr);grid-row-gap:0.5rem;grid-column-gap:1rem;input{min-height:45px;border-radius:8px;}.","{&-select-selector{min-height:45px;border-radius:8px !important;> span{line-height:45px !important;}}&-row{width:100%;}}@media screen and (max-width:700px){grid-template-columns:1fr;}"],(function(e){return e.theme.namespace})),ye=R.c.div.withConfig({componentId:"silk__sc-1hgu4j5-1"})(["display:none;"]),ke=Object(d.memo)((function(e){var t=function(e){var t=Object(u.c)(),n=Object(u.d)((function(e){return e.cart.cartDetail})),r=Object(u.d)((function(e){return e.checkout.email})),c=Object(u.d)((function(e){return e.checkout.shippingAddress})),h=Object(u.d)((function(e){return e.checkout.shippingFields})),p=Object(u.d)((function(e){return e.user.isLogin})),f=Object(d.useState)(null),O=Object(l.a)(f,2),x=O[0],g=O[1],v=Object(d.useState)(!1),y=Object(l.a)(v,2),k=y[0],C=y[1],S=Object(d.useState)([]),I=Object(l.a)(S,2),F=I[0],M=I[1],N=Object(d.useMemo)((function(){return[{code:"US",id:226,name:"United States"}]}),[]),L=Object(d.useMemo)((function(){var e,t;return(null!==(e=null===n||void 0===n||null===(t=n.lineItems)||void 0===t?void 0:t.physicalItems)&&void 0!==e?e:[]).reduce((function(e,t){return[].concat(Object(s.a)(e),[{item_id:t.id,quantity:t.quantity}])}),[])}),[n]),P=Object(d.useCallback)(Object(o.a)(Object(a.a)().mark((function n(){var r,c,i,s,o,l,d;return Object(a.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return l=null!==(r=null===(c=e.getFieldValue())||void 0===c?void 0:c.shipping)&&void 0!==r?r:{},d=[{lineItems:L,shippingAddress:{firstName:l.firstName,lastName:l.lastName,company:null!==(i=null===l||void 0===l?void 0:l.company)&&void 0!==i?i:"",phoneNumber:null!==(s=null===l||void 0===l?void 0:l.phone)&&void 0!==s?s:"",addressLine1:l.address1,addressLine2:null!==(o=null===l||void 0===l?void 0:l.address2)&&void 0!==o?o:"",city:l.city,countryCode:l.countryCode,state:l.state_name,zipCode:l.postalCode}}],n.next=4,t(m.a.setShippingMethodLoading(!0));case 4:return n.next=6,t(m.b.setShippingAddress(d));case 6:return n.next=8,t(m.a.setShippingMethodLoading(!1));case 8:case"end":return n.stop()}}),n)}))),[t,e,L]),T=Object(d.useCallback)((function(e,t){return t&&t.children&&t.children.indexOf(e)>=0}),[]),E=Object(d.useCallback)(function(){var e=Object(o.a)(Object(a.a)().mark((function e(n){var c,i,s,o,l,d,u,h,b,p,j,f;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=n.address1,s=n.address2,o=n.city,l=n.company,d=n.countryCode,u=n.firstName,h=n.lastName,b=n.phone,p=n.postalCode,j=n.state_code,f=[{line_items:L,shipping_address:{email:r,country_code:d,first_name:u,last_name:h,address1:i,address2:s,city:o,company:l,state_or_province:null!==(c=null===n||void 0===n?void 0:n.state_name)&&void 0!==c?c:"",state_or_province_code:j,postal_code:p,phone:b}}],e.next=5,C(!0);case 5:return e.next=7,t(m.b.setShippingAddress(f));case 7:e.next=12;break;case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",null);case 12:return e.prev=12,e.next=15,C(!1);case 15:return e.finish(12);case 16:case"end":return e.stop()}}),e,null,[[0,9,12,16]])})));return function(t){return e.apply(this,arguments)}}(),[t,r,L]),z=Object(d.useCallback)(Object(o.a)(Object(a.a)().mark((function t(){var n;return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[["shipping","state_name"]],h.forEach((function(e){n.push(["shipping",e.name])})),t.next=4,e.validateFields(n).then((function(e){var t=e.shipping;w()(t,x)||(E(t),g(t),P())})).catch((function(){}));case 4:case"end":return t.stop()}}),t)}))),[P,e,x,E,h]),A=Object(d.useCallback)(function(){var e=Object(o.a)(Object(a.a)().mark((function e(n,r){var c;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,c=Number(null===r||void 0===r?void 0:r.key),e.next=4,C(!0);case 4:return e.next=6,t(m.b.fetchCountryState({id:c||226})).then((function(e){var t=e.payload;t&&b()(t)?(M(Object(s.a)(t)),C(!1)):(C(!1),z())})).catch((function(){C(!1)}));case 6:e.next=12;break;case 8:return e.prev=8,e.t0=e.catch(0),e.next=12,C(!1);case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,n){return e.apply(this,arguments)}}(),[t,z]),q=Object(d.useCallback)(function(){var t=Object(o.a)(Object(a.a)().mark((function t(n){var r;return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=F.find((function(e){return e.id===n})),t.next=3,e.setFieldsValue({shipping:{state_name:r.name,state_code:r.code}});case 3:return t.next=5,z();case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[e,z,F]);return Object(d.useEffect)((function(){if(!j()(c)){var t={},n=(c.state_or_province,c.state_or_province_code,Object(i.a)(c,_));
9delete n.custom_fields,Object.entries(n).forEach((function(e){var n=Object(l.a)(e,2),r=n[0],c=n[1],i=r.replace(/_(\w)/g,(function(e,t){return t.toUpperCase()}));t[i]=c})),e.setFieldsValue({billing:t})}}),[e,c]),Object(d.useEffect)((function(){e.setFieldsValue({shipping:{countryCode:"US"}}),A()}),[e,A]),{countries:N,isLoading:k,isLogin:p,regionState:F,shippingFields:h,handleCountryChange:A,handleFilterChange:T,handleFormChange:z,handleStateChange:q}}(e.form),n=t.countries,r=t.isLoading,h=t.regionState,p=t.shippingFields,f=t.handleCountryChange,O=t.handleFilterChange,x=t.handleFormChange,g=t.handleStateChange,v=function(e){var t=e.name,r=e.required;switch(t){case"countryCode":return Object(E.jsx)(I.a.Item,{label:Object(y.b)({id:"checkout.countryCode"}),name:["shipping",t],rules:[{required:r}],children:Object(E.jsx)(Z.a,{showSearch:!0,placeholder:Object(y.b)({id:"global.selectCountry"}),filterOption:O,onChange:f,children:n.map((function(e){return Object(E.jsx)(Z.a.Option,{value:e.code,children:e.name},e.id)}))})});case"stateOrProvince":return Object(E.jsx)(E.Fragment,{children:h.length>0?Object(E.jsxs)(E.Fragment,{children:[Object(E.jsx)(I.a.Item,{label:Object(y.b)({id:"checkout.stateOrProvince"}),name:["shipping",t],rules:[{required:r}],children:Object(E.jsx)(Z.a,{showSearch:!0,placeholder:"Select a state",filterOption:O,onChange:g,children:h.map((function(e){return Object(E.jsx)(Z.a.Option,{value:e.id,children:e.name},e.id)}))})}),Object(E.jsxs)(ye,{children:[Object(E.jsx)(I.a.Item,{name:["shipping","state_name"],children:Object(E.jsx)(D.a,{})}),Object(E.jsx)(I.a.Item,{name:["shipping","state_code"],children:Object(E.jsx)(D.a,{})})]})]}):Object(E.jsx)(I.a.Item,{label:Object(y.b)({id:"checkout.stateOrProvince"}),name:["shipping","state_name"],rules:[{required:r}],children:Object(E.jsx)(D.a,{onBlur:x})})});default:return Object(E.jsx)(I.a.Item,{label:Object(y.b)({id:"checkout.".concat(t)}),name:["shipping",t],rules:[{required:r}],children:Object(E.jsx)(D.a,{onBlur:x})})}};return Object(E.jsxs)("div",{children:[Object(E.jsx)(W.a,{type:"title",level:5,children:Object(E.jsx)("span",{children:Object(E.jsx)(c.a,{id:"checkout.shippingAddress"})})}),Object(E.jsx)(U.a,{spinning:r,children:Object(E.jsx)(ve,{children:p.map((function(e){return Object(E.jsx)(v,Object(S.a)({},e),e.id)}))})})]})})),Ce=ke,we=R.c.div.withConfig({componentId:"silk__sc-93gulo-0"})(["margin-top:1.5rem;"]),_e=R.c.div.withConfig({componentId:"silk__sc-93gulo-1"})(["margin-top:1rem;.","{&-form-item{margin-bottom:0;width:100%;}&-radio-group{display:block;margin-bottom:0.5rem;border-radius:0.2rem;border:0.05rem solid #e1e6eb;.","-radio-wrapper{&:last-child{border-bottom:unset;}}}&-row{width:100%;}&-radio-wrapper{display:block;margin-right:0;padding:0.75rem 1rem;border-bottom:1px dashed ",";&-checked{background-color:#f5f5f5;}}}"],(function(e){return e.theme.namespace}),(function(e){return e.theme.namespace}),(function(e){return e.theme.colors.global.dashed})),Se=R.c.div.withConfig({componentId:"silk__sc-93gulo-2"})(["display:flex;margin-top:1rem;min-height:6.5rem;padding:0.75rem;justify-content:center;align-items:center;border-radius:0.2rem;border:0.05rem solid #e1e6eb;"]),Ie=function(){var e=function(){var e=Object(u.c)(),t=Object(u.d)((function(e){return e.checkout.shippingMethods})),n=Object(u.d)((function(e){return e.checkout.shippingMethodLoading})),r=Object(d.useCallback)(function(){var t=Object(o.a)(Object(a.a)().mark((function t(n){var r;return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r=n.target.params.id,t.next=4,e(m.a.setLoading(!0));case 4:return t.next=6,e(m.b.setShippingMethod(r));case 6:t.next=11;break;case 8:return t.prev=8,t.t0=t.catch(0),t.abrupt("return",null);case 11:return t.prev=11,t.next=14,e(m.a.setLoading(!1));case 14:return t.finish(11);case 15:case"end":return t.stop()}}),t,null,[[0,8,11,15]])})));return function(e){return t.apply(this,arguments)}}(),[e]);return{shippingMethods:t,shippingMethodLoading:n,handleMethodChange:r}}(),t=e.shippingMethodLoading,n=e.shippingMethods,r=e.handleMethodChange;return Object(E.jsxs)(we,{children:[Object(E.jsx)(W.a,{type:"title",level:5,children:Object(E.jsx)("span",{children:Object(E.jsx)(c.a,{id:"checkout.shippingMethod"})})}),Object(E.jsx)(U.a,{spinning:t,children:n.length>0?Object(E.jsx)(_e,{children:Object(E.jsx)(I.a.Item,{name:"shipping_method",rules:[{required:!0}],children:Object(E.jsx)(X.a.Group,{onChange:r,children:n.map((function(e){return Object(E.jsxs)(X.a,{params:e,value:e.type,children:[Object(E.jsx)("span",{dangerouslySetInnerHTML:{__html:e.description}}),Object(E.jsx)("span",{children:"\xa0-\xa0"}),Object(E.jsx)(ue,{value:e.cost})]},e.id)}))})})}):Object(E.jsx)(Se,{children:Object(E.jsx)("p",{children:Object(E.jsx)(c.a,{id:"checkout.shippingAddressNote"})})})})]})},Fe=R.c.div.withConfig({componentId:"silk__sc-1xddx7r-0"})(["margin-top:1.5rem;button{min-height:45px;border-radius:8px;font-weight:500;font-size:18px;line-height:24px;:hover,:active,:focus{border-color:",";color:#fff;}}"],(function(e){return e.theme.colors.global.primary})),Me=function(){var e=function(){var e=I.a.useForm(),t=Object(l.a)(e,1)[0],n=Object(x.a)(),r=Object(u.c)(),c=Object(u.d)((function(e){return e.checkout.loading})),i=Object(u.d)((function(e){return e.checkout.shippingAddress})),s=Object(u.d)((function(e){return e.user.isLogin})),h=Object(u.d)((function(e){return e.user.isBundle})),b=Object(d.useState)(!1),p=Object(l.a)(b,2),j=p[0],f=p[1],O=Object(d.useState)([]),g=Object(l.a)(O,2),v=g[0],y=g[1],k=Object(u.d)((function(e){return e.checkout.email})),C=Object(d.useCallback)(function(){var e=Object(o.a)(Object(a.a)().mark((function e(t){return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r(m.a.setSameAs(!0));case 2:if(!t.shipping_method){e.next=8;break}return e.next=6,r(m.b.setBillingAddress(Object(S.a)(Object(S.a)({},i),{},{email:k})));case 6:return e.next=8,r(m.a.setSteps(2));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[r,i,k]),w=Object(d.useCallback)(function(){var e=Object(o.a)(Object(a.a)().mark((function e(t){var n;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.target.checked,e.next=3,r(m.a.setSameAs(n));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[r]);return Object(d.useEffect)((function(){var e=function(){var e=Object(o.a)(Object(a.a)().mark((function e(){var t,n,c;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f(!0);case 3:return e.next=5,r(F.b.fetchAddressBook());case 5:c=e.sent,y(null!==(t=null===c||void 0===c||null===(n=c.payload)||void 0===n?void 0:n.addresses)&&void 0!==t?t:[]),e.next=12;break;case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",null);case 12:return e.prev=12,e.next=15,f(!1);case 15:return e.finish(12);case 16:case"end":return e.stop()}}),e,null,[[0,9,12,16]])})));return function(){return e.apply(this,arguments)}}();s&&e()}),[n,h,r,s]),{form:t,loading:c,isBundle:h,addresses:v,isFetching:j,handleFormFinish:C,handleToggleCheck:w}}(),t=e.form,n=e.loading,r=e.isBundle,i=e.addresses,s=e.isFetching,h=e.handleFormFinish;return Object(E.jsx)(E.Fragment,{children:s?Object(E.jsx)(T.a,{children:Object(E.jsx)("span",{children:Object(E.jsx)(c.a,{id:"checkout.fetchAddress"})})}):Object(E.jsxs)(I.a,{layout:"vertical",initialValues:{saveIn:!1,sameAs:!r},form:t,onFinish:h,children:[(null===i||void 0===i?void 0:i.length)>0?Object(E.jsx)(ge,{addressMethod:"isShipping",addresses:i,children:Object(E.jsx)(Ce,{form:t})}):Object(E.jsx)(Ce,{form:t}
9),Object(E.jsxs)(U.a,{spinning:n,children:[Object(E.jsx)(Ie,{}),Object(E.jsx)(Fe,{children:Object(E.jsx)(A.a,{type:"primary",htmlType:"submit",children:Object(E.jsx)("span",{children:Object(E.jsx)(c.a,{id:"checkout.continue"})})})})]})]})})},Ne=R.c.article.withConfig({componentId:"silk__sc-1kgspdj-0"})(["min-height:15rem;border:1px solid #ddd;border-radius:0.2rem;box-shadow:0 4px 8px rgb(221 221 221 / 50%);"]),Le=R.c.section.withConfig({componentId:"silk__sc-1kgspdj-1"})(["display:flex;padding:0.75rem;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;"]),Pe=R.c.section.withConfig({componentId:"silk__sc-1kgspdj-2"})(["padding:0.75rem 0.75rem 0;border-bottom:1px solid #ddd;.list{max-height:19.5rem;overflow-y:scroll;> li{display:grid;padding:0.75rem 0;grid-template-columns:3rem 1fr 4rem;grid-gap:0.75rem;border-bottom:1px dashed ",";&:last-child{border-bottom:unset;}}}.price{justify-self:flex-end;}"],(function(e){return e.theme.colors.global.dashed})),Te=R.c.section.withConfig({componentId:"silk__sc-1kgspdj-3"})(["padding:0.75rem 0.75rem 0.65rem;border-bottom:1px solid #ddd;> p{display:flex;margin-bottom:0.5rem;justify-content:space-between;align-items:center;}.code{font-size:",";}"],(function(e){return e.theme.fontSize.xxs})),Ee=R.c.div.withConfig({componentId:"silk__sc-1kgspdj-4"})(["display:flex;padding:0.75rem;justify-content:space-between;align-items:center;.label{font-size:",";}.value{font-size:",";font-weight:bold;}"],(function(e){return e.theme.fontSize.xs}),(function(e){return e.theme.fontSize.l})),ze=function(){var e,t,n=function(){var e=Object(u.d)((function(e){return e.cart.cartDetail})),t=Object(u.d)((function(e){return e.cart.cartQty})),n=Object(u.d)((function(e){return e.cart.cartSubTotal})),r=Object(u.d)((function(e){return e.cart.cartTotal})),c=Object(u.d)((function(e){return e.checkout.loading})),i=Object(u.d)((function(e){return e.checkout.consignment})),s=Object(d.useState)(!0),h=Object(l.a)(s,2),b=h[0],p=h[1],j=Object(d.useState)([]),m=Object(l.a)(j,2),f=m[0],g=m[1],v=Object(d.useState)(!0),y=Object(l.a)(v,2),k=y[0],C=y[1],w=Object(u.c)(),_=Object(x.a)();Object(d.useEffect)((function(){var t;p(!0);var n,r=[],c=null!==(t=null===e||void 0===e?void 0:e.lineItems.physicalItems)&&void 0!==t?t:[],i=[];c.forEach((function(e){var t=e.productId;i.push(t)}));var s=function(e){w(O.b.fetchProducts({client:_,ids:e})).then((function(e){var t=e.payload;t&&t.products.forEach((function(e){var t=e.entityId,n=e.name;c.forEach((function(e){var i=e.url.replace("https://comfort-colors-1187231.mybigcommerce.com",""),a=e.id,s=e.productId,o=e.imageUrl,l=e.name,d=e.listPrice,u=e.salePrice,h=e.quantity,b=e.sku;t===s&&r.push({id:a,image:o,name:null!==n&&void 0!==n?n:l,basePrice:d,salePrice:u,productId:s,quantity:h,url:i,sku:b}),r.length===c.length&&(g(r),p(!1))}))}))}))};if(i.length>0&&i.length===c.length&&k){n=Array.from(new Set(i));for(var l=[],d=0;d<n.length;d+=10)l.push(n.slice(d,d+10));l.length>0&&l.forEach(function(){var e=Object(o.a)(Object(a.a)().mark((function e(t){return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s(t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}else p(!1);return function(){C(!1)}}),[w,null===e||void 0===e?void 0:e.lineItems.physicalItems,_,k]);var S=Object(d.useMemo)((function(){var e,t;return(null!==(e=null!==(t=r+(null===i||void 0===i?void 0:i.shipping_cost_inc_tax))&&void 0!==t?t:0+(null===i||void 0===i?void 0:i.handling_cost_inc_tax))&&void 0!==e?e:0)||r}),[r,i]),I=Object(d.useMemo)((function(){var t,n;return null!==(t=null===e||void 0===e||null===(n=e.coupons)||void 0===n?void 0:n[0])&&void 0!==t?t:null}),[e]),F=Object(d.useMemo)((function(){var t,n;return null!==(t=null===e||void 0===e||null===(n=e.currency)||void 0===n?void 0:n.code)&&void 0!==t?t:""}),[e]);return{isLoading:b,cartQty:t,loading:c,cartList:f,cartTotal:r,cartCoupon:I,totalPrice:S,consignment:i,cartSubTotal:n,currencyCode:F}}
9(),r=n.isLoading,i=n.cartQty,s=n.loading,h=n.cartList,b=n.totalPrice,p=n.consignment,j=n.cartSubTotal,m=n.currencyCode;return Object(E.jsxs)(Ne,{children:[Object(E.jsx)(Le,{children:Object(E.jsx)("h5",{children:Object(E.jsx)(c.a,{id:"checkout.order"})})}),Object(E.jsx)(Pe,{children:Object(E.jsxs)(U.a,{spinning:r,children:[Object(E.jsx)("h6",{children:"".concat(i," ").concat(i>0?"Items":"Item")}),h.length>0&&Object(E.jsx)("ul",{className:"list",children:h.map((function(e){var t=e.id,n=e.image,r=e.name,c=e.quantity,i=e.salePrice,a=e.sku;return Object(E.jsxs)("li",{children:[Object(E.jsx)("div",{children:Object(E.jsx)("figure",{children:Object(E.jsx)("img",{src:n,alt:r,title:r})})}),Object(E.jsxs)("div",{children:[Object(E.jsx)("p",{className:"name",dangerouslySetInnerHTML:{__html:r}}),Object(E.jsxs)("p",{children:[Object(E.jsx)("span",{children:"Sku: "}),Object(E.jsx)("span",{children:a})]}),Object(E.jsxs)("p",{children:[Object(E.jsx)("span",{children:c}),Object(E.jsx)("span",{children:" x "}),Object(E.jsx)(ue,{value:i})]})]}),Object(E.jsx)("p",{className:"price",children:Object(E.jsx)(ue,{value:c*i})})]},t)}))})]})}),Object(E.jsxs)(U.a,{spinning:s,children:[Object(E.jsxs)(Te,{children:[Object(E.jsxs)("p",{children:[Object(E.jsx)("span",{children:Object(E.jsx)(c.a,{id:"checkout.subtotal"})}),Object(E.jsx)(ue,{value:j})]}),Object(E.jsxs)("p",{children:[Object(E.jsx)("span",{children:Object(E.jsx)(c.a,{id:"checkout.shipping"})}),Object(E.jsx)(ue,{value:null!==(e=null===p||void 0===p?void 0:p.shipping_cost_inc_tax)&&void 0!==e?e:0})]}),Object(E.jsxs)("p",{children:[Object(E.jsx)("span",{children:Object(E.jsx)(c.a,{id:"checkout.tax"})}),Object(E.jsx)(ue,{value:null!==(t=null===p||void 0===p?void 0:p.handling_cost_inc_tax)&&void 0!==t?t:0})]})]}),Object(E.jsxs)(Ee,{children:[Object(E.jsxs)("span",{className:"label",children:[Object(E.jsx)(c.a,{id:"checkout.total"})," (",m,")"]}),Object(E.jsx)(ue,{className:"value",value:b})]})]})]})},Ae=R.c.div.withConfig({componentId:"silk__sc-1cmh2ri-0"})(["padding:1.5rem 0;border-bottom:0.05rem solid ",";"],(function(e){return e.theme.colors.global.dashed})),qe=R.c.div.withConfig({componentId:"silk__sc-1cmh2ri-1"})(["display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;@media screen and (max-width:500px){> button{flex:1;}};"]),Ve=R.c.div.withConfig({componentId:"silk__sc-1cmh2ri-2"})(["display:grid;grid-auto-flow:column;grid-gap:1rem;justify-content:flex-start;align-items:center;.title{display:block;font-weight:bold;font-size:",";text-transform:uppercase;}.step{display:flex;gap:20px;}@media screen and (max-width:500px){display:flex;align-items:flex-start;flex-wrap:wrap;};"],(function(e){return e.theme.fontSize.m})),Be=R.c.div.withConfig({componentId:"silk__sc-1cmh2ri-3"})(["display:flex;color:",";font-size:",";width:1.6rem;height:1.6rem;border-radius:50%;background-color:",";justify-content:center;align-items:center;"],(function(e){return e.theme.colors.global.text}),(function(e){return e.theme.fontSize.s}),(function(e){return e.theme.colors.global.primary})),Ge=R.c.div.withConfig({componentId:"silk__sc-1cmh2ri-4"})(["padding:1.25rem 0 0 2.65rem;.","-dropdown{z-index:100;&-menu{> li{&:not(:last-child){border-bottom:0.05rem dashed ",";}}}}"],(function(e){return e.theme.namespace}),(function(e){return e.theme.colors.global.dashed})),Ue=function(){var e=function(){var e=Object(u.c)(),t=Object(u.d)((function(e){return e.checkout.stepCurrent})),n=Object(u.d)((function(e){return e.user.isLogin})),r=Object(u.d)((function(e){return e.user.isBundle})),c=Object(u.d)((function(e){return e.user.roleId})),i=Object(d.useState)([]),s=Object(l.a)(i,2),h=s[0],b=s[1],p=Object(x.a)(),j=Object(d.useCallback)(function(){var n=Object(o.a)(Object(a.a)().mark((function n(r){return Object(a.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(3!==t&&0!==r){n.next=3;break}return n.next=3,e(m.a.setSteps(r));case 3:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),[e,t]),f=Object(d.useCallback)((function(t){e(m.a.setSteps(t))}),[e]);return Object(d.useEffect)((function(){n&&e(m.a.setSteps(1))}),[e,n]),Object(d.useEffect)((function(){var t=function(){var t=Object(o.a)(Object(a.a)().mark((function t(){var n,r,c;return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e(F.b.fetchAddressBook());case 3:c=t.sent,b(null!==(n=null===c||void 0===c||null===(r=c.payload)||void 0===r?void 0:r.addresses)&&void 0!==n?n:[]),t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();n&&t()}),[p,r,e,n,c]),{roleId:c,isLogin:n,isBundle:r,addresses:h,stepCurrent:t,handleStepCh
9ange:j,handleToggleView:f}}(),t=e.isLogin,n=e.stepCurrent,r=e.handleToggleView,i=[{key:"customer",title:Object(y.b)({id:"checkout.customer"}),children:t?null:Object(E.jsx)(K,{}),content:Object(E.jsx)(q,{})},{key:"shipping",title:Object(y.b)({id:"checkout.shipping"}),children:Object(E.jsx)(Me,{}),content:Object(E.jsx)(he,{})},{key:"payment",title:Object(y.b)({id:"checkout.payment"}),children:Object(E.jsx)(oe,{})}];return Object(E.jsxs)("div",{className:"content",children:[Object(E.jsx)("div",{className:"orderSummary",children:Object(E.jsx)(ze,{})}),Object(E.jsx)("div",{className:"steps",children:i.map((function(e,a){var s=e.key,o=e.title,l=e.children,d=e.content,u=n>a&&a<i.length-1;return Object(E.jsxs)(Ae,{children:[Object(E.jsxs)(qe,{children:[Object(E.jsxs)(Ve,{children:[Object(E.jsxs)("div",{className:"step",children:[Object(E.jsx)(Be,{children:Object(E.jsx)("span",{children:a+1})}),Object(E.jsx)("span",{className:"title",dangerouslySetInnerHTML:{__html:o}})]}),u&&Object(E.jsx)("div",{children:d})]}),u&&Object(E.jsx)(E.Fragment,{children:t&&0===a?Object(E.jsx)(A.a,{children:Object(E.jsx)("span",{children:Object(E.jsx)(c.a,{id:"checkout.signOUt"})})}):Object(E.jsx)(A.a,{onClick:function(){r(a)},children:Object(E.jsx)(c.a,{id:"global.edit"})})})]}),n===a&&Object(E.jsx)(Ge,{children:l})]},s)}))})]})},De=R.c.div.withConfig({componentId:"silk__sc-1ha3xxr-0"})(["padding:48px;font-family:'Owners';font-style:normal;font-weight:400;font-size:18px;line-height:28px;.content{display:flex;gap:2rem;flex-direction:row-reverse;.steps{flex:1;}.orderSummary{min-width:400px;}}.","{&-row{display:inline-block !important;}}@media screen and (max-width:960px){padding:24px;.content{display:grid;gap:2rem;}.orderSummary{min-width:unset !important;}}"],(function(e){return e.theme.namespace})),He=function(){var e=function(){var e=Object(u.c)(),t=Object(k.a)(),n=Object(M.b)(),r=Object(l.a)(n,1)[0].checkout.enableOneStep,c=Object(u.d)((function(e){return e.cart.cartQty})),i=Object(u.d)((function(e){return e.checkout.countries})),s=Object(d.useState)(!1),h=Object(l.a)(s,2),b=h[0],p=h[1],j=N.a.getItem("quoteCartId"),f=Object(L.a)().routes.publicRoutes,O=Object(d.useMemo)((function(){var e,n,r=f.filter((function(e){var n;return(null===(n=e.path)||void 0===n?void 0:n.split("/")[3])===t.pathname.split("/")[3]}))[0];return{label:null!==(e=null===r||void 0===r?void 0:r.label)&&void 0!==e?e:"",id:null!==(n=null===r||void 0===r?void 0:r.id)&&void 0!==n?n:0}}),[f,t.pathname]);return Object(d.useEffect)((function(){0!==c||j||t.push("/")}),[c,t,j]),Object(d.useEffect)((function(){var t=function(){var t=Object(o.a)(Object(a.a)().mark((function t(){return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,p(!0);case 3:return t.next=5,e(m.b.fetchFormFields());case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.prev=10,t.next=13,p(!1);case 13:return t.finish(10);case 14:case"end":return t.stop()}}),t,null,[[0,7,10,14]])})));return function(){return t.apply(this,arguments)}}();t()}),[e]),Object(d.useEffect)((function(){var t=function(){var t=Object(o.a)(Object(a.a)().mark((function t(){return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e(m.b.fetchSiteCountries());case 3:t.next=8;break;case 5:return t.prev=5,t.t0=t.catch(0),t.abrupt("return",null);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}();0===i.length&&t()}),[i,e]),{isFetching:b,currentPage:O,enableOneStep:r}}(),t=e.enableOneStep,n=e.isFetching;return Object(E.jsx)(De,{children:Object(E.jsxs)(r.a,{children:[Object(E.jsx)(P.a,{id:"global.checkout"}),n?Object(E.jsx)(T.a,{global:!0,children:Object(E.jsx)(c.a,{id:"global.loading"})}):Object(E.jsx)("div",{children:t?Object(E.jsx)(z,{}):Object(E.jsx)(Ue,{})})]})})};t.default=function(){return Object(E.jsx)(He,{})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.