1import{d as C,co as _,cj as x,aw as A,r as I,U as N,j as e,A as R,ct as F,n as S,cu as B,ap as L,cg as w,cv as E,cw as U,ci as $}from"./index-KDcLenRU.js";import{u as G}from"./FreeShippingMilestone.ix-UlGxA.js";import{O as k}from"./index.GeTr7EHP.js";import{r as j,a as P}from"./utils.WQNb3MMc.js";import{u as W,P as M,a as O}from"./PostalCodeSelect.Nr8KR-Ud.js";import{S as q}from"./plus.U__nI8si.js";import{e as f}from"./react-select.esm.H5GyIIS6.js";import{u as v}from"./CheckoutStore.nOpGFITF.js";import{f as m}from"./react-select.v8gwy_BX.js";import{d as b}from"./react-select-utils.fldikllN.js";import{T as u}from"./TextInput.AndAWOLI.js";import{u as X}from"./index.gw6lQf0q.js";import{u as K}from"./useProductTabsByCode.z62J-Z7i.js";import{P as D}from"./ProductCardsSwiper.uWj36LrL.js";import{u as V,C as Z}from"./CheckoutSteps.nmahUI3h.js";import"./GenericStore.Q48sUYLa.js";import"./useCreateAddress.fJ3QVqz-.js";import"./TeacherBookBadge.lXe03IJT.js";import"./warning-sign.XBdkSz9g.js";import"./toGreekCaps.1t_UCRL0.js";import"./NewsletterStore.BF55IJRu.js";import"./arrow-right-white.YSM0Fa2R.js";import"./chevron.FnaHNmVN.js";import"./FormattedPrice._VlBjyoq.js";import"./useCalculatedEstimatedDeliveryForProducts.FuByFuHK.js";/* empty css */import"./memoize-one.esm.sgM6qpEC.js";import"./emotion-element-f0de968e.browser.esm.61_hlabn.js";import"./emotion-utils.browser.esm.PLmk2cuA.js";import"./setPrototypeOf.ahVgEFUp.js";import"./hoist-non-react-statics.cjs.FLDqboxU.js";import"./variables.w40geAFS.js";import"./paymentHandoffSentinel.7cWEtiIE.js";const Y=()=>{const{t}=C(),o=_(c=>c.selectedAddress),n=_(c=>c.setSelectedAddress),{updateFormData:s,clearFormErrors:r}=x(),{data:a}=W(),{data:l}=A(),d=j(l,o.cnid);I.useEffect(()=>{if(!o.id)return;const c=P(o.mob,d);s({adrtl:o.tl,fnm:o.fn,lnm:o.ln,ctid:o.cnid,crid:o.cnid===1?o.crid:null,ct:o.ct,adr1:o.adl,pc:o.pc,mob:c,ncm:o.ncm}),r()},[o,d]);const p=c=>{n(c)},g=()=>{n({}),s({adrtl:"",fnm:"",lnm:"",mob:"",tel:"",ctid:1,crid:null,adr1:"",ct:"",ar:"",bnm:"",pc:"",rt:"",cnm:"",irs:"",job:"",vat:"",dadrtl:"",dfnm:"",dlnm:"",dmob:"",dtel:"",dctid:1,dcrid:null,dadr1:"",dct:"",dar:"",dpc:"",dbnm:"",ncm:""}),r()};return N.isAuthenticated()?e.jsx(e.Fragment,{children:e.jsxs("div",{className:"address-list-container",children:[e.jsx("div",{className:"address-list",children:a.map(c=>e.jsxs("label",{className:`address-option ${o.id===c.id?"active":""}`,children:[e.jsx("input",{type:"radio",name:"address",checked:o.id===c.id,onChange:()=>p(c)}),e.jsxs("div",{className:"address-details",children:[e.jsx("p",{className:"title",children:c.tl}),e.jsxs("p",{className:"address",children:[c.adl,", ",c.pc]}),e.jsxs("p",{className:"name",children:[c.fn,", ",c.ln]})]})]},c.id))}),e.jsxs("button",{className:`add-new-address-button ${o.id?"":"active"}`,onClick:()=>g(),children:[t("addresses.addNewAddress")," ",e.jsx(q,{className:"plus"})]})]})}):null},T=()=>{const{data:t}=R(),{data:o}=A(),{formData:n,updateFormData:s}=x(),r=j(o,n==null?void 0:n.ctid);return I.useEffect(()=>{var a,l,d,p;!t.id||((l=(a=n==null?void 0:n.fnm)==null?void 0:a.trim())==null?void 0:l.length)>0||((p=(d=n==null?void 0:n.lnm)==null?void 0:d.trim())==null?void 0:p.length)>0||s({fnm:t.fn,lnm:t.ln,mob:P(t.mob,r)})},[t,r]),null},H=t=>{var d,p,g;const o={RG_WS_PUBLIC_AFM_CALLED_BY_BLOCKED:"Î ÏÏήÏÏÎ·Ï ÏοÏ
καλεί Ïην Ï
ÏηÏεÏία ÎÏει ÏÏοÏÏÏινά αÏοκλειÏÏεί αÏÏ Ïη ÏÏήÏη ÏηÏ.",RG_WS_PUBLIC_AFM_CALLED_BY_NOT_FOUND:"Î Î.Φ.Î. για Ïον οÏοίο γίνεÏαι η κλήÏη δε βÏÎθηκε ÏÏοÏ
Ï ÎγκÏ
ÏοÏ
Ï Î.Φ.Î. ÏοÏ
ÎηÏÏÏοÏ
TAXIS.",RG_WS_PUBLIC_EPIT_NF:"O Î.Φ.Î. για Ïον οÏοίο ζηÏοÏνÏαι ÏληÏοÏοÏÎ¯ÎµÏ Î´ÎµÎ½ ανήκει και δεν ανήκε ÏοÏÎ Ïε Î½Î¿Î¼Î¹ÎºÏ ÏÏÏÏÏÏο, νομική ονÏÏÏηÏα, ή ÏÏ
ÏÎ¹ÎºÏ ÏÏÏÏÏÏο με ειÏÏδημα αÏÏ ÎµÏιÏειÏημαÏική δÏαÏÏηÏιÏÏηÏα.",RG_WS_PUBLIC_FAILURES_TOLERATED_EXCEEDED:"Î¥ÏÎÏβαÏη μÎγιÏÏοÏ
εÏιÏÏεÏÏÎ¿Ï Î¿ÏίοÏ
ÏÏÏÏÏαÏÏν αÏοÏÏ
ÏημÎÎ
1½Ïν κλήÏεÏν. Î ÏοÏÏαθήÏÏε εκ νÎοÏ
Ïε μεÏικÎÏ ÏÏεÏ.",RG_WS_PUBLIC_MAX_DAILY_USERNAME_CALLS_EXCEEDED:"Î¥ÏÎÏβαÏη μÎγιÏÏοÏ
εÏιÏÏεÏÏÎ¿Ï Î¿ÏίοÏ
ημεÏήÏιÏν κλήÏεÏν ανά ÏÏήÏÏη (ανεξαÏÏήÏÏÏ ÎµÎ¾Î¿Ï
ÏιοδοÏήÏεÏν).",RG_WS_PUBLIC_MONTHLY_LIMIT_EXCEEDED:"Î¥ÏÎÏβαÏη ÏοÏ
ÎÎγιÏÏοÏ
ÎÏιÏÏεÏÏÎ¿Ï ÎηνιαίοÏ
ÎÏίοÏ
ÎλήÏεÏν.",RG_WS_PUBLIC_MSG_TO_TAXISNET_ERROR:"ÎημιοÏ
Ïγήθηκε ÏÏÏβλημα καÏά Ïην ενημÎÏÏÏη ÏÏν ειÏεÏÏÏμενÏν μηνÏ
μάÏÏν ÏÏο MyTAXISnet.",RG_WS_PUBLIC_NO_INPUT_PARAMETERS:"Îε δÏθηκαν Ï
ÏοÏÏεÏÏικÎÏ ÏαÏάμεÏÏοι ειÏÏδοÏ
για Ïην κλήÏη ÏÎ·Ï Ï
ÏηÏεÏίαÏ.",RG_WS_PUBLIC_SERVICE_NOT_ACTIVE:"Î Ï
ÏηÏεÏία δεν είναι ενεÏγή.",RG_WS_PUBLIC_TAXPAYER_NF:"O Î.Φ.Î. για Ïον οÏοίο ζηÏοÏνÏαι ÏληÏοÏοÏÎ¯ÎµÏ Î´Îµ βÏÎθηκε ÏÏοÏ
Ï ÎγκÏ
ÏοÏ
Ï Î.Φ.Î. ÏοÏ
ÎηÏÏÏοÏ
TAXIS.",RG_WS_PUBLIC_TOKEN_AFM_BLOCKED:"Î ÏÏήÏÏÎ·Ï (ή ο εξοÏ
ÏιοδοÏημÎÎ½Î¿Ï ÏÏίÏοÏ) ÏοÏ
καλεί Ïην Ï
ÏηÏεÏία ÎÏει ÏÏοÏÏÏινά αÏοκλειÏÏεί αÏÏ Ïη ÏÏήÏη ÏηÏ.",RG_WS_PUBLIC_TOKEN_AFM_NOT_AUTHORIZED:"Î ÏÏÎÏον ÏÏήÏÏÎ·Ï Î´ÎµÎ½ ÎÏει εξοÏ
ÏιοδοÏηθεί αÏÏ Ïον Î.Φ.Î. για ÏÏήÏη ÏÎ·Ï Ï
ÏηÏεÏίαÏ.",RG_WS_PUBLIC_TOKEN_AFM_NOT_FOUND:"Î Î.Φ.Î. ÏοÏ
ÏÏÎÏονÏÎ¿Ï ÏÏήÏÏη δε βÏÎθηκε ÏÏοÏ
Ï ÎγκÏ
ÏοÏ
Ï Î.Φ.Î. ÏοÏ
ÎηÏÏÏοÏ
TAXIS.",RG_WS_PUBLIC_TOKEN_AFM_NOT_REGISTERED:"Î ÏÏÎÏον ÏÏήÏÏÎ·Ï Î´ÎµÎ½ ÎÏει εγγÏαÏεί για ÏÏήÏη ÏÎ·Ï Ï
ÏηÏεÏίαÏ.",RG_WS_PUBLIC_TOKEN_USERNAME_NOT_ACTIVE:"ΠκÏδικÏÏ ÏÏήÏÏη (username) ÏοÏ
ÏÏηÏιμοÏοιήθηκε ÎÏει ανακληθεί.",RG_WS_PUBLIC_TOKEN_USERNAME_NOT_AUTHENTICATED:"Î ÏÏ
νδÏ
αÏμÏÏ ÏÏήÏÏη/κÏÎ´Î¹ÎºÎ¿Ï ÏÏÏÏβαÏÎ·Ï ÏοÏ
δÏθηκε δεν είναι ÎγκÏ
ÏοÏ.",RG_WS_PUBLIC_TOKEN_USERNAME_NOT_DEFINED:"Îεν οÏίÏθηκε ο ÏÏήÏÏÎ·Ï ÏοÏ
καλεί Ïην Ï
ÏηÏεÏία.",RG_WS_PUBLIC_TOKEN_USERNAME_TOO_LONG:"ÎιαÏιÏÏÏθηκε Ï
ÏÎÏβαÏη ÏοÏ
μήκοÏ
Ï ÏοÏ
ονÏμαÏÎ¿Ï ÏοÏ
ÏÏήÏÏη (username) ÏÎ·Ï Ï
ÏηÏεÏίαÏ",RG_WS_PUBLIC_WRONG_AFM:"O Î.Φ.Î. για Ïον οÏοίο ζηÏοÏνÏαι ÏληÏοÏοÏÎ¯ÎµÏ Î´ÎµÎ½ είναι ÎγκÏ
ÏοÏ."},n=/<m:([A-Za-z]+)>([^<]+)<\/m:\1>/gm,s=t.matchAll(n),r={};for(const c of s)r[c[1]]=c[2].trim();if(r.errorCode)return{afmData:null,error:o[r.errorCode]};const a=t.match(/<arrayOfRgWsPublicFirmActRt_out[^>]*>(.*?)<\/arrayOfRgWsPublicFirmActRt_out>/s),l=(g=(p=(d=a==null?void 0:a[1])==null?void 0:d.match(/<m:firmActDescr[^>]*>([^<]+)<\/m:firmActDescr>/))==null?void 0:p[1])==null?void 0:g.trim();return l&&(r.firmActDescr=l),{afmData:r,error:null}},z=()=>{T();const{t}=C(),o=_(p=>p.sameShippingAsBilling),{formData:n,updateFormData:s,updateFormInput:r,formErrors:a}=x(),l=X(n.vat.trim(),1e3),d=v(p=>p.setOrder);return I.useEffect(()=>{var p,g,c;if(n.ctid===1&&((p=l==null?void 0:l.trim())==null?void 0:p.length)===9){F(l).then(h=>{const i=H(h);if(i.error||!i.afmData||i.afmData.firmFlagDescr==="ΠΡΩÎÎ ÎÎ ÎΤÎÎÎÎ¥ÎÎΤÎÎΣ"){S(t("vatNumberInput.invalid_afm")),s({cnm:"",irs:"",job:""});return}const y={cnm:i.afmData.onomasia,irs:i.afmData.doyDescr,irscd:i.afmData.doy,job:i.afmData.firmActDescr,adr1:`${i.afmData.postalAddress} ${i.afmData.postalAddressNo}`,ct:i.afmData.postalAreaDescription,pc:i.afmData.postalZipCode};i.afmData.postalZipCode,o&&(y.dpc=i.afmData.postalZipCode,i.afmData.postalZipCode),s(y)}).catch(()=>s({cnm:"",irs:"",job:""}));return}if(n.ctid===1){s({cnm:"",irs:"",job:""});return}n.ctid&&n.ctid!==1&&((g=l==null?void 0:l.trim())==null?void 0:g.length)>7&&((c=l==null?void 0:l.trim())==null?void 0:c.length)<18?B(n.ctid,l).then(h=>{h.isValid?(L(t("vatNumberInput.vies_valid")),s({cnm:h.name}),d({hasVies:!0})):(S(t("vatNumberInput.vies_invalid")),d({hasVies:!1}))}).catch(()=>{d({hasVies:!1})}):d({hasVies:!1})},[l,n.ctid]),e.jsx(u,{type:"text",placeholder:`${t("vatNumberInput.vat")}*`,required:!0,value:n==null?void 0:n.vat,errorMsg:a==null?void 0:a.vat,onChange:p=>r("vat",p.target.value)})},Q=()=>{var h;T();const{t}=C(),o=_(i=>i.sameShippingAsBilling),{formData:n,updateFormData:s,updateFormInput:r,formErrors:a,countries:l,billingRegions:d,billingPostalCodes:p,billingCities:g}=x(),c=v(i=>i.order);return e.jsxs("div",{className:"form-inputs",children:[N.isAuthenticated()&&e.jsx(u,{id:"billing-address-title",type:"text",placeholder:t("billingInformation.title"),name:"billing-address-title",autoComplete:"off",value:((h=(n==null?void 0:n.adrtl)??(n==null?void 0:n.adr1
1))==null?void 0:h.slice(0,20))??"",onChange:i=>r("adrtl",i.target.value.slice(0,20)),errorMsg:a==null?void 0:a.adrtl,className:"full",required:!0,maxLength:20}),e.jsxs("div",{className:"input-wrapper select-wrapper full",children:[e.jsx(f,{className:"select",classNamePrefix:"select",styles:b,placeholder:`${t("billingInformation.country")}*`,inputId:"countryIdInput",name:"billing-country",noOptionsMessage:()=>t("billingInformation.no_options"),isSearchable:!0,options:m(l,"nm","id"),value:m(l,"nm","id").find(i=>i.value===n.ctid),onChange:i=>{i&&(o?s({ctid:i.value,dctid:i.value}):r("ctid",i.value))}}),e.jsxs("label",{htmlFor:"countryIdInput",children:[t("billingInformation.country"),"*"]}),a.ctid&&e.jsx("small",{className:"error-input",children:a.ctid})]}),c.rt===1&&e.jsxs(e.Fragment,{children:[e.jsx(z,{}),e.jsx(u,{id:"billing-company-name",type:"text",placeholder:`${t("billingInformation.company_name")}*`,name:"billing-company-name",autoComplete:"organization",value:n==null?void 0:n.cnm,onChange:i=>r("cnm",i.target.value),errorMsg:a==null?void 0:a.cnm,required:!0,disabled:n.ctid===1}),e.jsx(u,{id:"billing-profession",type:"text",placeholder:t("billingInformation.profession"),name:"billing-profession",autoComplete:"off",value:n==null?void 0:n.job,onChange:i=>r("job",i.target.value),errorMsg:a==null?void 0:a.job,required:!0,disabled:n.ctid===1}),e.jsx(u,{id:"billing-tax-office",type:"text",placeholder:`${t("billingInformation.tax_office")}*`,name:"billing-tax-office",autoComplete:"off",value:n==null?void 0:n.irs,onChange:i=>r("irs",i.target.value),errorMsg:a==null?void 0:a.irs,required:!0,disabled:n.ctid===1})]}),e.jsxs(e.Fragment,{children:[e.jsx(u,{id:"billing-first-name",required:!0,placeholder:`${t("billingInformation.first_name")}*`,name:"billing-given-name",autoComplete:"billing given-name",value:n==null?void 0:n.fnm,errorMsg:a==null?void 0:a.fnm,onChange:i=>r("fnm",i.target.value)}),e.jsx(u,{id:"billing-last-name",required:!0,placeholder:`${t("billingInformation.last_name")}*`,name:"billing-family-name",autoComplete:"billing family-name",value:n==null?void 0:n.lnm,errorMsg:a==null?void 0:a.lnm,onChange:i=>r("lnm",i.target.value)}),n.ctid===1&&e.jsxs("div",{className:"input-wrapper select-wrapper",children:[e.jsx(f,{id:"regionId",className:"select",styles:b,classNamePrefix:"select",inputId:"regionIdInput",name:"billing-region",placeholder:n.ctid===1?`${t("billingInformation.region")}*`:t("billingInformation.region"),noOptionsMessage:()=>t("billingInformation.no_options"),isSearchable:!0,options:m(d,"nm","id"),value:m(d,"nm","id").find(i=>i.value===n.crid)??null,onChange:i=>{i&&(o?s({crid:i.value,dcrid:i.value}):r("crid",i.value))}}),e.jsx("label",{htmlFor:"regionIdInput",children:n.ctid===1?`${t("billingInformation.region")}*`:t("billingInformation.region")}),a.crid&&e.jsx("small",{className:"error-input",children:a.crid})]}),n.ctid===1?e.jsxs("div",{className:"input-wrapper select-wrapper",children:[e.jsx(M,{id:"postalCodeId",className:"select",inputId:"postalCodeInput",name:"billing-postal-code",placeholder:n.crid?`${t("billingInformation.postal_code")}*`:t("billingInformation.select_region_first"),noOptionsMessage:()=>t("billingInformation.no_options"),isDisabled:!n.crid,options:m(p,"cd","cd"),value:n.pc,onChange:i=>{o?s({pc:i,dpc:i}):r("pc",i)}}),e.jsx("label",{htmlFor:"postalCodeInput",children:`${t("billingInformation.postal_code")}*`}),a.pc&&e.jsx("small",{className:"error-input",children:a.pc})]}):e.jsx(u,{id:"billing-postal-code",placeholder:`${t("billingInformation.postal_code")}*`,required:!0,name:"billing-postal-code",autoComplete:"billing postal-code",inputMode:"numeric",value:n==null?void 0:n.pc,errorMsg:a==null?void 0:a.pc,onChange:i=>{o?s({pc:i.target.value,dpc:i.target.value}):r("pc",i.target.value)}}),n.ctid===1?e.jsxs("div",{className:"input-wrapper select-wrapper",children:[e.jsx(f,{id:"cityId",className:"select",styles:b,classNamePrefix:"select",inputId:"cityInput",name:"billing-city",placeholder:n.pc?`${t("billingInformation.city")}*`:t("billingInformation.select_postal_code_first"),noOptionsMessage:()=>t("billingInformation.no_options"),isSearchable:!0,isDisabled:!n.pc||g.length===0,options:m(g,"nm","nm"),value:m(g,"nm","nm").find(i=>i.value===n.ct)??null,onChange:i=>{i&&r("ct",i.value)}}),e.jsx("label",{htmlFor:"cityInput",children:`${t("billingInformation.city")}*`}),a.ct&&e.jsx("small",{className:"error-input",children:a.ct})]}):e.jsx(u,{id:"billing-city",placeholder:`${t("billingInformation.city")}*`,required:!0,name:"billing-city",autoComplete:"billing address-level2",value:n==null?void 0:n.ct,errorMsg:a==null?void 0:a.ct,onChange:i=>r("ct",i.target.value)}),e.jsx(u,{id:"billing-address-line1",placeholder:`${t("billingInformation.street")}*`,required:!0,name:"billing-address-line1",autoComplete:"billing address-line1",value:n==null?void 0:n.adr1,errorMsg:a==null?void 0:a.adr1,onChange:i=>r("adr1",i.target.value)}),e.jsxs("div",{className:"input-wrapper full",children:[e.jsx(O,{value:n==null?void 0:n.mob,onChange:i=>r("mob",i),countryIso2:j(l,n==null?void 0:n.ctid),inputId:"billing-phone",name:"billing-phone",autoComplete:"billing tel",style:{height:"48px"}}),(a==null?void 0:a.mob)&&e.jsx("small",{className:"error-input",children:a==null?void 0:a.mob})]})]})]})},J={0:{slidesPerView:1.5,slidesPerGroup:2,spaceBetween:20},800:{slidesPerView:2.5,slidesPerGroup:2,spaceBetween:20},1024:{slidesPerView:1.6,slidesPerGroup:2,spaceBetween:20},1300:{slidesPerView:2.5,slidesPerGroup:2,spaceBetween:20}},ee=()=>{var s,r;const{data:t}=K("CheckoutProducts"),o=t.tl,n=((r=(s=t==null?void 0:t.product_tab_entr
1ies)==null?void 0:s.at(0))==null?void 0:r.products)??[];return n.length===0?null:e.jsxs("div",{className:"checkout-products",children:[e.jsx("h2",{children:o}),e.jsx(D,{products:n,largeCard:!1,breakpoints:J})]})},ie=()=>{const{t}=C(),o=v(r=>r.order),n=v(r=>r.setOrder),s=_(r=>r.setSelectedAddress);return e.jsxs("div",{className:"radio-buttons",children:[e.jsxs("label",{children:[e.jsx("input",{type:"radio",name:"billing-option",value:"0",checked:o.rt===0,onChange:()=>n({rt:0})}),t("receiptType.receipt")]}),e.jsxs("label",{children:[e.jsx("input",{type:"radio",name:"billing-option",value:"1",checked:o.rt===1,onChange:()=>{n({rt:1}),s({})}}),t("receiptType.invoice")]})]})},ne=()=>{var h;const{t}=C(),o=_(i=>i.sameShippingAsBilling),n=_(i=>i.setSameShippingAsBilling),{formData:s,updateFormInput:r,updateFormData:a,formErrors:l,countries:d,deliveryRegions:p,deliveryPostalCodes:g,deliveryCities:c}=x();return e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"same-as-billing",children:[e.jsx("input",{className:"checkbox",type:"checkbox",defaultChecked:o,onChange:()=>{n(!o),o||a({dctid:s.ctid,dcrid:s.crid,dpc:s.pc})}}),t("shippingInformation.same_as_billing")]}),!o&&e.jsxs("div",{className:"form-inputs",children:[N.isAuthenticated()&&e.jsx(u,{id:"shipping-address-title",type:"text",placeholder:t("shippingInformation.title"),name:"shipping-address-title",autoComplete:"off",value:((h=(s==null?void 0:s.dadrtl)??(s==null?void 0:s.dadr1))==null?void 0:h.slice(0,20))??"",onChange:i=>r("dadrtl",i.target.value.slice(0,20)),errorMsg:l==null?void 0:l.dadrtl,className:"full",required:!0,maxLength:20}),e.jsxs("div",{className:"input-wrapper select-wrapper full",children:[e.jsx(f,{className:"select",classNamePrefix:"select",styles:b,placeholder:`${t("shippingInformation.country")}*`,inputId:"countryIdInput",name:"shipping-country",noOptionsMessage:()=>t("shippingInformation.no_options"),isSearchable:!0,options:m(d,"nm","id"),value:m(d,"nm","id").find(i=>i.value===s.dctid),onChange:i=>{i&&r("dctid",i.value)}}),e.jsxs("label",{htmlFor:"countryIdInput",children:[t("shippingInformation.country"),"*"]}),l.dctid&&e.jsx("small",{className:"error-input",children:l.dctid})]}),e.jsx(u,{id:"shipping-first-name",required:!0,placeholder:`${t("shippingInformation.first_name")}*`,name:"shipping-given-name",autoComplete:"shipping given-name",value:s==null?void 0:s.dfnm,errorMsg:l==null?void 0:l.dfnm,onChange:i=>r("dfnm",i.target.value)}),e.jsx(u,{id:"shipping-last-name",required:!0,placeholder:`${t("shippingInformation.last_name")}*`,name:"shipping-family-name",autoComplete:"shipping family-name",value:s==null?void 0:s.dlnm,errorMsg:l==null?void 0:l.dlnm,onChange:i=>r("dlnm",i.target.value)}),s.dctid===1&&e.jsxs("div",{className:"input-wrapper select-wrapper",children:[e.jsx(f,{id:"regionId",className:"select",styles:b,classNamePrefix:"select",inputId:"regionIdInput",name:"shipping-region",placeholder:s.dctid===1?`${t("shippingInformation.region")}*`:t("shippingInformation.region"),noOptionsMessage:()=>"Îεν Ï
ÏάÏÏοÏ
ν εÏιλογÎÏ",isSearchable:!0,options:m(p,"nm","id"),value:m(p,"nm","id").find(i=>i.value===s.dcrid)??null,onChange:i=>{i&&r("dcrid",i.value)}}),e.jsx("label",{htmlFor:"regionIdInput",children:s.dctid===1?`${t("shippingInformation.region")}*`:t("shippingInformation.region")}),l.dcrid&&e.jsx("small",{className:"error-input",children:l.dcrid})]}),s.dctid===1?e.jsxs("div",{className:"input-wrapper select-wrapper",children:[e.jsx(M,{id:"postalCodeId",className:"select",inputId:"postalCodeInput",name:"shipping-postal-code",placeholder:s.dcrid?`${t("shippingInformation.postal_code")}*`:t("shippingInformation.select_region_first"),noOptionsMessage:()=>t("shippingInformation.no_options"),isDisabled:!s.dcrid,options:m(g,"cd","cd"),value:s.dpc,onChange:i=>r("dpc",i)}),e.jsx("label",{htmlFor:"postalCodeInput",children:`${t("shippingInformation.postal_code")}*`}),l.dpc&&e.jsx("small",{className:"error-input",children:l.dpc})]}):e.jsx(u,{id:"shipping-postal-code",placeholder:`${t("shippingInformation.postal_code")}*`,required:!0,name:"shipping-postal-code",autoComplete:"shipping postal-code",inputMode:"numeric",value:s==null?void 0:s.dpc,errorMsg:l==null?void 0:l.dpc,onChange:i=>{i&&r("dpc",i.target.value)}}),s.dctid===1?e.jsxs("div",{className:"input-wrapper select-wrapper",children:[e.jsx(f,{id:"cityId",className:"select",styles:b,classNamePrefix:"select",inputId:"cityInput",name:"shipping-city",placeholder:s.dpc?`${t("shippingInformation.city")}*`:t("shippingInformation.select_postal_code_first"),noOptionsMessage:()=>t("shippingInformation.no_options"),isSearchable:!0,isDisabled:!s.dpc||c.length===0,options:m(c,"nm","nm"),value:m(c,"nm","nm").find(i=>i.value===s.dct)??null,onChange:i=>{i&&r("dct",i.value)}}),e.jsx("label",{htmlFor:"cityInput",children:`${t("shippingInformation.city")}*`}),l.dct&&e.jsx("small",{className:"error-input",children:l.dct})]}):e.jsx(u,{id:"shipping-city",placeholder:`${t("shippingInformation.city")}*`,required:!0,name:"shipping-city",autoComplete:"shipping address-level2",value:s==null?void 0:s.dct,errorMsg:l==null?void 0:l.dct,onChange:i=>r("dct",i.target.value)}),e.jsx(u,{id:"shipping-address-line1",placeholder:`${t("shippingInformation.street")}*`,required:!0,name:"shipping-address-line1",autoComplete:"shipping address-line1",value:s==null?void 0:s.dadr1,errorMsg:l==null?void 0:l.dadr1,onChange:i=>r("dadr1",i.target.value)}),e.jsxs("div",{className:"input-wrapper full",children:[e.jsx(O,{value:s==null?void 0:s.dmob,onChange:i=>r("dmob",i),countryIso2:j(d,s==null?void 0:s.dctid),inputId:"shipping-phone",name:"shipping-phone",autoComplete:"shipping tel",style:{height:"48px"}}),(l==null?void 0:l.dmob)&&e.jsx("small",{className:"error-input",children:l==null?void 0:l.dmob})]})]})]})},te=()=>{const{t}=C(),{data:o}=w(),{data:n}
1=G(),[s,r]=I.useState(!1);V();const a=I.useMemo(()=>o.reduce((l,d)=>l+d.quantity,0)??0,[o]);return I.useEffect(()=>{o.length>0&&(n==null?void 0:n.gamt)>0&&!s&&(E({value:n==null?void 0:n.gamt,content_ids:o.map(l=>l.productId),quantity:a}),r(!0))},[o,n]),I.useEffect(()=>{if(o.length>0&&n.amt>0){const l=n.amt;U($(o),l)}},[o,n]),e.jsxs(e.Fragment,{children:[e.jsx(Z,{step:2}),e.jsx("div",{id:"checkout-information",children:e.jsxs("div",{className:"checkout-container content-wrapper",children:[e.jsxs("div",{className:"information-outer",children:[e.jsx(ee,{}),e.jsx("div",{className:"information",children:e.jsxs("div",{className:"inner-container",children:[e.jsx("p",{className:"billing-title",children:t("checkoutInformation.billing_details")}),e.jsx(ie,{}),e.jsx(Y,{}),e.jsx(Q,{}),e.jsx("p",{className:"delivery-title",children:t("checkoutInformation.shipping_details")}),e.jsx(ne,{})]})})]}),e.jsx(k,{activeStep:2})]})})]})};te.propTypes={};export{te as default};
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.