PageSourceSearch

https://dashboard.prometeoapi.com/assets/register.page-DTMkDedm.js

js prometeoapi.com collected 2026-10-03 23:30:55 UTC 12,197 bytes, 7 lines download raw bytes

1import{aJ as k,c as p,n as M,aE as B,cI as V,cJ as A,a6 as H,a7 as D,a8 as h,aB as W,a9 as G,j as r,E as o,ad as m,aG as g,ae as w,bJ as J,af as E,ag as K,S as b,_ as z,aI as Q,aa as Y,cK as Z}from"./index-CYmSZNjT.js";import{s as t}from"./register.module-DFebYGj5.js";const X=()=>{const{publicClient:e}=k();return{validateEmail:c=>e.get(`api/dashboard/register/${c}/validate`)}},ee=()=>{const{privateClient:e}=k();return{createAccount:c=>e.post("api/dashboard/register/",c)}},re=e=>({first_name:e.first_name,last_name:e.last_name,companyName:e.companyName,solutions:e.solutions,email:e.email,password:e.password,terms_conditions:e.terms_conditions,recaptcha_token:e.recaptcha_token}),se=e=>({first_name:e.first_name,last_name:e.last_name,companyName:e.companyName,solutions:e.solutions,email:e.email,password:e.password,terms_conditions:e.terms_conditions}),te=()=>{const e=ee();return{createAccount:async u=>{const l=re(u),y=await e.createAccount(l);return se(y.data)}}},ae=({useRegisterAccountUseCases:e})=>()=>e(),ie=ae({useRegisterAccountUseCases:te});function ne({url:e}){const[c,u]=p.useState(!1),l=p.useRef(!0);return p.useEffect(()=>{function y(){const x=e,n=document.createElement("script"),f=()=>{u(!1),n.removeEventListener("error",f),n.removeEventListener("load",j)},j=()=>{u(!0),n.removeEventListener("error",f),n.removeEventListener("load",j)};n.src=x,n.async=!0,n.defer=!0,n.setAttribute("data-testid","hs-script-loader"),n.setAttribute("id","hs-script-loader"),document.body.appendChild(n),n.addEventListener("load",j),n.addEventListener("error",f)}return l.current&&y(),()=>{l.current=!1}},[e]),c}const oe={control:e=>({...e,minHeight:"60px",height:"60px",maxWidth:"100%",flexDirection:"row !important"}),valueContainer:e=>({...e,display:"flex",flexDirection:"row !important",flexWrap:"nowrap",overflowX:"hidden"}),multiValue:e=>({...e,whiteSpace:"nowrap",overflow:"hidden",display:"table !important",textOverflow:"ellipsis",marginRight:"4px"}),indicatorsContainer:e=>({...e,display:"flex !important",flexDirection:"row !important",justifyContent:"end",height:"60px"}),dropdownIndicator:e=>({...e,padding:"2px"}),clearIndicator:e=>({...e,padding:"2px"}),container:e=>({...e,maxWidth:"100%"})},de=()=>{var C;const{t:e}=M(["register","shared","auth"]),{executeRecaptcha:c}=B();ne({url:Z});const[u,l]=p.useState(""),[y,x]=p.useState(null),[n,f]=p.useState(!1),{createAccount:j}=ie(),{validateEmail:R}=X(),[v,T]=p.useState(!1);p.useEffect(()=>{const s=document.createElement("script");s.type="text/javascript",s.innerHTML=`(function(c,l,a,r,i,t,y){
2      c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
3      t=l.createElement(r);t.async=1;
4      t.src="${V}${A}";
5      y=l.getElementsByTagName(r)[0];
6      y.parentNode.insertBefore(t,y);
7    })(window, document, "clarity", "script", "${A}");`,document.head.appendChild(s)},[]);const F=["gmail.com","hotmail.com","yahoo.com","outlook.com"],I=[{value:"CEP",label:e("register:registerPage.solutionOptions.CEP")},{value:"Agentic Banking Infrastructure",label:e("register:registerPage.solutionOptions.ABI")},{value:"Cross Border",label:e("register:registerPage.solutionOptions.borderlessBanking")},{value:"CURP",label:e("register:registerPage.solutionOptions.CURP")},{value:"BAM - Tesorería",label:e("register:registerPage.solutionOptions.treasuryManagement")},{value:"Validación de Cuentas",label:e("register:registerPage.solutionOptions.bankAccountValidation")},{value:"Pagos Cuenta a Cuenta",label:e("register:registerPage.solutionOptions.bankTransferPayments")},{value:"Otras",label:e("register:registerPage.solutionOptions.other")}],O=H({firstName:h().required(e("shared:form.errors.requiredField",{name:e("register:registerPage.nameInput")})),lastName:h().required(e("shared:form.errors.requiredField",{name:e("register:registerPage.lastNameInput")})),company:h().required(e("shared:form.errors.requiredField",{name:e("register:registerPage.companyName")})),email:h().email(e("shared:form.errors.emailField",{name:e("register:registerPage.emailInput")})).required(e("shared:form.errors.requiredField",{name:e("register:registerPage.emailInput")})).test("is-corporate-email",e("shared:form.errors.invalidCorporateEmail"),s=>
7{if(!s)return!1;const a=s.split("@")[1];return a&&!F.includes(a.toLowerCase())}),password:h().required(e("shared:form.errors.requiredField",{name:e("register:registerPage.password")})).min(8,e("auth:error.length",{name:e("register:registerPage.password")})).matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*])/,e("auth:error.regex",{name:e("register:registerPage.password")})),confirmPassword:h().required(e("shared:form.errors.requiredField",{name:e("register:registerPage.confirmPassword")})).min(8,e("resetpage:resetPasswordConfirm.error.length",{name:e("register:registerPage.confirmPassword")})).matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*])/,e("auth:error.regex",{name:e("register:registerPage.confirmPassword")})).oneOf([W("password")],e("resetpage:resetPasswordConfirm.error.match",{name:e("register:registerPage.confirmPassword")})),terms_and_conditions:D().oneOf([!0],e("shared:form.errors.requiredField",{name:e("register:registerPage.termAndCondtition")}))}),{control:d,handleSubmit:L,formState:{errors:i},reset:q}=G({defaultValues:{firstName:"",lastName:"",company:"",solutions:[],email:"",password:"",confirmPassword:"",terms_and_conditions:!1},resolver:Y(O)}),U=async s=>{var _,S;x(null);try{await R(s.email)}catch(P){if(((_=P.response)==null?void 0:_.status)===400){x(e("shared:form.errors.invalidCorporateEmail"));return}l(e("shared:form.errors.errorValidateEmail"));return}const N={recaptcha_token:await c("register"),first_name:s.firstName,last_name:s.lastName,companyName:s.company,solutions:s.solutions,password:s.password,email:s.email,terms_conditions:n};try{await j(N),T(!0),q()}catch(P){return i&&x(((S=P.response.data)==null?void 0:S.email)||null),l(P._messageForUser.description),P}},$=s=>{n?U(s):l(e("register:registerPage.errorTerm"))};return r.jsx("div",{children:r.jsx("div",{className:t["page-container"],children:r.jsxs("main",{className:v===!0?t["main-success"]:t.main,children:[r.jsxs("div",{className:t["body-card"],children:[r.jsxs("div",{className:t["title-card"],children:[r.jsx(o,{variant:"display-3",withFontFamily:!0,children:e(v===!1?"register:registerPage.title":"register:registerPage.titleSuccess")}),!v&&r.jsx(o,{variant:"body-1",withFontFamily:!0,typographyColor:"gray-6",children:e("register:registerPage.description")})]}),v===!1?r.jsxs("div",{className:t["form-section"],children:[r.jsxs("form",{onSubmit:L($),children:[r.jsx("div",{className:t["field-name"],children:r.jsx(m,{name:"firstName",control:d,render:({field:s})=>{var a;return r.jsxs("div",{className:t["input input-group"],children:[r.jsx(g,{htmlFor:"some-input-id",id:"input-label",children:r.jsx(o,{variant:"body-2",typographyColor:"gray-6",children:e("register:registerPage.nameInput")})}),r.jsx(w,{type:"text",...s,error:(a=i==null?void 0:i.firstName)==null?void 0:a.message})]})}})}),r.jsx("div",{id:"lastName",className:t["field-lastname"],children:r.jsx(m,{name:"lastName",control:d,render:({field:s})=>{var a;return r.jsxs("div",{className:t["input input-group"],children:[r.jsx(g,{htmlFor:"some-input-id",id:"input-label",children:r.jsx(o,{variant:"body-2",typographyColor:"gray-6",children:e("register:registerPage.lastNameInput")})}),r.jsx(w,{type:"text",...s,error:(a=i==null?void 0:i.lastName)==null?void 0:a.message})]})}})}),r.jsx("div",{id:"company",className:t["field-companyName"],children:r.jsx(m,{name:"company",control:d,render:({field:s})=>{var a;return r.jsxs("div",{className:t["input input-group"],children:[r.jsx(g,{htmlFor:"some-input-id",id:"input-label",children:r.jsx(o,{variant:"body-2",typographyColor:"gray-6",children:e("register:registerPage.companyName")})}),r.jsx(w,{type:"text",...s,error:(a=i==null?void 0:i.lastName)==null?void 0:a.message})]})}})}),r.jsx("div",{id:"solutions",className:t["field-solutions"],children:r.jsx(m,{name:"solutions",control:d,render:({field:s})=>r.jsxs("div",{className:t["input input-group"],children:[r.jsx(g,{htmlFor:"solutions-select",id:"input-label",children:r.jsx(o,{variant:"body-2",typographyColor:"gray-6",children:e("register:registerPage.solutions")})}),r.jsx("div",{style:{width:"100%",display:"flex",position:"relative",flexWrap:"wrap"},children:r.jsx(J,{inputRef:s.ref,name:s.name,styles:oe,options:I,isSearchable:!1,placeholder:e("register:registerPage.solutionsPlaceholder"),onChange:a=>{s.onChange(a.map(N=>N.value))},isMulti:!0})}),r.jsx("input",{id:"solucion",type:"text",name:"solucion",value:s.value.join(";"),readOnly:!0,style:{display:"block",opacity:0,height:0,border:"none",padding:0,margin:0}})]})})}),r.jsx("div",{children:r.jsx(m,{name:"email",control:d,render:({field:s})=>{var a;return r.jsxs("div",{className:t["input input-group"],children:[r.jsx(g,{htmlFor:"some-input-id",id:"input-label",children:r.jsx(o,{variant:"body-2",typographyColor:"gray-6",children:e("register:registerPage.emailInput")})}),r.jsx(w,{type:"email",...s,error:y||((a=i==null?void 0:i.email)==null?void 0:a.message)})]})}})}),r.jsx("div",{children:r.jsx(m,{name:"password",control:d,render:({field:s})=>{var a;return r.jsxs("div",{className:t["input input-group"],children:[r.jsx(g,{htmlFor:"some-input-id",id:"input-label",children:r.jsx(o,{variant:"body-2",typographyColor:"gray-6",children:e("register:registerPage.password")})}),r.jsx(E,{...s,type:"password",error:(a=i==null?void 0:i.password)==null?void 0:a.message})]})}})}),r.jsx("div",{children:r.jsx(m,{name:"confirmPassword",control:d,render:({field:s})=>{var a;return r.jsxs("div",{className:t["input input-group"],children:[r.jsx(g,{htmlFor:"some-input-id",id:"input-label",children:r.jsx(o,{variant:"body-2",typographyColor:"gray-6",children:e("register:registerPage.confirmPassword")})}),r.jsx(E,{...s,type:"password",error:(a=i==null?void 0:i.confirmPassword)==null?void 0:a.message})]})}})}),r.jsxs("div",{children:[r.jsx(m,{name:"terms_and_conditions",control:d,render:({field:s})=>r.jsx(K,{checked:n,label:r.jsxs("p",{children:[e("register:registerPage.textTerm"),r.jsxs(b,{href:"https://prometeoapi.com/terminos-y-condiciones",target:"_blank",id:"anchor-component",typographyColor:"brand",typographyTag:"span",typographyVariant:"body-1",underlineOnHover:!0,children:[e("register:registerPage.term")," "]}),e("register:registerPage.andTerm")," ",r.jsx(b,{href:"https://prometeoapi.com/politica-de-privacidad",target:"_blank",id:"anchor-component",typographyColor:"brand",typographyTag:"span",typographyVariant:"body-1",underlineOnHover:!0,children:e("register:registerPage.condition")})]}),onChange:a=>{s.onChange(f(a.target.checked))}})}),i.terms_and_conditions?r.jsxs("p",{className:t["error-text"],children:[(C=i.terms_and_conditions)==null?void 0:C.message," "]}):""]}),u?r.jsxs("p",{className:t["error-text"],children:[u," "]}):"",r.jsx("div",{className:t["button-container"],children:r.jsxs(z,{type:"submit",fullWidth:!0,className:t["button-submit"],children:[e("register:registerPage.button")," "]})})]}),r.jsx(Q,{}),r.jsxs("div",{className:t["forgot-password"],children:[r.jsx(o,{variant:"body-1",tag:"span",children:e("auth:forgotPassword")}),r.jsx(b,{href:"/reset-password",children:e("auth:recoverPassword")})]})]}):r.jsxs("div",{className:t["info-section"],children:[r.jsx("div",{className:t["thanks-section"],children:r.jsx(o,{variant:"headline-3",withFontFamily:!0,t
7ypographyColor:"red-5",className:t["icon-check-red"],children:e("register:infoSection.thanks")})}),r.jsx("div",{className:t["icon-line"],children:r.jsx(o,{variant:"body-1",children:e("register:infoSection.successMessage")})})]})]}),r.jsx("div",{className:t["footer-card"],children:v?r.jsxs("div",{children:[r.jsx(o,{variant:"body-1",typographyColor:"gray-4",children:e("register:registerPage.supportHelp")})," ",r.jsx(b,{href:"mailto:[email protected]",children:e("register:registerPage.contactSupport")})]}):r.jsxs("div",{children:[r.jsx(o,{variant:"body-1",typographyColor:"gray-4",children:e("auth:authSection.loginQuestion")})," ",r.jsx(b,{href:"/",children:e("auth:authSection.loginLink")})]})})]})})})};export{de as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.