1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8934],{19508:(e,r,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[country]/user/registration",function(){return i(79974)}])},62144:(e,r,i)=>{"use strict";i.d(r,{A:()=>s});let s=(0,i(92921).A)("outline","clock","Clock",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]])},79974:(e,r,i)=>{"use strict";i.r(r),i.d(r,{__N_SSP:()=>en,default:()=>ea});var s=i(37876),n=i(14232),a=i(40575),t=i(14169),l=i(77328),o=i.n(l),d=i(20539),p=i(23346),c=i(14430),g=i(54498),h=i(83388),u=i(14785),m=i(66752),b=i(27343),y=i(47497),x=i(6909),v=i(48727),A=i(99370),N=i(55063),f=i(64802),j=i(27937),C=i(37262),I=i(75198),L=i(38842),E=i(77561),w=i(78626),F=i(51960),S=i(36535),k=i(39306),T=i(16922),P=i(25407),O=i(30647),R=i(34222),$=i(71665),z=i(43090),B=i(75511),D=i(3502),V=i(91717),M=i(14361),_=i(6703),G=i(52913),H=i(89099),q=i(32634),U=i(67948),J=i(19093),W=i(37342),K=i(62144),Y=i(57639),Z=i(81700),X=i(32266),Q=i(3033);let ee={preregistered:"",salutation:"",firstName:"",nip:"",lastName:"",phone:"",email:"",password:"",company:"",taxID:"",invoiceEmail:"",invoiceOperatorCode:"",organizationLegalForm:"",customerGroup:"",customerNr:"",streetName:"",additionalStreetInfo:"",postalCode:"",city:"",country:"",state:"",industry:"",department:"",handleBillingToggle:!1,handleShippingToggle:!1,privacyOptIn:"",privacyOptIn2:"",membersClubOptIn:!1,vatGroup:!1,territorialSelfGovernmentUnit:!1,billingAddress:{billingfirstName:"",billinglastName:"",billingcompany:"",billingstreetName:"",billingadditionalStreetInfo:"",billingpostalCode:"",billingcity:"",b
1illingcountry:"",billingstate:"",billinginternalNumber:""},shippingAddress:{shippingfirstName:"",shippinglastName:"",shippingcompany:"",shippingstreetName:"",shippingadditionalStreetInfo:"",shippingpostalCode:"",shippingcity:"",shippingcountry:"",shippingstate:"",receivalTimes:"",shippinginternalNumber:"",shippingphone:"",shippingemail:""}},er=()=>{let e=(0,H.useRouter)(),{country:r,language:i}=(0,c.JK)(e),{t:l}=(0,G.A)("common"),o=`/${i}/${(0,c.$9)(r)}`,{region:er,billingAddressEditable:ei}=(0,h.A)(),es=(0,Z.WU)(er,{allowNordic:!0}),en=(0,n.useMemo)(()=>(0,u.A)({language:i}),[i]),ea=(0,n.useMemo)(()=>en.map(e=>({value:e.code,label:e.name})),[en]),[et,el]=(0,n.useState)(!1),[eo,ed]=(0,n.useState)(!1),[ep,ec]=(0,n.useState)(null),[eg,eh]=(0,n.useState)(!1),[eu,em]=(0,n.useState)(!1),[eb,ey]=(0,n.useState)(!1),[ex,ev]=(0,n.useState)({open:!1}),eA=(0,n.useRef)(!1),eN=(0,n.useRef)(""),ef=(0,n.useRef)(!1),ej=(0,M.U)("(max-width: 48rem)"),{t:eC}=(0,G.A)("forms"),eI="PL"===r,{validateNip:eL,isValidating:eE,regonData:ew,error:eF,isRegonValidated:eS}=(0,J.D)(),{executeRecaptcha:ek}=(0,q.l)(),eT=(0,n.useRef)(null),eP=(0,n.useRef)(null),eO=(0,n.useRef)(null),eR=(0,n.useRef)(null),e$=(0,n.useRef)(null),ez=(0,n.useRef)(null),eB=(0,n.useRef)(null),eD=(0,n.useRef)(null),eV=(0,n.useRef)(null),eM=(0,n.useRef)(null),e_=(0,n.useRef)(null),eG=(0,n.useRef)(null),eH=(0,n.useRef)(null),eq=(0,n.useRef)(null),eU=(0,n.useRef)(null),eJ=(0,n.useCallback)(e=>{switch(e){case"first-name":eT.current?.focus();break;case"last-name":eP.current?.focus();break;case"email":eO.current?.focus();break;case"password":eR.current?.focus();break;case"company":e$.current?.focus();break;case"invoice-email":ez.current?.focus();break;case"invoice-operator-code":eB.current?.focus();break;case"customer-group":eD.current?.focus();break;case"street-address":eV.current?.focus();break;case"zip-code":eM.current?.focus();break;case"city":e_.current?.focus();break;case"country":eG.current?.focus();break;case"state":eH.current?.focus();break;case"privacy-opt-in":eq.current?.focus();break;case"privacy-opt-in-2":eU.current?.focus()}},[]),eW=(0,n.useMemo)(()=>({firstName:"first-name",lastName:"last-name",email:"email",password:"password",company:"company",invoiceEmail:"invoice-email",invoiceOperatorCode:"invoice-operator-code",customerGroup:"customer-group",streetName:"street-address",postalCode:"zip-code",city:"city",country:"country",state:"state",privacyOptIn:"privacy-opt-in",privacyOptIn2:"privacy-opt-in-2"}),[]),eK=(0,n.useMemo)(()=>(0,g.a)(r),[r]),eY=eK.taxID.isVisible||eK.invoiceEmail.isVisible||eK.invoiceOperatorCode.isVisible,eZ={headline:eC("forms:registrationHeadline"),preregisteredTrue:eC("forms:preregisteredTrueLabel"),preregisteredFalse:eC("forms:preregisteredFalseLabel"),preregisteredDescription:eC("forms:preregisteredDescription"),contactHeadline:eC("forms:contactHeadline"),addressHeadline:eC("addressHeadline"),billingHeadline:"Billing address",shippingHeadline:"Shipping address",businessInvoicingHeadline:eC("businessInvoicingHeadline"),businessInvoicingDescription:eC("businessInvoicingDescription"),inputs:{nip:{label:eC("nipLabel"),placeholder:eC("nipPlaceholder"),helper:eC("nipHelper"),validation:eC("nipInvalid")},firstName:{label:er.isNordic?eC("nordicNameLabel"):eC("firstNameLabel"),placeholder:er.isNordic?eC("nordicNameLabel"):eC("firstNamePlaceholder"),validation:er.isNordic?eC("errorNameEmpty"):eC("errorFirstNameEmpty")},lastName:{label:eC("lastNameLabel"),placeholder:eC("lastNamePlaceholder"),validation:eC("errorLastNameEmpty")},phone:{label:er.isNordic?eC("nordicMobilePhoneLabel"):eC("phoneLabel"),placeholder:eC("phonePlaceholder")},email:{label:eC("emailLabel"),placeholder:eC("emailPlaceholder")},password:{label:eC("passwordLabel"),validation:eC("passwordInvalid")},company:{label:eC("companyLabel"),placeholder:eC("companyPlaceholder"),validation:eC("errorCompanyEmpty")},taxID:{label:er.isNordic?eC("nordicOrganizationNumberLabel"):eC("vatNumberLabel"),placeholder:eC("vatNumberPlaceholder"),validation:eC("invalidTaxID")},invoiceEmail:{label:eC("invoiceEmailLabel"),placeholder:eC("invoiceEmailPlaceholder"),validation:eC("forms:errorEmailInvalid"),description:eC("invoiceEmailDescription")},invoiceOperatorCode:{label:eC("invoiceOperatorCodeLabel"),placeholder:eC("invoiceOperatorCodePlaceholder"),description:eC("invoiceOperatorCodeDescription")},streetName:{label:eC("streetAndNumberLabel"),placeholder:eC("streetAndNumberPlaceholder"),validation:eC("errorStreetAndNumber")},postalCode:{label:eK.isPostcodeLabel?eC("postCodeLabel"):eC("zipLabel"),placeholder:eK.isPostcodeLabel?eC("postCodePlaceholder"):eC("zipPlaceholder"),validation:eK.isPostcodeLabel?eC("postalCodeMissing"):eC("zipMissing"),formatValidation:eC("postalCodeFormatInvalid")},city:{label:eC("cityLabel"),placeholder:eC("cityPlaceholder"),validation:eC("errorCityEmpty")},country:{label:eC("countryLabel"),placeholder:eC("countryPlaceholder"),validation:eC("errorCountryEmpty")},organizationLegalForm:{label:eC("forms:organizationLegalFormLabel"),placeholder:eC("forms:organizationLegalFormPlaceholder"),validation:eC("errorInputEmpty")},customerGroup:{label:eC("customerGroupLabel"),placeholder:eC("customerGroupPlaceholder")},industry:{label:eC("industryLabel"),placeholder:eC("industryPlaceholder")},department:{label:eC("departmentLabel"),placeholder:eC("departmentPlaceholder")},customerNr:{label:eC("customerNrLabel"),placeholder:eC("customerNrPlaceholder")},additionalStreetInfo:{label:eC("streetAddendumLabel"),placeholder:eC("streetAddendumPlaceholder")},shippingAdditionalStreetInfo:{label:eI?eC("polShippingAdditionalInfo"):eC("streetAddendumLabel"),placeholder:eI?eC("polShippingAdditionalInfo"):eC("streetAddendumPlaceholder")},state:{label:eC("stateLabel"),placeholder:eC("statePlaceholder"),validation:eC("stateCountryEmpty")},receivalTimes:{label:eC("receivalTimesLabel"),placeholder:eC("receivalTimesPlaceholder")},shippingToggle:{label:eC("shippingToggleLabel")},billingToggle:{label:eC("billingToggleLabel")},privacyAndMembersClub:{header:er.isUS?eC("privacyAndMembersClubHeader"):eC("privacyAndMarketingHeader")},privacyOptIn:{label:eC("termsAndConditionsLabel"),termsAndConditionsOfSale:`${o}${eC("privacyLabelLink1Href")}`,termsAndConditionsOfUse:`${o}${eC("privacyLabelLink2Href")}`,validation:eC("errorPrivacyPolicyNotAccepted")},privacyOptIn2:{label:eC("privacyPolicyLabel"),privacyPolicy:`${o}${eC("privacyPolicyLinkHref")}`,validation:eC("errorPrivacyPolicyNotAccepted")},membersClub:{description:eC("membersClubDescription")},generic:{validation:eC("errorInputEmpty")}},registerButtonLabel:eC("registerLabel"),usFormText:{salutation:eC("registrationCustomerSalutation"),text1:eC("registrationExistingCustomerUsText1"),text2:eC("registrationExistingCustomerUsText2")}},eX=eK.state.isVisible?[]:["state"],eQ=er.isNordic?[...eX,"lastName"]:eX,e0=(0,Q.Z1)({country:r,isRequired:eK.phone.isRequired,requiredMessage:eZ.inputs.generic.validation,invalidMessage:eC("phoneMinLengthError"),tooLongMessage:eC("phoneMaxLengthError")}),e1={...(0,y.jl)(eZ,void 0,void 0,eQ),nip:eI?e=>/^\d{10}$/.test(e)?null:eZ.inputs.nip.validation:void 0,phone:e0,taxID:eK.taxID.isRequired?(0,B.h)(eZ.inputs.generic.validation):void 0,invoiceOperatorCode:eK.invoiceOperatorCode.isRequired?(0,B.h)(eZ.inputs.generic.validation):void 0,organizationLegalForm:eK.organizationLegalForm.isVisible?(0,B.h)(eZ.inputs.generic.validation):void 0,customerGroup:eK.customerGroup.isRequired?(0,B.h)(eZ.inputs.generic.validation):void 0,customerNr:eK.customerNumber.isRequired?(0,B.h)(eZ.inputs.generic.validation):void 0,password:e=>(0,y.H9)(e,eC),email:e=>(0,y.DT)(e,eC),invoiceEmail:e=>eK.invoiceEmail.isRequired&&!e?eZ.inputs.generic.validation:e?(0,y.DT)(e,eC):null,privacyOptIn:(0,B.h)(eZ.inputs.privacyOptIn.validation),privacyOptIn2:(0,B.h)(eZ.inputs.privacyOptIn2.validation),country:e=>"Invalid Country"!==e?(0,B.h)(eZ.inputs.country.validation)(e):e,billingAddress:(0,y.jl)(eZ,et,"billing",eQ),shippingAddress:{...(0,y.jl)(eZ,eo,"shipping",eQ),shippingphone:e=>eo&&eI?(0,Q.Z1)({country:r,isRequired:!0,requiredMessage:eC("errorInputEmpty"),invalidMessage:eC("phoneMinLengthError"),tooLongMessage:eC("phoneMaxLengthError")})(e):null,shippingemail:e=>eo&&eI&&e?(0,D.x)(eC("errorEmailInvalid"))(e):null,shippinginternalNumber:e=>eI&&e&&!(0,b.v)(e)?eC("internalIdNumberInvalid")||"Invalid format (must be: 10 digits-5 digits)":null}},e2=(0,V.m)({initialValues:{...ee,preregistered:eK.preregistered.isVisible?ee.preregistered:"false"},validate:e1,validateInputOnChange:["nip","firstName","lastName","phone","email","invoiceEmail","password","company","industry","department","taxID","organizationLegalForm","invoiceOperatorCode","customerNr","streetName","additionalStreetInfo","postalCode","city","state","billingAddress.billingfirstName","billingAddress.billinglastName","billingAddress.billingcompany","billingAddress.billingstreetName","billingAddress.billingadditionalStreetInfo","billingAddress.billingpostalCode","billingAddress.billingcity","billingAddress.billingstate","shippingAddress.shippingfirstName","shippingAddress.shippinglastName","shippingAddress.shippingcompany","shippingAddress.shippingstreetName","shippingAddress.shippingadditionalStreetInfo","shippingAddress.shippingpostalCode","shippingAddress.shippingcity","shippingAddress.shippingstate","shippingAddress.receivalTimes"],validateInputOnBlur:["nip","firstName","lastName","phone","email","invoiceEmail","password","company","industry","department","taxID","organizationLegalForm","invoiceOperatorCode","customerNr","streetName","additionalStreetInfo","postalCode","city","state","billingAddress.billingfirstName","billingAddress.billinglastName","billingAddress.billingcompany","billingAddress.billingstreetName","billingAddress.billingadditionalStreetInfo","billingAddress.billingpostalCode","billingAddress.billingcity","billingAddress.billingstate","shippingAddress.shippingfirstName","shippingAddress.shippinglastName","shippingAddress.shippingcompany","shippingAddress.shippingstreetName","shippingAddress.shippingadditionalStreetInfo","shippingAddress.shippingpostalCode","shippingAddress.shippingcity","shippingAddress.shippingstate","shippingAddress.receivalTimes"]}),{focusedFields:e6,handleFieldChange:e3,handleFocus:e5,handleBlur:e9}=(0,C.N)(e2);(0,n.useEffect)(()=>{r&&en.some(e=>e.code===r)&&(e2.setFieldValue("country",r),e2.setFieldValue("billingAddress.billingcountry",r),e2.setFieldValue("shippingAddress.shippingcountry",r))},[r,en]),(0,n.useEffect)(()=>{let e=e2.values.country;!ef.current&&e&&"US"!==e&&(ef.current=!0,(0,U.D)({registrationCountry:e}))},[e2.values.country]),(0,n.useEffect)(()=>{e2.setFieldValue("billingAddress.billingstate","")},[e2.values.billingAddress.billingcountry]),(0,n.useEffect)(()=>{e2.setFieldValue("shippingAddress.shippingstate","")},[e2.values.shippingAddress.shippingcountry]);let e7=(0,n.useMemo)(()=>(0,L.Bf)(e2.values.country),[e2.values.country]),e4=(0,n.useMemo)(()=>(0,L.Bf)(e2.values.billingAddress.billingcountry||e2.values.country),[e2.values.billingAddress.billingcountry,e2.values.country]),e8=(0,n.useMemo)(()=>(0,L.Bf)(e2.values.shippingAddress.shippingcountry||e2.values.country),[e2.values.shippingAddress.shippingcountry,e2.values.country]),re=(0,n.useMemo)(()=>(0,L.VD)(e2.values.country),[e2.values.country]),rr=(e,r)=>e>r?eC("forms:addressFieldMaxLengthError",{max:r}):void 0,ri=rr(e2.values.company.length,e7.companyName),rs=rr(e2.values.streetName.length,e7.streetName),rn=rr(e2.values.additionalStreetInfo.length,e7.additionalStreetInfo),ra=rr(e2.values.billingAddress.billingcompany.length,e4.companyName),rt=rr(e2.values.billingAddress.billingstreetName.length,e4.streetName),rl=rr(e2.values.billingAddress.billingadditionalStreetInfo.length,e4.additionalStreetInfo),ro=rr(e2.values.shippingAddress.shippingcompany.length,e8.companyName),rd=rr(e2.values.shippingAddress.shippingstreetName.length,e8.streetName),rp=rr(e2.values.shippingAddress.shippingadditionalStreetInfo.length,e8.additionalStreetInfo);(0,n.useEffect)(()=>{ew&&(em(!0),e2.setFieldValue("company",ew.companyData.legalName),e2.setFieldValue("streetName",ew.companyData.address.streetName),e2.setFieldValue("postalCode",ew.companyData.address.postalCode),e2.setFieldValue("city",ew.companyData.address.city))},[ew]),(0,n.useEffect)(()=>{ec(e=>e?null:e)},[e2.values]);let rc=async(r,i=[])=>{ey(!0);try{if(eA.current)return;eA.current=!0;let s=await ek("registration_form");ec(null),e2.clearErrors();let n=r.password,{originalLocale:a,country:t,language:l}=(0,c.JK)(e),o=await fetch("/api/registration",{method:"POST",body:JSON.stringify({values:eI&&eN.current?{...r,nip:eN.current}:r,password:n,token:s,locale:a,overriddenAddresses:i}),headers:{"Content-Type":"application/json"}});if(eA.current=!1,o.ok){let i=await o.json(),s=r.customerGroup?"professional":void 0;(0,U.wJ)({method:"email",customerType:s}),(0,U.R_)({leadType:"registration",customerType:s}),i.userConfirmed?t&&(t!==e2.values.country?e.push(`/${l}/${e2.values.country}/customer/dashboard`):e.push(`/${l}/${(0,c.$9)(t)}/customer/dashboard`)):eh(!0)}else{let e=eC("forms:registrationError")||"Registration failed. Please try again.";try{let s=o.headers.get("content-type");if(s&&s.includes("application/json")){let s=await o.json();
1if(s.fieldErrors){let e=eC("forms:errorAddressValidation")||eC("forms:registrationError")||"Registration failed. Please try again.";ec(e);let n=null;if(Object.entries(s.fieldErrors).forEach(([e,r])=>{let i=eC(`forms:${r}`)||String(r),a=(0,x.xS)(e,s.addressType);e2.setFieldError(a,i),n||(n=a)}),n){let e=eW[n];e?eJ(e):(0,y.$w)({[n]:!0})}let a={main:r.country,shipping:r.shippingAddress?.shippingcountry,billing:r.billingAddress?.billingcountry}[s.addressType];(0,v.Po)(a)&&ev({open:!0,suggested:s.suggestedAddress,addressType:s.addressType,pendingValues:r,overridden:i}),ey(!1),eA.current=!1;return}if(s.error){if("errorEmailAlreadyInUse"===s.error)return void(e=>{e2.setFieldError("email",e),ec(e),eJ("email"),(0,y.$w)({email:!0}),ey(!1),eA.current=!1})(eC("forms:errorEmailAlreadyInUse"));e=s.error}}else{let r=await o.text();if(r){let i=`forms:${r}`,s=eC(i);e=s!==i?s:r}}}catch(e){console.error("Error parsing error response:",e)}throw Error(e)}}catch(e){ec(String((0,d.u)(e)))}ey(!1)};return eg?(0,s.jsx)("div",{children:eC("messageRegistrationSuccess")}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Y.A,{opened:ex.open,onClose:()=>ev({open:!1}),suggestedAddress:ex.suggested,onUseSuggested:e=>{let r=ex.addressType,i=r?[...ex.overridden??[],r]:ex.overridden??[];ev({open:!1});let s=e2.values;"main"===r?s={...e2.values,streetName:e.line1,city:e.city,postalCode:e.postalCode,country:e.country,...e.state&&{state:e.state}}:"shipping"===r?s={...e2.values,shippingAddress:{...e2.values.shippingAddress,shippingstreetName:e.line1,shippingcity:e.city,shippingpostalCode:e.postalCode,shippingcountry:e.country,...e.state&&{shippingstate:e.state}}}:"billing"===r&&(s={...e2.values,billingAddress:{...e2.values.billingAddress,billingstreetName:e.line1,billingcity:e.city,billingpostalCode:e.postalCode,billingcountry:e.country,...e.state&&{billingstate:e.state}}}),e2.setValues(s),rc(s,i)},onUseAsEntered:()=>{let e=ex.pendingValues,r=ex.addressType,i=r?[...ex.overridden??[],r]:ex.overridden??[];ev({open:!1}),e&&rc(e,i)},addressType:ex.addressType}),(0,s.jsx)("form",{id:"registration-form",onSubmit:e2.onSubmit(e=>rc(e,[]),e=>{(0,y.$w)(e)}),children:(0,s.jsxs)(a.x,{children:[(0,s.jsx)(E.h,{order:1,children:eZ.headline}),eK.preregistered.isVisible&&(0,s.jsxs)(w.s.Group,{...e2.getInputProps("preregistered"),className:"w-full","aria-label":eC("areYouPreRegistered"),children:[(0,s.jsx)(w.s,{checked:!0,value:"false",label:eZ.preregisteredFalse,my:"lg",disabled:eb}),"false"===e2.getInputProps("preregistered").value?(0,s.jsx)(t.s,{direction:"column",gap:"0.25rem",mt:"-1.5rem",mb:"2rem",pl:"2rem",children:(0,s.jsx)("div",{className:"text-gray-500 text-[14px]",children:eZ.preregisteredDescription})}):null,(0,s.jsx)(w.s,{value:"true",label:eZ.preregisteredTrue,my:"lg",disabled:eb}),"true"===e2.getInputProps("preregistered").value?(0,s.jsxs)(t.s,{direction:"column",gap:"0.25rem",mt:"-1.5rem",mb:"2rem",pl:"2rem",className:"text-gray-500 text-[14px]",children:[(0,s.jsx)("div",{children:eZ.usFormText.salutation}),(0,s.jsx)("div",{children:eZ.usFormText.text1}),(0,s.jsx)("div",{children:eZ.usFormText.text2})]}):null]}),(0,s.jsxs)(a.x,{mb:"md",children:[(0,s.jsx)(a.x.Col,{span:12,mt:eK.preregistered.isVisible?"0":"1rem",children:(0,s.jsx)(E.h,{order:2,children:eZ.contactHeadline})}),eK.salutation.isVisible&&(0,s.jsx)(a.x.Col,{children:(0,s.jsx)(j.r,{namespace:"forms",valueMode:"code",country:r,groupAriaLabel:eC("titleSelect"),hideLabel:!0,disabled:eb,...e2.getInputProps("salutation")})}),(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)(F.k,{ref:eT,placeholder:eZ.inputs.firstName.placeholder,label:eZ.inputs.firstName.label,withAsterisk:!0,disabled:eb,maxLength:re.firstName,...e2.getInputProps("firstName"),error:!!e2.errors.firstName,onChange:e=>e3("firstName",e.currentTarget.value),onFocus:()=>e5("firstName"),onBlur:()=>e9("firstName"),"data-cy":"first-name","aria-invalid":!!e2.errors.firstName,"aria-describedby":e2.errors.firstName?"f
1irst-name-error":void 0,id:"first-name"}),(0,s.jsx)("div",{id:"registration-firstName-counter",children:(0,s.jsx)(N.$,{id:"first-name-error",currentLength:e2.values.firstName.length,maxLength:re.firstName,error:e2.errors.firstName,showError:!0,isFocused:e6.has("firstName")})})]}),(0,s.jsx)(a.x.Col,{span:ej?12:6,children:!er.isNordic&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.lastName.placeholder,label:eZ.inputs.lastName.label,withAsterisk:!0,disabled:eb,maxLength:re.lastName,...e2.getInputProps("lastName"),error:!!e2.errors.lastName,onChange:e=>e3("lastName",e.currentTarget.value),onFocus:()=>e5("lastName"),onBlur:()=>e9("lastName"),ref:eP,"data-cy":"last-name","aria-invalid":!!e2.errors.lastName,"aria-describedby":e2.errors.lastName?"last-name-error":void 0,id:"last-name"}),(0,s.jsx)("div",{id:"registration-lastName-counter",children:(0,s.jsx)(N.$,{id:"last-name-error",currentLength:e2.values.lastName.length,maxLength:re.lastName,error:e2.errors.lastName,showError:!0,isFocused:e6.has("lastName")})})]})}),eK.phone.isVisible&&(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.phone.placeholder,label:eZ.inputs.phone.label,withAsterisk:eK.phone.isRequired,disabled:eb,maxLength:re.phone,...e2.getInputProps("phone"),error:!!e2.errors.phone,onChange:e=>e3("phone",(0,I._)(e,r)),onFocus:()=>e5("phone"),onBlur:()=>e9("phone"),"data-cy":"phone","aria-describedby":"registration-phone-counter"}),(0,s.jsx)("div",{id:"registration-phone-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.phone.length,maxLength:re.phone,error:e2.errors.phone,showError:!0,isFocused:e6.has("phone")})})]}),(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)(F.k,{type:"email",placeholder:eZ.inputs.email.placeholder,label:eZ.inputs.email.label,withAsterisk:!0,disabled:eb,maxLength:A.n.EMAIL,...e2.getInputProps("email"),error:!!e2.errors.email,onChange:e=>e3("email",e.currentTarget.value),onFocus:()=>e5("email"),onBlur:()=>e9("email"),ref:eO,"data-cy":"email","aria-invalid":!!e2.errors.email,"aria-describedby":e2.errors.email?"email-error":void 0,id:"email"}),(0,s.jsx)("div",{id:"registration-email-counter",children:(0,s.jsx)(N.$,{id:"email-error",currentLength:e2.values.email.length,maxLength:A.n.EMAIL,error:e2.errors.email,showError:!0,isFocused:e6.has("email")})})]}),(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)(S.y,{label:eZ.inputs.password.label,withAsterisk:!0,disabled:eb,maxLength:A.n.PASSWORD,...e2.getInputProps("password"),error:!!e2.errors.password,onChange:e=>e3("password",e.currentTarget.value),onFocus:()=>e5("password"),onBlur:()=>e9("password"),ref:eR,"data-cy":"password","aria-invalid":!!e2.errors.password,"aria-describedby":e2.errors.password?"password-error":void 0,id:"password"}),(0,s.jsx)("div",{id:"registration-password-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.password.length,maxLength:A.n.PASSWORD,error:e2.errors.password,showError:!0,id:"password-error",isFocused:e6.has("password")})})]}),eI&&(0,s.jsxs)(a.x.Col,{span:12,children:[(0,s.jsx)(k.c,{my:"sm"}),(0,s.jsx)(E.h,{order:2,children:eC("companyRegistrationHeadline")}),!eS&&(0,s.jsx)(T.F,{color:"blue",variant:"light",icon:(0,s.jsx)(K.A,{size:16,color:"#004382"}),mb:"sm",mt:"sm",maw:514,p:"0.3rem 0.625rem",styles:{message:{color:"#004382",fontSize:"0.875rem"}},children:eC("nipInfoBanner")}),(0,s.jsxs)(a.x,{gutter:"sm",align:"flex-end",children:[(0,s.jsx)(a.x.Col,{span:6,children:(0,s.jsx)(F.k,{label:eZ.inputs.nip.label,placeholder:eZ.inputs.nip.placeholder,withAsterisk:!0,styles:{label:{fontWeight:"normal"}},disabled:eb||eE,maxLength:10,...e2.getInputProps("nip"),error:!!e2.errors.nip,onChange:e=>{e3("nip",e.currentTarget.value)},"data-cy":"nip"})}),!eS&&(0,s.jsx)(a.x.Col,{span:6,children:(0,s.jsx)(P.$,{onClick:()=>{eN.current=e2.values.nip,eL(e2.values.nip)},disabled:eb||!/^\d{10}$/.test(e2.values.nip),variant:"filled",w:254,ml:"sm",children:eC("validateWithRegon")})})]}),e2.errors.nip&&(0,s.jsx)(O.E,{size:"sm",c:"red",mt:4,children:e2.errors.nip}),(0,s.jsx)(O.E,{size:"xs",c:"#272727",mt:4,children:eZ.inputs.nip.helper}),eE&&(0,s.jsx)(T.F,{color:"yellow",variant:"light",icon:(0,s.jsx)(K.A,{size:16,color:"#825D00"}),maw:470,p:"0.5rem 0.625rem",mt:"sm",styles:{icon:{color:"#825D00"},message:{color:"#825D00",fontSize:"0.875rem",fontWeight:700}},children:eC("regonValidating")}),eS&&ew&&!eE&&(0,s.jsx)(R.a,{maw:"50%",children:(0,s.jsx)(W.O,{eligible:ew.eligible,companyStatus:ew.companyData.status,classification:ew.companyData.classification,validationTimestamp:ew.validationTimestamp,onRevalidate:()=>{eN.current=e2.values.nip,eL(e2.values.nip)},isValidating:eE})}),eF&&!eS&&(0,s.jsx)(O.E,{size:"sm",c:"red",mt:"xs",children:eF.technical?eC("regonValidationError"):eF.error})]}),!eI&&(0,s.jsxs)(a.x.Col,{span:12,children:[(0,s.jsx)(E.h,{order:2,children:eZ.addressHeadline}),"Invalid Country"===e2.getInputProps("country").value&&(0,s.jsx)("div",{style:{color:"#C8102E"},children:eC("cannotRegister")})]}),(!eI||eu)&&(0,s.jsxs)(a.x.Col,{span:eI?6:9,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.company.placeholder,label:eZ.inputs.company.label,disabled:eb||eI&&!!ew,withAsterisk:!0,maxLength:e7.companyName,...e2.getInputProps("company"),error:!!e2.errors.company||!!ri,onChange:e=>{eI&&ew||e3("company",e.currentTarget.value)},onFocus:()=>e5("company"),onBlur:()=>e9("company"),ref:e$,"data-cy":"company","aria-invalid":!!e2.errors.company,"aria-describedby":e2.errors.company?"company-error":void 0,id:"company"}),!(eI&&ew)&&(0,s.jsx)("div",{id:"registration-company-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.company.length,maxLength:e7.companyName,error:e2.errors.company??ri,showError:!0,id:"company-error",isFocused:e6.has("company")})}),eI&&ew&&(0,s.jsx)(O.E,{size:"xs",c:"dimmed",children:eC("regonAutoPopulated")})]}),eK.industry.isVisible&&(0,s.jsxs)(a.x.Col,{span:3,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.industry.placeholder,label:eZ.inputs.industry.label,disabled:eb,withAsterisk:!0,maxLength:A.n.INDUSTRY,...e2.getInputProps("industry"),error:!!e2.errors.industry,onChange:e=>e3("industry",e.currentTarget.value),onFocus:()=>e5("industry"),onBlur:()=>e9("industry"),"data-cy":"industry","aria-describedby":"registration-industry-counter"}),(0,s.jsx)("div",{id:"registration-industry-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.industry.length,maxLength:A.n.INDUSTRY,error:e2.errors.industry,showError:!0,isFocused:e6.has("industry")})})]}),eK.department.isVisible&&!eI&&(0,s.jsxs)(a.x.Col,{span:3,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.department.placeholder,label:eZ.inputs.department.label,disabled:eb,withAsterisk:eK.department.isRequired,maxLength:re.department,...e2.getInputProps("department"),error:!!e2.errors.department,onChange:e=>e3("department",e.currentTarget.value),onFocus:()=>e5("department"),onBlur:()=>e9("department"),"data-cy":"department","aria-describedby":"registration-department-counter"}),(0,s.jsx)("div",{id:"registration-department-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.department.length,maxLength:re.department,error:e2.errors.department,showError:!0,isFocused:e6.has("department")})})]}),eK.organizationLegalForm.isVisible&&(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.organizationLegalForm.placeholder,label:eZ.inputs.organizationLegalForm.label,withAsterisk:eK.organizationLegalForm.isRequired,disabled:eb,maxLength:A.n.ORGANIZATION_LEGAL_FORM,...e2.getInputProps("organizationLegalForm"),error:!!e2.errors.organizationLegalForm,onChange:e=>e3("organizationLegalForm",e.currentTarget.value),onFocus:()=>e5("organizationLegalForm"),onBlur:()=>e9("organizationLegalForm"),"data-cy":"legal-form","aria-describedby":"registration-organizationLegalForm-counter"}),(0,s.jsx)("div",{id:"registration-organizationLegalForm-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.organizationLegalForm.length,maxLength:A.n.ORGANIZATION_LEGAL_FORM,error:e2.errors.organizationLegalForm,showError:!0,isFocused:e6.has("organizationLegalForm")})})]}),eK.customerGroup.isVisible&&(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)($.l6,{data:(0,p.Y)(r,eC),placeholder:eZ.inputs.customerGroup.placeholder,label:eZ.inputs.customerGroup.label,withAsterisk:eK.customerGroup.isRequired,disabled:eb,...e2.getInputProps("customerGroup"),ref:eD,"aria-invalid":!!e2.errors.customerGroup,"aria-describedby":e2.errors.customerGroup?"customer-group-error":void 0,id:"customer-group","data-cy":"customer-group"}),e2.errors.customerGroup&&(0,s.jsx)("span",{id:"customer-group-error",role:"alert","aria-atomic":"true","aria-live":"polite",className:"sr-only",children:e2.errors.customerGroup})]}),eK.customerNumber.isVisible&&(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.customerNr.placeholder,label:eZ.inputs.customerNr.label,withAsterisk:eK.customerNumber.isRequired,disabled:eb,maxLength:A.n.CUSTOMER_NUMBER,...e2.getInputProps("customerNr"),error:!!e2.errors.customerNr,onChange:e=>e3("customerNr",e.currentTarget.value),onFocus:()=>e5("customerNr"),onBlur:()=>e9("customerNr"),"data-cy":"customer-nr","aria-describedby":"registration-customerNr-counter"}),(0,s.jsx)("div",{id:"registration-customerNr-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.customerNr.length,maxLength:A.n.CUSTOMER_NUMBER,error:e2.errors.customerNr,
1showError:!0,isFocused:e6.has("customerNr")})})]}),eI&&eu&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.x.Col,{span:12,children:(0,s.jsx)(k.c,{my:"sm"})}),(0,s.jsx)(a.x.Col,{span:12,children:(0,s.jsx)(E.h,{order:2,children:eC("billingAddressHeadline")})})]}),(!eI||eu)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(a.x.Col,{span:12,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.streetName.placeholder,label:eZ.inputs.streetName.label,withAsterisk:!0,disabled:eb||eI&&!!ew,maxLength:e7.streetName,...e2.getInputProps("streetName"),error:!!e2.errors.streetName||!!rs,onChange:e=>{eI&&ew||e3("streetName",e.currentTarget.value)},onFocus:()=>e5("streetName"),onBlur:()=>e9("streetName"),ref:eV,"data-cy":"street-address","aria-invalid":!!e2.errors.streetName,"aria-describedby":e2.errors.streetName?"street-address-error":void 0,id:"street-address"}),!(eI&&ew)&&(0,s.jsx)("div",{id:"registration-streetName-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.streetName.length,maxLength:e7.streetName,error:e2.errors.streetName??rs,showError:!0,id:"street-address-error",isFocused:e6.has("streetName")})}),eI&&ew&&(0,s.jsx)(O.E,{size:"xs",c:"dimmed",children:eC("regonAutoPopulated")})]}),(0,s.jsxs)(a.x.Col,{span:12,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.additionalStreetInfo.placeholder,label:eZ.inputs.additionalStreetInfo.label,disabled:eb,maxLength:e7.additionalStreetInfo,...e2.getInputProps("additionalStreetInfo"),error:!!e2.errors.additionalStreetInfo||!!rn,onChange:e=>e3("additionalStreetInfo",e.currentTarget.value),onFocus:()=>e5("additionalStreetInfo"),onBlur:()=>e9("additionalStreetInfo"),"data-cy":"addtnl-street-address","aria-describedby":"registration-additionalStreetInfo-counter"}),(0,s.jsx)("div",{id:"registration-additionalStreetInfo-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.additionalStreetInfo.length,maxLength:e7.additionalStreetInfo,error:e2.errors.additionalStreetInfo??rn,showError:!0,isFocused:e6.has("additionalStreetInfo")})})]}),(0,s.jsxs)(a.x.Col,{span:ej?12:3,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.postalCode.placeholder,label:eZ.inputs.postalCode.label,withAsterisk:!0,disabled:eb||eI&&!!ew,maxLength:e7.postalCode,...e2.getInputProps("postalCode"),error:!!e2.errors.postalCode,onChange:e=>{eI&&ew||e3("postalCode",e.currentTarget.value)},onFocus:()=>e5("postalCode"),onBlur:()=>e9("postalCode"),ref:eM,"data-cy":"zip-code","aria-invalid":!!e2.errors.postalCode,"aria-describedby":e2.errors.postalCode?"zip-code-error":void 0,id:"zip-code"}),!(eI&&ew)&&(0,s.jsx)("div",{id:"registration-postalCode-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.postalCode.length,maxLength:e7.postalCode,error:e2.errors.postalCode,showError:!0,id:"zip-code-error",isFocused:e6.has("postalCode")})}),eI&&ew&&(0,s.jsx)(O.E,{size:"xs",c:"dimmed",children:eC("regonAutoPopulated")})]}),(0,s.jsxs)(a.x.Col,{span:ej?12:9,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.city.placeholder,label:eZ.inputs.city.label,withAsterisk:!0,disabled:eb||eI&&!!ew,maxLength:e7.city,...e2.getInputProps("city"),error:!!e2.errors.city,onChange:e=>{eI&&ew||e3("city",e.currentTarget.value)},onFocus:()=>e5("city"),onBlur:()=>e9("city"),ref:e_,"data-cy":"city","aria-invalid":!!e2.errors.city,"aria-describedby":e2.errors.city?"city-error":void 0,id:"city"}),!(eI&&ew)&&(0,s.jsx)("div",{id:"registration-city-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.city.length,maxLength:e7.city,error:e2.errors.city,showError:!0,id:"city-error",isFocused:e6.has("city")})}),eI&&ew&&(0,s.jsx)(O.E,{size:"xs",c:"dimmed",children:eC("regonAutoPopulated")})]}),(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)($.l6,{data:ea,label:eZ.inputs.country.label,placeholder:eZ.inputs.country.placeholder,withAsterisk:!0,disabled:!0,searchable:!0,...e2.getInputProps("country"),ref:eG,"aria-invalid":!!e2.errors.country,"aria-describedby":e2.errors.country?"country-error":void 0,id:"country"}),e2.errors.country&&(0,s.jsx)("span",{id:"country-error",role:"alert","aria-atomic":"true","aria-live":"polite",className:"sr-only",children:e2.errors.country})]}),eK.state.isVisible&&(0,s.jsx)(a.x.Col,{span:ej?12:6,children:e2.values.country&&m[e2.values.country]?(0,s.jsx)($.l6,{label:eZ.inputs.state.label,placeholder:eZ.inputs.state.placeholder,data:m[e2.values.country].map(e=>({value:e.STATE,label:e["STATE DESCRIPTION"]})),withAsterisk:eK.state.isRequired,...e2.getInputProps("state"),"data-cy":"state",ref:eH,id:"state"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.state.placeholder,label:eZ.inputs.state.label,withAsterisk:eK.state.isRequired,disabled:eb,maxLength:A.n.STATE,...e2.getInputProps("state"),error:!!e2.errors.state,onChange:e=>e3("state",e.currentTarget.value),onFocus:()=>e5("state"),onBlur:()=>e9("state"),"data-cy":"state","aria-invalid":!!e2.errors.state,"aria-describedby":e2.errors.state?"state-error":void 0,id:"state"}),(0,s.jsx)("div",{id:"registration-state-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.state.length,maxLength:A.n.STATE,error:e2.errors.state,showError:!0,id:"state-error",isFocused:e6.has("state")})})]})}
1),"NONE"!==ei&&(0,s.jsx)(a.x.Col,{span:12,children:(0,s.jsx)(z.S,{label:eZ.inputs.billingToggle.label,...e2.getInputProps("handleBillingToggle"),onChange:e=>{el(e.target.checked),e2.values.handleBillingToggle=e.target.checked},"data-cy":"billingt-toggle"})}),(0,s.jsx)(a.x.Col,{span:12,children:(0,s.jsx)(z.S,{label:eZ.inputs.shippingToggle.label,...e2.getInputProps("handleShippingToggle"),onChange:e=>{ed(e.target.checked),e2.values.handleShippingToggle=e.target.checked},"data-cy":"shipping-toggle"})})]})]}),et&&(0,s.jsxs)(a.x,{w:"100%",mb:"md",children:[(0,s.jsx)(a.x.Col,{span:12,children:(0,s.jsx)(E.h,{order:2,children:eZ.billingHeadline})}),(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.firstName.placeholder,label:eZ.inputs.firstName.label,withAsterisk:!0,disabled:eb,maxLength:re.firstName,...e2.getInputProps("billingAddress.billingfirstName"),error:!!e2.errors["billingAddress.billingfirstName"],onChange:e=>e3("billingAddress.billingfirstName",e.currentTarget.value),onFocus:()=>e5("billingAddress.billingfirstName"),onBlur:()=>e9("billingAddress.billingfirstName"),"data-cy":"billing-first-name","aria-describedby":"registration-billing-firstName-counter"}),(0,s.jsx)("div",{id:"registration-billing-firstName-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.billingAddress.billingfirstName.length,maxLength:re.firstName,error:e2.errors["billingAddress.billingfirstName"],showError:!0,isFocused:e6.has("billingAddress.billingfirstName")})})]}),!er.isNordic&&(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.lastName.placeholder,label:eZ.inputs.lastName.label,withAsterisk:!0,disabled:eb,maxLength:re.lastName,...e2.getInputProps("billingAddress.billinglastName"),error:!!e2.errors["billingAddress.billinglastName"],onChange:e=>e3("billingAddress.billinglastName",e.currentTarget.value),onFocus:()=>e5("billingAddress.billinglastName"),onBlur:()=>e9("billingAddress.billinglastName"),"data-cy":"billing-last-name","aria-describedby":"registration-billing-lastName-counter"}),(0,s.jsx)("div",{id:"registration-billing-lastName-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.billingAddress.billinglastName.length,maxLength:re.lastName,error:e2.errors["billingAddress.billinglastName"],showError:!0,isFocused:e6.has("billingAddress.billinglastName")})})]}),(0,s.jsxs)(a.x.Col,{md:6,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.company.placeholder,label:eZ.inputs.company.label,withAsterisk:!0,disabled:eb,maxLength:e4.companyName,...e2.getInputProps("billingAddress.billingcompany"),error:!!e2.errors["billingAddress.billingcompany"]||!!ra,onChange:e=>e3("billingAddress.billingcompany",e.currentTarget.value),onFocus:()=>e5("billingAddress.billingcompany"),onBlur:()=>e9("billingAddress.billingcompany"),"data-cy":"billing-company-name","aria-describedby":"registration-billing-company-counter"}),(0,s.jsx)("div",{id:"registration-billing-company-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.billingAddress.billingcompany.length,maxLength:e4.companyName,error:e2.errors["billingAddress.billingcompany"]??ra,showError:!0,isFocused:e6.has("billingAddress.billingcompany")})})]}),(0,s.jsxs)(a.x.Col,{span:12,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.streetName.placeholder,label:eZ.inputs.streetName.label,withAsterisk:!0,disabled:eb,maxLength:e4.streetName,...e2.getInputProps("billingAddress.billingstreetName"),error:!!e2.errors["billingAddress.billingstreetName"]||!!rt,onChange:e=>e3("billingAddress.billingstreetName",e.currentTarget.value),onFocus:()=>e5("billingAddress.billingstreetName"),onBlur:()=>e9("billingAddress.billingstreetName"),"data-cy":"billing-street-address","aria-describedby":"registration-billing-streetName-counter"}),(0,s.jsx)("div",{id:"registration-billing-streetName-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.billingAddress.billingstreetName.length,maxLength:e4.streetName,error:e2.errors["billingAddress.billingstreetName"]??rt,showError:!0,isFocused:e6.has("billingAddress.billingstreetName")})})]}),(0,s.jsxs)(a.x.Col,{span:12,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.additionalStreetInfo.placeholder,label:eZ.inputs.additionalStreetInfo.label,disabled:eb,maxLength:e4.additionalStreetInfo,...e2.getInputProps("billingAddress.billingadditionalStreetInfo"),error:!!e2.errors["billingAddress.billingadditionalStreetInfo"]||!!rl,onChange:e=>e3("billingAddress.billingadditionalStreetInfo",e.currentTarget.value),onFocus:()=>e5("billingAddress.billingadditionalStreetInfo"),onBlur:()=>e9("billingAddress.billingadditionalStreetInfo"),"data-cy":"billing-addtnl-street-address","aria-describedby":"registration-billing-additionalStreetInfo-counter"}),(0,s.jsx)("div",{id:"registration-billing-additionalStreetInfo-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.billingAddress.billingadditionalStreetInfo.length,maxLength:e4.additionalStreetInfo,error:e2.errors["billingAddress.billingadditionalStreetInfo"]??rl,showError:!0,isFocused:e6.has("billingAddress.billingadditionalStreetInfo")})})]}),(0,s.jsxs)(a.x.Col,{span:ej?12:3,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.postalCode.placeholder,label:eZ.inputs.postalCode.label,withAsterisk:!0,disabled:eb,maxLength:e4.postalCode,...e2.getInputProps("billingAddress.billingpostalCode"),error:!!e2.errors["billingAddress.billingpostalCode"],onChange:e=>e3("billingAddress.billingpostalCode",e.currentTarget.value),onFocus:()=>e5("billingAddress.billingpostalCode"),onBlur:()=>e9("billingAddress.billingpostalCode"),"data-cy":"billing-zip-code","aria-describedby":"registration-billing-postalCode-counter"}),(0,s.jsx)("div",{id:"registration-billing-postalCode-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.billingAddress.billingpostalCode.length,maxLength:e4.postalCode,error:e2.errors["billingAddress.billingpostalCode"],showError:!0,isFocused:e6.has("billingAddress.billingpostalCode")})})]}),(0,s.jsxs)(a.x.Col,{span:ej?12:9,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.city.placeholder,label:eZ.inputs.city.label,withAsterisk:!0,disabled:eb,maxLength:e4.city,...e2.getInputProps("billingAddress.billingcity"),error:!!e2.errors["billingAddress.billingcity"],onChange:e=>e3("billingAddress.billingcity",e.currentTarget.value),onFocus:()=>e5("billingAddress.billingcity"),onBlur:()=>e9("billingAddress.billingcity"),"data-cy":"billing-city","aria-describedby":"registration-billing-city-counter"}),(0,s.jsx)("div",{id:"registration-billing-city-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.billingAddress.billingcity.length,maxLength:e4.city,error:e2.errors["billingAddress.billingcity"],showError:!0,isFocused:e6.has("billingAddress.billingcity")})})]}),(0,s.jsx)(a.x.Col,{span:ej?12:6,children:(0,s.jsx)($.l6,{data:ea,label:eZ.inputs.country.label,placeholder:eZ.inputs.country.placeholder,withAsterisk:!0,disabled:!er.isNordic,searchable:!0,...e2.getInputProps("billingAddress.billingcountry")})}),eK.state.isVisible&&(0,s.jsx)(a.x.Col,{span:ej?12:6,children:e2.values.billingAddress.billingcountry&&m[e2.values.billingAddress.billingcountry]?(0,s.jsx)($.l6,{label:eZ.inputs.state.label,placeholder:eZ.inputs.state.placeholder,data:m[e2.values.billingAddress.billingcountry].map(e=>({value:e.STATE,label:e["STATE DESCRIPTION"]})),withAsterisk:eK.state.isRequired,...e2.getInputProps("billingAddress.billingstate"),"data-cy":"billing-state"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.state.placeholder,label:eZ.inputs.state.label,withAsterisk:eK.state.isRequired,disabled:eb,maxLength:A.n.STATE,...e2.getInputProps("billingAddress.billingstate"),error:!!e2.errors["billingAddress.billingstate"],onChange:e=>e3("billingAddress.billingstate",e.currentTarget.value),onFocus:()=>e5("billingAddress.billingstate"),onBlur:()=>e9("billingAddress.billingstate"),"data-cy":"billing-state","aria-describedby":"registration-billing-state-counter"}),(0,s.jsx)("div",{id:"registration-billing-state-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.billingAddress.billingstate.length,maxLength:A.n.STATE,error:e2.errors["billingAddress.billingstate"],showError:!0,isFocused:e6.has("billingAddress.billingstate")})})]})})]}),eo&&(0,s.jsxs)(a.x,{w:"100%",mb:"md",children:[(0,s.jsx)(a.x.Col,{span:12,children:(0,s.jsx)(E.h,{order:2,children:eZ.shippingHeadline})}),(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.firstName.placeholder,label:eZ.inputs.firstName.label,withAsterisk:!0,disabled:eb,maxLength:re.firstName,...e2.getInputProps("shippingAddress.shippingfirstName"),error:!!e2.errors["shippingAddress.shippingfirstName"],onChange:e=>e3("shippingAddress.shippingfirstName",e.currentTarget.value),onFocus:()=>e5("shippingAddress.shippingfirstName"),onBlur:()=>e9("shippingAddress.shippingfirstName"),"data-cy":"shipping-first-name","aria-describedby":"registration-shipping-firstName-counter"}),(0,s.jsx)("div",{id:"registration-shipping-firstName-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.shippingAddress.shippingfirstName.length,maxLength:re.firstName,error:e2.errors["shippingAddress.shippingfirstName"],showError:!0,isFocused:e6.has("shippingAddress.shippingfirstName")}
1)})]}),!er.isNordic&&(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.lastName.placeholder,label:eZ.inputs.lastName.label,withAsterisk:!0,disabled:eb,maxLength:re.lastName,...e2.getInputProps("shippingAddress.shippinglastName"),error:!!e2.errors["shippingAddress.shippinglastName"],onChange:e=>e3("shippingAddress.shippinglastName",e.currentTarget.value),onFocus:()=>e5("shippingAddress.shippinglastName"),onBlur:()=>e9("shippingAddress.shippinglastName"),"data-cy":"shipping-last-name","aria-describedby":"registration-shipping-lastName-counter"}),(0,s.jsx)("div",{id:"registration-shipping-lastName-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.shippingAddress.shippinglastName.length,maxLength:re.lastName,error:e2.errors["shippingAddress.shippinglastName"],showError:!0,isFocused:e6.has("shippingAddress.shippinglastName")})})]}),(0,s.jsxs)(a.x.Col,{md:6,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.company.placeholder,label:eZ.inputs.company.label,withAsterisk:!0,disabled:eb,maxLength:e8.companyName,...e2.getInputProps("shippingAddress.shippingcompany"),error:!!e2.errors["shippingAddress.shippingcompany"]||!!ro,onChange:e=>e3("shippingAddress.shippingcompany",e.currentTarget.value),onFocus:()=>e5("shippingAddress.shippingcompany"),onBlur:()=>e9("shippingAddress.shippingcompany"),"data-cy":"shipping-company-name","aria-describedby":"registration-shipping-company-counter"}),(0,s.jsx)("div",{id:"registration-shipping-company-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.shippingAddress.shippingcompany.length,maxLength:e8.companyName,error:e2.errors["shippingAddress.shippingcompany"]??ro,showError:!0,isFocused:e6.has("shippingAddress.shippingcompany")})})]}),(0,s.jsxs)(a.x.Col,{span:12,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.streetName.placeholder,label:eZ.inputs.streetName.label,withAsterisk:!0,disabled:eb,maxLength:e8.streetName,...e2.getInputProps("shippingAddress.shippingstreetName"),error:!!e2.errors["shippingAddress.shippingstreetName"]||!!rd,onChange:e=>e3("shippingAddress.shippingstreetName",e.currentTarget.value),onFocus:()=>e5("shippingAddress.shippingstreetName"),onBlur:()=>e9("shippingAddress.shippingstreetName"),"data-cy":"shipping-street-address","aria-describedby":"registration-shipping-streetName-counter"}),(0,s.jsx)("div",{id:"registration-shipping-streetName-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.shippingAddress.shippingstreetName.length,maxLength:e8.streetName,error:e2.errors["shippingAddress.shippingstreetName"]??rd,showError:!0,isFocused:e6.has("shippingAddress.shippingstreetName")})})]}),(0,s.jsxs)(a.x.Col,{span:12,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.shippingAdditionalStreetInfo.placeholder,label:eZ.inputs.shippingAdditionalStreetInfo.label,disabled:eb,maxLength:e8.additionalStreetInfo,...e2.getInputProps("shippingAddress.shippingadditionalStreetInfo"),error:!!e2.errors["shippingAddress.shippingadditionalStreetInfo"]||!!rp,onChange:e=>e3("shippingAddress.shippingadditionalStreetInfo",e.currentTarget.value),onFocus:()=>e5("shippingAddress.shippingadditionalStreetInfo"),onBlur:()=>e9("shippingAddress.shippingadditionalStreetInfo"),"data-cy":"shipping-addtnl-street-address","aria-describedby":"registration-shipping-additionalStreetInfo-counter"}),(0,s.jsx)("div",{id:"registration-shipping-additionalStreetInfo-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.shippingAddress.shippingadditionalStreetInfo.length,maxLength:e8.additionalStreetInfo,error:e2.errors["shippingAddress.shippingadditionalStreetInfo"]??rp,showError:!0,isFocused:e6.has("shippingAddress.shippingadditionalStreetInfo")})})]}),(0,s.jsxs)(a.x.Col,{span:ej?12:3,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.postalCode.placeholder,label:eZ.inputs.postalCode.label,withAsterisk:!0,disabled:eb,maxLength:e8.postalCode,...e2.getInputProps("shippingAddress.shippingpostalCode"),error:!!e2.errors["shippingAddress.shippingpostalCode"],onChange:e=>e3("shippingAddress.shippingpostalCode",e.currentTarget.value),onFocus:()=>e5("shippingAddress.shippingpostalCode"),onBlur:()=>e9("shippingAddress.shippingpostalCode"),"data-cy":"shipping-zip-code","aria-describedby":"registration-shipping-postalCode-counter"}),(0,s.jsx)("div",{id:"registration-shipping-postalCode-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.shippingAddress.shippingpostalCode.length,maxLength:e8.postalCode,error:e2.errors["shippingAddress.shippingpostalCode"],showError:!0,isFocused:e6.has("shippingAddress.shippingpostalCode")})})]}),(0,s.jsxs)(a.x.Col,{span:ej?12:9,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.city.placeholder,label:eZ.inputs.city.label,withAsterisk:!0,disabled:eb,maxLength:e8.city,...e2.getInputProps("shippingAddress.shippingcity"),error:!!e2.errors["shippingAddress.shippingcity"],onChange:e=>e3("shippingAddress.shippingcity",e.currentTarget.value),onFocus:()=>e5("shippingAddress.shippingcity"),onBlur:()=>e9("shippingAddress.shippingcity"),"data-cy":"shipping-city","aria-describedby":"registration-shipping-city-counter"}),(0,s.jsx)("div",{id:"registration-shipping-city-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.shippingAddress.shippingcity.length,maxLength:e8.city,error:e2.errors["shippingAddress.shippingcity"],showError:!0,isFocused:e6.has("shippingAddress.shippingcity")})})]}),(0,s.jsx)(a.x.Col,{span:ej?12:6,children:(0,s.jsx)($.l6,{data:ea,label:eZ.inputs.country.label,placeholder:eZ.inputs.country.placeholder,withAsterisk:!0,disabled:!0,searchable:!0,...e2.getInputProps("shippingAddress.shippingcountry")})}),eK.state.isVisible&&(0,s.jsx)(a.x.Col,{span:ej?12:6,children:e2.values.shippingAddress.shippingcountry&&m[e2.values.shippingAddress.shippingcountry]?(0,s.jsx)($.l6,{label:eZ.inputs.state.label,placeholder:eZ.inputs.state.placeholder,data:m[e2.values.shippingAddress.shippingcountry].map(e=>({value:e.STATE,label:e["STATE DESCRIPTION"]})),withAsterisk:eK.state.isRequired,...e2.getInputProps("shippingAddress.shippingstate"),"data-cy":"billing-state",id:"shipping-state"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.state.placeholder,label:eZ.inputs.state.label,withAsterisk:eK.state.isRequired,disabled:eb,maxLength:A.n.STATE,...e2.getInputProps("shippingAddress.shippingstate"),error:!!e2.errors["shippingAddress.shippingstate"],onChange:e=>e3("shippingAddress.shippingstate",e.currentTarget.value),onFocus:()=>e5("shippingAddress.shippingstate"),onBlur:()=>e9("shippingAddress.shippingstate"),"data-cy":"billing-state","aria-describedby":"registration-shipping-state-counter"}),(0,s.jsx)("div",{id:"registration-shipping-state-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.shippingAddress.shippingstate.length,maxLength:A.n.STATE,error:e2.errors["shippingAddress.shippingstate"],showError:!0,isFocused:e6.has("shippingAddress.shippingstate")})})]})}),eI&&eo&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.phone.placeholder,label:eZ.inputs.phone.label,withAsterisk:!0,disabled:eb,maxLength:A.n.PHONE,...e2.getInputProps("shippingAddress.shippingphone"),error:!!e2.errors["shippingAddress.shippingphone"],onChange:e=>e3("shippingAddress.shippingphone",(0,I._)(e,r)),onFocus:()=>e5("shippingAddress.shippingphone"),onBlur:()=>e9("shippingAddress.shippingphone"),"data-cy":"shipping-phone","aria-describedby":"registration-shipping-phone-counter"}),(0,s.jsx)("div",{id:"registration-shipping-phone-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.shippingAddress.shippingphone.length,maxLength:A.n.PHONE,error:e2.errors["shippingAddress.shippingphone"],showError:!0,isFocused:e6.has("shippingAddress.shippingphone")})})]}),(0,s.jsxs)(a.x.Col,{span:ej?12:6,children:[(0,s.jsx)(F.k,{placeholder:eZ.inputs.email.placeholder,label:eZ.inputs.email.label,disabled:eb,maxLength:A.n.EMAIL,...e2.getInputProps("shippingAddress.shippingemail"),error:!!e2.errors["shippingAddress.shippingemail"],onChange:e=>e3("shippingAddress.shippingemail",e.currentTarget.value),onFocus:()=>e5("shippingAddress.shippingemail"),onBlur:()=>e9("shippingAddress.shippingemail"),"data-cy":"shipping-email","aria-describedby":"registration-shipping-email-counter"}),(0,s.jsx)("div",{id:"registration-shipping-email-counter",children:(0,s.jsx)(N.$,{currentLength:e2.values.shippingAddress.shippingemail.length,maxLength:A.n.EMAIL,error:e2.errors["shippingAddress.shippingemail"],showError:!0,isFocused:e6.has("shippingAddress.shippingemail")})})]})]}),eI&&eo&&(0,s.jsxs)(a.x.Col,{span:12,children:[(0,s.jsx)(F.k,{label:eC("internalIdNumber")||"Internal ID Number",placeholder:"NNNNNNNNNN-NNNNN",disabled:eb,maxLength:16,...e2.getInputProps("shippingAddress.shippinginternalNumber"),error:e2.values.shippingAddress.shippinginternalNumber&&!/^\d{10}-\d{5}$/.test(e2.values.shippingAddress.shippinginternalNumber)?eC("internalIdNumberInvalid")||"Invalid format (must be: 10 digits-5 digits)":e2.errors["shippingAddress.shippinginternalNumber"],onChange:e=>e3("shippingAddress.shippinginternalNumber",e.currentTarget.value),onFocus:()=>e5("shippingAddress.shippinginternalNumber"),onBlur:()=>e9("shippingAddress.shippinginternalNumber"),"data-cy":"shipping-internal-number","aria-describedby":"registration-shipping-internalNumber-info"}),(0,s.jsx)(O.E,{id:"registration-shipping-internalNumber-info",size:"xs",color:"dimmed",mt:4,children:eC("internalIdNumberDescription")||"Optional: Enter in format NIP-internal number"})]})]}),eY&&(0,s.jsx)(f.C,{form:e2,fieldsVisibility:eK,prefix:"",idPrefix:"registration",isNordic:er.isNordic,loading:eb,isMobile:ej,invoiceEmailRef:ez,invoiceOperatorCodeRef:eB}),(!eI||eu)&&(0,s.jsxs)(a.x,{w:"100%",children:[(0,s.jsx)(a.x.Col,{span:12,children:(0,s.jsx)(k.c,{my:"md"})}),(0,s.jsx)(a.x.Col,{span:12,mt:-32,children:(0,s.jsx)(O.E,{fw:600,children:eZ.inputs.privacyAndMembersClub.header})}),(0,s.jsxs)(a.x.Col,{span:12,children:[(0,s.jsx)(z.S,{required:!0,label:(0,s.jsxs)("span",{children:[(0,s.jsx)(_.A,{i18nKey:"forms:termsAndConditionsLabel",components:[(0,s.jsx)("a",{href:eZ.inputs.privacyOptIn.termsAndConditionsOfSale,target:"_blank",rel:"noreferrer",style:{color:"var(--mantine-color-sarred-5)",textDecoration:"underline"},children:""},"0"),(0,s.jsx)("a",{href:eZ.inputs.privacyOptIn.termsAndConditionsOfUse,target:"_blank",rel:"noreferrer",style:{color:"var(--mantine-color-sarred-5)",textDecoration:"underline"},children:""},"1")]})," *"]}),...e2.getInputProps("privacyOptIn",{type:"checkbox"}),ref:eq,id:"privacy-opt-in","data-cy":"privacy-opt-in","aria-invalid":!!e2.errors.privacyOptIn,"aria-describedby":e2.errors.privacyOptIn?"privacy-opt-in-error":void 0}),e2.errors.privacyOptIn&&(0,s.jsx)("span",{id:"privacy-opt-in-error",role:"alert","aria-atomic":"true","aria-live":"polite",className:"sr-only",children:e2.errors.privacyOptIn})]}),(0,s.jsxs)(a.x.Col,{span:12,children:[(0,s.jsx)(z.S,{required:!0,label:(0,s.jsxs)("span",{children:[(0,s.jsx)(_.A,{i18nKey:"forms:privacyPolicyLabel",components:[(0,s.jsx)("a",{href:eZ.inputs.privacyOptIn2.privacyPolicy,target:"_blank",rel:"noreferrer",style:{color:"var(--mantine-color-sarred-5)",textDecoration:"underline"},children:""},"0")]})," *"]}),...e2.getInputProps("privacyOptIn2",{type:"checkbox"}),ref:eU,id:"privacy-opt-in-2","data-cy":"privacy-opt-in-2","aria-invalid":!!e2.errors.privacyOptIn2,"aria-describedby":e2.errors.privacyOptIn2?"privacy-opt-in-2-error":void 0}),e2.errors.privacyOptIn2&&(0,s.jsx)("span",{id:"privacy-opt-in-2-error",role:"alert","aria-atomic":"true","aria-live":"polite",className:"sr-only",children:e2.errors.privacyOptIn2})]}),es&&(0,s.jsx)(a.x.Col,{span:12,children:(0,s.jsx)(z.S,{label:eC(es),description:(0,s.jsx)(X.A,{id:"registration-marketing-consent-notice",blurb:eZ.inputs.membersClub.description}),"aria-describedby":"registration-marketing-consent-notice",...e2.getInputProps("membersClubOptIn",{type:"checkbox"}
1),id:"members-club-opt-in","data-cy":"members-club-opt-in"})}),eI&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(a.x.Col,{span:12,children:[(0,s.jsx)(k.c,{my:"md"}),(0,s.jsx)(E.h,{order:4,children:eC("polandEinvoicingTitle")||"E-Invoicing Information"})]}),(0,s.jsx)(a.x.Col,{span:12,children:(0,s.jsx)(z.S,{label:eC("grupaVATLabel")||"Grupa VAT",...e2.getInputProps("vatGroup",{type:"checkbox"}),id:"grupa-vat","data-cy":"grupa-vat"})}),(0,s.jsx)(a.x.Col,{span:12,children:(0,s.jsx)(z.S,{label:eC("localGovernmentUnit")||"Jednostka SamorzÄ
du Terytorialnego",...e2.getInputProps("territorialSelfGovernmentUnit",{type:"checkbox"}),id:"jednostka-samorzadu-terytorialnego","data-cy":"jednostka-samorzadu-terytorialnego"})})]})]}),(!eI||eu)&&ep&&(0,s.jsx)(a.x.Col,{span:12,mt:"md",px:"0",children:(0,s.jsx)(T.F,{color:"red",variant:"light","data-cy":"registration-error",styles:{message:{color:"var(--mantine-color-sarred-5)"}},children:ep})}),(!eI||eS)&&(0,s.jsxs)(a.x.Col,{px:0,py:"md",children:[(0,s.jsx)(t.s,{w:"100%",children:(0,s.jsx)(P.$,{color:"red",type:"submit",loading:eb,disabled:!e2.isDirty()||!e2.isValid(),ml:"auto","data-cy":"registration-submit",children:eZ.registerButtonLabel})}),ej&&(0,s.jsx)(O.E,{size:"xs",ta:"right",children:l("recaptchaDisclaimer")})]})]})})]})};var ei=i(95068),es=i(26114),en=!0;function ea(){let{t:e}=(0,G.A)("seo"),{personalDataDisabled:r}=(0,es.e)(),i=(0,H.useRouter)(),{language:l,country:d}=(0,c.JK)(i);if((0,n.useEffect)(()=>{r&&i.replace(`/${l}/${(0,c.$9)(d)}`)},[r,i,l,d]),r)return null;let p={seo:{title:e("registrationTitle"),description:e("registrationDescription"),canonicalUrl:`${(0,ei.$_)()}/${l}/${(0,c.$9)(d)}/user/registration`,robots:{noFollow:!0,noIndex:!0}}},g=(0,ei.cp)(p);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o(),{children:(0,s.jsx)(s.Fragment,{children:g})}),(0,s.jsx)(a.x,{justify:"center",align:"center",my:"2rem",children:(0,s.jsx)(t.s,{direction:"column",gap:"lg",maw:"952px",my:"lg",w:"100%",px:"sm",children:(0,s.jsx)(er,{})})})]})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=19508)),_N_E=e.O()}]);
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.