module.exports=[184897,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(50944);function e(){let a=(0,d.useSearchParams)(),[e,f]=(0,c.useState)("processing");return(0,c.useEffect)(()=>{let b=a.get("code"),c=a.get("state"),d=a.get("error"),e={code:b,state:c,error:d,errorDescription:a.get("error_description"),fullUrl:window.location.href},g=[window.location.origin,"http://localhost:1455"];if(window.opener)for(let a of g)try{window.opener.postMessage({type:"oauth_callback",data:e},a)}catch(a){console.log("postMessage failed:",a)}try{let a=new BroadcastChannel("oauth_callback");a.postMessage(e),a.close()}catch(a){console.log("BroadcastChannel failed:",a)}try{localStorage.setItem("oauth_callback",JSON.stringify({...e,timestamp:Date.now()}))}catch(a){console.log("localStorage failed:",a)}b||d?(f("success"),setTimeout(()=>{window.close(),setTimeout(()=>f("done"),500)},1500)):setTimeout(()=>f("manual"),0)},[a]),(0,b.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg",children:(0,b.jsxs)("div",{className:"text-center p-8 max-w-md",children:["processing"===e&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,b.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,b.jsx)("h1",{className:"text-xl font-semibold mb-2",children:"Processing..."}),(0,b.jsx)("p",{className:"text-text-muted",children:"Please wait while we complete the authorization."})]}),("success"===e||"done"===e)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,b.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,b.jsx)("h1",{className:"text-xl font-semibold mb-2",children:"Authorization Successful!"}),(0,b.jsx)("p",{className:"text-text-muted",children:"success"===e?"This window will close automatically...":"You can close this tab now."})]}),"manual"===e&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-yellow-100 dark:bg-yellow-900/30 flex items-center justify-center",children:(0,b.jsx)("span",{className:"material-symbols-outlined text-3xl text-yellow-600",children:"info"})}),(0,b.jsx)("h1",{className:"text-xl font-semibold mb-2",children:"Copy This URL"}),(0,b.jsx)("p",{className:"text-text-muted mb-4",children:"Please copy the URL from the address bar and paste it in the application."}),(0,b.jsx)("div",{className:"bg-surface border border-border rounded-lg p-3 text-left",children:(0,b.jsx)("code",{className:"text-xs break-all",children:""})})]})]})})}a.s(["default",0,function(){return(0,b.jsx)(c.Suspense,{fallback:(0,b.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg",children:(0,b.jsxs)("div",{className:"text-center p-8",children:[(0,b.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,b.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,b.jsx)("p",{className:"text-text-muted",children:"Loading..."})]})}),children:(0,b.jsx)(e,{})})}])}];

//# sourceMappingURL=src_app_callback_page_0qsmtz..js.map