1 line
9.7 KiB
JavaScript
1 line
9.7 KiB
JavaScript
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8810],{7900:(e,a,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/create-account",function(){return t(6660)}])},6234:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});var s=t(4848);function l(e){let{message:a}=e;return(0,s.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,s.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,s.jsx)("span",{children:a})]})}t(6540)},4329:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var s=t(4848);t(6540);var l=t(1710);function r(){return(0,s.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 px-6 py-20 bg-white rounded shadow-sm max-w-2xl w-full",children:[(0,s.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,s.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,s.jsx)(l.A,{width:"25px",position:"relative"})})]})})}},9625:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var s=t(4848),l=t(6540);function r(e){let{pageTitle:a,pageDescription:t,pagePathname:r,aceEditor:n}=e;return(0,s.jsxs)(l.Fragment,{children:[(0,s.jsx)("link",{rel:"canonical",href:"http://localhost:7070"+r}),(0,s.jsx)("meta",{property:"og:url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{itemProp:"url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{name:"twitter:url",content:"http://localhost:7070"+r}),(0,s.jsx)("meta",{property:"og:title",content:a}),(0,s.jsx)("meta",{property:"og:description",content:t}),(0,s.jsx)("meta",{itemProp:"name",content:a}),(0,s.jsx)("meta",{itemProp:"description",content:t}),(0,s.jsx)("meta",{name:"twitter:title",content:a}),(0,s.jsx)("meta",{name:"twitter:description",content:t}),n&&(0,s.jsxs)(l.Fragment,{children:[(0,s.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,s.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]})}},4060:(e,a,t)=>{"use strict";let s;t.d(a,{A:()=>m});var l=t(4848),r=t(6540),n=t(9020);async function i(e){let{e:a,setLoading:t,user:s,image:l,query:r}=e;t(!0);let i={first_name:a.target.first_name.value,last_name:a.target.last_name.value,email:s?null:a.target.email_address.value,username:s?null:a.target.username.value,password:s?null:a.target.password.value,image:l||null};(null==r?void 0:r.invite)&&(i.inviteObject=r),(0,n.A)(s?"/api/updateUser":"/api/registerUser",{method:"post",body:i},!!s).then(e=>{console.log(e),!s&&(null==e?void 0:e.insertId)?(localStorage.setItem("id",e.insertId),(0,n.A)("/api/loginUser",{method:"post",body:{email:i.email,password:i.password}}).then(e=>{console.log(e),localStorage.setItem("csrf",e.user.csrf_k),localStorage.setItem("stripe_id",e.user.stripe_id),localStorage.setItem("user",JSON.stringify(e.userPayload)),window.location.href="/admin"})):s&&(null==e?void 0:e.user)?window.location.reload():(null==e?void 0:e.msg)&&alert(e.msg)}).catch(e=>{console.log(e)}).finally(()=>{setTimeout(()=>{t(!1)},2e3)})}var o=t(6234),c=t(1710),d=t(7384);function m(e){let{user:a,query:t,image:m}=e,u=(null==t?void 0:t.email)?t.email:(null==a?void 0:a.email)?a.email:"",[x,p]=r.useState(null),[g,h]=r.useState(!1);return(0,l.jsxs)("div",{className:"relative w-full max-w-2xl flex-col items-start",children:[g&&(0,l.jsx)(c.A,{}),!a&&(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)("hr",{className:"opacity-0"}),(0,l.jsx)(d.A,{user:null,userType:"admin",setLoading:h}),(0,l.jsxs)("div",{className:"w-full justify-center relative",children:[(0,l.jsx)("span",{className:"bg-white dark:bg-
|