PageSourceSearch

https://reserva.valeti.com/_next/static/chunks/pages/adicione-seu-veiculo-63842637c738556d.js

js valeti.com collected 2026-10-01 23:53:06 UTC 3,900 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4571],{96355:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/adicione-seu-veiculo",function(){return a(89491)}])},18630:function(e,t){"use strict";t.Z={src:"/_next/static/media/logo.223e81c6.png",height:607,width:1772,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAYAAACuyE5IAAAATUlEQVR42mP4583AAMQ2QCwJxIlALPvPC8zOBeJEBiCnBMiYCqSXAukFQDwDiNcB+dOAuBmogGEFEM8G4h1AiXlAvAWIG4D86n/eDPMBzmYqHrUuN/kAAAAASUVORK5CYII=",blurWidth:8,blurHeight:3}},54379:function(e,t,a){"use strict";a.d(t,{h:function(){return d}});var l=a(85893),n=a(18680);function r(e){let{message:t}=e;return t?(0,l.jsx)("span",{className:"text-sm text-red-500 -mt-2",children:t}):null}function d(e){let{plate:t,onPlateChange:a,register:d,errors:i,disabled:o,onFieldEdit:s}=e,c=d("brand"),u=d("model");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("input",{className:"border w-full rounded-lg p-4 ".concat(i.plate?"border-red-400":"border-zinc-200"),type:"text",inputMode:"text",autoCapitalize:"characters",autoComplete:"off",placeholder:"Placa (ABC-1D23)",maxLength:8,value:t,disabled:o,onChange:e=>{a((0,n.Ck)(e.target.value)),null==s||s("plate")}}),(0,l.jsx)(r,{message:i.plate}),(0,l.jsx)("input",{...c,className:"border w-full rounded-lg p-4 ".concat(i.brand?"border-red-400":"border-zinc-200"),type:"text",placeholder:"Marca",disabled:o,onChange:e=>{c.onChange(e),null==s||s("brand")}}),(0,l.jsx)(r,{message:i.brand}),(0,l.jsx)("input",{...u,className:"border w-full rounded-lg p-4 ".concat(i.model?"border-red-400":"border-zinc-200"),type:"text",placeholder:"Modelo",disabled:o,onChange:e=>{u.onChange(e),null==s||s("model")}}),(0,l.jsx)(r,{message:i.model})]})}},89491:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return f}});var l=a(85893),n=a(67294),r=a(87536),d=a(733),i=a.n(d),o=a(9008),s=a.n(o),c=a(25675),u=a.n(c),m=a(11163),p=a(18630),h=a(54379),x=a(42105),b=a(36465),g=a(18680);function f(){let{register:e,getValues:t,setValue:a}=(0,r.cI)(),[d,o]=(0,n.useState)(""),[c,f]=(0,n.useState)({}),[A,w]=(0,n.useState)(!1),C=(0,m.useRouter)(),{addToast:j}=(0,b.p)(),{addVehicle:N,updateVehicle:v}=(0,x.P)(),y=C.query.id;async function _(e){e.preventDefault();let a={plate:d,brand:String(t("brand")||""),model:String(t("model")||"")},l=(0,g.ub)(a);if(f(l),l.plate||l.brand||l.model){j({type:"error",title:"Revise os dados do ve\xedculo",description:l.plate||l.brand||l.model});return}w(!0);let n=t();try{y?await v({...n,id:Number(y),plate:a.plate,brand:a.brand.trim(),model:a.model.trim()}):await N({...n,plate:a.plate,brand:a.brand.trim(),model:a.model.trim()})}catch(e){}finally{w(!1)}}return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s(),{children:(0,l.jsx)("title",{children:"Adicione seu ve\xedculo - Valeti"})}),(0,l.jsx)("main",{className:"flex bg-zinc-100 w-full h-[100vh]",children:(0,l.jsxs)("section",{className:"flex flex-col items-center w-full max-w-2xl m-auto bg-white rounded-lg shadow-lg py-8 px-4 gap-8",children:[(0,l.jsx)(u(),{className:"w-32 h-auto",src:p.Z,alt:"Valeti"}),(0,l.jsx)("p",{className:"text-center text-zinc-600",children:"Cadastre o seu ve\xedculo para continuar"}),(0,l.jsxs)("form",{onSubmit:_,className:"flex w-full flex-col px-4 gap-4",children:[(0,l.jsx)(h.h,{plate:d,onPlateChange:e=>{o(e),a("plate",e),f(e=>({...e,plate:void 0}))},register:e,errors:c,disabled:A,onFieldEdit:e=>f(t=>({...t,[e]:void 0}))}),(0,l.jsx)("button",{className:"flex items-center justify-center bg-orange-500 text-white font-semibold rounded-lg p-4 hover:bg-orange-600 disabled:opacity-50 disabled:cursor-not-allowed",type:"submit",disabled:A,children:A?(0,l.jsx)(i(),{className:"right-24",type:"spin",color:"white",height:24,width:24}):"Cadastrar"})]})]})})]})}},9008:function(e,t,a){e.exports=a(83121)}},function(e){e.O(0,[5675,733,7536,9774,2888,179],function(){return e(e.s=96355)}),_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.