PageSourceSearch

https://mond.how/_next/static/chunks/pages/auth-callback/discord-guild-12e6dd07c34b80a1.js

js mond.how collected 2026-09-24 09:29:54 UTC 4,722 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[393],{95976:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth-callback/discord-guild",function(){return r(51154)}])},8329:function(e,t,r){"use strict";r.d(t,{S:function(){return c}});var n=r(52322),i=r(59772);r(2784);var s=r(94182),u=r(34725),a=r(45356);let c=e=>{let{children:t}=e,{t:r}=(0,i.$G)(),{authUser:c,isLoading:o}=(0,a.fC)(),l=(0,a.S4)();return o?(0,n.jsx)(s.jk,{py:!0}):c?(0,n.jsx)(u.Y,{children:e=>t(e)}):(0,n.jsxs)("div",{className:"flex flex-col items-center gap-24 p-24 text-text-black dark:text-dark-text-black border-[1px] border-line dark:border-dark-line bg-surface dark:bg-dark-surface rounded-[3px] w-full",children:[(0,n.jsx)("div",{className:"tg-subtitle-1 text-text-black dark:text-dark-text-black",children:r("Please sign in to see this page")}),(0,n.jsx)("div",{className:"tg-body-sans-2 text-text-gray dark:text-dark-text-gray leading-8 text-center",children:r("AuthFallback.message")}),(0,n.jsx)(s.zx,{isFullWidth:!0,onClick:l.openToContinueCurrentPath,children:r("Sign up / Sign in")})]})}},34725:function(e,t,r){"use strict";r.d(t,{Y:function(){return p}});var n=r(52322),i=r(34089),s=r.n(i),u=r(752),a=r(5632),c=r(2784),o=r(10890),l=r(94182),d=r(78448),f=r(45356),g=r(87472),h=r(30856);let p=e=>{let{unauthenticatedRoute:t,children:r}=e,i=(0,a.useRouter)(),{authUser:p,isLoading:x,authState:k,reload:m}=(0,f.fC)(),_=(0,u.Dv)(h.D);(0,c.useEffect)(()=>{if(!_){if(k===g.jq.Unauthenticated||k===g.jq.Anonymous){s().leaveBreadcrumb("RequireAuth: redirecting to sign in page due to unauthenticated state",{authState:k}),i.replace(t||d._j.signInToContinue(i.asPath));return}k!==g.jq.ProfileNotCreated||(null==p?void 0:p.profile)||(s().leaveBreadcrumb("RequireAuth: redirecting to create profile page due to profile not created state",{authState:k}),i.replace(d._j.accountSetup))}},[_,x,k,t,i,null==p?void 0:p.profile]);let b=!(null==p?void 0:p.profile),v=(0,c.useCallback)(async()=>{b&&(s().leaveBreadcrumb("RequireAuth: reloading auth user due to 5 seconds timeout"),await m(!0))},[b,m]);return((0,o.Z)(v,5e3),b)?(0,n.jsx)(l.AA,{}):(0,n.jsx)(n.Fragment,{children:r({authUser:p})})}},83577:function(e,t,r){"use strict";r.d(t,{O:function(){return i}});var n=r(48359);let i=n.Ry({response:n.Ry({errors:n.IX(n.Ry({message:n.Z_(),extensions:n.Ry({code:n.Z_()})})).nonempty(),status:n.Rx().optional(),headers:n._4().optional()}),request:n._4().optional()})},51154:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSG:function(){return k},default:function(){return m}});var n=r(52322),i=r(8329),s=r(34089),u=r.n(s),a=r(5632),c=r(2784),o=r(98614),l=r(78067),d=r(44522),f=r(78448),g=r(32440),h=r(90363),p=r(83577);let x=()=>{let e=(0,a.useRouter)(),{show:t}=(0,d.p)(),{t:r}=(0,o.$G)(),{gqlClient:i,isAuthenticated:s}=(0,h.gq)(),{mutate:x,isLoading:k}=(0,g.GLM)(i),m=(0,c.useRef)(!1);return(0,c.useEffect)(()=>{if(!e.isReady||m.current||!s)return;let n=n=>{t(r(n)),setTimeout(()=>{e.replace(f._j.membershipSetting.pathname)},200)};(async()=>{let{code:t,guild_id:r,error:i}=e.query;if(i){m.current=!0,n("settings.discordIntegrationFailed");return}if(!t||!r)return;m.current=!0;let s="settings.discordIntegrationFailed";x({authorizationCode:t,guildId:r},{onSuccess:()=>{n("settings.discordIntegrationSuccess")},onError:e=>{u().notify(e);let t=p.O.safeParse(e);t.success&&t.data.response.errors[0].extensions.code===l.ErrorCode.ALREADY_LINKED_TO_ANOTHER_USER&&(s="settings.discordIntegrationFailedDueToDuplication"),n(s)}})})()},[e.isReady,s,e,e.query,t,r,x,k]),(0,n.jsx)("div",{className:"grid h-[calc(100vh-theme(spacing.64))] place-items-center",children:(0,n.jsxs)("div",{className:"flex flex-col items-center gap-8 p-24 bg-white dark:bg-dark-white rounded-lg shadow-md",children:[(0,n.jsxs)("h1",{className:"tg-heading-5",children:[r("discordIntegration.title")," ",r("Processing now")]}),(0,n.jsx)("p",{children:r("settings.discordIntegrationCallback")})]})})};var k=!0,m=()=>(0,n.jsx)(i.S,{children:e=>(0,n.jsx)(x,{...e})})},10890:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(2784);function i(e,t){void 0===t&&(t=0);var r=(0,n.useRef)(!1),i=(0,n.useRef)(),s=(0,n.useRef)(e),u=(0,n.useCallback)(function(){return r.current},[]),a=(0,n.useCallback)(function(){r.current=!1,i.current&&clearTimeout(i.current),i.current=setTimeout(function(){r.current=!0,s.current()},t)},[t]),c=(0,n.useCallback)(function(){r.current=null,i.current&&clearTimeout(i.current)},[]);return(0,n.useEffect)(function(){s.current=e},[e]),(0,n.useEffect)(function(){return a(),c},[t]),[u,c,a]}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=95976)}),_N_E=e.O()}]);
2//# sourceMappingURL=discord-guild-12e6dd07c34b80a1.js.map

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.