This commit is contained in:
2026-03-12 03:56:24 +00:00
parent 6d2413a25f
commit f95770dec6
120 changed files with 573 additions and 50 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[820],{81981:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return u(2111)}])}},function(n){n.O(0,[888,774,179],function(){return n(n.s=81981)}),_N_E=n.O()}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[964],{64830:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin",function(){return s(9854)}])},49533:function(e,n,s){"use strict";s.d(n,{Z:function(){return h}});var i=s(85893),r=s(5606),t=s(60),l=s(67294),c=s(55412),a=s(86609),d=s(94655);function o(e){let{link:n,icon:s,...r}=e;return(0,i.jsx)(a.Z,{href:n.url,...r,...n.linkProps,children:(0,i.jsxs)(d.Z,{children:[(0,i.jsx)("span",{children:n.title}),s||(0,i.jsx)(c.Z,{size:17})]})})}var u=s(56211),v=s(60826),x=s(3326),m=s(25808),p=s(96486),f=s.n(p);function j(e){let{service:n}=e,{pageProps:s,ws:c}=(0,l.useContext)(r.AppContext),{deployment:a}=s,{ready:p,setReady:j}=(0,m.Z)(),h=null==a?void 0:a.services.filter(e=>e.parent_service_name==n.service_name),_=[n,...h||[]],[Z,g]=(0,l.useState)(null==_?void 0:_[0]);_.findIndex(e=>e.service_name==(null==Z?void 0:Z.service_name));let N=null==Z?void 0:Z.servers,[w,C]=(0,l.useState)(null==N?void 0:N[0]),k=(0,l.useRef)(void 0);return(0,l.useEffect)(()=>{var e;C(null==Z?void 0:null===(e=Z.servers)||void 0===e?void 0:e[0])},[Z]),(0,l.useEffect)(()=>{if(j(!1),w&&k.current){var e;e=k.current,c.sendData({event:"client:kill-port",server:w,service:f().omit(n,["servers"]),port:e})}setTimeout(()=>{j(!0)},2e3)},[w]),(0,i.jsxs)(t.Z,{className:"grid-cell",children:[(0,i.jsxs)(t.Z,{className:"grid-cell-content",children:[(0,i.jsxs)(d.Z,{className:"w-full justify-between",children:[(0,i.jsx)(u.Z,{children:n.service_name}),(0,i.jsx)(o,{link:{url:"/admin/services/".concat(n.service_name),title:"View"}})]}),(0,i.jsxs)("code",{children:[n.service_name," service"]})]}),(0,i.jsx)("hr",{}),(0,i.jsxs)(t.Z,{className:"gap-0",children:[(0,i.jsxs)(d.Z,{className:"p-4 grid md:grid-cols-2",children:[(0,i.jsx)(x.Z,{options:_.map((e,n)=>({value:e.service_name,title:"Cluster #".concat(n+1)})),changeHandler:e=>{g(_.find(n=>n.service_name==e))}}),N?(0,i.jsx)(x.Z,{options:N.map(e=>({value:e.private_ip,title:e.private_ip})),changeHandler:e=>{C(N.find(n=>n.private_ip==e))}}):void 0]}),p&&w?(0,i.jsx)(v.Z,{server:w,service:n,portRef:k}):void 0]})]})}function h(){let{pageProps:e}=(0,l.useContext)(r.AppContext),{deployment:n,children_services:s}=e,c=null==n?void 0:n.services.filter(e=>!e.parent_service_name);return(0,i.jsx)(t.Z,{className:"w-full nested-grid-frame xl:grid-cols-2",children:null==c?void 0:c.map((e,n)=>(0,i.jsx)(j,{service:e},n))})}},9854:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return f},default:function(){return j}});var i=s(85893),r=s(5606),t=s(94655),l=s(3668),c=s(60),a=s(67294);function d(){let{pageProps:e}=(0,a.useContext)(r.AppContext),{user:n,deployment:s,deployment_id:d}=e;return s?(0,i.jsx)(c.Z,{className:"w-full gap-0",children:(0,i.jsxs)(c.Z,{className:"grid-cell-content",children:[(0,i.jsxs)(l.Z,{children:[s.services.length," Services"]}),(0,i.jsx)(t.Z,{children:s.services.map((e,n)=>(0,i.jsx)("a",{href:"/admin/services/".concat(e.service_name),children:(0,i.jsx)("code",{children:e.service_name})},n))})]})}):null}var o=s(21147),u=s(38249),v=s(60705),x=s(49533);function m(){let{pageProps:e}=(0,a.useContext)(r.AppContext),{user:n,deployment:s,deployment_id:t}=e,l=null==s?void 0:s.deployment_name;return(0,i.jsxs)(a.Fragment,{children:[(0,i.jsx)(o.Z,{title:"".concat((0,u.Z)(l)," Deplyoment Dashboard"),description:(0,i.jsxs)(i.Fragment,{children:["Deployment"," ",(0,i.jsx)("code",{children:null==t?void 0:t.split("-").shift()})," > ",(0,i.jsx)("code",{children:null==s?void 0:s.deployment_name})]})}),(0,i.jsx)(v.Z,{}),(0,i.jsx)(d,{}),(0,i.jsx)(v.Z,{}),(0,i.jsx)(x.Z,{})]})}var p=s(89350),f=!0;function j(){return(0,i.jsx)(p.Z,{children:(0,i.jsx)(m,{})})}}},function(e){e.O(0,[662,75,664,433,7,827,242,696,888,774,179],function(){return e(e.s=64830)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[148],{55634:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/services",function(){return s(78701)}])},49533:function(e,n,s){"use strict";s.d(n,{Z:function(){return j}});var i=s(85893),r=s(5606),t=s(60),l=s(67294),c=s(55412),a=s(86609),o=s(94655);function u(e){let{link:n,icon:s,...r}=e;return(0,i.jsx)(a.Z,{href:n.url,...r,...n.linkProps,children:(0,i.jsxs)(o.Z,{children:[(0,i.jsx)("span",{children:n.title}),s||(0,i.jsx)(c.Z,{size:17})]})})}var d=s(56211),v=s(60826),f=s(3326),p=s(25808),x=s(96486),m=s.n(x);function _(e){let{service:n}=e,{pageProps:s,ws:c}=(0,l.useContext)(r.AppContext),{deployment:a}=s,{ready:x,setReady:_}=(0,p.Z)(),j=null==a?void 0:a.services.filter(e=>e.parent_service_name==n.service_name),h=[n,...j||[]],[Z,N]=(0,l.useState)(null==h?void 0:h[0]);h.findIndex(e=>e.service_name==(null==Z?void 0:Z.service_name));let g=null==Z?void 0:Z.servers,[w,C]=(0,l.useState)(null==g?void 0:g[0]),k=(0,l.useRef)(void 0);return(0,l.useEffect)(()=>{var e;C(null==Z?void 0:null===(e=Z.servers)||void 0===e?void 0:e[0])},[Z]),(0,l.useEffect)(()=>{if(_(!1),w&&k.current){var e;e=k.current,c.sendData({event:"client:kill-port",server:w,service:m().omit(n,["servers"]),port:e})}setTimeout(()=>{_(!0)},2e3)},[w]),(0,i.jsxs)(t.Z,{className:"grid-cell",children:[(0,i.jsxs)(t.Z,{className:"grid-cell-content",children:[(0,i.jsxs)(o.Z,{className:"w-full justify-between",children:[(0,i.jsx)(d.Z,{children:n.service_name}),(0,i.jsx)(u,{link:{url:"/admin/services/".concat(n.service_name),title:"View"}})]}),(0,i.jsxs)("code",{children:[n.service_name," service"]})]}),(0,i.jsx)("hr",{}),(0,i.jsxs)(t.Z,{className:"gap-0",children:[(0,i.jsxs)(o.Z,{className:"p-4 grid md:grid-cols-2",children:[(0,i.jsx)(f.Z,{options:h.map((e,n)=>({value:e.service_name,title:"Cluster #".concat(n+1)})),changeHandler:e=>{N(h.find(n=>n.service_name==e))}}),g?(0,i.jsx)(f.Z,{options:g.map(e=>({value:e.private_ip,title:e.private_ip})),changeHandler:e=>{C(g.find(n=>n.private_ip==e))}}):void 0]}),x&&w?(0,i.jsx)(v.Z,{server:w,service:n,portRef:k}):void 0]})]})}function j(){let{pageProps:e}=(0,l.useContext)(r.AppContext),{deployment:n,children_services:s}=e,c=null==n?void 0:n.services.filter(e=>!e.parent_service_name);return(0,i.jsx)(t.Z,{className:"w-full nested-grid-frame xl:grid-cols-2",children:null==c?void 0:c.map((e,n)=>(0,i.jsx)(_,{service:e},n))})}},78701:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return v},default:function(){return f}});var i=s(85893),r=s(67294),t=s(5606),l=s(38249),c=s(60705),a=s(21147),o=s(49533);function u(){let{pageProps:e}=(0,r.useContext)(t.AppContext),{user:n,deployment:s,deployment_id:u}=e,d=null==s?void 0:s.deployment_name;return(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(a.Z,{title:"".concat((0,l.Z)(d)," Deplyoment Dashboard"),description:(0,i.jsxs)(i.Fragment,{children:["Deployment"," ",(0,i.jsx)("code",{children:null==u?void 0:u.split("-").shift()})," > ",(0,i.jsx)("code",{children:null==s?void 0:s.deployment_name})]})}),(0,i.jsx)(c.Z,{}),(0,i.jsx)(o.Z,{})]})}var d=s(89350),v=!0;function f(){return(0,i.jsx)(d.Z,{children:(0,i.jsx)(u,{})})}}},function(e){e.O(0,[662,75,664,433,7,827,242,696,888,774,179],function(){return e(e.s=55634)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[329],{89426:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/services/[service_name]",function(){return s(52963)}])},52963:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return h},default:function(){return _}});var l=s(85893),r=s(67294),i=s(5606),t=s(38249),c=s(60705),a=s(21147),d=s(60),o=s(94655),u=s(60826);function x(e){let{service:n}=e,{pageProps:s}=(0,r.useContext)(i.AppContext),t=n.servers,[c,a]=(0,r.useState)(null==t?void 0:t[0]),x=null!=t&&!!t.length&&!!(t.length%2);return(0,l.jsx)(d.Z,{className:"w-full grid-cell col-span-1 gap-0",children:(0,l.jsxs)(o.Z,{className:"nested-grid-frame xl:grid-cols-2",children:[null==t?void 0:t.map((e,s)=>(0,l.jsx)(u.Z,{server:e,service:n,wrapperProps:{className:"grid-cell"}},s)),x?(0,l.jsx)("div",{className:"grid-cell"}):null]})})}var v=s(3326),p=s(56211);function m(){let{pageProps:e,ws:n}=(0,r.useContext)(i.AppContext),{service:s,deployment:t,children_services:c}=e,a=[s,...c||[]],[u,m]=(0,r.useState)(s||void 0),j=a.findIndex(e=>(null==e?void 0:e.service_name)==(null==u?void 0:u.service_name))+1;return null==u||u.servers,(0,l.jsx)(d.Z,{className:"w-full nested-grid-frame grid-cols-1",children:(0,l.jsxs)(d.Z,{className:"grid-cell gap-0",children:[(0,l.jsx)(o.Z,{className:"grid-cell-content flex-nowrap",children:(0,l.jsxs)(o.Z,{className:"w-full justify-between",children:[(0,l.jsx)(o.Z,{children:(0,l.jsxs)(p.Z,{children:["Cluster #",j]})}),(0,l.jsx)(o.Z,{children:(0,l.jsx)(v.Z,{options:a.map((e,n)=>({value:null==e?void 0:e.service_name,title:"Cluster #".concat(n+1)})),wrapperWrapperProps:{className:"max-w-[250px]"},changeHandler:e=>{m(void 0),n.sendData({event:"client:kill-all-ports"}),setTimeout(()=>{m(a.find(n=>(null==n?void 0:n.service_name)==e)||void 0)},200)}})})]})}),(0,l.jsx)("hr",{}),u?(0,l.jsx)(x,{service:u}):void 0]})})}function j(){let{pageProps:e}=(0,r.useContext)(i.AppContext),{service:n,deployment:s}=e,d=null==s?void 0:s.deployment_name,o=null==n?void 0:n.service_name;return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)(a.Z,{title:"".concat((0,t.Z)(o)," Service"),description:(0,l.jsxs)(l.Fragment,{children:["Deployment ",(0,l.jsx)("code",{children:d})," > ",(0,l.jsx)("code",{children:o})]})}),(0,l.jsx)(c.Z,{}),(0,l.jsx)(m,{})]})}var f=s(89350),h=!0;function _(){return(0,l.jsx)(f.Z,{children:(0,l.jsx)(j,{})})}}},function(e){e.O(0,[662,75,664,433,7,827,242,696,888,774,179],function(){return e(e.s=89426)}),_N_E=e.O()}]);
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[635],{64168:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/users",function(){return r(45446)}])},45446:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return f},default:function(){return y}});var n=r(85893),s=r(67294),a=r(5606),i=r(60705),c=r(21147),u=r(94495),d=r(53151),l=r(88584),o=r(94655),x=r(3668),m=r(60);function g(){let{pageProps:e}=(0,s.useContext)(a.AppContext),{deployment_users:t}=e;return(0,n.jsx)(m.Z,{className:"grid-cell-content",children:null==t?void 0:t.map((e,t)=>{let r=!!e.is_super_admin;return(0,n.jsx)("a",{href:"/admin/users/".concat(e.id),children:(0,n.jsxs)(o.Z,{className:"w-full justify-between",children:[(0,n.jsxs)(o.Z,{children:[(0,n.jsx)(d.Z,{image_url:e.image,title:"".concat(e.first_name," Image"),image_size:40}),(0,n.jsxs)(x.Z,{children:[e.first_name," ",e.last_name]})]}),(0,n.jsx)(o.Z,{children:r?(0,n.jsx)(l.Z,{children:"Super Admin"}):null})]})},t)})})}function h(){let{pageProps:e}=(0,s.useContext)(a.AppContext);return(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)(c.Z,{title:"Users",description:(0,n.jsx)(n.Fragment,{children:"All Users in this deployment"}),ctas:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(u.Z,{title:"Add User",href:"/admin/users/add-user",children:"Add User"})})}),(0,n.jsx)(i.Z,{}),(0,n.jsx)(g,{})]})}var p=r(89350),f=!0;function y(){return(0,n.jsx)(p.Z,{children:(0,n.jsx)(h,{})})}},88584:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(85893);r(67294);var s=r(98388);function a(e){let{color:t,variant:r,children:a,href:i,newTab:c,linkProps:u,...d}=e,l=(0,n.jsx)("div",{...d,className:(0,s.m6)("text-xs px-2 py-0.5 rounded-full outline-0","text-center flex items-center justify-center","secondary"==t?"bg-secondary text-white outline-secbg-secondary":"success"==t?"bg-success outline-success text-white":"error"==t?"bg-orange-700 outline-orange-700":"gray"==t?(0,s.m6)("bg-slate-100 outline-slate-200 dark:bg-gray-dark dark:outline-gray-dark","text-slate-800 dark:text-white"):"bg-primary text-white outline-primbg-primary twui-tag-primary","outlined"==r?"!bg-transparent outline-1 "+("secondary"==t?"text-secondary":"success"==t?"text-success dark:text-success-dark":"error"==t?"text-orange-700":"gray"==t?"text-slate-700 dark:text-white/80":"text-primary dark:text-primary-dark twui-tag-primary-outlined"):"ghost"==r?"!bg-transparent outline-none border-none "+("secondary"==t?"text-secondary":"success"==t?"text-success dark:text-success-dark":"error"==t?"text-orange-700":"gray"==t?"text-slate-700 dark:text-white/80":"text-primary dark:text-primary-dark"):"","twui-tag",d.className),children:a});return i?(0,n.jsx)("a",{href:i,target:c?"_blank":void 0,...u,className:(0,s.m6)("hover:opacity-80",null==u?void 0:u.className),children:l}):l}}},function(e){e.O(0,[662,75,664,433,7,242,888,774,179],function(){return e(e.s=64168)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[786],{79845:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/users/[deployment_user_id]",function(){return r(38347)}])},38347:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return x},default:function(){return g}});var n=r(85893),s=r(67294),a=r(5606),i=r(60705),u=r(21147),c=r(88584),l=r(94655);function o(){let{pageProps:e}=(0,s.useContext)(a.AppContext),{deployment_user:t}=e;if(!(null==t?void 0:t.id))return null;let r=!!t.is_super_admin;return(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)(u.Z,{title:(0,n.jsxs)(l.Z,{children:[(0,n.jsx)("span",{children:null==t?void 0:t.first_name}),(0,n.jsx)("span",{children:null==t?void 0:t.last_name}),r?(0,n.jsx)(c.Z,{className:"inline",children:"Super Admin"}):null]})}),(0,n.jsx)(i.Z,{})]})}var d=r(89350),x=!0;function g(){return(0,n.jsx)(d.Z,{children:(0,n.jsx)(o,{})})}},88584:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(85893);r(67294);var s=r(98388);function a(e){let{color:t,variant:r,children:a,href:i,newTab:u,linkProps:c,...l}=e,o=(0,n.jsx)("div",{...l,className:(0,s.m6)("text-xs px-2 py-0.5 rounded-full outline-0","text-center flex items-center justify-center","secondary"==t?"bg-secondary text-white outline-secbg-secondary":"success"==t?"bg-success outline-success text-white":"error"==t?"bg-orange-700 outline-orange-700":"gray"==t?(0,s.m6)("bg-slate-100 outline-slate-200 dark:bg-gray-dark dark:outline-gray-dark","text-slate-800 dark:text-white"):"bg-primary text-white outline-primbg-primary twui-tag-primary","outlined"==r?"!bg-transparent outline-1 "+("secondary"==t?"text-secondary":"success"==t?"text-success dark:text-success-dark":"error"==t?"text-orange-700":"gray"==t?"text-slate-700 dark:text-white/80":"text-primary dark:text-primary-dark twui-tag-primary-outlined"):"ghost"==r?"!bg-transparent outline-none border-none "+("secondary"==t?"text-secondary":"success"==t?"text-success dark:text-success-dark":"error"==t?"text-orange-700":"gray"==t?"text-slate-700 dark:text-white/80":"text-primary dark:text-primary-dark"):"","twui-tag",l.className),children:a});return i?(0,n.jsx)("a",{href:i,target:u?"_blank":void 0,...c,className:(0,s.m6)("hover:opacity-80",null==c?void 0:c.className),children:o}):o}}},function(e){e.O(0,[662,75,664,433,7,242,888,774,179],function(){return e(e.s=79845)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[633],{33356:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/users/add-user",function(){return n(28043)}])},78513:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(85893),s=n(77827),o=n(94495),a=n(60),i=n(5606),l=n(25808),c=n(67294),d=n(79265);function u(e){var t,n,u,h;let{new_deployment_user:f}=e,{newUser:p,setNewUser:m,loading:w,setLoading:y,isPasswordConfirmed:g,setIsPasswordConfirmed:j,pageProps:x}=function(e){let{new_deployment_user:t}=e,{pageProps:n}=(0,c.useContext)(i.AppContext),[r,s]=(0,c.useState)({}),{loading:o,setLoading:a}=(0,l.Z)(),[d,u]=(0,c.useState)(!1);return{newUser:r,setNewUser:s,loading:o,setLoading:a,isPasswordConfirmed:d,setIsPasswordConfirmed:u,pageProps:n}}({new_deployment_user:f}),v=!!(g&&(null===(t=p.password)||void 0===t?void 0:t.match(/./))&&(null===(n=p.confirmed_password)||void 0===n?void 0:n.match(/./)));return(0,r.jsx)("form",{onSubmit:e=>{e.preventDefault()},children:(0,r.jsxs)(a.Z,{className:"w-full items-stretch gap-6",children:[(0,r.jsx)(s.Z,{placeholder:"Eg. John",title:"First Name",changeHandler:e=>{m(t=>({...t,first_name:e}))},required:!0,showLabel:!0}),(0,r.jsx)(s.Z,{placeholder:"Eg. Doe",title:"Last Name",changeHandler:e=>{m(t=>({...t,last_name:e}))},showLabel:!0}),(0,r.jsx)(s.Z,{placeholder:"Email Address",title:"Email",type:"email",changeHandler:e=>{m(t=>({...t,email:e}))},required:!0,showLabel:!0}),x.user.id?(0,r.jsx)(s.Z,{placeholder:"Username",title:"Username",changeHandler:e=>{m(t=>({...t,username:e}))},validationRegex:/^[a-z0-9\-]{3,}$/,info:(0,r.jsxs)(r.Fragment,{children:["Allowed characters:"," ",(0,r.jsx)("code",{children:(0,r.jsx)("b",{children:"a-z, 0-9, -"})}),"."]}),wrapperWrapperProps:{className:"items-start!"},required:!0,showLabel:!0}):null,(0,r.jsx)(s.Z,{placeholder:"Password",title:"Password",type:"password",changeHandler:e=>{m(t=>({...t,password:e}))},validity:{isValid:!((null===(u=p.password)||void 0===u?void 0:u.match(/./))&&(null===(h=p.confirmed_password)||void 0===h?void 0:h.match(/./)))||v,msg:"Passwords don't match"},required:!0,showLabel:!0}),(0,r.jsx)(s.Z,{placeholder:"Confirm Password",title:"Confirm Password",type:"password",changeHandler:e=>{m(t=>({...t,confirmed_password:e})),j(e==p.password)},showLabel:!0}),(0,r.jsx)(o.Z,{title:"Login",onClick:()=>{v&&window.confirm("Create Super Admin Account?")&&(y(!0),(0,d.Z)("/api/auth/signup",{method:"POST",body:{new_user:p}}).then(e=>{console.log("res",e),e.success&&window.location.reload()}).finally(()=>{}))},loading:w,children:x.user.super_admin?"Add User":"Signup"})]})})}},28043:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return h},default:function(){return f}});var r=n(85893),s=n(67294),o=n(5606),a=n(60705),i=n(21147),l=n(78513),c=n(60);function d(){let{pageProps:e}=(0,s.useContext)(o.AppContext);return(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)(i.Z,{title:"Add New User"}),(0,r.jsx)(a.Z,{}),(0,r.jsx)(c.Z,{className:"grid-cell-content max-w-[600px]",children:(0,r.jsx)(l.Z,{})})]})}var u=n(89350),h=!0;function f(){return(0,r.jsx)(u.Z,{children:(0,r.jsx)(d,{})})}},79265:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(96486),s=n.n(r),o={stringify:function(e,t,n){try{return JSON.stringify(e,t||void 0,n)}catch(e){return}}};async function a(e,t){let n;let r={"Content-Type":"application/json"};(null==t?void 0:t.csrfKey)&&t.csrfValue&&(r[t.csrfKey]=t.csrfValue);let a=e;if((null==t?void 0:t.query)&&(a+=function(e){let t="?";if("object"!=typeof e)return console.log("Invalid Query type"),t;if(Array.isArray(e))return console.log("Query is an Array. This is invalid."),t;if(!e)return console.log("No Query provided."),t;let n=Object.keys(e),r=[];return n.forEach(t=>{if(!t||!e[t])return;let n=e[t];if("object"==typeof n){let e=o.stringify(n);r.push("".concat(t,"=").concat(encodeURIComponent(String(e))))}else"string"==typeof n||"number"==typeof n?r.push("".concat(t,"=").concat(encodeURIComponent(n))):r.push("".concat(t,"=").concat(String(n)))}),t+=r.join("&")}(t.query)),"string"==typeof t)try{n="post"===t?(await fetch(a,{method:t,headers:r})).json():(await fetch(a)).json()}catch(e){console.log("FetchAPI error #1:",e.message),n=null}else if("object"==typeof t)try{let e;if(t.body&&"object"==typeof t.body){let e=s().cloneDeep(t.body);t.body=JSON.stringify(e)}if(t.headers){t.headers=s().merge(t.headers,r);let n={...t};e=await fetch(a,n)}else{let n={...t,headers:r};e=await fetch(a,n)}n=e.json()}catch(e){console.log("FetchAPI error #2:",e.message),n=null}else try{let e=await fetch(a);n=await e.json()}catch(e){console.log("FetchAPI error #3:",e.message),n=null}return n}}},function(e){e.O(0,[662,75,664,433,7,827,242,888,774,179],function(){return e(e.s=33356)}),_N_E=e.O()}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
!function(){"use strict";var e,n,r,t,o={},i={};function u(e){var n=i[e];if(void 0!==n)return n.exports;var r=i[e]={id:e,loaded:!1,exports:{}},t=!0;try{o[e].call(r.exports,r,r.exports,u),t=!1}finally{t&&delete i[e]}return r.loaded=!0,r.exports}u.m=o,e=[],u.O=function(n,r,t,o){if(r){o=o||0;for(var i=e.length;i>0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[r,t,o];return}for(var f=1/0,i=0;i<e.length;i++){for(var r=e[i][0],t=e[i][1],o=e[i][2],l=!0,c=0;c<r.length;c++)f>=o&&Object.keys(u.O).every(function(e){return u.O[e](r[c])})?r.splice(c--,1):(l=!1,o<f&&(f=o));if(l){e.splice(i--,1);var a=t();void 0!==a&&(n=a)}}return n},u.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(n,{a:n}),n},u.d=function(e,n){for(var r in n)u.o(n,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},u.p="/_next/",n={272:0},u.O.j=function(e){return 0===n[e]},r=function(e,r){var t,o,i=r[0],f=r[1],l=r[2],c=0;if(i.some(function(e){return 0!==n[e]})){for(t in f)u.o(f,t)&&(u.m[t]=f[t]);if(l)var a=l(u)}for(e&&e(r);c<i.length;c++)o=i[c],u.o(n,o)&&n[o]&&n[o][0](),n[o]=0;return u.O(a)},(t=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))}();
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
self.__BUILD_MANIFEST=function(s,a,e,c,t,i,n,d,u){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[s,e,a,c,u,t,i,"static/chunks/pages/index-5ce092dbf4b7ea2c.js"],"/404":[s,a,"static/chunks/pages/404-8292e1046538596b.js"],"/_error":["static/chunks/pages/_error-10090a8ee211d5fd.js"],"/admin":[s,e,a,c,t,i,n,d,"static/chunks/pages/admin-83b6b2d79d15b7e5.js"],"/admin/services":[s,e,a,c,t,i,n,d,"static/chunks/pages/admin/services-48ec8a74b0ca56be.js"],"/admin/services/[service_name]":[s,e,a,c,t,i,n,d,"static/chunks/pages/admin/services/[service_name]-0fc288a6bcc41043.js"],"/admin/settings":[s,e,a,c,t,i,n,"static/chunks/pages/admin/settings-bd82e576fc0744d5.js"],"/admin/users":[s,e,a,c,t,n,"static/chunks/pages/admin/users-9119f10d67bb4442.js"],"/admin/users/add-user":[s,e,a,c,t,i,n,"static/chunks/pages/admin/users/add-user-cb427987939b9d0b.js"],"/admin/users/[deployment_user_id]":[s,e,a,c,t,n,"static/chunks/pages/admin/users/[deployment_user_id]-e11d7e3f20a9460d.js"],"/auth/login":[s,e,a,c,u,t,i,"static/chunks/pages/auth/login-3f936f997e58438c.js"],"/auth/logout":[s,a,"static/chunks/pages/auth/logout-c8b207f96be4f684.js"],"/auth/signup":[s,e,a,c,t,i,"static/chunks/pages/auth/signup-726f0563911fb18e.js"],sortedPages:["/","/404","/_app","/_error","/admin","/admin/services","/admin/services/[service_name]","/admin/settings","/admin/users","/admin/users/add-user","/admin/users/[deployment_user_id]","/auth/login","/auth/logout","/auth/signup"]}}("static/chunks/29107295-2819ba6e51dbf961.js","static/chunks/664-e347d64e56042a02.js","static/chunks/e5d67320-ccbab4288ca637ad.js","static/chunks/433-ace0b205fb566ad3.js","static/chunks/7-2db8c3551ba01919.js","static/chunks/827-7975edcf8481ec69.js","static/chunks/242-b8336fba4de93a9a.js","static/chunks/696-9f47b10ab1f27d0e.js","static/chunks/225-f257bb5bd6014d68.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
+1
View File
@@ -0,0 +1 @@
self.__SSG_MANIFEST=new Set,self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB();