PageSourceSearch

https://aisha.ai/_next/static/chunks/4042-cc72cb1e8b67d279.js

js aisha.ai collected 2026-10-01 23:59:15 UTC 11,198 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3f1849fc-63ef-447c-bc7c-5ee51d4bae06",e._sentryDebugIdIdentifier="sentry-dbid-3f1849fc-63ef-447c-bc7c-5ee51d4bae06")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4042],{24811:(e,t,a)=>{a.d(t,{CG:()=>o,Fm:()=>g,cj:()=>i,h:()=>c,qp:()=>h});var n=a(87384);a(39604);var r=a(89755),s=a(32823),l=a(44073);function i(e){let{...t}=e;return(0,n.jsx)(r.bL,{"data-slot":"sheet",...t})}function o(e){let{...t}=e;return(0,n.jsx)(r.l9,{"data-slot":"sheet-trigger",...t})}function d(e){let{...t}=e;return(0,n.jsx)(r.ZL,{"data-slot":"sheet-portal",...t})}function u(e){let{className:t,...a}=e;return(0,n.jsx)(r.hJ,{"data-slot":"sheet-overlay",className:(0,l.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function c(e){let{className:t,children:a,showCloseButton:i,side:o="right",...c}=e;return(0,n.jsxs)(d,{children:[(0,n.jsx)(u,{}),(0,n.jsxs)(r.UC,{"data-slot":"sheet-content",className:(0,l.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500","right"===o&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm","left"===o&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm","top"===o&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b","bottom"===o&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...c,children:[a,(0,n.jsxs)(r.bm,{className:(0,l.cn)("absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",!i&&"hidden"),children:[(0,n.jsx)(s.A,{className:"size-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function g(e){let{className:t,...a}=e;return(0,n.jsx)("div",{"data-slot":"sheet-header",className:(0,l.cn)("flex flex-col gap-1.5 p-4",t),...a})}function h(e){let{className:t,...a}=e;return(0,n.jsx)(r.hE,{"data-slot":"sheet-title",className:(0,l.cn)("text-foreground font-semibold",t),...a})}},36788:(e,t,a)=>{a.d(t,{PublicNavbar:()=>m});var n=a(87384),r=a(89326),s=a(94461),l=a.n(s),i=a(18846),o=a(39604),d=a(3266),u=a(90906),c=a(24811),g=a(44073),h=a(39387);function m(){let[e,t]=(0,o.useState)(!1),[a,s]=(0,o.useState)(!1),m=(0,i.usePathname)(),{isAuthenticated:f}=(0,h.A)();return(0,o.useEffect)(()=>{t(!1)},[m]),(0,o.useEffect)(()=>{let e=()=>{s(window.scrollY>50)};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(0,n.jsx)("header",{className:(0,g.cn)("sticky top-0 flex h-18 items-center gap-4 px-4 md:px-6 z-50 transition-all duration-300",a?"backdrop-blur-md shadow-xl":"bg-transparent"),children:(0,n.jsxs)("div",{className:"container flex w-full items-center justify-between mx-auto",children:[(0,n.jsx)(l(),{href:"/",className:"flex items-center gap-2 text-lg font-semibold md:text-base",children:(0,n.jsx)(d.A,{className:"h-10 text-white"})}),(0,n.jsxs)("div",{className:"flex items-center gap-2 md:gap-3",children:[(0,n.jsx)("div",{className:"hidden md:flex"}),!f&&(0,n.jsx)(l(),{href:"/login",className:"hidden md:inline-flex",children:(0,n.jsx)(u.$,{variant:"default",className:"px-6 cursor-pointer rounded-full","data-testid":"login-button",children:"Login"})}),f&&(0,n.jsx)(l(),{href:"/ask",className:"hidden md:inline-flex",children:(0,n.jsx)(u.$,{variant:"default",className:"px-6 cursor-pointer rounded-full",children:"Chat with AISHA"})}),(0,n.jsxs)(c.cj,{open:e,onOpenChange:t,children:[(0,n.jsx)(c.CG,{asChild:!0,children:(0,n.jsxs)(u.$,{variant:"ghost",size:"icon",className:"shrink-0 md:hidden border",onClick:()=>t(!0),"data-testid":"mobile-menu-trigger",children:[(0,n.jsx)(r.A,{className:"h-5 w-5 text-white rounded-lg"}),(0,n.jsx)("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),(0,n.jsxs)(c.h,{side:"right",className:"w-[80%] sm:w-75 bg-[#0b0f2a] border-0",children:[(0,n.jsx)(c.qp,{className:"sr-only",children:"Navigation Menu"}),(0,n.jsx)("div",{className:"mt-8 px-2.5"}),(0,n.jsxs)("div",{children:[(0,n.jsx)(l(),{href:"/login",className:"flex justify-center mt-6 mx-4",children:(0,n.jsx)(u.$,{variant:"default",className:"w-full  rounded-full",children:"Login"})}),(0,n.jsx)(l(),{href:"/signup",className:"flex justify-center mt-6 mx-4",children:(0,n.jsx)(u.$,{variant:"secondary",className:"w-full text-white rounded-full",children:"Sign Up"})})]})]})]})]})]})})}},39387:(e,t,a)=>{a.d(t,{c:()=>g,AuthProvider:()=>h,A:()=>m});var n=a(87384),r=a(39604),s=a(9663);let l={VIEW_PAGE:"view:page"},i=(e,t,a)=>
1{let n=[l.VIEW_PAGE];return!!e||n.includes(t)&&(null==a?void 0:a.resourceType)==="public_page"};var o=a(27804),d=a(90674),u=a(29755);let c={isAuthenticated:!1,user:null,isLoading:!0},g=(0,r.createContext)(void 0),h=e=>{let{children:t}=e,[l,h]=(0,r.useState)(c),[m,f]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=()=>{h({isAuthenticated:!1,user:null,isLoading:!1})},t=()=>{h({isAuthenticated:!1,user:null,isLoading:!1}),f(!1)};return window.addEventListener("auth:unauthorized",e),window.addEventListener(u.G0,t),()=>{window.removeEventListener("auth:unauthorized",e),window.removeEventListener(u.G0,t)}},[]),(0,r.useEffect)(()=>{let e=!0;return(async()=>{if(s.ManageAuthToken.isAccessTokenValid()){let e=s.ManageAuthToken.getUserId(),t=s.ManageAuthToken.getUserEmail(),a=s.ManageAuthToken.getUserRole();h({isAuthenticated:!0,user:e&&t&&a?{id:parseInt(e,10)||0,name:"",email:t,role:a,emailVerifiedAt:null,createdAt:"",updatedAt:"",phoneNo:null,smsOptIn:!1,avatar:null,profileImageUrl:null,profileImageThumbnail:null,profileImageFilename:null,currentLocation:null,archetype:null}:null,isLoading:!1}),d.tokenRefreshTriggers.setupAllTriggers();return}let t="AISHA_ACCESS_TOKEN";if(localStorage.getItem(t))try{let{AuthService:n}=await Promise.resolve().then(a.bind(a,50465)),r=await n.refreshToken({skipSessionGate:!0,suppressFailureHandling:!0});if(localStorage.removeItem(t),!e)return;let l=s.ManageAuthToken.getUserId(),i=s.ManageAuthToken.getUserEmail(),o=s.ManageAuthToken.getUserRole();if(r&&l&&i&&o){let e={id:parseInt(l,10)||0,name:"",email:i,role:o,emailVerifiedAt:null,createdAt:"",updatedAt:"",ph
1oneNo:null,smsOptIn:!1,avatar:null,profileImageUrl:null,profileImageThumbnail:null,profileImageFilename:null,currentLocation:null,archetype:null};h({isAuthenticated:!0,user:e,isLoading:!1}),d.tokenRefreshTriggers.setupAllTriggers();return}}catch(a){if(console.warn("Legacy session migration failed:",a),localStorage.removeItem(t),!e)return}if(s.ManageAuthToken.hasActiveSession())try{let{AuthService:t}=await Promise.resolve().then(a.bind(a,50465)),n=await t.refreshToken();if(!e)return;let r=s.ManageAuthToken.getUserId(),l=s.ManageAuthToken.getUserEmail(),i=s.ManageAuthToken.getUserRole();if(n&&r&&l&&i){let e={id:parseInt(r,10)||0,name:"",email:l,role:i,emailVerifiedAt:null,createdAt:"",updatedAt:"",phoneNo:null,smsOptIn:!1,avatar:null,profileImageUrl:null,profileImageThumbnail:null,profileImageFilename:null,currentLocation:null,archetype:null};h({isAuthenticated:!0,user:e,isLoading:!1}),d.tokenRefreshTriggers.setupAllTriggers();return}}catch(t){if(console.warn("Silent refresh on page reload failed:",t),!e)return}h({isAuthenticated:!1,user:null,isLoading:!1})})(),()=>{e=!1,d.tokenRefreshTriggers.cleanup()}},[]);let p=async()=>{d.tokenRefreshTriggers.cleanup(),sessionStorage.setItem("explicitLogout","true"),sessionStorage.removeItem("redirectAfterLogin"),h({isAuthenticated:!1,user:null,isLoading:!1}),f(!1);try{let{AuthService:e}=await Promise.resolve().then(a.bind(a,50465));await e.logout()}catch(e){console.warn("Secure logout failed, performing basic logout:",e),s.ManageAuthToken.removeTokenData(),o.queryClient.resetQueries(),window.location.href="/login"}};return(0,n.jsx)(g.Provider,{value:{...l,user:l.user,setUser:e=>{h(t=>({...t,user:e,isAuthenticated:!!e})),f(!0)},canAccess:(e,t)=>i(l.user,e,t),logout:p,login:e=>{var t;let{user:a,access_token:n}=e;s.ManageAuthToken.storeAccessToken(n),h({isAuthenticated:!0,user:{id:a.id,name:a.name,email:a.email,role:a.role,emailVerifiedAt:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),phoneNo:null!=(t=a.phoneNo)?t:null,smsOptIn:!1,avatar:null,profileImageUrl:null,profileImageThumbnail:null,profileImageFilename:null,currentLocation:null,archetype:null,user_onboard:a.user_onboard,state:a.state},isLoading:!1}),void 0!==a.user_onboard&&f(!0),d.tokenRefreshTriggers.setupAllTriggers()},isProfileLoaded:m},children:t})},m=()=>{let e=(0,r.useContext)(g);if(void 0===e)throw Error("useAuth must be used within an AuthProvider");return e}},62327:(e,t,a)=>{a.d(t,{Footer:()=>l});var n=a(87384);a(39604);var r=a(18846),s=a(44073);function l(){var e;let t=(0,r.useRouter)(),a="/"===(0,r.usePathname)();return(0,n.jsx)("footer",{className:(0,s.cn)("backdrop-blur-sm px-4 py-6 md:px-8",a?"bg-slate-950/30":"bg-slate-100/80 dark:bg-slate-950/30"),"data-testid":"footer",children:(0,n.jsx)("div",{className:"container mx-auto",children:(0,n.jsxs)("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[(0,n.jsxs)("div",{className:(0,s.cn)("text-sm order-1",a?"text-gray-400":"text-gray-600 dark:text-gray-400"),"data-testid":"copyright",children:["\xa9 ",(e=new Date,e.getFullYear())," AISHA. All rights reserved."]}),(0,n.jsxs)("div",{className:(0,s.cn)("text-sm order-3 md:order-2",a?"text-gray-400":"text-gray-600 dark:text-gray-400"),"data-testid":"attribution",children:["Powered by"," ",(0,n.jsx)("a",{href:"https://onyximpact.org/",target:"_blank",rel:"noopener noreferrer",className:"text-[#D89B00] dark:text-[#FFBF00] font-semibold hover:text-foreground transition-colors duration-200 underline-offset-2 hover:underline","data-testid":"onyx-impact-link",children:"Onyx Impact"})]}),(0,n.jsxs)("nav",{className:"flex items-center gap-6 order-2 md:order-3","data-testid":"legal-links",children:[(0,n.jsx)("button",{type:"button",onClick:()=>t.push("/privacy-policy"),className:(0,s.cn)("text-sm transition-colors duration-200 cursor-pointer",a?"text-gray-400 hover:text-gray-300":"text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300"),"data-testid":"privacy-policy-link",children:"Privacy Policy"}),(0,n.jsx)("button",{type:"button",onClick:()=>t.push("/terms-of-service"),className:(0,s.cn)("text-sm transition-colors duration-200 cursor-pointer",a?"text-gray-400 hover:text-gray-300":"text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300"),"data-testid":"terms-service-link",children:"Terms of Service"})]})]})})})}}}]);

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.