PageSourceSearch

https://houseofgamers.com.br/_next/static/chunks/pages/my-account/addresses-96a05707a5a6fc96.js

js houseofgamers.com.br collected 2026-10-04 22:31:36 UTC 22,683 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1441],{44632:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-account/addresses",function(){return i(34583)}])},63281:function(e,t,i){"use strict";var o=i(67294);t.Z=function(e,t){(0,o.useEffect)((function(){var i,o=function(){window.innerHeight<=780&&window.innerWidth<1024&&(e(!0),i=setTimeout((function(){e(!1)}),t))},n=document.querySelectorAll("input");return n.forEach((function(e){e.addEventListener("focus",o)})),function(){n.forEach((function(e){e.removeEventListener("focus",o)})),clearTimeout(i),e(!1)}}),[e,t])}},34583:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return M}});var o=i(85893),n=i(7774),l=i(83713),r=i(47568),s=i(26042),d=i(69396),a=i(97582),c=i(67294),u=i(90361),h=i(58030),p=i(24239),v=i(47473),m=i(13488),x=i(86010),g=i(97323),f=i.n(g),b=i(41938),y=i(17240),S=i(99557),j=i(79814),N=i(76440),Z=i(96929),w=i(10553),C=i(9669),A=i.n(C),T=i(82580),z=i(73474);var E=function(e){var t,i=e.value,n=e.selected,l=e.setSelected,r=(0,c.useRef)(null),s=(0,c.useState)(null),d=s[0],a=s[1];return(0,c.useEffect)((function(){var e=function(){if(null===r||void 0===r?void 0:r.current){var e,t=null===(e=r.current)||void 0===e?void 0:e.offsetWidth;a(t)}};return window.addEventListener("resize",e),e(),function(){window.removeEventListener("resize",e)}}),[]),(0,o.jsxs)("div",{ref:r,className:(0,x.Z)("flex w-full items-center justify-between gap-8 border-b pb-1",{"border-b-hog-100":""!==n,"border-b-hog-200/[32%]":""===n}),children:[(0,o.jsxs)("p",{className:(0,x.Z)("whitespace-nowrap text-sm",{"text-white/25":""===n}),children:["Salvar endere\xe7o como: ",d>=360&&(t=n,t.charAt(0).toUpperCase()+t.slice(1))]}),(0,o.jsxs)("div",{className:"flex items-center gap-4 sm:gap-6",children:[(0,o.jsx)(z.Z,{type:"casa",selectedAddressType:n,setSelectedAddressType:l,usePaddingTop:!1,children:(0,o.jsx)(h.fQ,{className:(0,x.Z)("h-4 w-4 fill-none duration-300 ease-in-out",{"text-hog-500":"casa"===n,"text-hog-100/[24%]":"casa"!==n||!i})})}),(0,o.jsx)(z.Z,{type:"apartamento",selectedAddressType:n,setSelectedAddressType:l,usePaddingTop:!1,children:(0,o.jsx)(h.Qy,{className:(0,x.Z)("h-4 w-4 fill-none duration-300 ease-in-out",{"text-hog-500":"apartamento"===n,"text-hog-100/[24%]":"apartamento"!==n||!i})})}),(0,o.jsx)(z.Z,{type:"trabalho",selectedAddressType:n,setSelectedAddressType:l,usePaddingTop:!1,children:(0,o.jsx)(h.In,{className:(0,x.Z)("h-4 w-4 fill-none duration-300 ease-in-out",{"text-hog-500":"trabalho"===n,"text-hog-100/[24%]":"trabalho"!==n||!i})})})]})]})},B=(0,c.memo)(E),F=function(e){var t=e.values;return(0,o.jsxs)("div",{className:"flex w-full items-center",children:[(0,o.jsx)("div",{children:(0,o.jsx)(h.wR,{className:"h-[0.875rem] w-[0.6875rem] fill-none text-hog-500"})}),(0,o.jsxs)("div",{className:"ml-[0.875rem] flex flex-col",children:[(0,o.jsx)("span",{className:"text-sm font-medium",children:"Endere\xe7o:"}),(null===t||void 0===t?void 0:t.street)&&(0,o.jsx)("span",{className:"line-clamp-1 text-sm font-light",children:t.street}),(0,o.jsxs)("span",{className:"line-clamp-1 text-sm font-light",children:[(null===t||void 0===t?void 0:t.neighborhood)&&"".concat(t.neighborhood," - "),null===t||void 0===t?void 0:t.city,"/",null===t||void 0===t?void 0:t.shortState," - CEP ",null===t||void 0===t?void 0:t.zipcode]})]})]})},_=(0,c.memo)(F),L=i(42088),k=i(22634),P=i(32288),I=i(10219),W=function(e){var t=e.values,i=e.setFieldValue,n=e.errors,l=e.handleBlur,s=e.handleChange,d=e.touched,c=e.storedShortState,u=e.isZipcodeApiFailed,p=e.isZipcodeNotFound,v=e.addressType,m=e.useZipcodeAddressInfos,g=void 0===m||m,f=e.isZipcodeLoading,b=e.setIsZipcodeLoading,y=e.getAddressByCEP,S=e.selectedZipcode,j=e.setSelectedZipcode,N=e.selectedAddressType,Z=e.setSelectedAddressType,w=e.enableSelectField,C=e.setEnableSelectField;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"flex w-full gap-x-8 gap-y-4",children:[(0,o.jsxs)("div",{className:"flex w-full flex-col gap-4",children:[(0,o.jsx)(k.Z,{input:{name:"zipcode",value:null===t||void 0===t?void 0:t.zipcode,maxLength:9,type:"text",placeholder:"Qual seu cep?",handleChange:function(){var e=(0,r.Z)((function(e){var o,n;return(0,a.__generator)(this,(function(l){switch(l.label){case 0:return e.target.value=(0,I.Tc)(e.target.value),s(e),t.zipcode=e.target.value,S===t.zipcode?[3,3]:(b(!0),9!==t.zipcode.length?[3,2]:[4,y(null===t||void 0===t?void 0:t.zipcode)]);case 1:n=l.sent(),i("city",(null===n||void 0===n?void 0:n.city)||(null===t||void 0===t?void 0:t.city)),i("state",(null===n||void 0===n?void 0:n.state)||(null===t||void 0===t?void 0:t.state)),i("shortState",(null===n||void 0===n?void 0:n.shortState)||(null===t||void 0===t?void 0:t.shortState)),i("street",(null===n||void 0===n?void 0:n.street)||(null===t||void 0===t?void 0:t.street)),i("neighborhood",(null===n||void 0===n?void 0:n.neighborhood)||(null===t||void 0===t?void 0:t.neighborhood)),j(null===t||void 0===t?void 0:t.zipcode),null===(o=document.getElementById("receiverName"))||void 0===o||o.focus(),l.label=2;case 2:return[3,4];case 3:b(!1),l.label=4;case 4:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),handleBlur:l},inputTextStyle:"text-sm",borderWhite:!!(null===t||void 0===t?void 0:t.zipcode),error:d.zipcode&&n.zipcode,success:!n.zipcode&&9===t.zipcode.length&&!f,isLoading:9===t.zipcode.length&&f,children:(0,o.jsx)(h.wR,{className:"mr-1 h-[0.875rem] w-[0.6875rem] fill-none text-hog-500"})}),g?(null===t||void 0===t?void 0:t.city)&&(null===t||void 0===t?void 0:t.shortState)&&!u&&!p&&(0,o.jsx)(_,{values:t}):null]}),(0,o.jsx)(k.Z,{input:{name:"receiverName",value:null===t||void 0===t?void 0:t.receiverName,type:"text",placeholder:"Destinat\xe1rio",handleChange:s,handleBlur:l},inputTextStyle:"text-sm",borderWhite:!!(null===t||void 0===t?void 0:t.receiverName),error:d.receiverName&&n.receiverName,success:!n.receiverName&&!!t.receiverName})]}),(0,o.jsxs)("div",{className:"flex w-full gap-x-8 gap-y-4",children:[(0,o.jsx)(k.Z,{input:{name:"street",value:null===t||void 0===t?void 0:t.street,type:"text",placeholder:"Endere\xe7o",handleChange:s,handleBlur:l},inputTextStyle:"text-sm",borderWhite:!!(null===t||void 0===t?void 0:t.street),error:d.street&&n.street,success:!n.street&&!!t.street}),(0,o.jsxs)("div",{className:"flex w-full gap-8",children:[(0,o.jsx)(k.Z,{input:{name:"number",value:null===t||void 0===t?void 0:t.number,type:"text",placeholder:"N\xfamero",handleChange:s,handleBlur:l},inputTextStyle:"text-sm",borderWhite:!!(null===t||void 0===t?void 0:t.number),error:d.number&&n.number,success:!n.number&&!!t.number}),(0,o.jsx)(k.Z,{input:{name:"complement",value:null===t||void 0===t?void 0:t.complement,type:"text",placeholder:"Complemento",handleChange:s,handleBlur:l},inputTextStyle:"text-sm",borderWhite:!!(null===t||void 0===t?void 0:t.complement),success:!!t.complement})]})]}),(0,o.jsxs)("div",{className:"flex w-full gap-x-8 gap-y-4",children:[(0,o.jsx)(k.Z,{input:{name:"neighborhood",value:null===t||void 0===t?void 0:t.neighborhood,type:"text",placeholder:"Bairro",handleChange:s,handleBlur:l},inputTextStyle:"text-sm pb-1",borderWhite:!!(null===t||void 0===t?void 0:t.neighborhood),error:d.neighborhood&&n.neighborhood,success:!n.neighborhood&&!!t.neighborhood}),(0,o.jsx)(B,{selected:N,setSelected:Z,value:v})]}),(u||p)&&(0,o.jsxs)("div",{className:"flex w-[48%] gap-x-8 gap-y-4",children:[(0,o.jsx)(k.Z,{input:{name:"city",value:null===t||void 0===t?void 0:t.city,type:"text",placeholder:"Cidade",handleChange:s,handleBlur:l},inputTextStyle:"text-sm",borderWhite:!!(null===t||void 0===t?void 0:t.city),error:d.city&&n.city,success:!n.city&&!!t.city}),(0,o.jsxs)("div",{className:"relative w-full",children:[(0,o.jsx)("div",{className:(0,x.Z)("absolute inset-0 z-10 w-full bg-transparent",{hidden:w}),onClick:function(){C(!0)}}),(0,o.jsx)(P.Z,{fieldName:"shortState",options:L.UF,onChange:s,value:c||(null===t||void 0===t?void 0:t.shortState),textSizeStyle:"text-sm pt-[7px] pb-1",defaultPlaceholderOption:"Estado",usePaddings:!1,useOpacityStyles:!1,borderWhite:!!(null===t||void 0===t?void 0:t.shortState),disabled:!w,error:d.shortState&&n.shortState})]})]})]})},D=(0,c.memo)(W),V=i(63281),O=function(e){var t=e.values,i=e.setFieldValue,n=e.errors,l=e.handleBlur,s=e.handleChange,d=e.touched,c=e.storedShortState,u=e.isZipcodeApiFailed,p=e.isZipcodeNotFound,v=e.addressType,m=e.useZipcodeAddressInfos,g=void 0===m||m,f=e.isZipcodeLoading,y=e.getAddressByCEP,S=e.selectedZipcode,j=e.setSelectedZipcode,N=e.selectedAddressType,Z=e.setSelectedAddressType,w=e.enableSelectField,C=e.setEnableSelectField,A=e.setIsZipcodeLoading,T=(0,b.IR)().setKeyboardActive;return(0,V.Z)(T,6e4),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(k.Z,{input:{name:"zipcode",maxLength:9,value:null===t||void 0===t?void 0:t.zipcode,type:"text",placeholder:"Qual seu cep?",handleChange:function(){var e=(0,r.Z)((function(e){var o,n;return(0,a.__generator)(this,(function(l){switch(l.label){case 0:return e.target.value=(0,I.Tc)(e.target.value),s(e),t.zipcode=e.target.value,S===t.zipcode?[3,3]:(A(!0),9!==t.zipcode.length?[3,2]:[4,y(null===t||void 0===t?void 0:t.zipcode)]);case 1:n=l.sent(),i("city",(null===n||void 0===n?void 0:n.city)||(null===t||void 0===t?void 0:t.city)),i("state",(null===n||void 0===n?void 0:n.state)||(null===t||void 0===t?void 0:t.state)),i("shortState",(null===n||void 0===n?void 0:n.shortState)||(null===t||void 0===t?void 0:t.shortState)),i("street",(null===n||void 0===n?void 0:n.street)||(null===t||void 0===t?void 0:t.street)),i("neighborhood",(null===n||void 0===n?void 0:n.neighborhood)||(null===t||void 0===t?void 0:t.neighborhood)),j(null===t||void 0===t?void 0:t.zipcode),null===(o=document.getElementById("receiverName"))||void 0===o||o.focus(),l.label=2;case 2:return[3,4];case 3:A(!1),l.label=4;case 4:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),handleBlur:l},inputTextStyle:"text-sm",borderWhite:!!(null===t||void 0===t?void 0:t.zipcode),error:d.zipcode&&n.zipcode,success:!n.zipcode&&9===t.zipcode.length&&!f,isLoading:f,children:(0,o.jsx)(h.wR,{className:"mr-1 h-[0.875rem] w-[0.6875rem] fill-none text-hog-500"})}),g?(null===t||void 0===t?void 0:t.city)&&(null===t||void 0===t?void 0:t.shortState)&&!u&&!p&&(0,o.jsx)(_,{values:t}):null,(0,o.jsx)(k.Z,{input:{name:"receiverName",value:null===t||void 0===t?void 0:t.receiverName,type:"text",placeholder:"Destinat\xe1rio",handleChange:s,handleBlur:l},inputTextStyle:"text-sm",borderWhite:!!(null===t||void 0===t?void 0:t.receiverName),error:d.receiverName&&n.receiverName,success:!n.receiverName&&!!t.receiverName}),(0,o.jsx)(k.Z,{input:{name:"street",value:null===t||void 0===t?void 0:t.street,type:"text",placeholder:"Endere\xe7o",handleChange:s,handleBlur:l},inputTextStyle:"text-sm",borderWhite:!!(null===t||void 0===t?void 0:t.street),error:d.street&&n.street,success:!n.street&&!!t.street}),(0,o.jsx)(k.Z,{input:{name:"neighborhood",value:null===t||void 0===t?void 0:t.neighborhood,type:"text",placeholder:"Bairro",handleChange:s,handleBlur:l},inputTextStyle:"text-sm pb-1",borderWhite:!!(null===t||void 0===t?void 0:t.neighborhood),error:d.neighborhood&&n.neighborhood,success:!n.neighborhood&&!!t.neighborhood}),(0,o.jsxs)("div",{className:"flex w-full gap-8",children:[(0,o.jsx)(k.Z,{input:{name:"number",value:null===t||void 0===t?void 0:t.number,type:"text",placeholder:"N\xfamero",handleChange:s,handleBlur:l},inputTextStyle:"text-sm",borderWhite:!!(null===t||void 0===t?void 0:t.number),error:d.number&&n.number,success:!n.number&&!!t.number}),(0,o.jsx)(k.Z,{input:{name:"complement",value:null===t||void 0===t?void 0:t.complement,type:"text",placeholder:"Complemento",handleChange:s,handleBlur:l},inputTextStyle:"text-sm",borderWhite:!!(null===t||void 0===t?void 0:t.complement),success:!!t.complement})]}),(u||p)&&(0,o.jsxs)("div",{className:"flex w-full gap-x-8 gap-y-8",children:[(0,o.jsx)(k.Z,{input:{name:"city",value:null===t||void 0===t?void 0:t.city,type:"text",placeholder:"Cidade",handleChange:s,handleBlur:l},inputTextStyle:"text-sm",borderWhite:!!(null===t||void 0===t?void 0:t.city),error:d.city&&n.city,success:!n.city&&!!t.city}),(0,o.jsxs)("div",{className:"relative w-full",children:[(0,o.jsx)("div",{className:(0,x.Z)("absolute inset-0 z-10 w-full bg-transparent",{hidden:w}),onClick:function(){C(!0)}}),(0,o.jsx)(P.Z,{fieldName:"shortState",options:L.UF,onChange:s,value:c||(null===t||void 0===t?void 0:t.shortState),textSizeStyle:"text-sm pt-[7px] pb-1",defaultPlaceholderOption:"Estado",usePaddings:!1,useOpacityStyles:!1,borderWhite:!!(null===t||void 0===t?void 0:t.shortState),disabled:!w,error:d.shortState&&n.shortState})]})]}),(0,o.jsx)(B,{selected:N,setSelected:Z,value:v})]})},R=(0,c.memo)(O),U=function(e){var t=e.isLoading,n=e.onSubmit,l=e.initialValues,u=void 0===l?{receiverName:"",street:"",city:"",zipcode:"",number:"",neighborhood:"",shortState:"",state:"",complement:"",type:""}:l,p=e.onClickBack,v=e.showBackButton,g=void 0===v||v,f=(0,Z.RD)(),b=f.isZipcodeApiFailed,C=f.setIsZipcodeApiFailed,z=f.isZipcodeNotFound,E=f.setIsZipcodeNotFound,B=(0,m.Z)().width,F=(0,c.useState)(u.zipcode),_=F[0],L=F[1],k=(0,c.useState)(),P=k[0],I=k[1],W=(0,c.useState)(u.type),V=W[0],O=W[1],U=(0,c.useState)(!1),H=U[0],J=U[1],K=(0,c.useState)(!1),Q=K[0],X=K[1],M=(0,c.useCallback)(function(){var e=(0,r.Z)((function(e){var t,o,n,l,r,s;return(0,a.__generator)(this,(function(d){switch(d.label){case 0:return d.trys.push([0,2,4,5]),X(!0),[4,A().post("/api/shoppingcart/getAddress",{cep:e})];case 1:return t=d.sent().data,E(""===t),C(!1),[2,t];case 2:return(null===(o=d.sent())||void 0===o||null===(n=o.response)||void 0===n?void 0:n.status)>=500&&(null===w.n||void 0===w.n||w.n.track("error-generic",{code:null===o||void 0===o||null===(l=o.response)||void 0===l?void 0:l.status,endpoint:"https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente?wsdl",message:null===o||void 0===o||null===(r=o.response)||void 0===r||null===(s=r.data)||void 0===s?void 0:s.message})),C(!0),[4,Promise.all([i.e(1338),i.e(6007)]).then(i.bind(i,63657))];case 3:return d.sent().default.error("Ocorreu um erro ao buscar as informa\xe7\xf5es do seu cep."),[3,5];case 4:return X(!1),[7];case 5:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),[]);return(0,c.useEffect)((function(){var e;null===(e=document.getElementById("zipcode"))||void 0===e||e.focus()}),[]),(0,c.useEffect)((function(){var e,t,i=null===(e=JSON.parse(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("primary-address")))||void 0===e?void 0:e.shortState,o=null===(t=JSON.parse(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("temporary-address")))||void 0===t?void 0:t.shortState;I(o||(i||""))}),[]),(0,o.jsx)(T.J9,{initialValues:u,validateOnBlur:!1,validate:function(e){var t={};return(0,S.O)(e.zipcode,"zipcode",t),(0,j.K)(e.receiverName,"receiverName",t),(0,N.a)(e.street,"street",t),(0,N.a)(e.neighborhood,"neighborhood",t),(0,N.a)(e.number,"number",t),(b||z)&&((0,N.a)(e.city,"city",t),(0,N.a)(e.shortState,"shortState",t)),t},onSubmit:function(e){var t=(0,d.Z)((0,s.Z)({},e),{state:b||z?e.shortState:e.state,countryCode:"BR",isPrimary:!0,type:V});n(t)},children:function(e){var i=e.values,n=e.errors,l=e.touched,r=e.handleChange,s=e.handleBlur,d=e.handleSubmit,a=e.setFieldValue;return(0,o.jsx)("form",{onSubmit:d,noValidate:!0,children:(0,o.jsxs)("div",{className:"flex h-full w-full flex-col gap-x-8 gap-y-8 lg:gap-y-4",children:[B>=1024?(0,o.jsx)(D,{values:i,setFieldValue:a,handleChange:r,handleBlur:s,touched:l,errors:n,storedShortState:P,addressType:null===u||void 0===u?void 0:u.type,isZipcodeApiFailed:b,isZipcodeNotFound:z,getAddressByCEP:M,selectedZipcode:_,setSelectedZipcode:L,selectedAddressType:V,setSelectedAddressType:O,enableSelectField:H,setEnableSelectField:J,useZipcodeAddressInfos:!0,isZipcodeLoading:Q,setIsZipcodeLoading:X}):(0,o.jsx)(R,{values:i,setFieldValue:a,handleChange:r,handleBlur:s,touched:l,errors:n,storedShortState:P,addressType:null===u||void 0===u?void 0:u.type,isZipcodeApiFailed:b,isZipcodeNotFound:z,getAddressByCEP:M,selectedZipcode:_,setSelectedZipcode:L,selectedAddressType:V,setSelectedAddressType:O,enableSelectField:H,setEnableSelectField:J,useZipcodeAddressInfos:!0,isZipcodeLoading:Q,setIsZipcodeLoading:X}),(0,o.jsxs)("div",{className:(0,x.Z)("flex w-full items-center gap-8 lg:mt-4",{"justify-between":g,"justify-end ":!g}),children:[g&&(0,o.jsxs)("div",{className:"flex w-fit cursor-pointer items-center gap-2",onClick:p,children:[(0,o.jsx)("div",{className:"flex h-4 w-4 items-center justify-center",children:(0,o.jsx)(h.jw,{className:"h-1.5 w-[0.625rem] rotate-90 fill-none text-hog-500"})}),(0,o.jsx)("p",{className:"text-xs font-medium uppercase",children:"Voltar"})]}),(0,o.jsx)(y.Z,{tag:"button",type:"submit",variant:"small",onLoad:t,disabled:""===V||!!n.zipcode||!!n.receiverName||!!n.street||!!n.neighborhood||!!n.number,children:"CADASTRAR"})]})]})})}})},H=(0,c.memo)(U),J=function(e){var t=e.isLoading,i=e.addAddressHandler,n=e.selectAddressHandler,l="cursor-pointer whitespace-nowrap text-xs underline decoration-hog-100 underline-offset-8 duration-500 hover:decoration-hog-500 hover:underline-offset-4";return(0,o.jsxs)("div",{className:"flex w-full items-center justify-between gap-8 px-0.5",children:[(0,o.jsx)("p",{className:(0,x.Z)(l,"sm:hidden"),onClick:i,children:"Adicionar endere\xe7o"}),(0,o.jsx)("p",{className:(0,x.Z)(l,"hidden sm:block"),onClick:i,children:"Adicionar novo endere\xe7o"}),(0,o.jsx)(y.Z,{tag:"button",variant:"small",onClick:n,onLoad:t,children:"selecionar"})]})},K=(0,c.memo)(J),Q=function(){var e=(0,v.Hl)(),t=e.setCurrentCustomer,i=e.currentCustomer,n=(0,m.Z)().height,l=(0,b.IR)(),g=l.getCustomerAddresses,y=l.setKeyboardActive,S=(0,c.useState)(!1),j=S[0],N=S[1],Z=(0,c.useState)(!1),w=Z[0],C=Z[1],A=(0,c.useState)(!1),T=A[0],z=A[1],E=(0,c.useState)(!1),B=E[0],F=E[1],_=(0,c.useState)(!1),L=_[0],k=_[1],P=(0,c.useState)(),I=P[0],W=P[1],D=null===g||void 0===g?void 0:g.filter((function(e){return e.isPrimary}))[0],V=(0,c.useCallback)((0,r.Z)((function(){var e;return(0,a.__generator)(this,(function(o){switch(o.label){case 0:return N(!0),[4,(0,p.l)({addressUpdate:{currentCustomer:i,operation:"SELECT",addressData:I}})];case 1:return e=o.sent(),t(e),N(!1),[2]}}))})),[I]),O=(0,c.useCallback)((0,r.Z)((function(){var e;return(0,a.__generator)(this,(function(o){switch(o.label){case 0:return C(!0),[4,(0,p.l)({addressUpdate:{currentCustomer:i,operation:"DELETE",addressData:I}})];case 1:return e=o.sent(),t(e),C(!1),[2]}}))})),[I]);return(0,c.useEffect)((function(){(null===g||void 0===g?void 0:g.length)?(W(D),F(!1)):setTimeout((function(){F(!0)}),250)}),[g]),(0,o.jsxs)("div",{className:"flex w-full flex-col gap-6 xxl1:gap-8",children:[(0,o.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,o.jsx)("h1",{className:"text-xs font-semibold uppercase sm:text-sm",children:"Endere\xe7os"}),(B&&(null===g||void 0===g?void 0:g.length)>0||L)&&(0,o.jsxs)("div",{className:"flex cursor-pointer items-center gap-2 pr-1",onClick:function(){y(!1),F(!1),k(!1)},children:[(0,o.jsx)(h.jw,{className:"h-1.5 w-[0.625rem] rotate-90 fill-none text-hog-500"}),(0,o.jsx)("p",{className:"text-xs font-medium uppercase",children:"Voltar"})]})]}),(0,o.jsx)("section",{className:(0,x.Z)(f().scrollbar,"w-full overflow-x-hidden lg:overflow-y-auto",{"lg:max-h-[calc(100vh-340px)] xxl1:max-h-[calc(100vh-400px)]":B||L},{"lg:max-h-[calc(100vh-390px)] xxl1:max-h-[calc(100vh-440px)]":n<800&&!B&&!L,"lg:max-h-[calc(100vh-390px)] xl:max-h-[calc(100vh-420px)] xxl1:max-h-[calc(100vh-440px)] xxl2:max-h-[calc(100vh-505px)]":n>=800&&n<900&&!B&&!L,"lg:max-h-[calc(100vh-420px)] xl:max-h-[calc(100vh-460px)] xxl2:max-h-[calc(100vh-608px)] full-hd:max-h-[19.625rem]":n>=900&&!B&&!L}),children:B?(0,o.jsx)(H,{initialValues:{street:"",city:"",zipcode:"",neighborhood:"",shortState:"",state:"",receiverName:"",number:"",complement:"",type:""},onSubmit:function(){var e=(0,r.Z)((function(e){var o;return(0,a.__generator)(this,(function(n){switch(n.label){case 0:return y(!1),z(!0),[4,(0,p.l)({addressUpdate:{currentCustomer:i,operation:"ADD",addressData:e}})];case 1:return o=n.sent(),t(o),z(!1),F(!1),[2]}}))}));return function(t){return e.apply(this,arguments)}}(),isLoading:T,showBackButton:!1}):L?(0,o.jsx)(H,{initialValues:I,onSubmit:function(){var e=(0,r.Z)((function(e){var o;return(0,a.__generator)(this,(function(n){switch(n.label){case 0:return y(!1),z(!0),[4,(0,p.l)({addressUpdate:{currentCustomer:i,operation:"UPDATE",addressData:(0,d.Z)((0,s.Z)({},I,e),{isPrimary:I.isPrimary})}})];case 1:return o=n.sent(),t(o),z(!1),k(!1),[2]}}))}));return function(t){return e.apply(this,arguments)}}(),isLoading:T,showBackButton:!1}):(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:"grid w-full gap-4 sm:grid-cols-2 sm:gap-6 xxl1:gap-8",children:[D&&(0,o.jsx)(u.Z,{isSelected:(null===I||void 0===I?void 0:I._id)===D._id,isMyAccountFlow:!0,city:D.city,receiverName:D.receiverName,shortState:D.shortState,street:D.street,neighborhood:D.neighborhood,number:D.number,zipcode:D.zipcode,addressType:D.type,onClick:function(){return W(D)},onDelete:O,onEdit:function(){return k(!0)},isDeleteConfirmLoading:w}),(null===g||void 0===g?void 0:g.length)>0&&g.filter((function(e){return!e.isPrimary})).map((function(e,t){return(0,o.jsx)("div",{children:(0,o.jsx)(u.Z,{isSelected:(null===I||void 0===I?void 0:I._id)===e._id,isMyAccountFlow:!0,city:e.city,receiverName:e.receiverName,shortState:e.shortState,street:e.street,neighborhood:e.neighborhood,number:e.number,zipcode:e.zipcode,addressType:e.type||"casa",onClick:function(){return W(e)},onDelete:O,onEdit:function(){return k(!0)},isDeleteConfirmLoading:w})},"".concat(e.zipcode).concat(t))}))]})})}
1),!B&&!L&&(0,o.jsx)(K,{addAddressHandler:function(){return F(!0)},selectAddressHandler:V,isLoading:j})]})},X=(0,c.memo)(Q),M=function(){var e=(0,b.IR)().isCacheFetchLoading,t=(0,m.Z)().width,i="sticky z-[7] top-0 hidden lg:flex w-full items-start whitespace-nowrap uppercase pb-8 xxl1:pb-12 gap-12 lg:gap-8 xxl1:gap-16 bg-black",r="px-0.5 pb-8 flex max-[520px]:flex-wrap items-center min-[520px]:justify-center gap-x-4 gap-y-5 md:gap-x-12 md:gap-y-0 whitespace-nowrap uppercase lg:hidden";return(0,o.jsxs)(n.Z,{children:[e?(0,o.jsx)("section",{className:t<1024?r:i,children:(0,o.jsx)(l.LK,{})}):(0,o.jsx)("section",{className:t<1024?r:i,children:(0,o.jsx)(l.XI,{})}),(0,o.jsx)(X,{})]})}},97323:function(e){e.exports={scrollbar:"style_scrollbar__bao1X"}}},function(e){e.O(0,[9464,3609,7774,9774,2888,179],(function(){return t=44632,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.