dsql-admin/dsql-app/.local_dist/server/chunks/8268.js
Benjamin Toby 3ffd2d6777 Updates
2024-12-05 08:03:33 +01:00

1 line
18 KiB
JavaScript

exports.id=8268,exports.ids=[8268],exports.modules={32415:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(8732),r=a(82015),l=a.n(r);function n({width:e,position:t,style:a,borderWidth:r,screen:n,title:i}){return(0,s.jsxs)("div",{className:" top-0 left-0 w-full h-full flex items-center justify-center gap-4 bg-white/80 dark:bg-slate-800/80 z-50"+(n?" fixed":" absolute"),style:{...a,position:t,zIndex:2e4},children:[(0,s.jsx)("span",{className:"general_loader",style:e?{width:e,height:e,minWidth:e,borderWidth:r||"4px"}:{}}),i?(0,s.jsx)("span",{children:i}):(0,s.jsx)(l().Fragment,{})]})}},93353:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(8732);a(82015);var r=a(59266);function l({size:e,adminAside:t,collapseAsideMobile:a,setCollapseAsideMobile:l}){return(0,s.jsxs)("a",{href:"/",className:"logo",onClick:e=>{let t=e.target;if(t?.closest("button"))return e.preventDefault()},children:[t&&(0,s.jsxs)("button",{className:"flex lg:hidden small-text mr-2 primary-light",onClick:e=>{a&&l?l(!1):l&&l(!0)},children:[(0,s.jsx)("div",{className:"-mt-0.5",children:(0,s.jsx)(r.A,{color:"action"})}),(0,s.jsx)("span",{className:"dark:text-white",children:"Menu"})]}),(0,s.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:35,className:"dark:hidden -mt-1.5 -mr-1.5"}),(0,s.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:35,className:"hidden dark:flex -mt-1.5 -mr-1.5"}),(0,s.jsx)("span",{className:"text-slate-800 dark:text-white text-[20px] font-bold hidden sm:flex -mt-[1px]",children:"Datasquirel"})]})}},87472:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(8732),r=a(82015),l=a.n(r);function n({pageTitle:e,pageDescription:t,pagePathname:a,aceEditor:r}){return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsx)("link",{rel:"canonical",href:"http://localhost:7070"+a}),(0,s.jsx)("meta",{property:"og:url",content:"http://localhost:7070"+a}),(0,s.jsx)("meta",{itemProp:"url",content:"http://localhost:7070"+a}),(0,s.jsx)("meta",{name:"twitter:url",content:"http://localhost:7070"+a}),(0,s.jsx)("meta",{property:"og:title",content:e}),(0,s.jsx)("meta",{property:"og:description",content:t}),(0,s.jsx)("meta",{itemProp:"name",content:e}),(0,s.jsx)("meta",{itemProp:"description",content:t}),(0,s.jsx)("meta",{name:"twitter:title",content:e}),(0,s.jsx)("meta",{name:"twitter:description",content:t}),r&&(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"})]})]})}},34254:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(8732),r=a(82015),l=a.n(r);function n(e){let[t,a]=l().useState("Light Mode");return(0,s.jsx)("div",{className:"",id:"theme-selector-wrapper",onClick:()=>{let e=document.getElementById("theme-selector-graphic-wrapper"),t=localStorage.getItem("theme"),s=e?.querySelector("img.sun"),r=e?.querySelector("img.moon");!t||t?.match(/light/)?(document.documentElement.className="dark",localStorage.setItem("theme","dark"),t="dark",s?.classList.add("hidden"),r?.classList.remove("hidden"),e?.firstChild?.classList.add("ml-auto"),a("Dark Mode")):t?.match(/dark/)&&(document.documentElement.className="light",localStorage.setItem("theme","light"),t="light",r?.classList.add("hidden"),s?.classList.remove("hidden"),e?.firstChild?.classList.remove("ml-auto"),a("Light Mode"))},children:(0,s.jsx)("div",{className:"p-1 rounded-full w-12 transition-all",id:"theme-selector-graphic-wrapper",children:(0,s.jsxs)("div",{className:"pointer-events-none transition-all dark:ml-auto",children:[(0,s.jsx)("img",{src:"/images/sun.png",alt:"Sun Icon",width:18,className:"sun dark:hidden"}),(0,s.jsx)("img",{src:"/images/new-moon.png",alt:"Sun Icon",width:18,className:"moon hidden dark:flex"})]})})})}},62506:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(8732),r=a(82015),l=a.n(r);function n({children:e,column:t,className:a}){let r=l().useRef();return(0,s.jsx)("div",{className:"items-stretch gap-0"+(t?" flex-col":" flex-wrap xl:flex-nowrap")+(a?" "+a:""),ref:r,children:e})}},63715:(e,t,a)=>{"use strict";async function s(e,t,a){let s;let r=e.match(/\?/)?e:e+window.location.search;if("string"==typeof t)try{s="post"===t?(await fetch(r,{method:t,headers:{"Content-Type":"application/json","x-csrf-auth":a?localStorage.getItem("csrf"):""}})).json():(await fetch(r)).json()}catch(e){s=null}else if("object"==typeof t)try{let e;if(t.body&&"object"==typeof t.body){let e=t.body;t.body=JSON.stringify(e)}if(t.headers){t.headers["x-csrf-auth"]=a?localStorage.getItem("csrf"):"";let s={...t};e=await fetch(r,s)}else e=await fetch(r,{...t,headers:{"Content-Type":"application/json","x-csrf-auth":a?localStorage.getItem("csrf"):""}});s=e.json()}catch(e){s=null}else try{s=(await fetch(r)).json()}catch(e){s=null}return s}a.d(t,{A:()=>s})},54896:(e,t,a)=>{"use strict";async function s({links:e}){let t=e||document.querySelectorAll("nav a");if(t&&t.forEach(e=>{e.dataset.currentlink===window.location.pathname?e.classList.add("active"):window.location.pathname.match(RegExp(`${e.dataset.currentlink}\\/.*`))&&!e.dataset.strictlink&&e.classList.add("active")}),window.location.pathname.match(/\/databases\/.*/)){let e=document.querySelectorAll("a");e&&window.location.search.match(/delegated=true/)&&e.forEach((e,t)=>{e?.pathname?.match(/databases/)&&(e.href=e.pathname+window.location.search)})}}a.d(t,{A:()=>s})},71457:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var s=a(8732),r=a(82015),l=a.n(r),n=a(27912),i=a.n(n);a(54896);var c=a(20681),o=a(64699);function d(e){return(0,s.jsx)(l().Fragment,{})}var m=a(11169);function h({children:e,head:t,user:a,productionEnvironment:r,darkBgHeader:n,transparentHeader:h}){return(0,s.jsxs)(l().Fragment,{children:[(0,s.jsx)(i(),{children:t}),(0,s.jsx)(d,{head:t,productionEnvironment:r}),(0,s.jsx)(c.A,{user:a,darkBg:n,transparent:h}),e,(0,s.jsx)(o.A,{}),(0,s.jsx)(m.A,{})]})}},49538:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var s=a(8732),r=a(82015),l=a.n(r),n=a(32415);a(62506);var i=a(52070);function c({user:e}){return(0,s.jsxs)("div",{className:"dropdown right-aligned",children:[(0,s.jsxs)("a",{href:"/admin",className:"button outlined gray more-padding relative z-20 mb-2",children:[(0,s.jsx)(i.A,{size:18,className:"mr-1"}),(0,s.jsx)("span",{children:"Dashboard"})]}),null,(0,s.jsx)("a",{href:`/admin/${e?.id}/settings`,className:"button plain-text more-padding normal-weight",children:"Settings"}),(0,s.jsx)("a",{href:"/logout",className:"button plain-text more-padding normal-weight",children:"Logout"})]})}var o=a(34254),d=a(58526);function m({activeUser:e,noModeSelector:t}){return e?.logged_in_status?(0,s.jsxs)("div",{className:"gap-2 flex-col-reverse xl:flex-row gap-y-6 w-full xl:w-auto py-2 whitespace-nowrap",children:[(0,s.jsxs)("div",{className:"ml-auto dropdown-wrapper p-0 xl:p-4 hover:bg-slate-100 hidden",children:[(0,s.jsx)("a",{href:`/admin/${e?.id}/notifications`,className:"flex items-center justify-center",children:(0,s.jsx)("img",{src:"/images/notification-icon.svg",alt:"Notification Icon",width:20,className:"opacity-50"})}),(0,s.jsxs)("div",{className:"dropdown mt-0 xl:-mt-3 gap-2",children:[(0,s.jsx)("span",{className:"text-slate-400",children:"Notifications"}),(0,s.jsx)(n.A,{position:"relative",width:"20px"})]})]}),(0,s.jsxs)("div",{className:"ml-auto dropdown-wrapper",children:[(0,s.jsxs)("div",{className:"avatar",style:{width:"36px",height:"36px"},children:[(0,s.jsx)("img",{src:e?.image,alt:"User Image",width:35,className:"w-full h-full object-cover rounded-full"}),e?.social_login?(0,s.jsxs)("div",{className:"sub-img",children:[(0,s.jsx)("img",{src:e?.social_platform?.match(/facebook/i)?"/images/facebook.png":e?.social_platform?.match(/google/i)?"/images/google.png":e?.social_platform?.match(/github/i)?"/images/github.png":"/images/sharing.png",alt:"",className:"flex dark:hidden"}),(0,s.jsx)("img",{src:e?.social_platform?.match(/facebook/i)?"/images/facebook.png":e?.social_platform?.match(/google/i)?"/images/google.png":e?.social_platform?.match(/github/i)?"/images/github-white.png":"/images/sharing.png",alt:"",className:"hidden dark:flex"})]}):(0,s.jsx)(l().Fragment,{})]}),(0,s.jsx)("span",{className:"dark:text-white",children:(0,s.jsxs)("b",{children:[e?.first_name," ",e?.last_name]})}),(0,s.jsx)(d.A,{size:20}),(0,s.jsx)(c,{user:e})]}),!t&&(0,s.jsx)("div",{className:"ml-2",children:(0,s.jsx)(o.A,{})})]}):(0,s.jsx)(l().Fragment,{})}},64699:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(8732);a(82015);var r=a(93353);function l(e){return(0,s.jsxs)("footer",{className:"p-8 md:p-10 w-full flex flex-col items-center",children:[(0,s.jsxs)("div",{className:"main-container items-start justify-between gap-6 flex-wrap flex-col md:flex-row pt-6",children:[(0,s.jsxs)("div",{className:"flex flex-col items-start gap-6",children:[(0,s.jsx)(r.A,{}),(0,s.jsx)("span",{className:"font-normal max-w-sm text-sm text-left",children:"Datasquirel is a fast efficient cloud-based data store that takes away the entire hassle of data management."})]}),(0,s.jsxs)("div",{className:"flex-col items-start",children:[(0,s.jsx)("h4",{className:"m-0",children:"Features"}),(0,s.jsx)("a",{href:"/docs/database-reference/data-types",className:"text-slate-600",children:"Database Schema"}),(0,s.jsx)("a",{href:"/docs/database-reference/querying-data",className:"text-slate-600",children:"SQL Queries"}),(0,s.jsx)("a",{href:"/docs/gui-reference/upload-media",className:"text-slate-600",children:"Media Storage"})]}),(0,s.jsxs)("div",{className:"flex-col items-start",children:[(0,s.jsx)("h4",{className:"m-0",children:"Docs"}),(0,s.jsx)("a",{href:"/docs/quick-start",className:"text-slate-600",children:"Quick Start Guide"}),(0,s.jsx)("a",{href:"/docs/api-reference",className:"text-slate-600",children:"API Guide"}),(0,s.jsx)("a",{href:"/docs/gui-reference",className:"text-slate-600",children:"GUI Interface"})]}),(0,s.jsxs)("div",{className:"flex-col items-start",children:[(0,s.jsx)("h4",{className:"m-0",children:"Company"}),(0,s.jsx)("a",{href:"/about",className:"text-slate-600",children:"About Us"}),(0,s.jsx)("a",{href:"/terms",className:"text-slate-600",children:"Terms and Conditions"}),(0,s.jsx)("a",{href:"/privacy",className:"text-slate-600",children:"Privacy Policy"})]})]}),(0,s.jsx)("hr",{className:"my-10"}),(0,s.jsx)("div",{className:"container",children:(0,s.jsxs)("span",{className:"text-sm text-slate-400 dark:text-slate-600",children:[new Date().getFullYear()," \xa9 Datasquirel. All rights reserved."]})})]})}},20681:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var s=a(8732),r=a(82015),l=a.n(r),n=a(34254),i=a(93353),c=a(49538),o=a(58526);function d({user:e,darkBg:t,transparent:a}){let[r,d]=l().useState(e?.logged_in_status?e:null);return(0,s.jsx)("header",{className:"w-full px-4 md:px-8 flex justify-center gap-4 "+(t?" shadow-slate-900/20 dark-content":" shadow-slate-900/5")+(a?"":" bg-white dark:bg-slate-800 shadow-lg dark:shadow-black/10 z-50")+(e?.logged_in_status?" py-4":" py-6"),style:{zIndex:700},children:(0,s.jsx)("div",{className:"container",children:(0,s.jsxs)("nav",{className:"w-full flex items-center justify-between gap-4 md:gap-10",children:[(0,s.jsx)(i.A,{}),(0,s.jsxs)("div",{className:"hidden xl:flex flex-col items-stretch grow fixed xl:static top-0 right-0 p-4 xl:p-0 shadow-xl xl:shadow-none h-screen xl:h-auto overflow-auto xl:overflow-visible w-screen sl:w-auto xl:bg-transparent"+(a?" bg-white xl:bg-transparent":" bg-white dark:bg-slate-800"),id:"main-nav-content-wrapper",children:[(0,s.jsxs)("div",{className:"items-center mb-2 flex xl:hidden",children:[(0,s.jsx)("a",{href:"/",children:(0,s.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Logo Icon",width:37})}),(0,s.jsx)("button",{className:"outlined gray ml-auto",onClick:e=>{let t=document.getElementById("main-nav-content-wrapper");t?.classList.toggle("hidden")},style:{border:"none"},children:(0,s.jsx)("span",{className:"font-semibold text-4xl",children:"✕"})})]}),(0,s.jsxs)("div",{className:"flex items-center grow flex-col-reverse xl:flex-row mb-10 xl:mb-0",children:[(0,s.jsxs)("div",{className:"flex-col xl:flex-row w-full gap-y-10 gap-x-6",children:[(0,s.jsxs)("div",{className:"dropdown-wrapper flex items-center gap-1",children:[(0,s.jsxs)("a",{href:"/docs/gui-reference",className:"relative z-10 flex items-center gap-2",children:[(0,s.jsx)("span",{children:"Features"}),(0,s.jsx)(o.A,{size:20})]}),(0,s.jsxs)("div",{className:"dropdown",children:[(0,s.jsx)("a",{href:"/docs/database-reference/data-types",className:"button plain-text more-padding normal-weight",children:"Database Schema"}),(0,s.jsx)("a",{href:"/docs/database-reference/querying-data",className:"button plain-text more-padding normal-weight",children:"Sql Queries"}),(0,s.jsx)("a",{href:"/docs/gui-reference/upload-media",className:"button plain-text more-padding normal-weight",children:"Media Storage"})]})]}),(0,s.jsxs)("div",{className:"dropdown-wrapper flex items-center gap-1",children:[(0,s.jsxs)("a",{href:"/docs",className:"relative z-10 flex items-center gap-2",children:[(0,s.jsx)("span",{children:"Docs"}),(0,s.jsx)(o.A,{size:20})]}),(0,s.jsxs)("div",{className:"dropdown",children:[(0,s.jsx)("a",{href:"/docs/quick-start",className:"button plain-text more-padding normal-weight",children:"Quick Start"}),(0,s.jsx)("a",{href:"/docs/api-reference",className:"button plain-text more-padding normal-weight",children:"Api Guide"}),(0,s.jsx)("a",{href:"/docs/gui-reference",className:"button plain-text more-padding normal-weight",children:"GUI Interface"})]})]}),(0,s.jsx)("a",{href:"/about",children:"About Us"}),(0,s.jsx)("a",{href:"/contact",children:"Contact Us"})]}),r?.logged_in_status?(0,s.jsx)(c.A,{activeUser:r,noModeSelector:!0}):(0,s.jsxs)("div",{className:"ml-auto w-full xl:w-auto justify-center",children:[(0,s.jsx)("a",{href:"/login",className:"button outlined gray hidden xl:flex"+(t?" light":""),children:"Login"}),(0,s.jsx)("a",{href:"/login",className:"button outlined gray flex xl:hidden",children:"Login"}),(0,s.jsx)("a",{href:"/create-account",className:"button",children:"Get Started"})]})]})]}),(0,s.jsx)("div",{className:"ml-0 xl:-ml-2",children:(0,s.jsx)(n.A,{})}),(0,s.jsxs)("button",{className:"bg-transparent w-16 p-4 gap-1.5 flex xl:hidden flex-col hover:bg-transparent transition-all",onClick:e=>{let t=document.getElementById("main-nav-content-wrapper");t?.classList.toggle("hidden")},style:{minWidth:"50px",backgroundColor:"transparent"},id:"main-header-hamburger-button","aria-label":"Mobile Hambutget Button",children:[(0,s.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,s.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,s.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"})]})]})})})}},11169:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var s=a(8732),r=a(58591),l=a(82015),n=a.n(l);function i({snug:e}){let[t,a]=n().useState(!1);return(0,s.jsx)(n().Fragment,{children:t&&(0,s.jsx)("button",{className:"fixed z-40 w-12 h-12 p-2 rounded-full bg-white dark:bg-slate-600 shadow-xl flex items-center justify-center hover:bg-slate-800 dark:hover:bg-slate-800 text-slate-500 dark:text-slate-200 outline-slate-300 dark:outline-transparent"+(e?" bottom-6 right-4":" bottom-4 md:bottom-10 right-4 md:right-10"),style:{outlineStyle:"solid",outlineWidth:"1px",zIndex:2e3},onClick:e=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},children:(0,s.jsx)(r.A,{size:20})})})}},68268:(e,t,a)=>{"use strict";a.r(t),a.d(t,{AppContext:()=>p,default:()=>f});var s=a(8732),r=a(82015),l=a.n(r),n=a(28133),i=a.n(n),c=a(27912),o=a.n(c),d=a(90627);a(79061),a(44422);var m=a(63715),h=a(71457),x=a(87472);class g extends l().Component{constructor(e){super(e),this.state={hasError:!1};let t="Error | Datasquirel",a="Datasquirel is a fast and efficient cloud-based SQL data management system that takes away the entire hassle of dealing with data both locally and across different platforms.",r=(0,s.jsxs)(l().Fragment,{children:[(0,s.jsx)("title",{children:t}),(0,s.jsx)("meta",{name:"description",content:a}),(0,s.jsx)(x.A,{pageTitle:t,pageDescription:a,pagePathname:"/"})]});this.state.head=r}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){(0,m.A)("/api/admin/clientError",{method:"post",body:{component:"ErrorBoundary-class-component",message:e.message+" ==== Error Info => "+t,user:{}}})}render(){return this.state.hasError?(0,s.jsx)(h.A,{head:this.state.head,user:null,children:(0,s.jsxs)("div",{className:"paper items-center px-20",children:[(0,s.jsx)("h2",{className:"text-base text-slate-400 m-0",children:"Application Error!"}),(0,s.jsx)("h1",{className:"text-2xl m-0 mb-4",children:"Please try again!"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("a",{href:"/",className:"button outlined",children:"Home"}),(0,s.jsx)("button",{onClick:e=>{window.history.back()},children:"Go Back"})]})]})}):this.props.children}}let u=(0,d.createTheme)({typography:{fontFamily:"inherit",fontSize:14},palette:{primary:{main:"#00948a"},secondary:{main:"#107ab8"},light:{main:"#c48ff0"},white:{main:"#ffffff"},grey:{main:"#64748b"},gray:{main:"#64748b"},dark:{main:"#1e293b"}}}),p=l().createContext({pageProps:{}});function f({Component:e,pageProps:t}){return(0,s.jsxs)(p.Provider,{value:{pageProps:t},children:[(0,s.jsx)(o(),{children:(0,s.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"})}),(0,s.jsx)(g,{children:(0,s.jsx)(d.ThemeProvider,{theme:u,children:(0,s.jsx)(e,{...t})})}),(0,s.jsx)(i(),{src:"/scripts/main.js",strategy:"afterInteractive"})]})}},79061:()=>{},44422:()=>{}};