"use strict";(()=>{var e={};e.id=7471,e.ids=[7471],e.modules={95687:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{config:()=>g,default:()=>c,getServerSideProps:()=>m,getStaticPaths:()=>x,getStaticProps:()=>p,reportWebVitals:()=>h,routeModule:()=>P,unstable_getServerProps:()=>b,unstable_getServerSideProps:()=>q,unstable_getStaticParams:()=>S,unstable_getStaticPaths:()=>f,unstable_getStaticProps:()=>v});var s=r(63865),i=r(9455),n=r(30671),d=r(5583),l=r(53881),u=r(88348),o=e([u]);u=(o.then?(await o)():o)[0];let c=(0,n.M)(u,"default"),p=(0,n.M)(u,"getStaticProps"),x=(0,n.M)(u,"getStaticPaths"),m=(0,n.M)(u,"getServerSideProps"),g=(0,n.M)(u,"config"),h=(0,n.M)(u,"reportWebVitals"),v=(0,n.M)(u,"unstable_getStaticProps"),f=(0,n.M)(u,"unstable_getStaticPaths"),S=(0,n.M)(u,"unstable_getStaticParams"),b=(0,n.M)(u,"unstable_getServerProps"),q=(0,n.M)(u,"unstable_getServerSideProps"),P=new s.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/su/load-balancing",pathname:"/admin/[user_id]/su/load-balancing",bundlePath:"",filename:""},components:{App:l.default,Document:d.default},userland:u});a()}catch(e){a(e)}})},53265:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.d(t,{A:()=>o});var s=r(8732),i=r(53881),n=r(82015),d=r.n(n),l=r(57168),u=e([l]);function o(){let e=d().useContext(i.AppContext).pageProps.servers;return(0,s.jsxs)(d().Fragment,{children:[(0,s.jsxs)("div",{className:"w-full justify-between",children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-2",children:[(0,s.jsx)("h2",{className:"text-xl m-0",children:"Load Balancing"}),(0,s.jsx)("span",{children:"Distribute database load accross servers"})]}),(0,s.jsx)("div",{})]}),(0,s.jsxs)("section",{className:"paper",children:[(0,s.jsx)("h2",{className:"text-base m-0",children:"Servers"}),(0,s.jsx)("div",{className:"flex flex-col gap-2 w-full",children:e.map((e,t)=>(0,s.jsx)(l.A,{server:e},t))})]})]})}l=(u.then?(await u)():u)[0],a()}catch(e){a(e)}})},88348:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{default:()=>o,getServerSideProps:()=>c});var s=r(8732);r(82015);var i=r(53265),n=r(24934),d=r(92702),l=r(72837),u=e([i,l]);function o({user:e,data:t}){let r=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Load Balancing"}),(0,s.jsx)("meta",{name:"description",content:"Distribute db load accross servers"})]});return(0,s.jsx)(l.A,{head:r,children:(0,s.jsx)(i.A,{})})}async function c({req:e,res:t,query:r}){let{user:a,appData:s}=await (0,d.A)(e,void 0,!1,!0);if(!a?.logged_in_status)return{redirect:{destination:`/admin/${a?.id}/login`,permanent:!1}};try{let e=(0,n.A)();if(!e)throw Error("No servers found");return{props:{user:a,appData:s,servers:e}}}catch(e){return{redirect:{destination:"/su",permanent:!1}}}}[i,l]=u.then?(await u)():u,a()}catch(e){a(e)}})},76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},39383:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/actions/users/user-auth")},65967:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/ejson")},93726:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/numberfy")},30889:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/slugify")},27825:e=>{e.exports=require("lodash")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},75979:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,3881,8892,8485],()=>r(95687));module.exports=a})();