1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,164485,e=>{"use strict";e.i(481082),e.i(137873),e.i(588583),e.i(117506),e.i(218202),e.i(285745),e.i(794464),e.i(890723),e.i(856173),e.i(762858),e.i(89909),e.i(76992),e.i(441010),e.i(148457),e.i(517480),e.i(799614),e.i(536141),e.i(410309),e.i(685848),e.i(208295),e.i(715575),e.i(760756),e.i(761907),e.s([])},117506,e=>{"use strict";var t=e.i(271645);e.s(["useAutoSlider",0,({length:e,interval:a=8e3})=>{let[r,i]=(0,t.useState)(0),[s,n]=(0,t.useState)(0),u=(0,t.useRef)(null),l=(0,t.useRef)(0),o=()=>{u.current&&clearInterval(u.current),e<=1||(u.current=setInterval(()=>{i(t=>{let a=(t+1)%e;return n(1),l.current=t,a})},a))};return(0,t.useEffect)(()=>{0===e?i(0):i(t=>t>=e?e-1:t)},[e]),(0,t.useEffect)(()=>{if(!(e<=1))return o(),()=>{u.current&&clearInterval(u.current)}},[e,a]),{index:r,direction:s,setIndex:t=>{if(e<=0)return;let a=(t%e+e)%e;a===r||(n(a>r?1:-1),l.current=a,i(a),o())},resetTimer:o}}])},761907,e=>{"use strict";var t=e.i(618566),a=e.i(271645),r=e.i(366181),i=e.i(39554);e.s(["useDraftPreview",0,()=>{let e=(0,t.useSearchParams)(),{user:s}=(0,r.useAuth)(),n=(0,i.isPreviewRequested)(e),u=s?.role==="admin";return(0,a.useMemo)(()=>({requested:n,isAdmin:u,isPreviewing:n&&u}),[n,u])}])},588583,e=>{"use strict";e.i(151718);var t=e.i(158528),t=t,a=t,r=e.i(136767),i=t,s=t,n=t,u=t,l=t,o=t,c=t,d=t,h=t,m=e.i(959141);class g extends Error{code;constructor(e,t){super(t),this.name="AuthError",this.code=e??"unknown"}}e.s(["useFirebaseEmailAuth",0,function(){return{registerWithEmail:async({email:e,password:a,firstName:r,lastName:s})=>{try{let n=await (0,t.x)(m.auth,e,a);try{await (0,i.aq)(n.user,{displayName:`${r} ${s}`})}catch{}}catch(a){let e=a?.code,t="Failed to signup. Try again later.";switch(e){case"auth/email-already-in-use":t="An account with this email already exists.";break;case"auth/invalid-email":t="Email address is invalid.";break;case"auth/network-request-failed":t="Network error. Try again.";break;case"auth/too-many-requests":t="Too many attempts. Try again later.";break;case"auth/user-token-expired":t="Your session has expired. Please refresh the page and try again."}throw new g(e,t)}},loginWithEmail:async(e,t)=>{try{await (0,a.af)(m.auth,e,t)}catch(a){let e=a?.code,t="Failed to sign in. Try again later.";switch(e){case"auth/invalid-credential":case"auth/wrong-password":t="Incorrect email or password.";break;case"auth/user-not-found":t="Account not found.";break;case"auth/user-disabled":t="Account is disabled.";break;case"auth/invalid-email":t="Email address is invalid.";break;case"auth/network-request-failed":t="Network error. Try again later.";break;case"auth/too-many-requests":t="Your account is locked due to too many attempts. Please try after 24 hours.";break;case"auth/user-token-expired":t="Your session has expired. Please refresh the page and try again."}throw new g(e,t)}},verifyEmail:async e=>{try{let t=await (0,l.u)(m.auth,e),a=t?.data?.email,r=m.auth.currentUser?.email;if(a&&r&&a.toLowerCase()!==r.toLowerCase())throw new g("app/account-mismatch","Email in link does not match current user.");await (0,u.o)(m.auth,e),await m.auth.currentUser?.reload(),await m.auth.currentUser?.getIdToken(!0)}catch(a){if(a instanceof g)throw a;let e=a?.code??"unknown",t="Failed to verify email. Try again later.";switch(e){case"auth/invalid-action-code":case"auth/expired-action-code":t="Invalid or expired verification link.";break;case"auth/invalid-email":t="Email address is invalid.";break;case"auth/network-request-failed":t="Network error. Try again later.";break;case"auth/user-token-expired":t="Your session has expired. Please refresh the page and try again."}throw new g(e,t)}},verifyResetPasswordCode:async e=>{try{let t=await (0,s.au)(m.auth,e),a=m.auth.currentUser?.email;if(t&&a&&t.toLowerCase()!==a.toLowerCase())throw new g("app/account-mismatch","Email in link does not match current user.");return t}catch(a){let e=a?.code??"unknown",t="Failed to verify reset password email. Try again later.";switch(e){case"auth/expired-action-code":t="Reset link has expired.";break;case"auth/invalid-action-code":t="Invalid or already used reset link.";break;case"auth/user-disabled":t="Account is disabled.";break;case"auth/user-not-found":t="Account not found.";break;case"auth/weak-password":t="Password is too weak.";break;case"auth/network-request-failed":t="Network error. Try again later.";break;case"auth/too-many-requests":t="Too many attempts. Try again later.";break;case"auth/user-token-expired":t="Your session has expired. Please refresh the page and try again."}throw new g(e,t)}},resetPassword:async(e,t,r)=>{try{await (0,n.v)(m.auth,e,t),await (0,a.af)(m.auth,r,t)}catch(a){let e=a?.code??"unknown",t="Failed to reset password. Try again later.";switch(e){case"auth/expired-action-code":t="Reset link has expired.";break;case"auth/invalid-action-code":t="Invalid or already used reset link.";break;case"auth/user-disabled":t="Account is disabled.";break;case"auth/user-not-found":t="Account not found.";break;case"auth/weak-password":t="Password is too weak.";break;case"auth/network-request-failed":t="Network error. Try again later.";break;case"auth/too-many-requests":t="Too many attempts. Try again later.";break;case"auth/user-token-expired":t="Your session has expired. Please refresh the page and try again."}throw new g(e,t)}}
1,signInWithMagicLink:async e=>{try{let t=window.location.href,a=new URL(t);a.searchParams.has("apiKey")||a.searchParams.set("apiKey","AIzaSyBg-4kw_WG7iYKYw5-cLtSvSKPTo4hbV-4");let r=a.toString();if(!(0,c.U)(m.auth,r))throw new g("app/invalid-link","Invalid sign-in link");await (0,o.ag)(m.auth,e,r),await m.auth.currentUser?.reload()}catch(a){let e=a?.code??"unknown",t="Failed to sign in with link. Try again later.";switch(e){case"auth/expired-action-code":t="Sign-in link has expired.";break;case"auth/invalid-action-code":t="Invalid or already used sign-in link.";break;case"auth/invalid-email":t="Email address is invalid.";break;case"auth/user-disabled":t="Account is disabled.";break;case"auth/too-many-requests":t="Too many attempts. Try again later.";break;case"auth/network-request-failed":t="Network error. Try again later.";break;case"auth/user-token-expired":t="Your session has expired. Please refresh the page and try again.";break;case"app/invalid-link":t="Invalid link. Please try again."}throw new g(e,t)}},signOut:async()=>{await (0,r.signOut)(m.auth)},verifyCurrentPassword:async e=>{let t=m.auth.currentUser;if(!t?.email)return{success:!1,error:"Failed to change password"};try{let a=h.d.credential(t.email,e);return await (0,d.a2)(t,a),{success:!0}}catch(e){if("INVALID_LOGIN_CREDENTIALS"==e?.message)return{success:!1,error:"Invalid Password"};return{success:!1,error:"Faild to change password"}}}}}],588583)},208295,715575,760756,e=>{"use strict";var t=e.i(271645),a=e.i(915046),r=e.i(925108);e.i(732832);var i=e.i(875664);
1let s="America/New_York",n=new Intl.DateTimeFormat("en-US",{timeZone:s,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),u=new Intl.DateTimeFormat("en-US",{timeZone:s,hour:"numeric",minute:"2-digit",hour12:!0}),l=null;e.s(["useLiveChapterMarkers",0,e=>{let[s,o]=(0,t.useState)([]),[c,d]=(0,t.useState)([]);return(0,t.useEffect)(()=>{if(!e)return void o([]);let t=!0;return(async()=>{try{let e=await (!l&&(l=new Promise(e=>{let t=setTimeout(()=>e(!1),3e3);(0,a.fetchChapterMarkersFlag)().then(a=>{clearTimeout(t),e(a)}).catch(a=>{clearTimeout(t),i.logger.error("Failed to read ENABLE_CHAPTER_MARKERS: ",a),e(!1)})})),l);if(!t||!e)return;let s=await (0,r.getLiveChapters)();if(!t)return;o(s?.data??[])}catch(e){i.logger.error("Failed to load live chapters: ",e)}})(),()=>{t=!1}},[e]),(0,t.useEffect)(()=>{if(0===s.length)return void d([]);let e=()=>d(((e,t=new Date)=>e.map(e=>({id:e.id,title:e.title,subtitle:e.subtitle,thumbnail:e.thumbnail,startDate:((e,t,a=new Date)=>{let r,i,s=(r=n.formatToParts(a),{year:(i=e=>Number(r.find(t=>t.type===e)?.value??"0"))("year"),month:i("month"),day:i("day"),hour:i("hour"),minute:i("minute"),second:i("second")}),u=Date.UTC(s.year,s.month-1,s.day,s.hour,s.minute,s.second),l=a.getTime()-a.getMilliseconds();return new Date(Date.UTC(s.year,s.month-1,s.day,e,t,0)-(u-l))})(e.startHour,e.startMinute,t)})).filter(e=>e.startDate.getTime()<=t.getTime()).sort((e,t)=>t.startDate.getTime()-e.startDate.getTime()).map(e=>{let t;return{...e,timeLabel:(t=e.startDate,`${u.format(t)} ET`)}}))(s));e();let t=setInterval(e,6e4);return()=>clearInterval(t)},[s]),c}],208295);var o=e.i(762858);e.s(["useLiveChatAccess",0,function(){let{validateAccess:e}=(0,o.useAccessControl)(),{canAccess:t}=e({requiresAuth:!0,requiresSubscription:!0,action:"live-chat",checkoutSource:"live_chat",shouldRedirect:!1});return{canAccessLiveChat:!0===t,isDecidingLiveChatAccess:null===t}}],715575);var c=e.i(148457);e.s(["useLiveResumeTracking",0,function({enabled:e,isPlaying:a,track:r}){let s=(0,c.useLatestRef)(r),n=(0,t.useRef)(null),u=(0,t.useRef)(0),l=(0,t.useRef)(!1),o=(0,t.useRef)(null),d=(0,t.useRef)(!a);(0,t.useLayoutEffect)(()=>{d.current=!a},[a]);let h=e&&a,m=(0,t.useCallback)(()=>{let e=n.current;if(null!==e)return l.current?e:Math.round(e+(Date.now()-u.current)/1e3)},[]),g=(0,t.useCallback)((e,t)=>{s.current(e,t).catch(e=>{i.logger.warn("[useLiveResumeTracking] Live track failed:",e)})},[s]),w=(0,t.useCallback)((e=!1)=>{o.current&&(clearTimeout(o.current),o.current=null);let t=m();void 0!==t&&g(t,{resumeOnly:!0,paused:d.current,keepalive:e})},[m,g]),f=(0,t.useCallback)(e=>{n.current=e,u.current=Date.now()},[]),p=(0,t.useCallback)(e=>{f(e),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,w()},1500)},[f,w]);return(0,t.useEffect)(()=>{if(!h)return;let e=m();void 0!==e&&(n.current=e,u.current=Date.now()),l.current=!0;let t=()=>g(m());t();let a=setInterval(t,6e4);return()=>{clearInterval(a),l.current=!1,u.current=Date.now(),w()}},[h,m,g,w]),(0,t.useEffect)(()=>{if(!e)return;let t=()=>{"hidden"===document.visibilityState&&w(!0)};return document.addEventListener("visibilitychange",t),()=>{document.removeEventListener("visibilitychange",t),o.current&&w(),n.current=null}},[e,w]),{onLiveOffsetChange:f,onLiveSeeked:p}}],760756)},481082,137873,e=>{"use strict";var t=e.i(271645);e.i(732832),e.s([],481082),e.i(151718);var a=e.i(158528),a=a,r=a,i=a,s=e.i(136767),n=e.i(959141);e.s(["useFirebaseOAuth",0,()=>{let[e,u]=(0,t.useState)({google:!1,apple:!1}),[l,o]=(0,t.useState)({}),c=async e=>{u(t=>({...t,[e]:!0})),o(t=>({...t,[e]:void 0}));try{let t=(e=>{if("google"===e){let e=new r.f;return e.setCustomParameters({prompt:"select_account"}),e}{let e=new i.g("apple.com");return e.addScope("email"),e.addScope("name"),e}})(e);await (0,a.ai)(n.auth,t)}catch(r){let t=r?.code,a=`Sign in using ${e.charAt(0).toUpperCase()+e.slice(1)} failed. Try again later.`;switch(t){case"auth/account-exists-with-different-credential":a="Account already exists with a different sign-in method.";break;case"auth/cancelled-popup-request":case"auth/popup-closed-by-user":a="Sign in was canceled by the user.";break;case"auth/invalid-credential":a="Invalid credentials.";break;case"auth/popup-blocked":a="Popup was blocked by the browser.";break;case"auth/too-many-requests":a="Too many attempts. Try again later.";break;case"auth/network-request-failed":a="Network error. Try again later."}return o(t=>({...t,[e]:a})),null}finally{u(t=>({...t,[e]:!1}))}};return{signInWithGoogle:()=>c("google"),signInWithApple:()=>c("apple"),signOut:async()=>{await (0,s.signOut)(n.auth)},loading:e,error:l,resetErrors:()=>{u({google:!1,apple:!1}),o({})}}}],137873)},794464,890723,856173,762858,982615,441010,517480,799614,536141,410309,685848,e=>{"use strict";var t=e.i(672464),a=e.i(97298);e.s(["usePaginatedAtom",0,function(e){let r=(0,t.useAtomValue)(e.responseAtom),i=(0,t.useAtomValue)(e.itemsAtom),s=(0,t.useAtomValue)(e.metaAtom),n=(0,t.useAtomValue)(e.statusAtom),u=(0,t.useAtomValue)(e.errorAtom),l=(0,t.useAtomValue)(e.lastArgsAtom),o=(0,t.useSetAtom)(e.triggerAtom),c=(0,t.useSetAtom)(e.refreshAtom),d=(0,t.useSetAtom)(e.resetAtom);return{response:r,items:i,meta:s,status:n,error:u,lastArgs:l,trigger:o,refresh:c,reset:d,updateItem:(0,t.useSetAtom)(e.updateItemAtom),removeItem:(0,t.useSetAtom)(e.removeItemAtom),isIdle:n===a.PaginatedStatus.IDLE,isLoading:n===a.PaginatedStatus.LOADING,isFetchingMore:n===a.PaginatedStatus.LOADING_MORE,isRefreshing:n===a.PaginatedStatus.REFRESHING,isSuccess:n===a.PaginatedStatus.SUCCESS,isError:n===a.PaginatedStatus.ERROR,moreError:n===a.PaginatedStatus.ERROR_MORE,refreshError:n===a.PaginatedStatus.ERROR_REFRESH}}],794464);var r=e.i(271645);e.s(["useSearchFilters",0,()=>{let[e,t]=(0,r.useState)({keyword:"",contentType:[],duration:[],category:[]}),a=(0,r.useCallback)(e=>{let t={};e.keyword.trim()&&(t.keyword=e.keyword.trim());let a={};return e.contentType.length>0&&(a.contentType=e.contentType),e.duration.length>0&&(a.duration=e.duration),e.category.length>
10&&(a.category=e.category),Object.keys(a).length>0&&(t.filter=a),t},[]),i=(0,r.useCallback)(e=>{t(t=>({...t,...e}))},[t]),s=(0,r.useCallback)(()=>{t({keyword:"",contentType:[],duration:[],category:[]})},[t]),n=(0,r.useCallback)(e=>{if(e.length>0){let a=e.filter(e=>e.isSelected);a.length>0&&t(e=>({...e,contentType:a.map(e=>e.value)}))}},[t]);return{filterState:e,setFilterState:t,updateFilterState:i,resetFilters:s,buildSearchCriteria:a,syncContentType:n,pickFiltersFromSearchParams:(0,r.useCallback)(e=>{let t=e.get("keyword")||"",a=e.get("contentType")?.split(",")||[],r=e.get("category")?.split(",")||[],i=e.get("duration")?.split(",")||[];return{keyword:t,contentType:a.filter(Boolean),category:r.filter(Boolean),duration:i.filter(Boolean)}},[]),buildSearchParams:(0,r.useCallback)(e=>{let t=new URLSearchParams;return e.keyword.trim()&&t.set("keyword",e.keyword.trim()),e.contentType.length&&t.set("contentType",e.contentType.join(",")),e.category.length&&t.set("category",e.category.join(",")),e.duration.length&&t.set("duration",e.duration.join(",")),t},[])}}],890723),e.s([],856173);var i=e.i(618566),s=e.i(532549),n=e.i(816790),u=e.i(366181),l=e.i(377534);e.i(732832);var o=e.i(875664);e.s(["useAccessControl",0,function(){let{isAuthenticated:e,user:t,isLoading:a}=(0,u.useAuth)(),{features:c,isLoading:d}=(0,l.useFeatureFlags)(),h=(0,i.useRouter)(),m=(0,i.usePathname)(),g=(0,i.useSearchParams)().toString(),w=(0,r.useMemo)(()=>g?`${m}?${g}`:m,[m,g]),f=(0,r.useMemo)(()=>c?.enableSubscriptions===!0,[c]),p=(0,r.useCallback)((r={})=>{let{requiresAuth:i=!0,requiresSubscription:u=!1,action:l="access",keepReturnIntent:c=!0,shouldRedirect:m=!0}=r;if(a||d)return{canAccess:null,reason:n.AccessDenialReason.VALIDATING};if(i&&!e){if(o.logger.log("[AccessControl] Access denied: User not authenticated for action: ",l),m){let e=(0,s.getAuthEntryUrl)(w,c);h.push(e)}return{canAccess:!1,reason:n.AccessDenialReason.NOT_AUTHENTICATED}}let g=u&&f,p=t?.subscriptionStatus===n.UserSubscriptionStatus.ACTIVE;if(g&&!p){if(o.logger.log("[AccessControl] Access denied: User not subscribed for action: ",l),m){let e=r.checkoutSource??(r.contentContext?"content":"gated_action"),t=(0,s.getCheckoutEntryUrl)(w,c,{source:e,contentContext:r.contentContext});h.push(t)}return{canAccess:!1,reason:n.AccessDenialReason.NOT_SUBSCRIBED}}return{canAccess:!0}},[e,t,a,d,f,h,m]),y=(0,r.useCallback)(async(e,t)=>{let{canAccess:a}=p(e);return!!a&&(await t(),!0)},[p]);return{validateAccess:p,withAccessControl:y,isUserAuthenticated:(0,r.useCallback)(()=>e,[e]),isUserSubscribed:(0,r.useCallback)(()=>t?.subscriptionStatus===n.UserSubscriptionStatus.ACTIVE,[t])}}],762858);var c=e.i(881612);let d=n.LOCAL_STORAGE_KEYS.LINK_COOLDOWN,h=(e,t)=>`${t}:${e.trim().toLowerCase()}`,m=e=>{let t=Date.now();return Object.entries(e).reduce((e,[a,r])=>(t-r.requestedAt<=3e4&&(e[a]=r),e),{})},g=async()=>{try{{let e=localStorage.getItem(d);if(e){let t=await (0,c.decrypt)(e),a=JSON.parse(t),r=m(a);return Object.keys(r).length!==Object.keys(a).length&&await w(r),r}}return{}}catch(e){return o.logger.error("Failed to get link cooldown state:",e),f(),{}}},w=async e=>{try{{let t=m(e);if(0===Object.keys(t).length)return void f();let a=await (0,c.encrypt)(JSON.stringify(t));localStorage.setItem(d,a)}}catch(e){o.logger.error("Failed to set link cooldown state:",e)}},f=()=>{localStorage.removeItem(d)},p=async e=>{let t=await g();t[h(e.email,e.type)]=e,await w(t)},y=async(e,t)=>(await g())[h(e,t)],k=async(e,t)=>{let a=await y(e,t);return a?Math.max(0,Math.ceil((3e4-(Date.now()-a.requestedAt))/1e3)):0};e.s(["formatCooldownMessage",0,e=>`Please wait ${e} second${1!==e?"s":""} before requesting another link.`,"getRemainingCooldown",0,k,"setCooldownEntry",0,p],982615),e.s(["default",0,(e,t,a=!0)=>{let[i,s]=(0,r.useState)(0);return(0,r.useEffect)(()=>{e&&a&&k(e,t).then(e=>{e>0&&s(e)})},[e,t,a]),(0,r.useEffect)(()=>{if(i<=0)return;let e=window.setInterval(()=>{s(e=>e<=1?0:e-1)},1e3);return()=>window.clearInterval(e)},[i]),{cooldown:i,startCooldown:(0,r.useCallback)(e=>{s(e)},[])}}],441010),e.i(406399);var v=e.i(450524),b=e.i(915136);let T=async e=>await (0,v.clientApiCall)({url:b.apiEndpoints.community.displayNameSearch,method:a.HTTP_METHOD.POST,data:e});function S(e,t){if(t<=0||!e)return null;let a=-1;for(let r=t-1;r>=0;r--){let t=e[r];if(" "===t||"\n"===t||"\r"===t||" "===t)break;
1if("@"===t){(0===r||/[\s\n\r]/.test(e[r-1]))&&(a=r);break}}if(-1===a)return null;let r=e.slice(a+1,t);return r.length<3?null:r}e.s(["useMentions",0,function({text:e,cursorPosition:t,maxTags:a=20,enabled:i=!0,onSelect:s}){let[n,u]=(0,r.useState)([]),[l,o]=(0,r.useState)(!1),[c,d]=(0,r.useState)(!1),[h,m]=(0,r.useState)(""),[g,w]=(0,r.useState)(0),f=(0,r.useRef)(new Map),p=(0,r.useRef)(null),y=(0,r.useRef)("");(0,r.useEffect)(()=>{if(!i)return void d(!1);let r=S(e,t);if(!r||f.current.size>=a){d(!1),m(""),u([]),w(0),p.current&&(clearTimeout(p.current),p.current=null);return}return(m(r),p.current&&clearTimeout(p.current),r===y.current&&n.length>0)?void d(!0):(p.current=setTimeout(async()=>{o(!0);try{let e=await T({keyword:r,limit:10});y.current=r,u(e.data||[]),d((e.data||[]).length>0),w(0)}catch{u([]),d(!1)}finally{o(!1)}},300),()=>{p.current&&clearTimeout(p.current)})},[e,t,i,a]);let k=(0,r.useCallback)(a=>{let r=S(e,t);if(!r)return{newText:e,newCursorPosition:t,tag:{text:a.display_name,userId:a.id}};let i=t-r.length-1,s=e.slice(0,i),n=e.slice(t),l=`@${a.display_name}`,o=`${s}${l} ${n}`,c=s.length+l.length+1,h={text:a.display_name,userId:a.id};return f.current.set(a.display_name,h),d(!1),m(""),u([]),y.current="",{newText:o,newCursorPosition:c,tag:h}},[e,t]),v=(0,r.useCallback)(()=>{d(!1),m(""),u([]),w(0)},[]),b=(0,r.useCallback)(e=>{let t=[],a=new Set;for(let[r,i]of f.current.entries())e.includes(`@${r}`)&&!a.has(i.userId)&&(t.push(i),a.add(i.userId));return t},[]),A=(0,r.useCallback)(e=>{for(let t of(f.current.clear(),e)){let e=t.userInfo?.display_name||t.display_name||t.text;f.current.set(e,{text:e,userId:t.userId})}},[]),C=(0,r.useCallback)(e=>{if(!c||0===n.length)return!1;switch(e.key){case"ArrowDown":return e.preventDefault(),w(e=>e<n.length-1?e+1:0),!0;case"ArrowUp":return e.preventDefault(),w(e=>e>0?e-1:n.length-1),!0;case"Enter":if(n[g]){e.preventDefault();let t=k(n[g]);return s?.(t),!0}return!1;case"Escape":return e.preventDefault(),v(),!0;default:return!1}},[c,n,g,k,v,s]);return{isDropdownOpen:c,searchResults:n,isSearching:l,activeQuery:h,highlightedIndex:g,selectMention:k,dismissDropdown:v,extractTags:b,setTagsFromPopulated:A,tagCount:f.current.size,handleKeyDown:C}}],517480);var A=e.i(381749),C=e.i(580044);let E="deleted_user",R=new Map,P=e=>{let t=R.get(e);if(t)return t;let a=(0,A.getFollowState)({userId:e}).then(e=>
1({followState:e?.followState??"none",followsYou:e?.follows_you??!1,isMuted:e?.isMuted??!1})).finally(()=>{R.delete(e)});return R.set(e,a),a};e.s(["DELETED_USER_ID",0,E,"resolveRelationship",0,P,"useFollowState",0,function(e,a=!0,i,s){let{user:n,isAuthenticated:l}=(0,u.useAuth)(),c=(0,t.useAtomValue)(C.followStateCacheAtom),d=(0,t.useAtomValue)(C.followsYouCacheAtom),h=(0,t.useSetAtom)(C.setFollowStateAtom),m=(0,t.useSetAtom)(C.setFollowsYouAtom),g=!!e&&!!n?.id&&e===n.id,w=!!e&&e!==E&&!g&&l,f=e?c[e]:void 0,p=e?d[e]:void 0,[y,k]=(0,r.useState)(!1),v=i?C.FEED_FOLLOW_STATES[i]:null,b=void 0!==s&&"self"!==i?s:void 0;return(0,r.useEffect)(()=>{w&&e&&v&&void 0===f&&h({userId:e,followState:v})},[w,e,v,f,h]),(0,r.useEffect)(()=>{w&&e&&void 0!==b&&void 0===p&&m({userId:e,followsYou:b})},[w,e,b,p,m]),(0,r.useEffect)(()=>{if(!a||!w||!e||v||void 0!==f)return;let t=!0;return k(!0),P(e).then(t=>{h({userId:e,followState:t.followState}),m({userId:e,followsYou:t.followsYou})}).catch(e=>{o.logger.error("Failed to resolve follow state",e)}).finally(()=>{t&&k(!1)}),()=>{t=!1}},[a,w,e,f,v,h,m]),{followState:f??v??null,followsYou:p??b??!1,canFollow:w,isLoading:y,setFollowState:(0,r.useCallback)(t=>{e&&h({userId:e,followState:t})},[e,h])}}],799614);var D=e.i(58162);e.s(["useMuteState",0,function(e,a=!0,i){let{user:s,isAuthenticated:n}=(0,u.useAuth)(),l=(0,t.useAtomValue)(D.muteStateCacheAtom),c=(0,t.useSetAtom)(D.setMuteStateAtom),d=!!e&&!!s?.id&&e===s.id,h=!!e&&e!==E&&!d&&n,m=e?l[e]:void 0,[g,w]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{h&&e&&void 0!==i&&void 0===m&&c({userId:e,isMuted:i})},[h,e,i,m,c]),(0,r.useEffect)(()=>{if(!a||!h||!e||void 0!==i||void 0!==m)return;let t=!0;return w(!0),P(e).then(t=>c({userId:e,isMuted:t.isMuted})).catch(e=>{o.logger.error("Failed to resolve mute state",e)}).finally(()=>{t&&w(!1)}),()=>{t=!1}},[a,h,e,m,i,c]),{isMuted:m??i??null,canMute:h,isLoading:g,setMuteState:(0,r.useCallback)(t=>{e&&c({userId:e,isMuted:t})},[e,c])}}],536141);var I=e.i(250230);e.s(["useTabQueryParam",0,function({tabs:e,defaultTab:t,paramName:a=I.TAB_QUERY_PARAM}){let s=(0,i.useRouter)(),n=(0,i.usePathname)(),u=(0,i.useSearchParams)(),l=u.get(a),o=null!==l&&e.includes(l),c=o?l:t,d=(0,r.useCallback)(e=>{let r=new URLSearchParams(u.toString());e===t?r.delete(a):r.set(a,e);let i=r.toString();s.replace(i?`${n}?${i}`:n,{scroll:!1})},[u,s,n,a,t]);return(0,r.useEffect)(()=>{null===l||o||d(t)},[l,o,t,d]),{activeTab:c,setActiveTab:d}}],410309);let L=(e,t)=>{let a=e?.liveSyncPosition;return"number"==typeof a&&Number.isFinite(a)?a:t};e.s(["useChaptersPanel",0,({mediaRef:e,hlsRef:t,isLive:a,chapters:i,onSeeked:s})=>{let[n,u]=(0,r.useState)(!1),[l,o]=(0,r.useState)(null),[c,d]=(0,r.useState)([]),h=a&&!!i?.length,m=(0,r.useCallback)(()=>u(e=>!e),[]),g=(0,r.useCallback)(()=>u(!1),[]);(0,r.useEffect)(()=>{h||u(!1)},[h]);let w=(0,r.useCallback)(a=>{let r=e.current;if(!r?.seekable?.length)return;let i=r.seekable.start(0),n=L(t.current,r.seekable.end(r.seekable.length-1)),u=t.current?.playingDate,l=Math.min(Math.max((u?r.currentTime+(a.getTime()-u.getTime())/1e3:n-(Date.now()-a.getTime())/1e3)+1,i),n);r.currentTime=l,s?.(l)},[t,e,s]),f=(0,r.useCallback)(e=>{w(e.startDate)},[w]);return(0,r.useEffect)(()=>{if(!h||!n||!i)return;let a=()=>{let a=e.current;if(!a?.seekable?.length)return;let r=a.seekable.start(0),s=L(t.current,a.seekable.end(a.seekable.length-1)),n=t.current?.playingDate??new Date(Date.now()-(s-a.currentTime)*1e3),u=new Date(n.getTime()-(a.currentTime-r)*1e3);d(e=>{let t=i.filter(e=>e.startDate.getTime()<u.getTime()).map(e=>e.id);return t.join("|")===e.join("|")?e:t});let l=i.find(e=>e.startDate.getTime()<=n.getTime())?.id??null;o(e=>e===l?e:l)};a();let r=setInterval(a,1e3);return()=>clearInterval(r)},[i,h,t,n,e]),{hasChapters:h,isOpen:n,toggle:m,close:g,activeId:l,unreachableIds:c,selectChapter:f}}],685848)},166566,e=>{"use strict";var t=e.i(97298);e.s(["buildLiveTrackCall",0,(e,a,{resumeOnly:r=!1,paused:i=!1,keepalive:s=!1}={})=>{let n;return void 0!==a&&(n={offsetSeconds:a},r&&(n.resumeOnly=!0),i&&(n.paused=!0)),{url:e,method:t.HTTP_METHOD.POST,data:n,options:{suppressAuthRedirect:r,suppressSubscriptionRedirect:r,keepalive:s}}}])},925108,e=>{"use strict";e.i(406399);var t=e.i(450524),a=e.i(97298),r=e.i(452547),i=e.i(915136),s=e.i(166566);let n=i.apiEndpoints.radio,u=async()=>await (0,t.clientApiCall)({url:n.checkLive,method:a.HTTP_METHOD.GET}),l=async()=>await (0,t.clientApiCall)({url:n.liveRadioDetail,method:a.HTTP_METHOD.GET,options:{useReplaceForRedirects:!0}}),o=async(e,a)=>{await (0,t.clientApiCall)((0,s.buildLiveTrackCall)(n.trackLiveRadio,e,a))},c=async()=>await (0,t.clientApiCall)({url:n.liveChapters,method:a.HTTP_METHOD.GET,options:{suppressAuthRedirect:!0}}),d=async e=>await (0,t.clientApiCall)({url:(0,r.URLBuilder)(n.liveRadioComments,e),method:a.HTTP_METHOD.GET,options:{suppressAuthRedirect:!0,suppressSubscriptionRedirect:!0}}),h=async e=>await (0,t.clientApiCall)({url:n.liveRadioComments,method:a.HTTP_METHOD.POST,data:e}),m=async e=>await (0,t.clientApiCall)({url:n.toggleLikeRadioComment,method:a.HTTP_METHOD.POST,data:e});e.s(["addLiveRadioComment",0,h,"checkRadioLive",0,u,"getLiveChapters",0,c,"getLiveRadioComments",0,d,"getLiveRadio
1Detail",0,l,"toggleLikeLiveRadioComment",0,m,"trackLiveRadio",0,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.