1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6483],{2531:(e,t,n)=>{"use strict";n.d(t,{CD:()=>C,Fj:()=>S,H6:()=>o,KL:()=>P,OT:()=>A,PI:()=>g,PW:()=>m,Pm:()=>j,WH:()=>f,Ws:()=>D,XI:()=>O,YV:()=>b,Z_:()=>v,a9:()=>R,aO:()=>N,ag:()=>a,cJ:()=>d,cZ:()=>_,dB:()=>M,eg:()=>y,fb:()=>I,ft:()=>h,iw:()=>q,lh:()=>E,mV:()=>c,sM:()=>F,tc:()=>k,vK:()=>x,vy:()=>w,xD:()=>u,z2:()=>p});var r=n(48096);n(20730);var i=n(52064),s=n(12862),l=n(92376);function a(e){return(0,i.I)({queryKey:["user-profile"],queryFn:r.n.getUserProfile,refetchOnWindowFocus:!1,initialData:e})}function o(){return(0,s.n)({mutationFn:e=>r.n.updateUserDocument(e)})}function c(){return(0,i.I)({queryKey:["user-consultant"],queryFn:r.n.getUserConsultant,refetchOnWindowFocus:!1,retry:!1})}function u(){return(0,s.n)({mutationFn:e=>r.n.suspendAccount(e)})}function d(){return(0,i.I)({queryKey:["suspend-account"],queryFn:r.n.getSuspendAccountReasons})}function p(){return(0,s.n)({mutationFn:e=>r.n.updateUserProfile(e),onSuccess:async()=>{await l.qQ.invalidateQueries(["user-profile"]),await l.qQ.invalidateQueries(["user-profile-completion"]),await l.qQ.invalidateQueries(["email-validation-status"])}})}function h(){return(0,s.n)({mutationFn:e=>r.n.updateFieldValues(e),onSuccess:async()=>{await l.qQ.invalidateQueries(["user-profile"]),await l.qQ.invalidateQueries(["user-profile-completion"])}})}function f(){return(0,i.I)({queryKey:["field-values"],queryFn:r.n.getFieldValues,refetchOnWindowFocus:!1})}function m(){return(0,i.I)({queryKey:["home-components"],queryFn:r.n.getHomeComponents,refetchOnWindowFocus:!1,refetchOnMount:!1})}function g(){return(0,i.I)({queryKey:["home-components-v2"],queryFn:r.n.getHomeComponentsV2,refetchOnWindowFocus:!1,refetchOnMount:!1})}function x(){return(0,i.I)({queryKey:["transaction-types-grouped-by-product"],queryFn:r.n.getAllTransactionTypeGroupedByProduct,refetchOnWindowFocus:!1,refetchOnMount:!1})}function v(e){return(0,i.I)({queryKey:["sale-offers-count-by-transaction-type",e],queryFn:()=>r.n.getOffersCountByTransactionTypeIds(e),refetchOnWindowFocus:!1,refetchOnMount:!1})}function y(){return(0,i.I)({queryKey:["user-validation-products"],queryFn:r.n.getUserValidationProducts})}function b(){return(0,s.n)({mutationFn:e=>r.n.createUserValidation(e),onSuccess:async()=>{await l.qQ.invalidateQueries(["user-profile"]),await l.qQ.invalidateQueries(["user-profile-completion"])},onError:e=>e})}function w(){return(0,s.n)({mutationFn:r.n.savePartialRegistration})}function j(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return(0,i.I)({queryKey:["interests"],queryFn:r.n.getInterests,refetchOnReconnect:!1,refetchOnWindowFocus:!1,enabled:e})}function N(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return(0,i.I)({queryKey:["groups"],queryFn:r.n.getGroups,refetchOnReconnect:!1,refetchOnWindowFocus:!1,enabled:e})}function C(){return(0,i.I)({queryKey:["enabled-cities"],queryFn:r.n.getEnabledCities,refetchOnReconnect:!1,refetchOnWindowFocus:!1})}function F(e){return(0,i.I)({queryKey:["cities-in-radius",e],queryFn:()=>e&&r.n.getCitiesInRadius(e),refetchOnWindowFocus:!1,enabled:!e||!!e.destinationId})}function E(e){return(0,i.I)({queryKey:["cities",e],queryFn:()=>r.n.getCities(e),refetchOnWindowFocus:!1,enabled:!e||!!e.name})}function I(e){return(0,i.I)({queryKey:["regions-by-state",e],queryFn:()=>e&&r.n.getRegionsByState(e),refetchOnWindowFocus:!1,enabled:e&&e.states.length>0})}function S(e){return(0,i.I)({queryKey:["get-city-by-id",e],queryFn:()=>void 0!==e?r.n.getCityById(e):null,refetchOnReconnect:!1,refetchOnWindowFocus:!1})}function q(){return(0,i.I)({queryKey:["channel-notifications"],queryFn:r.n.getNotifications,refetchOnWindowFocus:!1})}function O(){return(0,s.n)({mutationFn:r.n.updateNotifications,onSuccess:()=>{l.qQ.invalidateQueries(["channel-notifications"])}})}function P(){return(0,s.n)({mutationFn:r.n.deleteCFMToken})}function _(){return(0,i.I)({queryKey:["mgm-page"],queryFn:r.n.getMgmPage})}function A(){return(0,i.I)({queryKey:["user-profile-completion"],queryFn:r.n.getUserProfileCompletion,refetchOnWindowFocus:!1,retry:!1})}function k(e){return(0,i.I)({refetchOnWindowFocus:!1,queryKey:["nps-hash",e],queryFn:()=>e&&r.n.getHashToSaveNpsAnswer(e),enabled:!!e})}function R(){return(0,i.I)({refetchOnWindowFocus:!1,queryKey:["nps-enabled"],queryFn:()=>r.n.getIsNpsEnabledToUser()})}function M(e){return(0,i.I)({queryKey:["address-by-cep",e],queryFn:()=>r.n.getAddressByCep(e),refetchOnWindowFocus:!1,enabled:8===e.length})}function D(e){return(0,i.I)({queryKey:["groups-autocomplete",e],queryFn:()=>r.n.getGroupsAutocomplete(e),refetchOnWindowFocus:!1,keepPreviousData:!0,enabled:e.length>0})}}
1,6238:(e,t,n)=>{"use strict";function r(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}n.d(t,{O:()=>r})},6649:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r,i=n(21462);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let l=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:121,height:120,fill:"none",viewBox:"0 0 121 120"},e),r||(r=i.createElement("path",{fill:"#8CC63F",fillRule:"evenodd",d:"M60.5 115q-45-20.047-45-40V25c0-3.838 1.473-4.73 5.55-7.198 1.234-.748 2.707-1.64 4.45-2.802.809-.54 17.816-10 35-10 14.976 0 27.5 5 35 10a115 115 0 0 0 4.45 2.802c4.077 2.468 5.55 3.36 5.55 7.198.099 1.086.05 24.186.019 38.974-.01 5.042-.019 9.119-.019 11.026q0 20-45 40m35-40c0-1.152.003-3.081.01-6.227l.012-6.357.007-3.409c.007-3.16.012-5.87.016-8.458.019-11.16.014-20.74.003-23.703l-.687-.426c-1.617-1.003-3.724-2.31-4.908-3.1C82.572 18.4 71.801 15 60.5 15c-10.81 0-24.857 5.256-29.453 8.32-1.184.79-3.29 2.097-4.908 3.1l-.639.397V75c0 7.542 11.146 17.844 35.005 29.01C84.36 92.869 95.5 82.571 95.5 75M76.965 41.465 55.5 62.929 44.035 51.464l-7.07 7.072L55.5 77.07l28.536-28.535z",clipRule:"evenodd"})))}},12030:(e,t,n)=>{"use strict";n.d(t,{j:()=>d});var r=n(23798),i=n(36100),s=n(84934),l=n(6238),a=n(89145),o=n(97393),c=n(48307),u=n(532);function d(e){var t,n,d,p;let{autoFocus:h,className:f,name:m,options:g,listLikeButton:x=!1,placeholder:v,onChange:y,trigger:b,defaultValue:w,onKeyDown:j,onFocus:N,onBlur:C,icon:F,disabled:E,control:I}=e,{debounce:S}=(0,i.d)(),{field:q,formState:{errors:O}}=(0,u.as)({name:m,control:I,defaultValue:null!=w?w:""}),P=(0,s._)(O,m),_=[];if("string"==typeof q.value)if(q.value.length<1||""===q.value)_=x?g.filter(e=>e.suggestion).slice(0,10):g.slice(0,10);else{let e=[],t=[],n=(0,l.O)(q.value.toLowerCase());for(let r of g){let i=(0,l.O)(r.label.toLowerCase());if(i.startsWith(n)){e.push(r);continue}i.includes(n)&&t.push(r)}_=[...e,...t].slice(0,10)}return(0,r.jsxs)("div",{className:f,children:[(0,r.jsx)(a.G3,{value:q.value,by:(e,t)=>e&&t&&e.id===t.id,onChange:function(e){C&&C(),q.onChange(e),b&&b()},disabled:E,children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(a.G3.Input,{autoFocus:h,className:(0,o.A)("peer block h-12 w-full rounded-md border border-gray-500 bg-white px-4 placeholder-transparent focus:border-transparent focus:outline-none focus:ring-2 focus:ring-primary-600",{"pt-4":v,"border-status-error focus:ring-status-error":P,"cursor-not-allowed opacity-50":E}),displayValue:e=>(null==e?void 0:e.label)||q.value,id:"".concat(m,"-autocomplete"),onKeyDown:j,onFocus:N,onChange:e=>{S(()=>{null==y||y(e.target.value)}),q.onChange(e)},onBlur:C,placeholder:v,autoComplete:"off",ref:q.ref}),v&&(0,r.jsx)(a.G3.Label,{htmlFor:"".concat(m,"-autocomplete"),className:(0,o.A)("pointer-events-none absolute left-4 top-1 mb-1 text-xs font-bold text-gray-900 duration-300 peer-placeholder-shown:top-3 peer-placeholder-shown:text-base peer-placeholder-shown:font-light peer-placeholder-shown:text-gray-700 peer-focus:top-1 peer-focus:text-xs peer-focus:font-bold peer-focus:text-gray-900",(null==(t=q.value)?void 0:t.label)===""?"top-4":"top-1",{"opacity-50":E}),children:v}),F&&(0,r.jsx)("div",{className:"peer pointer-events-none absolute inset-y-0 right-0 flex items-center pr-4",children:F}),(null==_?void 0:_.length)>0&&(0,r.jsx)(a.G3.Options,{static:x,className:(0,o.A)("z-10 w-full text-sm",x?"space-y-2 bg-transparent pt-2":"absolute max-h-80 overflow-y-auto rounded-md bg-white shadow"),children:_.map(e=>(0,r.jsx)(a.G3.Option,{className:e=>{let{active:t}=e;return(0,o.A)("cursor-pointer rounded-md px-4 py-2 text-sm",t?"bg-gray-300":"bg-white",{shadow:x})},value:e,children:(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("div",{children:e.label}),e.tag&&(0,r.jsx)("div",{className:"rounded-full bg-primary-500 px-2 py-1 text-xs font-semibold text-white",children:e.tag})]})},e.id))})]})}),P&&(0,r.jsxs)("div",{className:"my-2 flex items-center text-xs font-bold text-status-error",children:[(0,r.jsx)(c.A,{className:"mr-2 h-4 w-4 [&_*]:fill-status-error"}),(0,r.jsxs)("span",{children:[null==P||null==(n=P.message)?void 0:n.toString()," "]}),(0,r.jsx)("span",{children:null==(p=P.value)||null==(d=p.enabled_site)?void 0:d.message})]})]})}},20730:(e,t,n)=>{"use strict";n.d(t,{H:()=>s});var r=n(28846),i=n(92849);function s(e){var t;if((0,i.F0)(e)&&(null==(t=e.response)?void 0:t.status)===403){let e=window.location.href,t=e.includes("gd-vip")?r.w.GD_VIP:e.includes("purchase")?r.w.PURCHASE:e.includes("sale")&&!e.includes("inverse")?r.w.SALE:"inverse_journey";window.open("/web-app/commercial-barrier?journey=".concat(t),"_self")}else throw e}},21407:(e,t,n)=>{"use strict";n.d(t,{c:()=>r});let r=(0,n(97257).vt)(e=>({isInWebView:!1,setIsInWebView:t=>e({isInWebView:t})}))},23959:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r={blackList:["00000000000000","11111111111111","22222222222222","33333333333333","44444444444444","55555555555555","66666666666666","77777777777777","88888888888888","99999999999999"],stripRegex:/[^\d]/g,verifierDigit(e){let t=2,n=e.split("").map(e=>parseInt(e,10)).reverse(),r=0;for(let e of n)r+=e*t,t=9===t?2:t+1;let i=r%11;return i<2?0:11-i},format(e){return this.strip(e).replace(/^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})$/,(e,t,n,r,i,s)=>"".concat(t,".").concat(n,".").concat(r,"/").concat(i,"-").concat(s))},strip(e){return(e||"").replace(this.stripRegex,"")},isValid(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(t&&(e=this.strip(e)),!e||14!==e.length||this.blackList.includes(e))return!1;let n=e.substring(0,12);return n+=this.verifierDigit(n).toString(),(n+=this.verifierDigit(n).toString()).substring(n.length-2)===e.substring(e.length-2)}}}
1,23999:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r,i=n(21462);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let l=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:17,height:13,fill:"none",viewBox:"0 0 17 13"},e),r||(r=i.createElement("path",{fill:"#303030",fillRule:"evenodd",d:"M5.707 9.293 15 0l1.414 1.414L5.707 12.121 0 6.414 1.414 5z",clipRule:"evenodd"})))}},24296:(e,t,n)=>{"use strict";n.d(t,{Pm:()=>a,sd:()=>l});var r=n(23798),i=n(21462);let s=(0,i.createContext)({}),l=()=>{let e=(0,i.useContext)(s);if(!e.steps)throw Error("useStepperContext must be used within a StepperProvider");return e},a=e=>{let{steps:t,firstStep:n,children:l}=e,[a,o]=(0,i.useState)(n?function(e,t){for(let n in e)if(e[n]===t)return e[n]}(t,n):Object.values(t)[0]),[c,u]=(0,i.useState)(!0),[d,p]=(0,i.useState)([]),h=(0,i.useCallback)(()=>{d.length>0&&(o(d[d.length-1]),p(e=>e.slice(0,e.length-1)),window.scrollTo({top:0,behavior:"smooth"}))},[d]),f=(0,i.useCallback)(function(){let{shouldScroll:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.keys(t);o(r=>{let i=n.findIndex(e=>t[e]===r),s=n[i-1];return i>=0?(p(e=>[...e,r]),e&&window.scrollTo({top:0,behavior:"smooth"}),t[s]):r})},[t]),m=(0,i.useCallback)(function(){let{shouldScroll:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.keys(t),r=n.length-1;o(i=>{let s=n.findIndex(e=>t[e]===i),l=n[s+1];return s!==r?(p(e=>[...e,i]),e&&window.scrollTo({top:0,behavior:"smooth"}),t[l]):i})},[t]),g=(0,i.useCallback)(function(e){let{shouldScroll:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.keys(t);o(i=>(p(e=>[...e,i]),n&&window.scrollTo({top:0,behavior:"smooth"}),t[r[e]]))},[t]),x=(0,i.useCallback)(e=>{let n=Object.keys(t),r=n.findIndex(n=>t[n]===e);o(e=>(p(t=>[...t,e]),window.scrollTo({top:0,behavior:"smooth"}),t[n[r]]))},[t]),v=(0,i.useCallback)(e=>{let n=Object.values(t),r=n.findIndex(t=>t===e);o(()=>(p(()=>n.slice(0,r)),window.scrollTo({top:0,behavior:"smooth"}),n[r]))},[t]);return(0,r.jsx)(s.Provider,{value:{step:a,steps:t,stepsStack:d,setNextStep:m,setBackStep:f,setAtStepIndex:g,setPreviousStep:h,setStepByKey:x,canAdvance:c,setCanAdvance:u,getCurrentIndex:function(){return Object.values(t).findIndex(e=>e===a)},setStepByKeyAndFillStack:v},children:l})}},28846:(e,t,n)=>{"use strict";n.d(t,{w:()=>r});var r=function(e){return e.SALE="sale",e.PURCHASE="purchase",e.INVERSE="inverse_journey",e.GD_VIP="gd-vip",e}({})},29955:(e,t,n)=>{"use strict";n.d(t,{nE:()=>f,Nh:()=>m,Oq:()=>p,Kg:()=>d,Te:()=>h,IH:()=>c,ab:()=>u});var r=n(92376);let i={async getUserPoints(e){let{campaignId:t}=e,{data:n}=await r.FH.get("api/incentive-plan/score/".concat(t));return n},async userSpendPoints(e){let{data:t}=await r.FH.post("api/incentive-plan/spend-points",e);return t},async getHistory(e){let{page:t}=e,{data:n}=await r.FH.get("api/incentive-plan/history",{params:{page:t}});return n},async getActiveCampaign(){let{data:e}=await r.FH.get("api/incentive-plan/campaign");return e},async getMissions(){let{data:e}=await r.FH.get("api/incentive-plan/missions");return e},async completeMission(e){let{data:t}=await r.FH.post("api/incentive-plan/complete-mission",{missionId:e});return t},async confirmCompanyConsent(){await r.FH.post("api/incentive-plan/confirm-user-company-consent")}};var s=n(78319),l=n(52064),a=n(12862),o=n(52224);function c(e){let{campaignId:t}=e;return(0,l.I)({queryKey:[t,"user-points"],queryFn:()=>i.getUserPoints({campaignId:t}),enabled:!1})}function u(){return(0,a.n)({mutationFn:i.userSpendPoints,onSuccess:(e,t)=>{r.qQ.invalidateQueries(["history"]),r.qQ.invalidateQueries([t.campaign,"user-points"])}})}function d(){let e=0;return(0,o.q)({queryKey:["history",e],queryFn:t=>{let{pageParam:n}=t;return n&&(e=n),i.getHistory({page:e})},getNextPageParam:(e,t)=>0!==e.total&&(t.length<e.total||void 0),refetchOnWindowFocus:!1,staleTime:s.$0})}function p(){return(0,l.I)({queryKey:["campaign-info"],queryFn:i.getActiveCampaign})}function h(){return(0,l.I)({queryKey:["missions"],queryFn:i.getMissions})}function f(){return(0,a.n)({mutationFn:i.completeMission,onSuccess:()=>{r.qQ.invalidateQueries(["missions","history"])}})}function m(){return(0,a.n)({mutationFn:i.confirmCompanyConsent})}},35241:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r,i=n(21462);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let l=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),r||(r=i.createElement("path",{fill:"#303030",fillRule:"evenodd",d:"M6.071 4.003q-.267 0-.511.057a4.3 4.3 0 0 0-.853-1.267C4.138 2.224 3.242 2 2 2v2c.758 0 1.195.11 1.293.207C3.67 4.585 4 5.353 4 6l.01.141.98 6.86c-1.64.085-2.91 1.358-2.989 2.95L2 17c.097 1.644 1.363 2.909 2.943 2.998h.227a3.001 3.001 0 0 0 5.66.002h2.34a3.001 3.001 0 1 0 0-2h-2.34a3.001 3.001 0 0 0-5.66 0H5c-.51-.03-.967-.488-1.002-1.06L4 16c.027-.519.481-.973 1.05-1.001h1.974l.014.001h10.079l.148-.047a2.63 2.63 0 0 0 1.652-1.55l.105-.209.343-.678 1.053-2.092c.845-1.683 1.377-2.752 1.495-3.015.604-1.349-.62-2.387-1.872-2.409zM16.77 13H7.113a.17.17 0 0 1-.123-.14L6.01 6l13.883.995c-.242.495-.684 1.38-1.262 2.531l-.015.029c-.33.657-.683 1.36-1.037 2.06l-.342.677-.13.257-.048.113a.63.63 0 0 1-.29.338M16 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2m-7-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"})))}},36100:(e,t,n)=>{"use strict";n.d(t,{d:()=>i});var r=n(21462);let i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=(0,r.useRef)(t),i=(0,r.useRef)();return{debounce:(0,r.useCallback)(t=>{n.current?(n.current=!1,t()):(i.current&&clearTimeout(i.current),i.current=setTimeout(()=>t(),e))},[e])}}}
1,46233:(e,t,n)=>{"use strict";n.d(t,{M:()=>s});var r=n(23798),i=n(14590);function s(e){let{children:t,className:n}=e;return(0,r.jsx)("div",{className:(0,i.cn)("fixed bottom-0 left-0 z-[1] w-full border-t-2 border-t-gray-400 bg-white px-6 py-4",n),children:(0,r.jsx)("div",{className:"m-auto max-w-3xl",children:t})})}},48307:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r,i=n(21462);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let l=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),r||(r=i.createElement("path",{fill:"#303030",fillRule:"evenodd",d:"M1 12c0 6.075 4.925 11 11 11s11-4.925 11-11S18.075 1 12 1 1 5.925 1 12m20 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0m-7.996 1.998h.999v2h-4v-2h1v-2h-1v-2h3zm-.003-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"})))}},51935:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r,i=n(21462);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let l=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),r||(r=i.createElement("path",{fill:"#303030",fillRule:"evenodd",d:"M13 11h9v2h-9v9h-2v-9H2v-2h9V2h2z",clipRule:"evenodd"})))}},54492:(e,t,n)=>{"use strict";n.d(t,{p:()=>f});var r=n(23798),i=n(48307),s=n(14590),l=n(84934),a=n(92435),o=n(21462),c=n(532),u=n(80789);function d(e){let{children:t,hasLeftIcon:n,hasRightIcon:i,...l}=e;return(0,r.jsx)("label",{className:(0,s.cn)("pointer-events-none absolute left-4 top-1 mb-1 text-left text-xs font-bold text-gray-900 duration-300 peer-placeholder-shown:top-3 peer-placeholder-shown:text-base peer-placeholder-shown:font-light peer-placeholder-shown:text-gray-700 peer-focus:top-1 peer-focus:text-xs peer-focus:font-bold peer-focus:text-gray-900",n&&"left-10",i&&"right-10"),...l,children:t})}let p=(0,a.F)("pointer-events-none absolute",{variants:{position:{left:"left-4",right:"right-4"}},defaultVariants:{position:"left"}}),h=(0,a.F)("absolute flex h-12 items-center justify-center",{variants:{position:{left:"left-4",right:"right-4"}},defaultVariants:{position:"right"}}),f={Field:function(e){let{children:t,className:n}=e;return(0,r.jsx)("div",{className:(0,s.cn)("group relative flex w-full flex-col",n),children:t})},Label:d,Entry:function(e){let{children:t,name:n,field:i,mask:a,pattern:p,placeholder:h,textarea:f,className:m,rounded:g,suffix:x,onBlur:v,control:y,...b}=e,w=i||n,j=!1,N=!1,{field:{ref:C,onChange:F,...E},formState:{errors:I}}=(0,c.as)({name:n,control:y}),S=(0,o.useCallback)(e=>{F({target:{value:e}})},[F]);t&&(Array.isArray(t)?t:[t]).map(e=>{let t=e.props.position;t&&"left"===t&&(j=!0),t&&"right"===t&&(N=!0)});let q=(0,o.useMemo)(()=>(0,u.X1)(e=>{let{inputRef:t,...n}=e;return(0,o.createElement)(f?"textarea":"input",{...n,ref:t})}),[f]);return(0,r.jsxs)("div",{className:(0,s.cn)("relative flex items-center rounded-md border focus-within:border-transparent focus-within:bg-gray-200 focus-within:ring-2",(0,l._)(I,w)?"border-status-error ring-status-error":"border-gray-500 ring-primary-600",b.disabled&&"opacity-50",g&&"rounded-full"),children:[a?(0,r.jsx)(q,{className:(0,s.cn)("peer w-full rounded-md bg-white placeholder-transparent outline-none disabled:cursor-not-allowed",f?"h-24 border-white py-3":"h-12",j?"pl-10":"pl-4",N?"pr-10":"pr-4",{[f?"border-t-[1.5rem] pt-0":"pt-4"]:h},g&&"rounded-full",m),mask:a,inputRef:C,placeholder:h,onAccept:S,...b,...E,value:E.value?String(E.value):"",onChange:()=>{},autoComplete:"off",onBlur:e=>{E.onBlur(),null==v||v(e)}}):f?(0,r.jsx)("textarea",{className:(0,s.cn)("peer h-24 w-full rounded-md border-white bg-white py-3 placeholder-transparent outline-none disabled:cursor-not-allowed",j?"pl-10":"pl-4",N?"pr-10":"pr-4",{"border-t-[1.5rem] pt-0":h},g&&"rounded-full",m),ref:C,placeholder:h,onChange:F,...b,...E,onBlur:e=>
1{E.onBlur(),null==v||v(e)}}):(0,r.jsx)("input",{className:(0,s.cn)("peer h-12 w-full rounded-md bg-white placeholder-transparent outline-none disabled:cursor-not-allowed",j?"pl-10":"pl-4",N?"pr-10":"pr-4",{"pt-4":h},g&&"rounded-full",m),ref:C,placeholder:h,onChange:F,...b,...E,autoComplete:"off",onBlur:e=>{E.onBlur(),null==v||v(e)}}),(0,r.jsx)(d,{hasLeftIcon:j,hasRightIcon:N,children:h}),t,x&&(0,r.jsx)("span",{className:"flex h-12 w-[3rem] flex-row items-center justify-start rounded-md bg-white pr-1 text-gray-600",children:x})]})},Icon:function(e){let{svg:t,position:n,className:i}=e;return(0,r.jsx)(t,{className:(0,s.cn)(p({position:n}),i)})},Button:function(e){let{children:t,position:n,...i}=e;return(0,r.jsx)("button",{type:"button",className:h({position:n}),...i,children:t})},Errors:function(e){var t;let{field:n}=e,{formState:{errors:s}}=(0,c.xW)(),a=(0,l._)(s,n);return(null==a?void 0:a.message)?(0,r.jsxs)("div",{className:"my-2 flex gap-2 text-xs font-bold text-status-error",children:[a&&(0,r.jsx)(i.A,{className:"h-4 w-4 [&_*]:fill-status-error"}),(0,r.jsx)("span",{children:null==a||null==(t=a.message)?void 0:t.toString()})]}):null},Alert:function(e){let{field:t,message:n}=e,{formState:{errors:s,touchedFields:a}}=(0,c.xW)(),o=(0,l._)(s,t),u=(0,l._)(a,t);return o||u?null:(0,r.jsxs)("div",{className:"my-2 flex gap-2 text-xs font-bold text-orange-500",children:[(0,r.jsx)(i.A,{className:"h-4 w-4 [&_*]:fill-orange-500"}),(0,r.jsx)("span",{children:n})]})},PermanentBigAlert:function(e){let{field:t,message:n}=e,{formState:{errors:s}}=(0,c.xW)();return(0,l._)(s,t)?null:(0,r.jsxs)("div",{className:"my-2 flex items-center gap-2 text-base font-bold text-orange-500",children:[(0,r.jsx)("div",{className:"h-6 w-6",children:(0,r.jsx)(i.A,{className:"[&_*]:fill-orange-500"})}),(0,r.jsx)("span",{children:n})]})},CharactersCounter:function(e){let{maxLength:t,fieldName:n}=e,{watch:i}=(0,c.xW)(),s=i(n);return(0,r.jsxs)("small",{className:"absolute right-0 top-full mt-2 text-[0.8rem] text-gray-700",children:[(null==s?void 0:s.length)||0,"/",t]})},Helper:function(e){let{text:t,className:n,icon:i}=e;return(0,r.jsxs)("div",{className:(0,s.cn)("absolute -bottom-6 left-0 right-0 flex items-center gap-1 rounded-b-lg bg-secondary-50 p-1 pt-3 text-secondary-900","group-focus-within:bg-primary-600 group-focus-within:text-white group-focus-within:ring-2 group-focus-within:ring-primary-600 group-focus-within:[&>div]:border-transparent",n),children:[(0,r.jsx)("div",{className:"absolute -top-1 left-0 right-0 h-3 rounded-b-lg border-x border-b border-gray-500 bg-white"}),i&&(0,r.jsx)(i,{className:"h-3.5 w-3.5 shrink-0 [&_*]:fill-secondary-900 group-focus-within:[&_*]:fill-white"}),(0,r.jsx)("span",{className:"text-mobile-body-2 font-semibold",children:t})]})}}},57309:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(23798),i=n(38850);n(83779);var s=n(60266),l=n(95975),a=n.n(l),o=n(14948),c=n(97665);function u(e){let{statusCode:t}=e,n=(0,o.useRouter)(),l=(0,s.useSession)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a(),{children:[(0,r.jsx)("title",{children:"Gr\xe3o Direto | P\xe1gina n\xe3o encontrada"}),(0,r.jsx)("link",{rel:"shortcut icon",type:"image/x-icon",href:"/assets/favicon.ico"}),(0,r.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,r.jsx)("div",{className:"error-page mx-auto flex h-screen w-full items-center justify-center p-6 lg:max-w-3xl",children:(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)(c.A,{className:"[&_*]:fill-primary-600"}),(0,r.jsxs)("div",{className:"call-to-action text-center",children:[(0,r.jsx)("p",{className:"text-4xl font-bold text-primary-600",children:"Oops..."}),(0,r.jsx)("p",{className:"mb-6 mt-2 text-xl font-medium text-gray-950",children:"P\xe1gina n\xe3o encontrada, tente novamente mais tarde."}),(0,r.jsxs)("section",{className:"buttons flex flex-col gap-2 lg:flex-row lg:justify-center",children:[(0,r.jsx)(i.$,{size:"md",onClick:()=>n.back(),outlined:!0,children:"Voltar"}),(0,r.jsx)(i.$,{size:"md",onClick:()=>"unauthenticated"===l.status?n.push("/"):n.push("/web-app"),children:"P\xe1gina inicial"})]})]})]})})]})}u.getInitialProps=e=>{let{res:t,err:n,pathname:r}=e;return window.newrelic.noticeError(n),{statusCode:t?t.statusCode:n?n.statusCode:404}};let d=u},57913:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r,i=n(21462);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let l=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),r||(r=i.createElement("path",{fill:"#303030",d:"M21.125 7.029h-3.21a3.45 3.45 0 0 0 .558-1.885c0-.942-.367-1.832-1.038-2.503a3.52 3.52 0 0 0-2.504-1.038c-.942 0-1.832.366-2.504 1.038-.157.157-.296.34-.427.558a3.2 3.2 0 0 0-.427-.558 3.52 3.52 0 0 0-2.504-1.038c-.942 0-1.832.366-2.504 1.038a3.52 3.52 0 0 0-1.038 2.503c0 .672.192 1.318.559 1.885h-3.21A1.88 1.88 0 0 0 1 8.904v3.315c0 .96.724 1.753 1.657 1.867v6.429c0 .506.192.977.55 1.326.358.35
17.829.55 1.326.55h14.934c.497 0 .968-.193 1.326-.55a1.86 1.86 0 0 0 .55-1.326v-6.43A1.88 1.88 0 0 0 23 12.22V8.904a1.88 1.88 0 0 0-1.875-1.875m-1.876 7.074v6.202h-6.202v-6.202zm-6.141-7.127c.13-1.378.436-2.477.811-2.852.55-.55 1.5-.55 2.041 0a1.447 1.447 0 0 1 .01 2.04c-.376.367-1.484.681-2.853.812zm7.807 2.155v2.878h-7.86V9.131zm-9.953 4.98v6.203H4.76v-6.202zM7.63 5.154c0-.384.148-.75.427-1.02.262-.262.628-.41 1.02-.41.393 0 .76.148 1.021.4.367.376.68 1.484.812 2.853-1.37-.13-2.478-.436-2.853-.811a1.44 1.44 0 0 1-.419-1.02zm3.332 3.978v2.878H3.094V9.131h7.868"})))}},60711:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>Q,default:()=>U});var r,i=n(23798),s=function(e){return e.SELECTED_PRIZES="Pr\xeamio(s) selecionado(s)",e.DELIVERY_ADDRESS="Endere\xe7o de entrega",e}({}),l=n(5303),a=n(78244),o=n(2531),c=n(29955),u=n(46233),d=n(92121),p=n(90592),h=n(21462);function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let m=function(e){return h.createElement("svg",f({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),r||(r=h.createElement("path",{fill:"#303030",fillRule:"evenodd",d:"M22 11v2H2v-2z",clipRule:"evenodd"})))};var g=n(51935),x=n(532);function v(e){let{value:t,name:n}=e,{field:{ref:r,onChange:s,...l}}=(0,x.as)({name:n});return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"flex w-28 items-center justify-around rounded-lg border-2 border-gray-800 px-2 py-2",children:[(0,i.jsx)("button",{onClick:()=>{0!==l.value&&s(l.value-1)},type:"button",children:(0,i.jsx)(m,{className:"h-4 w-4"})}),(0,i.jsx)("input",{disabled:!0,type:"text",ref:r,...l,onChange:s,className:"w-6 bg-white text-center"}),(0,i.jsx)("button",{onClick:()=>{s(l.value+1)},type:"button",children:(0,i.jsx)(g.A,{className:"h-4 w-4"})})]})})}var y=n(83440),b=n(12030),w=n(54492),j=n(29032),N=n(78319),C=n(24296),F=n(79291),E=n(78722),I=n(76159),S=n(57309),q=n(35241),O=n(97719),P=n(57913),_=n(6649),A=n(35841),k=n(21407),R=n(23959),M=n(77109),D=n(89509),V=n(57162),z=n(60266),B=n(14948),H=n(64004),T=n(42488);function L(){let[e,t]=(0,h.useState)(!1),[n,r]=(0,h.useState)(0),f=(0,B.useRouter)(),m=(0,z.useSession)(),{userHasNavigated:g}=(0,A.l)(),{setEventOccurrence:L}=(0,E.X)(),{step:W,setNextStep:K,setBackStep:Q,setPreviousStep:U}=(0,C.sd)(),G=T.Ik({prizes:T.YO(T.Ik({id:T.ai(),name:T.Yj(),imgUrl:T.Yj(),quantity:T.ai(),points:T.ai()})),document:T.Yj({required_error:"CPF/CNPJ inv\xe1lido. Tente novamente."}).regex(/([0-9]{2}[\.]?[0-9]{3}[\.]?[0-9]{3}[\/]?[0-9]{4}[-]?[0-9]{2})|([0-9]{3}[\.]?[0-9]{3}[\.]?[0-9]{3}[-]?[0-9]{2})/,"CPF/CNPJ inv\xe1lido. Tente novamente.").min(14,"CPF/CNPJ inv\xe1lido. Tente novamente.").max(18,"CPF/CNPJ inv\xe1lido. Tente novamente.").refine(e=>14===e.length?M.A.isValid(e):18===e.length&&R.A.isValid(e),{message:"CPF/CNPJ inv\xe1lido. Tente novamente."}),description:T.Yj().optional(),cep:T.Yj({required_error:"Campo obrigat\xf3rio"}),city:T.Ik({id:T.ai(),label:T.Yj(),value:T.bz()},{required_error:"Campo obrigat\xf3rio",invalid_type_error:"Campo obrigat\xf3rio"}),address:T.Yj({required_error:"Campo obrigat\xf3rio"}),number:T.Yj({required_error:"Campo obrigat\xf3rio"}),neighborhood:T.Yj({required_error:"Campo obrigat\xf3rio"})}),Y=(0,x.mN)({resolver:(0,D.u)(G)}),{setValue:J,handleSubmit:$,control:Z}=Y,{fields:X}=(0,x.jz)({control:Z,name:"prizes"}),ee=(0,x.FH)({control:Z,name:"prizes"}),{data:et,refetch:en,isRefetching:er,error:ei}=(0,c.IH)({campaignId:n}),{mutateAsync:es,isLoading:el}=(0,c.ab)(),{data:ea,isLoading:eo,error:ec}=(0,o.CD)();(0,h.useEffect)(()=>{et&&L(I.F.IncentivePlanCart,{points:et})},[L,et]),(0,h.useEffect)(()=>{let e=localStorage.getItem(F.p.USER_HAS_SEEN_INCENTIVE_PLAN_ONBOARDING);e||localStorage.setItem(F.p.USER_HAS_SEEN_INCENTIVE_PLAN_ONBOARDING,JSON.stringify(!0)),e&&!1!==JSON.parse(e)||f.push("/web-app/plano-de-incentivo/como-funciona")},[f]),(0,h.useEffect)(()=>{if((0,V.hasCookie)(N.c7)){let e=JSON.parse((0,V.getCookie)(N.c7));e&&(r(e.campaign),J("prizes",e.prizes),0===e.prizes.length&&L(I.F.IncentivePlanCartEmpty))}},[J]),(0,h.useEffect)(()=>
1{if(ee){let e=ee.find(e=>0===e.quantity);if(e&&J("prizes",ee.filter(t=>t.id!==e.id)),(0,V.hasCookie)(N.c7)){let e=JSON.parse((0,V.getCookie)(N.c7));(0,V.setCookie)(N.c7,JSON.stringify({...e,prizes:[...ee]}))}}},[ee,J]),(0,h.useEffect)(()=>{0!==n&&en()},[n,en]),(0,h.useEffect)(()=>{W===s.SELECTED_PRIZES&&L(I.F.IncentivePlanAddress)},[W]),(0,h.useEffect)(()=>{e&&L(I.F.IncentivePlanSuccess)},[e]);let eu=()=>null==ee?void 0:ee.reduce((e,t)=>e+t.points*t.quantity,0),ed=(et||0)-eu()<0,ep=async e=>{var t,r;let{prizes:i}=e,s=i.map(e=>({gift:e.id,value:e.points,amount:e.quantity})),l={campaign:n,phoneUser:null==(t=m.data)?void 0:t.user.phoneNumber,userComplement:{phoneUser:null==(r=m.data)?void 0:r.user.phoneNumber,document:e.document.replace(/\D/g,""),cep:e.cep.replace(/\D/g,""),address:e.address,number:e.number,neighborhood:e.neighborhood,description:e.description,cityId:e.city.id},redeemedGift:s,action:"REDEEM"};L(I.F.IncentivePlanAddressContinue),es(l).then(e=>{eh()}).catch(e=>{Q(),"User does not have enough points"===e.response.data.message?H.Ay.error("Erro ao solicitar o brinde. Voc\xea n\xe3o possui pontos suficientes."):H.Ay.error("Erro ao solicitar o brinde. Entre em contato conosco.")})},eh=()=>{t(e=>!e)},ef=()=>(eh(),L(I.F.IncentivePlanSuccessClick),(0,V.deleteCookie)(N.c7),f.push("/web-app/plano-de-incentivo?activeTab=2")),em=(0,k.c)(e=>e.isInWebView);return ec||ei?(0,i.jsx)(S.default,{}):eo||er?(0,i.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,i.jsx)(j.A,{size:"2rem",color:"primary-600"})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.r,{showHelpChatButton:!em,showHelpButton:!1,backAction:()=>(e=>{if(e===s.SELECTED_PRIZES)return L(I.F.IncentivePlanAddressBB,{formValues:Y.getValues()}),g&&f.back(),f.push("/web-app/plano-de-incentivo");U()})(W)}),(0,i.jsxs)("section",{className:"m-auto max-w-3xl p-6",children:[(0,i.jsxs)("header",{className:"mb-3 flex flex-col gap-2",children:[(0,i.jsx)("h2",{className:"text-web-subheading-2 font-semibold text-gray-950",children:"Resgate de brinde"}),(null==ee?void 0:ee.length)>0&&(0,i.jsx)("h2",{className:"text-web-body-1 font-normal text-gray-950",children:W})]}),(0,i.jsx)(x.Op,{...Y,children:(0,i.jsxs)("form",{onSubmit:$(ep),className:"flex flex-col gap-2",children:[(0,i.jsxs)(y.C.Step,{step:s.SELECTED_PRIZES,children:[(0,i.jsx)("section",{className:"flex max-h-[calc(100vh-31.75rem)] flex-col gap-2 overflow-y-auto px-2 py-2 md:max-h-[calc(100vh-27rem)]",children:X.map((e,t)=>(0,i.jsxs)("div",{className:"flex h-32 flex-col rounded-lg bg-white p-2 shadow-gd-light",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("img",{alt:e.name,src:e.imgUrl,className:"h-16 w-16"}),(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"text-mobile-body-1 font-semibold text-primary-600",children:e.name}),(0,i.jsxs)("p",{className:"text-mobile-caption font-normal text-gray-950",children:[e.points.toLocaleString("pt-BR")," pontos"]})]})]}),(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("p",{className:"text-web-caption font-normal",children:[(ee[t].quantity*e.points).toLocaleString("pt-BR")," ","pontos"]}),(0,i.jsx)(v,{name:"prizes.".concat(t,".quantity")})]})]},e.id))}),0===X.length&&(0,i.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2",children:[(0,i.jsx)(q.A,{className:"h-28 w-28 [&_*]:fill-primary-600"}),(0,i.jsx)("h3",{className:"text-left font-semibold",children:"Carrinho vazio"}),(0,i.jsx)("p",{className:"text-center",children:"Selecione produtos para serem resgatados"})]}),ee&&ee.length>0?(0,i.jsx)(d.$,{size:"sm",type:"button",className:"mb-2 mt-2",intent:"secondary",href:"/web-app/plano-de-incentivo",onClick:()=>L(I.F.IncentivePlanCartSeeMore),children:"Adicionar mais"}):(0,i.jsx)(u.M,{children:(0,i.jsx)(d.$,{size:"sm",type:"button",intent:"primary",href:"/web-app/plano-de-incentivo",onClick:()=>L(I.F.IncentivePlanCartSeeMore),children:"Adicionar mais"})}),(null==ee?void 0:ee.length)>0&&(0,i.jsxs)(u.M,{className:"p-0",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-2 px-6 py-4",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("p",{className:"text-web-body-1 font-normal text-gray-950",children:"Total de pontos"}),(0,i.jsxs)("p",{className:"font-semibold",children:[eu().toLocaleStr
1ing("pt-BR")," ","pts"]})]}),(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("p",{className:"text-web-body-1 font-normal text-gray-950",children:"Resgate de pontos"}),(0,i.jsxs)("p",{className:"font-semibold text-primary-600",children:["-",eu().toLocaleString("pt-BR")," ","pts"]})]}),(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("p",{className:"text-web-body-1 text-gray-950",children:"Restante"}),et&&(0,i.jsxs)("p",{className:"font-semibold",children:[(et-eu()).toLocaleString("pt-BR")," ","pts"]})]})]}),(0,i.jsx)(p.c,{}),(0,i.jsxs)("div",{className:"flex flex-col gap-2 px-6 py-4",children:[(0,i.jsx)(d.$,{fill:!0,size:"sm",type:"button",intent:"primary",onClick:()=>{K(),L(I.F.IncentivePlanCartContinue,{prizes:ee.map(e=>[{id:e.id,name:e.name,quantity:e.quantity}]),totalSpentPoints:eu()})},disabled:ed,children:"Informar endere\xe7o de entrega"}),(0,i.jsx)(d.$,{fill:!0,size:"sm",type:"button",intent:"secondary",onClick:()=>{(()=>{if(g){(0,V.deleteCookie)(N.c7),f.back();return}(0,V.deleteCookie)(N.c7),f.push("/web-app/plano-de-incentivo")})(),L(I.F.IncentivePlanCartCancel,{prizes:ee.map(e=>[{id:e.id,name:e.name,quantity:e.quantity}]),totalSpentPoints:eu()})},children:"Cancelar"})]})]})]}),(0,i.jsxs)(y.C.Step,{step:s.DELIVERY_ADDRESS,children:[(0,i.jsxs)("section",{className:"flex max-h-[calc(100vh-16.25rem)] flex-col gap-2 overflow-y-auto px-2 pb-7 pt-1",children:[(0,i.jsxs)(w.p.Field,{children:[(0,i.jsx)(w.p.Entry,{disabled:el,name:"document",placeholder:"CPF/CNPJ",mask:[{mask:"000.000.000-00"},{mask:"00.000.000/0000-00"}],inputMode:"numeric"}),(0,i.jsx)(w.p.Errors,{field:"document"})]}),(0,i.jsxs)(w.p.Field,{children:[(0,i.jsx)(w.p.Entry,{disabled:el,name:"cep",placeholder:"CEP",inputMode:"numeric",mask:[{mask:"00.000-000"}]}),(0,i.jsx)(w.p.Errors,{field:"cep"})]}),(0,i.jsx)(b.j,{name:"city",placeholder:"Escolha a cidade",options:(null!=ea?ea:[]).map(e=>({id:e.id,label:"".concat(e.name," - ").concat(e.state),value:e}))}),(0,i.jsxs)(w.p.Field,{children:[(0,i.jsx)(w.p.Entry,{disabled:el,name:"address",inputMode:"text",placeholder:"Endere\xe7o"}),(0,i.jsx)(w.p.Errors,{field:"address"})]}),(0,i.jsxs)(w.p.Field,{children:[(0,i.jsx)(w.p.Entry,{disabled:el,name:"number",placeholder:"N\xfamero",inputMode:"text"}),(0,i.jsx)(w.p.Errors,{field:"number"})]}),(0,i.jsxs)(w.p.Field,{children:[(0,i.jsx)(w.p.Entry,{disabled:el,name:"neighborhood",placeholder:"Bairro",inputMode:"text"}),(0,i.jsx)(w.p.Errors,{field:"neighborhood"})]}),(0,i.jsxs)(w.p.Field,{children:[(0,i.jsx)(w.p.Entry,{disabled:el,name:"description",placeholder:"Complemento",inputMode:"text"}),(0,i.jsx)(w.p.Errors,{field:"description"})]}),(0,i.jsxs)("div",{className:"flex w-full items-center justify-center gap-2",children:[(0,i.jsx)("figure",{className:"h-5 w-5",children:(0,i.jsx)(_.A,{className:"h-5 w-5 [&_*]:fill-gray-950"})}),(0,i.jsx)("p",{className:"text-web-body-2 font-normal",children:"Os seus dados s\xe3o protegidos e n\xe3o ser\xe3o compartilhados."})]})]}),(0,i.jsx)(u.M,{children:(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsx)(d.$,{fill:!0,size:"sm",type:"submit",disabled:el,children:"Solicitar brinde"}),(0,i.jsx)(d.$,{fill:!0,size:"sm",type:"button",intent:"secondary",onClick:()=>{Q(),L(I.F.IncentivePlanAddressCancel,{formValues:Y.getValues()})},disabled:el,children:"Voltar a lista de brindes"})]})}),(0,i.jsx)(a.a,{type:"vertical",open:e,closeModal:ef,children:(0,i.jsxs)("div",{className:"p-5",children:[(0,i.jsx)("header",{className:"flex items-center justify-end",children:(0,i.jsx)("button",{title:"Fechar",onClick:ef,children:(0,i.jsx)(O.A,{})})}),(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)("figure",{className:"flex items-center justify-center",children:(0,i.jsx)(P.A,{className:"h-32 w-32 text-center [&_*]:fill-primary-600"})}),(0,i.jsx)("strong",{className:"text-web-subheading-2",children:"Brinde solicitado com sucesso!"}),(0,i.jsx)("p",{className:"text-mobile-subheading-2",children:"Em breve, voc\xea ser\xe1 notificado sobre o envio do(s) produto(s)."})]}),(0,i.jsx)("footer",{className:"mt-4 border-t-2 border-t-gray-200 pt-5",children:(0,i.jsx)(d.$,{fill:!0,size:"sm",type:"button",onClick:ef,children:"Hist\xf3rico"})})]})})]})]})})]})]})}var W=n(95975),K=n.n(W),Q=!0;function U(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(K(),{children:[(0,i.jsx)("title",{children:"Gr\xe3o Direto"}),(0,i.jsx)("link",{rel:"icon",href:"/assets/favicon.ico"})]}),(0,i.jsx)("main",{className:"bg-gray-50",children:(0,i.jsx)(C.Pm,{steps:s,children:(0,i.jsx)(L,{})})})]})}}
1,77109:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r={blackList:["00000000000","11111111111","22222222222","33333333333","44444444444","55555555555","66666666666","77777777777","88888888888","99999999999","12345678909"],stripRegex:/[^\d]/g,_verifierDigit(e){let t=e.split("").map(e=>parseInt(e,10)),n=t.length+1,r=t.map((e,t)=>e*(n-t)).reduce((e,t)=>e+t)%11;return r<2?0:11-r},format(e){return this.strip(e).replace(/^(\d{3})(\d{3})(\d{3})(\d{2})$/,(e,t,n,r,i)=>"".concat(t,".").concat(n,".").concat(r,"-").concat(i))},strip(e){return(e||"").replace(this.stripRegex,"")},isValid(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(t&&(e=this.strip(e)),!e||11!==e.length||this.blackList.includes(e))return!1;let n=e.substring(0,9);return n+=this._verifierDigit(n).toString(),(n+=this._verifierDigit(n).toString()).substring(n.length-2)===e.substring(e.length-2)},generate(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t="";for(let e=0;e<9;e+=1)t+=Math.floor(9*Math.random()).toString();return t+=this._verifierDigit(t).toString(),t+=this._verifierDigit(t).toString(),e?this.format(t):t}}},83440:(e,t,n)=>{"use strict";n.d(t,{C:()=>o});var r=n(23798),i=n(24296),s=n(14590),l=n(23999),a=n(21462);let o={Timeline:function(e){let{className:t}=e,{steps:n,step:o,canAdvance:c,setAtStepIndex:u}=(0,i.sd)(),d=Object.keys(n),p=d.findIndex(e=>n[e]===o);return(0,r.jsx)("div",{className:(0,s.cn)("stepper-timeline flex items-center gap-1 max-md:flex-col max-md:items-start md:gap-2",t),children:d.map((e,t)=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("button",{disabled:t>p,type:"button",className:"flex items-center gap-2 text-left",onClick:()=>{c&&u(t)},children:[(0,r.jsx)("div",{className:(0,s.cn)("flex h-[1.5625rem] w-[1.5625rem] flex-row items-center justify-center rounded-full p-2 text-sm font-semibold text-white [&_*]:fill-white",t<p||n[e]===o?"bg-primary-600 ":"bg-gray-600"),children:t<p?(0,r.jsx)(l.A,{}):String(t+1).padStart(2,"0")}),(0,r.jsx)("p",{className:(0,s.cn)("cursor-pointer text-gray-700",{"text-primary-600":n[e]===o,"font-semibold":t===p,"text-gray-900":t<p}),children:n[e]})]}),(0,r.jsx)("div",{className:(0,s.cn)("h-[0.125rem] w-6 bg-primary-600 max-md:mt-2 max-md:rotate-90",t<p?"bg-primary-600 ":"bg-gray-600",{hidden:t===d.length-1})}),(0,r.jsx)("div",{})]},t))})},Step:function(e){let{children:t,step:n}=e,{step:s}=(0,i.sd)();return s!==n?null:(0,r.jsx)(r.Fragment,{children:t})}}},84934:(e,t,n)=>{"use strict";function r(e,t){let n=t.split("."),r=e;for(let e of n)r=null==r?void 0:r[e];return r}n.d(t,{_:()=>r})},90592:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});var r=n(23798),i=n(97393);function s(e){let{vertical:t,className:n}=e;return(0,r.jsx)("div",{className:(0,i.A)("m-0 border-gray-400",t?"border-r-[0.0625rem]":"border-b-[0.0625rem]",n)})}},97665:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r,i,s=n(21462);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let a=function(e){return s.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",width:121,height:121,fill:"none",viewBox:"0 0 121 121"},e),r||(r=s.createElement("path",{fill:"#2D2D2D",fillRule:"evenodd",d:"M105.618 48.715A16.67 16.67 0 0 1 110.5 60.5a16.77 16.77 0 0 1-3.333 10l-6.142 8.192a18.85 18.85 0 0 1 3.687 20.302A18.84 18.84 0 0 1 87.583 110.5c-29.225-1.779-21.6-44.696 6.438-36.362L100.5 65.5a8.385 8.385 0 0 0-6.667-13.333H23a4.167 4.167 0 0 0-4.167 4.166 4.167 4.167 0 1 1-8.333 0 12.5 12.5 0 0 1 12.5-12.5V23a12.5 12.5 0 0 1 12.5-12.5h7.43a20.71 20.71 0 0 1 17.666 9.792l14.712 23.541H85.5V35.5a4.167 4.167 0 1 1 8.333 0v8.333c4.42 0 8.66 1.756 11.785 4.882M32.554 20.054A4.17 4.17 0 0 0 31.334 23v20.833H65.5L53.53 24.708a12.43 12.43 0 0 0-10.6-5.875H35.5a4.17 4.17 0 0 0-2.946 1.22m47.664 79.062a10.42 10.42 0 0 0 14.731 0 10.417 10.417 0 1 0-14.731 0",clipRule:"evenodd"})),i||(i=s.createElement("path",{fill:"#2D2D2D",fillRule:"evenodd",d:"M55.917 88.833h.416a4.167 4.167 0 1 1 0 8.334h-.416a20.6 20.6 0 0 1-3.042 7.321C58 105.5 58 108 58 108c0 2.5 0 2.5-7.5 2.5h-30c-7.5 0-7.5 0-7.5-2.5 0 0 0-2.5 5.12-3.517a2
10.6 20.6 0 0 1-3.037-7.316h-.416a4.167 4.167 0 1 1 0-8.334h.416a20.6 20.6 0 0 1 3.042-7.32l-.304-.305a4.166 4.166 0 0 1 5.891-5.891l.305.304a20.6 20.6 0 0 1 7.316-3.038v-.416a4.167 4.167 0 1 1 8.334 0v.416c2.614.532 5.1 1.564 7.32 3.042l.305-.304a4.166 4.166 0 0 1 5.891 5.892l-.304.304a20.6 20.6 0 0 1 3.038 7.316M26.66 101.84a12.5 12.5 0 1 0 17.678-17.68 12.5 12.5 0 0 0-17.678 17.68",clipRule:"evenodd"})))}},99191:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/web-app/incentive-plan/cart",function(){return n(60711)}])}},e=>{e.O(0,[4343,2064,532,4690,1100,9323,9145,4106,5303,636,6593,8792],()=>e(e.s=99191)),_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.