1 line
8.0 KiB
JavaScript
1 line
8.0 KiB
JavaScript
"use strict";(()=>{var e={};e.id=5151,e.ids=[3220,5151],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},59527:(e,t,s)=>{s.r(t),s.d(t,{config:()=>_,default:()=>P,getServerSideProps:()=>b,getStaticPaths:()=>v,getStaticProps:()=>y,reportWebVitals:()=>A,routeModule:()=>O,unstable_getServerProps:()=>q,unstable_getServerSideProps:()=>E,unstable_getStaticParams:()=>w,unstable_getStaticPaths:()=>D,unstable_getStaticProps:()=>M});var r={};s.r(r),s.d(r,{default:()=>f,getStaticPaths:()=>S,getStaticProps:()=>j});var a=s(63865),n=s(9455),l=s(30671),o=s(5583),i=s(19796),c=s(8732),p=s(82015),u=s.n(p),m=s(1013);s(91258),s(82271),s(24093),s(69237);var d=s(28187),g=s.n(d),x=s(9973),h=s.n(x);function f({pages:e,targetPage:t}){try{return(0,c.jsx)(u().Fragment,{})}catch(e){return(0,c.jsx)(m.A,{head:null,user:null,children:(0,c.jsx)("span",{children:"Redirection ..."})})}}async function j({params:e}){let t=h()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4"}});try{let s=await g().utils.connDbHandler(t,"SELECT id, title, slug, level, parent_id FROM docs_pages ORDER BY page_order ASC"),r=await g().utils.connDbHandler(t,"SELECT title, slug, description, content FROM docs_pages WHERE slug = ?",[e?.page]);return{props:{user:null,pages:s||[],targetPage:r[0]?r[0]:{}}}}catch(e){return{props:{user:null,pages:[],targetPage:{}}}}finally{t?.end()}}async function S(){return{paths:[],fallback:!1}}let P=(0,l.M)(r,"default"),y=(0,l.M)(r,"getStaticProps"),v=(0,l.M)(r,"getStaticPaths"),b=(0,l.M)(r,"getServerSideProps"),_=(0,l.M)(r,"config"),A=(0,l.M)(r,"reportWebVitals"),M=(0,l.M)(r,"unstable_getStaticProps"),D=(0,l.M)(r,"unstable_getStaticPaths"),w=(0,l.M)(r,"unstable_getStaticParams"),q=(0,l.M)(r,"unstable_getServerProps"),E=(0,l.M)(r,"unstable_getServerSideProps"),O=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/docs/[page]",pathname:"/docs/[page]",bundlePath:"",filename:""},components:{App:i.default,Document:o.default},userland:r})},91258:(e,t,s)=>{s.d(t,{A:()=>l});var r=s(8732),a=s(82015),n=s.n(a);function l({pageTitle:e,pageDescription:t,pagePathname:s,aceEditor:a}){return(0,r.jsxs)(n().Fragment,{children:[(0,r.jsx)("link",{rel:"canonical",href:"http://localhost:7070"+s}),(0,r.jsx)("meta",{property:"og:url",content:"http://localhost:7070"+s}),(0,r.jsx)("meta",{itemProp:"url",content:"http://localhost:7070"+s}),(0,r.jsx)("meta",{name:"twitter:url",content:"http://localhost:7070"+s}),(0,r.jsx)("meta",{property:"og:title",content:e}),(0,r.jsx)("meta",{property:"og:description",content:t}),(0,r.jsx)("meta",{itemProp:"name",content:e}),(0,r.jsx)("meta",{itemProp:"description",content:t}),(0,r.jsx)("meta",{name:"twitter:title",content:e}),(0,r.jsx)("meta",{name:"twitter:description",content:t}),a&&(0,r.jsxs)(n().Fragment,{children:[(0,r.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,r.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"})]})]})}},24093:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(8732);function a({pages:e}){if(!e?.[0])return null;let t=e?.filter(e=>1==e.level);return(0,r.jsxs)("aside",{className:"w-full lg:w-80 p-10 bg-slate-100 dark:bg-slate-800 sticky top-0 overflow-y-auto max-h-max lg:max-h-screen transition-all",children:[(0,r.jsx)("span",{className:"text-2xl m-0 mb-4 text-left font-semibold",children:"Docs"}),(0,r.jsx)("ul",{className:"pl-4 gap-4 flex flex-col items-start",children:function t(s,a){return s.map((s,n)=>{let l=`${a}/${s.slug}`,o=e?.filter(e=>2==e.level&&e.parent_id==s.id);return(0,r.jsxs)("li",{children:[(0,r.jsx)("a",{href:l,className:s?.level==1?"font-semibold":"text-slate-600",children:s.title}),o&&o[0]&&(0,r.jsx)("ul",{className:"pl-4 gap-2 flex flex-col items-start text-sm mt-2",children:t(o,l)})]},n)})}(t,"/docs")})]})}s(82015)},69237:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(8732);function a({title:e,description:t}){return(0,r.jsxs)("section",{className:"py-14",children:[(0,r.jsx)("div",{className:"w-full gap-10 justify-between items-start flex-col lg:flex-row relative z-10",children:(0,r.jsxs)("div",{className:"flex-col items-start max-w-[740px] text-left",style:{minWidth:"45%"},children:[(0,r.jsx)("h1",{className:"m-0 leading-tight",children:e}),(0,r.jsx)("span",{className:"font-normal text-xl -my-4",dangerouslySetInnerHTML:{__html:t}})]})}),(0,r.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-5 z-0"})]})}s(82015)},82271:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(46169);function a({setUser:e}){let t=localStorage.getItem("user");if(t)try{e(JSON.parse(t));return}catch(t){e({});return}(0,r.A)("/api/clientSideAuth",{method:"post",body:{}},!0).then(t=>{let s=t.user?t.user:{};e(s),localStorage.setItem("user",JSON.stringify(s))}).catch(e=>{console.log(e)})}},5583:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n});var r=s(8732);s(82015);var a=s(20883);function n(){return(0,r.jsxs)(a.Html,{lang:"en",children:[(0,r.jsxs)(a.Head,{children:[(0,r.jsx)("meta",{name:"author",content:"Datasquirel"}),(0,r.jsx)("meta",{name:"Copyright",content:`Copyright (c) ${new Date().getFullYear()} Datasquirel`}),"dev_dev".match(/dev/)&&(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com/",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Poppins"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Inter"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=IBM+Plex+Mono"}),(0,r.jsx)("script",{src:"/scripts/themeSelector.js"}),(0,r.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=UTF-8"}),(0,r.jsx)("meta",{property:"og:site_name",content:"DATASQUIREL"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{property:"og:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{itemProp:"image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://static.datasquirel.com/images/user-images/user-2/email-banner.jpeg"}),(0,r.jsx)("link",{rel:"stylesheet",href:"/styles/prism.css"}),(0,r.jsx)("script",{src:"/scripts/prism.js",async:!0}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"var DSQL = {}"}})]}),(0,r.jsxs)("body",{children:[(0,r.jsx)(a.Main,{}),(0,r.jsx)(a.NextScript,{})]})]})}},9455:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}});var s=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},28187:e=>{e.exports=require("@moduletrace/datasquirel")},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},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")},9973:e=>{e.exports=require("serverless-mysql")},33873:e=>{e.exports=require("path")}};var t=require("../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[883,9821,9796],()=>s(59527));module.exports=r})(); |