PageSourceSearch

https://discobook.vercel.app/_next/static/chunks/app/page-842f43739238270c.js

js discobook.vercel.app collected 2026-10-03 07:14:13 UTC 14,678 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{8350:function(e,t,s){Promise.resolve().then(s.bind(s,1058))},1058:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return A}});var r=s(7437),a=s(2265),l=s(8472),n=s(7602),i=s(6463),d=s(1942),o=s(998),c=s(7138),x=s(6648),m={src:"/_next/static/media/earlybird.c85154fe.png",height:512,width:512,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAVFBMVEVMaXElHAA4KgHhrwYlHAHHlwYDAgD/0gegeQQBAQAjGwEhGwIAAABnTQJmTQPzvQd4WQOSeATutAa/kQVxVgMfGQLapgbOlwYEAgCwhgSIZwTotwfO0fiRAAAAGXRSTlMAG8z+h/1Z/vgup3ELwfj8/uXD7N5wmCV/0y6Q/wAAAAlwSFlzAAALEwAACxMBAJqcGAAAAEBJREFUeJwly0kSgCAMAMERAkncdwX//0+r9N4NTety4JCLpdNvgkXVbb+Qp1iqK0jUOuviBJtU05h/PPTw9Q5eW/4CZVvVBo4AAAAASUVORK5CYII=",blurWidth:8,blurHeight:8},h=s(7724),u=e=>{let{servers:t,onlineMembers:s,direction:l="right-to-left"}=e,[n,i]=(0,a.useState)({x:0,y:0}),[d,o]=(0,a.useState)(!1),c=null==t?void 0:t.filter(e=>{let t=e.serverIconUrl&&"null"!==e.serverIconUrl,r=null==s?void 0:s[e.serverId];return t&&null!=r}),u=(null==c?void 0:c.length)?[...c,...c]:[],g=()=>(0,r.jsxs)(h.ZP,{speed:2,width:288,height:96,viewBox:"0 0 288 96",backgroundColor:"#2a2a2a",foregroundColor:"#3b3b3b",children:[(0,r.jsx)("circle",{cx:"48",cy:"48",r:"32"}),(0,r.jsx)("rect",{x:"96",y:"24",rx:"4",ry:"4",width:"140",height:"12"}),(0,r.jsx)("rect",{x:"96",y:"48",rx:"4",ry:"4",width:"100",height:"10"})]});return(0,r.jsxs)("div",{className:"relative overflow-hidden w-full bg-gray-900 py-4 cursor-pointer",onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect();i({x:e.clientX-t.left,y:e.clientY-t.top})},onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[d&&(0,r.jsx)("div",{className:"absolute pointer-events-none z-20",style:{top:n.y-150,left:n.x-150,width:210,height:210,borderRadius:"50%",background:"radial-gradient(circle, rgba(16, 204, 205, 0.4), rgba(16, 204, 205, 0.1))",filter:"blur(30px)"}}),(0,r.jsx)("div",{className:"absolute left-0 top-0 h-full w-48 bg-gradient-to-r from-gray-900 via-gray-900/50 to-transparent pointer-events-none z-10"}),(0,r.jsx)("div",{className:"absolute right-0 top-0 h-full w-48 bg-gradient-to-l from-gray-900 via-gray-900/50 to-transparent pointer-events-none z-10"}),(0,r.jsx)("div",{className:"flex ".concat("right-to-left"===l?"animate-slider-rtl":"animate-slider-ltr"," gap-4 w-max"),children:0===u.length?Array.from({length:5}).map((e,t)=>(0,r.jsx)("div",{className:"flex items-center w-72 bg-gray-500 text-white p-3 rounded-lg shadow-md animate-pulse",children:(0,r.jsx)(g,{})},t)):u.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center w-72 bg-gray-800 text-white p-3 rounded-lg shadow-md",children:[(0,r.jsx)(x.default,{width:64,height:64,src:e.serverIconUrl,alt:e.serverName,className:"w-16 h-16 rounded-lg mr-4"}),(0,r.jsxs)("div",{className:"flex flex-col w-full",children:[(0,r.jsxs)("div",{className:"text-base font-semibold truncate flex items-center w-full",children:[(0,r.jsx)(x.default,{width:16,height:16,src:m,alt:"Earlybird",className:"w-5 h-5 mr-2"}),e.serverName.length>18?"".concat(e.serverName.slice(0,14),"..."):e.serverName]}),(0,r.jsxs)("p",{className:"text-sm text-gray-400 pt-1",children:[s[e.serverId]," members"]})]})]},"".concat(e.serverId,"-").concat(t)))})]})},g=s(2001),f=s(7818),v=s(8853),b=s(6777);let p=(0,f.default)(()=>Promise.all([s.e(96),s.e(29)]).then(s.bind(s,7029)).then(e=>e.OrbitControlsWithDispose),{loadableGenerated:{webpack:()=>[7029]},ssr:!1}),j=e=>{let{textureUrl:t,position:l,rotationY:n}=e,[i,d]=(0,a.useState)(null),[o,c]=(0,a.useState)(!1);return((0,a.useEffect)(()=>{c(!0),Promise.resolve().then(s.bind(s,7776)).then(e=>{let{TextureLoader:s}=e;new s().load(t,e=>d(e),void 0,()=>console.error("Error loading texture: ".concat(t)))})},[t]),o&&i)?(0,r.jsxs)("mesh",{position:l,rotation:[0,n,0],children:[(0,r.jsx)("planeGeometry",{args:[2,3]}),(0,r.jsx)("meshStandardMaterial",{map:i,side:2})]}):null},w=e=>{let{servers:t}=e,s=(0,a.useRef)(null);return(0,v.A)(()=>{s.current&&(s.current.rotation.y+=.002)}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("ambientLight",{intensity:1}),(0,r.jsx)("pointLight",{position:[10,10,10]}),(0,r.jsx)(p,{enableZoom:!1,enablePan:!1}),(0,r.jsx)("group",{ref:s,children:t.map((e,s)=>{let a=s/t.length*Math.PI*2;return(0,r.jsx)(j,{textureUrl:e.serverIconUrl,position:[6*Math.cos(a),0,6*Math.sin(a)],rotationY:-a},e._id)})})]})};var N=e=>{let{servers:t}=e;return(0,r.jsx)(b.Xz,{camera:{position:[0,2,10],aspect:16/9},style:{height:"70vh",width:"100%",maxHeight:"400px",margin:"auto"},className:"bg-gray-900",children:(0,r.jsx)(w,{servers:t})})},y=s(8068);function A(){let[e,t]=(0,a.useState)([]),[s,x]=(0,a.useState)(""),[m,h]=(0,a.useState)({}),[f,v]=(0,a.useState)(1),[b,p]=(0,a.useState)(!1),{data:j,status:w}=(0,o.useSession)(),A=(0,i.useRouter)();(0,a.useEffect)(()=>{k()},[]),(0,a.useEffect)(()=>{Object.keys(m).length>0&&S(e)},[m]);let k=async()=>
1{try{let e=(await l.Z.get("/api/servers/getServers")).data;t(e.servers);let s=e.servers.map(e=>C(e.serverId));await Promise.all(s)}catch(e){console.error("Failed to fetch servers:",e)}},C=async e=>{try{let t=(await l.Z.get("/api/discord/getOnlineUsersCount?guildId=".concat(e))).data;h(s=>({...s,[e]:t.totalMembers}))}catch(e){}},S=e=>{t([...e].sort((e,t)=>{let s=m[e.serverId]||0;return(m[t.serverId]||0)-s}))},E=()=>{s.trim()&&A.push("/servers/search/".concat(encodeURIComponent(s)))},I=9*f,D=e.slice(I-9,I),M=[];for(let t=1;t<=Math.ceil(e.length/9);t++)M.push(t);let O=(0,a.useRef)(null),R=()=>{if(O.current){let e=O.current.getBoundingClientRect().top+window.scrollY+-100;window.scrollTo({top:e,behavior:"smooth"})}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"relative bg-cover",style:{backgroundImage:"url('/path-to-background-image')"},children:[(0,r.jsxs)("div",{className:"container mx-auto pt-20",children:[(0,r.jsx)("div",{className:"h-[300px] mb-4 flex items-center justify-center",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)(r.Fragment,{children:j?(0,r.jsx)(c.default,{href:"/dashboard/servers",className:"flex items-center text-white px-6 py-2  mb-12  text-sm font-semibold add-your-server rounded-full align-middle",onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:"Go to Dashboard"}):(0,r.jsxs)("button",{className:"flex items-center text-white px-6 py-2  mb-12  text-sm font-semibold add-your-server rounded-full align-middle add-your-server",onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),onClick:()=>(0,o.signIn)("discord"),children:[(0,r.jsx)("span",{className:"align-middle ".concat(b?"text-[#fe5bfd]":"text-[#2cfeda]"),children:"Add Your Server"}),(0,r.jsx)("span",{className:"ml-3 arrow-bounce rounded-full p-1 transition-colors duration-300 align-middle bg-[#2cfeda]",children:(0,r.jsx)(d.Z1Y,{className:"text-white"})})]})}),(0,r.jsxs)("h1",{className:"text-2xl md:text-5xl font-bold text-center text-white mb-4",children:["Grow Your ",(0,r.jsx)("span",{className:"font-semibold",children:"Discord Servers"})]}),(0,r.jsx)("p",{className:"text-center text-md md:text-lg text-gray-300 mb-8 ",children:"Connect with global Discord servers \uD83D\uDC4D"}),(0,r.jsxs)("div",{className:"flex justify-center mx-4",children:[(0,r.jsx)("input",{type:"text",placeholder:"Search for servers...",value:s,onChange:e=>x(e.target.value),className:"w-2/3 px-4 py-3 rounded-l-md focus:outline-none search-input",onKeyDown:e=>{"Enter"===e.key&&E()}}),(0,r.jsx)("button",{className:"bg-gray-700 text-white px-8 py-3 rounded-r-md",onClick:E,children:"SEARCH"})]})]})}),(0,r.jsx)("div",{className:"mb-20",children:(0,r.jsx)(N,{servers:e})}),(0,r.jsxs)("div",{className:"pb-20 md:pb-40",children:[(0,r.jsx)(u,{servers:e,onlineMembers:m,direction:"right-to-left"}),(0,r.jsx)(u,{servers:e,onlineMembers:m,direction:"left-to-right"})]}),(0,r.jsx)("div",{ref:O,className:"p-3 md:p-12 container mx-auto",children:(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:0===e.length?[...Array(9)].map((e,t)=>(0,r.jsx)(g.Z,{},t)):D.map(e=>(0,r.jsx)(n.Z,{serverId:e.serverId,serverIcon:e.serverIconUrl,serverName:e.serverName,description:e.description,tags:e.tags,mainLanguage:e.mainLanguage,category:e.category,onlineMembers:m[e.serverId]||null,inviteLink:e.inviteLink},e._id))})})]}),(0,r.jsx)("nav",{className:"pt-8 pb-16 flex justify-center",children:(0,r.jsxs)("ul",{className:"flex items-center space-x-2",children:[(0,r.jsx)("li",{children:(0,r.jsx)("button",{onClick:()=>{v(f-1),R()},className:"px-3 py-3 mx-1.5 rounded-full text-2xl ".concat(1===f?"bg-gray-400 text-gray-500 cursor-not-allowed":"bg-gray-600 text-white"),disabled:1===f,children:(0,r.jsx)(d.x_l,{})})}),M.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)("button",{onClick:()=>{v(e),R()},className:"px-3 py-3 rounded-full text-xl font-semibold  ".concat(f===e?"server-card-button text-black":"bg-gray-600 text-gray-300"),children:e})},e)),(0,r.jsx)("li",{children:(0,r.jsx)("button",{onClick:()=>{v(f+1),R()},className:"px-3 py-3 mx-1.5 rounded-full text-2xl ".concat(f===M.length?"bg-gray-400 text-gray-500 cursor-not-allowed":"bg-gray-600 text-white"),disabled:f===M.length,children:(0,r.jsx)(d.Z1Y,{})})})]})})]}),(0,r.jsx)(y.Z,{})]})}},8068:function(e,t,s){"use strict";var r=s(7437);s(2265);var a=s(7138),l=s(1942);t.Z=()=>(0,r.jsxs)("footer",{className:"bg-gray-900 text-white py-10 px-5 text-center",children:[(0,r.jsx)("h2",{className:"font-chakra text-2xl md:text-4xl font-semibold  mb-4",children:"DISCOBOOK"}),(0,r.jsx)("div",{className:"text-gray-400 text-sm mb-4",children:"\uD83C\uDF0D English"}),(0,r.jsxs)("div",{className:"flex flex-wrap justify-center gap-6 text-sm md:text-base mb-6",children:[(0,r.jsxs)(a.default,{href:"/terms-of-service",className:"flex items-center gap-2 hover:text-[#2cfeda] transition",children:[(0,r.jsx)(l.UCj,{})," Terms of Service"]}),(0,r.jsxs)(a.default,{href:"/privacy-policy",className:"flex items-center gap-2 hover:text-[#2cfeda] transition",children:[(0,r.jsx)(l.bri,{})," Privacy Policy"]}),(0,r.jsxs)(a.default,{href:"/about-us",className:"flex items-center gap-2 hover:text-[#2cfeda] transition",children:[(0,r.jsx)(l.DAO,{})," About Us"]}),(0,r.jsxs)(a.default,{target:"_blank",href:"https://discord.gg/tjES
1ZRXcbt",className:"flex items-center gap-2 hover:text-[#2cfeda] transition",children:[(0,r.jsx)(l.SRX,{})," Contact Us"]}),(0,r.jsxs)(a.default,{href:"/servers/search",className:"flex items-center gap-2 hover:text-[#2cfeda] transition",children:[(0,r.jsx)(l.U41,{})," Search"]})]}),(0,r.jsx)("div",{className:"mt-6 text-gray-400 text-sm md:text-base",children:'"Empowering server owners to grow, connect, and thrive. \uD83D\uDE80 Your community deserves to be seen!"'}),(0,r.jsx)("div",{className:"flex justify-center mt-6",children:(0,r.jsx)("a",{href:"https://www.producthunt.com/posts/discobook?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-discobook",target:"_blank",children:(0,r.jsx)("img",{src:"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=889557&theme=light&t=1739884880202",alt:"DiscoBook - Grow Your Discord Server. Get Discovered for free. | Product Hunt",className:"w-[220px] h-[54px]"})})}),(0,r.jsx)("div",{className:"text-gray-500 text-base mt-6",children:"\xa9 2025 DISCOBOOK"})]})},7602:function(e,t,s){"use strict";var r=s(7437),a=s(6648),l=s(6463);s(2265),t.Z=e=>{let{serverId:t,serverIcon:s,serverName:n,description:i,tags:d,mainLanguage:o,category:c,onlineMembers:x,inviteLink:m}=e,h=(0,l.useRouter)(),u=()=>{h.push("/server/".concat(t))};return(0,r.jsxs)("div",{className:"bg-gray-800 text-white p-6 rounded-lg shadow-lg w-full h-100 flex flex-col mb-10 server-card-border",children:[(0,r.jsxs)("div",{className:"flex items-start",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)(a.default,{src:s,alt:n,className:"w-16 h-16 rounded-md border-2 border-gray-700 cursor-pointer",onClick:u,width:64,height:64})}),(0,r.jsxs)("div",{className:"ml-4 flex-grow",children:[(0,r.jsx)("h3",{className:"text-xl font-bold cursor-pointer transition-all duration-300 hover:text-[#2cfeda] hover:underline hover:scale-105",onClick:u,children:n}),(0,r.jsx)("span",{className:"server-card-border text-color-tags text-sm px-2 py-0.5 font-semibold rounded mt-2 inline-block capitalize",children:c})]})]}),(0,r.jsx)("div",{className:"text-right mb-6",children:(0,r.jsxs)("span",{className:"bg-green-500 text-white inline-block rounded px-2 py-0.5 text-sm font-semibold",children:[x||"0"," | ONLINE"]})}),(0,r.jsx)("div",{className:"flex flex-wrap mb-2",children:d.map((e,t)=>(0,r.jsx)("span",{className:"server-card-border text-sm text-color-tags px-2 py-1 mr-2 mb-2 rounded-md font-semibold capitalize",children:e},t))}),(0,r.jsx)("p",{className:"mt-4 mb-4 text-md leading-relaxed overflow-hidden overflow-ellipsis whitespace-pre-wrap max-h-28",children:i}),(0,r.jsxs)("div",{className:"mt-auto",children:[(0,r.jsx)("p",{className:"text-sm font-semibold mb-4",children:o}),(0,r.jsx)("button",{className:"server-card-button text-black text-sm font-bold px-6 py-2 rounded-full shadow-lg transition w-full bg-gradient-to-r from-[#2cfeda] to-[#fe5bfd] hover:from-[#10cccd] hover:to-[#fe5bfd] transform hover:scale-105 duration-300",onClick:()=>window.open(m,"_blank"),children:"JOIN THIS SERVER"})]})]})}},2001:function(e,t,s){"use strict";var r=s(7437);s(2265),t.Z=()=>(0,r.jsxs)("div",{className:"bg-gray-800 p-6 rounded-lg shadow-lg w-full h-100 flex flex-col mb-10 animate-pulse",children:[(0,r.jsxs)("div",{className:"flex items-start",children:[(0,r.jsx)("div",{className:"flex-shrink-0 bg-gray-700 w-16 h-16 rounded-md"}),(0,r.jsxs)("div",{className:"ml-4 flex-grow",children:[(0,r.jsx)("div",{className:"h-5 bg-gray-700 w-3/4 mb-2 rounded"}),(0,r.jsx)("div",{className:"h-3 bg-gray-700 w-1/2 rounded"})]})]}),(0,r.jsx)("div",{className:"text-right mb-6 ml-auto",children:(0,r.jsx)("div",{className:"h-5 w-24 bg-gray-700 rounded"})}),(0,r.jsx)("div",{className:"flex flex-wrap mb-2",children:[void 0,void 0,void 0,void 0].map((e,t)=>(0,r.jsx)("div",{className:"h-4 bg-gray-700 w-16 rounded mr-2 mb-2"},t))}),(0,r.jsxs)("div",{className:"mt-4 mb-4 space-y-2 min-h-28",children:[(0,r.jsx)("div",{className:"h-4 bg-gray-700 w-full rounded"}),(0,r.jsx)("div",{className:"h-4 bg-gray-700 w-5/6 rounded"}),(0,r.jsx)("div",{className:"h-4 bg-gray-700 w-2/3 rounded"})]}),(0,r.jsxs)("div",{className:"mt-auto",children:[(0,r.jsx)("div",{className:"h-4 bg-gray-700 w-1/3 mb-4 rounded"}),(0,r.jsx)("div",{className:"h-8 bg-gray-700 w-full rounded"})]})]})}}
1,function(e){e.O(0,[699,870,689,980,648,138,849,777,776,971,23,744],function(){return e(e.s=8350)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.