PageSourceSearch

https://app.stackeasy.ai/assets/AdminSignUpPage-b2c5896f.js

js stackeasy.ai collected 2026-10-02 00:27:24 UTC 4,356 bytes, 1 lines download raw bytes

1import{j as e}from"./@base-ui/react-520d3e18.js";import{c as R,a as h}from"./yup-d870f5b2.js";import{r as k,u as M,e as P,L as I}from"./vendor-c4cd4da4.js";import{u as F}from"./react-hook-form-4fa7bb77.js";import{a as q,u as A,L as g,R as D,T as w}from"./index-4b49b086.js";import{o as U}from"./yup-e8905501.js";import{I as O}from"./index-9ae5e986.js";import{M as T}from"./index-409786d7.js";import{M as _}from"./index-b0789655.js";import"./posthog-js-7564cb7c.js";import"./qr-scanner-cf010ec4.js";import"./@headlessui/react-b70c55a7.js";import"./react-loading-skeleton-d47e9ae2.js";import"./react-icons-e9f1a3c2.js";import"./@quiltt/core-1c53b267.js";import"./@fullcalendar/core-f4694655.js";import"./@quiltt/react-2bbb75b9.js";import"./react-datepicker-a15c956d.js";import"./clsx-0839fdbe.js";import"./lucide-react-5e86fb69.js";import"./@stripe/react-stripe-js-35547995.js";import"./@stripe/stripe-js-6b714a86.js";import"./react-toastify-31070c08.js";import"./react-select-0fd6b47b.js";import"./@mantine/core-0e7e3627.js";import"./@uppy/dashboard-912851de.js";import"./react-google-recaptcha-2585cbe7.js";import"./@tanstack/react-query-3716d31a.js";import"./@fortawesome/fontawesome-svg-core-95dad805.js";import"./@fortawesome/free-solid-svg-icons-82da594a.js";import"./@fortawesome/free-regular-svg-icons-a38012c9.js";import"./@fortawesome/free-brands-svg-icons-2c021b6b.js";import"./@hookform/resolvers-2b80ca39.js";const ve=({role:j=D.SUPER_ADMIN})=>{const{sdk:y}=q(),{authDispatch:v,showToast:i}=A(),[r,s]=k.useState(!1),b=M(),S=new URLSearchParams(b.search).get("redirect_uri"),N=P(),E=R({email:h().email().required(),password:h().required()}).required(),{register:m,handleSubmit:C,setError:o,formState:{errors:l}}=F({resolver:U(E)}),L=async n=>{var c,d,p,u;try{s(!0);const t=await y.register(n.email,n.password,j);if(!t.error)v({type:"LOGIN",payload:t}),i("Succesfully Registered",4e3,w.SUCCESS),N(S??"/admin/dashboard");else if(s(!1),t.validation){const x=Object.keys(t.validation);for(let a=0;a<x.length;a++){const f=x[a];o(f,{type:"manual",message:t.validation[f]})}}}catch(t){s(!1),i(t==null?void 0:t.message,4e3,w.ERROR),o("email",{type:"manual",message:(d=(c=t==null?void 0:t.response)==null?void 0:c.data)!=null&&d.message?(u=(p=t==null?void 0:t.response)==null?void 0:p.data)==null?void 0:u.message:t==null?void 0:t.message})}};return e.jsx("div",{className:"m-auto flex justify-center items-center w-full h-full max-h-full min-h-full",children:e.jsxs("div",{className:"my-12 flex w-[90%] flex-col items-center rounded-lg border  border-[#a8a8a8] p-6 shadow-md md:w-[22.8125rem]",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:[e.jsx("path",{d:"M12.5 2C10.0147 2 8 4.01472 8 6.5C8 8.98528 10.0147 11 12.5 11C14.9853 11 17 8.98528 17 6.5C17 4.01472 14.9853 2 12.5 2Z",fill:"#4F46E5"}),e.jsx("path",{d:"M12.5004 12.5C8.3271 12.5 5.27345 15.2936 4.4402 19.0013C4.19057 20.112 5.10014 21 6.09882 21H18.902C19.9007 21 20.8102 20.112 20.5606 19.0013C19.7274 15.2936 16.6737 12.5 12.5004 12.5Z",fill:"#4F46E5"})]}),e.jsx("div",{className:"my-2 text-xl font-semibold text-[#262626]",children:"Register"}),e.jsxs("form",{className:"w-full max-w-full",onSubmit:C(L),children:[e.jsx("div",{className:"mb-6 flex flex-col text-sm",children:e.jsx(g,{children:e.jsx(T,{type:"email",label:"Email",name:"email",placeholder:"[email protected]",register:m,errors:l})})}),e.jsx("div",{className:"flex flex-col text-sm",children:e.jsx(g,{children:e.jsx(_,{required:!0,name:"password",label:"Password",errors:l,register:m})})}),e.jsx(O,{type:"submit",className:"my-12 flex w-full items-center justify-center rounded-md bg-[#4F46E5] py-2 tracking-wide text-white  outline-none focus:outline-none",loading:r,disabled:r,children:"Register"}),e.jsx("div",{children:e.jsxs("h3",{className:"text-center text-sm normal-case text-gray-800",children:["Already have an account?"," ",e.jsxs(I,{className:"my-text-gradient mb-8 self-end text-sm font-semibold",to:"/admin/login",children:["Login"," "]})," "]})})]}),e.jsx("div",{className:"oauth flex w-full max-w-md grow flex-col gap-4 px-6 text-[#344054]",children:e.jsxs("p",{className:"h-10 text-center text-xs text-gray-500",children:["© ",new Date().getFullYear()," manaknightdigital inc. All rights reserved."]})})]})})};export{ve 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.