1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return i}});let i=e=>{}},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return k},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return m},ST:function(){return y},WEB_VITALS:function(){return s},execOnce:function(){return a},getDisplayName:function(){return d},getLocationOrigin:function(){return l},getURL:function(){return c},isAbsoluteUrl:function(){return u},isResSent:function(){return h},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return S}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...i)=>(r||(r=!0,t=e(...i)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,u=e=>o.test(e);function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=l();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function h(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let i=await e.getInitialProps(t);if(r&&h(r))return i;if(!i)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${i}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return i}let m="u">typeof performance,y=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class k extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function S(e){return JSON.stringify({message:e.message,stack:e.stack})}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={assign:function(){return u},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return o}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});function s(e){let t={};for(let[r,i]of e.entries()){let e=t[r];void 0===e?t[r]=i:Array.isArray(e)?e.push(i):t[r]=[e,i]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,i]of Object.entries(e))if(Array.isArray(i))for(let e of i)t.append(r,a(e));else t.set(r,a(i));return t}function u(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,i]of r.entries())e.append(t,i)}return e}},12598,e=>{"use strict";var t=e.i(71645),r=e.i(43476),i=t.createContext(void 0);e.s(["QueryClientProvider",0,({client:e,children:n})=>(t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(i.Provider,{value:e,children:n})),"useQueryClient",0,e=>{let r=t.useContext(i);if(e)return e;if(!r)throw Error("No QueryClient set, use QueryClientProvider to set one");return r}])},22080,e=>{"use strict";let t=new Set(["strengthen","continue_sprint","guided_mastered","practice_passed","untouched"]),r=new Set(["crowned","first_passed","level_cleared"]);function i(e){return"string"==typeof e&&""!==e.trim()?e.trim():null}e.s(["guidedBadgeLabel",0,function(e){switch(e.guidedBadge){case"crowned":return"Crowned via guided";case"first_passed":return"Mastered via guided";case"level_cleared":return"Guided progress";default:return null}},"hasGuidedSignal",0,function(e){return"strengthen"===e.primary||"continue_sprint"===e.primary||null!==e.guidedBadge||"practice_passed"===e.primary},"parseCatalogTopicState",0,function(e){let n=i(e.primary),s=i(e.primary_cta),a=i(e.guided_badge);return{primary:n&&t.has(n)?n:"untouched",primaryCta:s??"Practice full level",guidedBadge:a&&r.has(a)?a:null,practiceFullAvailable:!1!==e.practice_full_available,promotes:!0===e.promotes}}])},50261,e=>{"use strict";var t=e.i(31409);
1class r extends Error{conflict;name;constructor(e){super(e.message),this.conflict=e,this.name="GuidedSessionConflictError"}}function i(e){return"object"==typeof e&&null!==e?e:null}e.s(["GuidedSessionConflictError",0,r,"buildGuidedStartSessionBody",0,function(e,t={}){return{chapter_id:e,intent_contract_version:2,...null!=t.replaceActiveSessionId?{replace_active_session_id:t.replaceActiveSessionId}:{},...null!=t.masteryTopicId?{mastery_topic_id:t.masteryTopicId}:{}}},"guidedSessionConflictActiveLabel",0,function(e){return e.activeSession.topicName||e.activeSession.chapterName||"your current climb"},"guidedSessionConflictErrorFromHttp",0,function(e){let n=i(i(e)?.response);if(n?.status!==409)return null;let s=i(n.data);if(!s)return null;let a=i(s.detail)??i(s.error)??s,o=(0,t.parseGuidedSessionConflict)(a);return o?new r(o):null},"guidedSessionConflictRequestedLabel",0,function(e){return e.requested.topicName||e.requested.chapterName||"the selected chapter"},"guidedSessionConflictStartDecision",0,function(e,t,r){if("resume"===t)return{subjectId:e.activeSession.subjectId,chapterId:e.activeSession.chapterId,topicId:e.activeSession.topicId||null,options:{}};let i=r?.chapterId===e.requested.chapterId?r:null,n=e.requested.masteryTopicId??i?.masteryTopicId,s=e.requested.topicId>0?e.requested.topicId:i?.topicId??n??null;return{subjectId:e.requested.subjectId,chapterId:e.requested.chapterId,topicId:s,options:{replaceActiveSessionId:e.activeSession.sessionId,...null!=n?{masteryTopicId:n}:{}}}},"guidedSessionConflictWithRequestedMasteryIntent",0,function(e,t){return null==t||null!=e.requested.masteryTopicId?e:{...e,requested:{...e.requested,topicId:e.requested.topicId>0?e.requested.topicId:t,masteryTopicId:t}}}])},98012,e=>{"use strict";function t(e){return"number"==typeof e&&Number.isInteger(e)&&e>0}function r(e,r){return t(e)?{subjectId:e,...t(r)?{topicId:r}:{}}:null}e.s(["buildStrengthenSessionParams",0,function(e){return{...t(e?.subjectId)?{subject_id:e.subjectId}:{},...t(e?.topicId)?{topic_id:e.topicId}:{}}},"claimMissionStartFlight",0,function(e){return!e.current&&(e.current=!0,!0)},"createJourneyAwareStrengthenScope",0,function(e,i){let n=t(e.selectedSubjectId)?e.selectedSubjectId:e.homeSubjectId;if(!t(n))return null;let s=n===e.homeSubjectId&&t(e.homeTopicId)?e.homeTopicId:null;return r(n,t(i)?i:e.preferHomeTopic&&null!=s?s:t(e.journeyFocusTopicId)?e.journeyFocusTopicId:null!=s?s:null)},"createSubjectStrengthenScope",0,r,"isRepairTerminalScreenState",0,function(e){return"repair_resting"===e||"caught_up"===e},"missionClimbFallbackCopy",0,function(e){return e?{title:"The climb could not start.",body:"Please retry. Your progress is safe."}:{title:"Guided missions are unavailable right now.",body:"Try again shortly, or keep practicing from the catalog. Your saved progress is safe."}},"missionRepairPreflightDecision",0,function(e){if(e.activeSession?.mode==="repair")return"resume_active_repair";switch(e.screenState){case"needs_strengthening":return"show_ready";case"repair_resting":case"caught_up":case"completed_today":return"show_terminal";default:return"unavailable"}},"missionSessionStartIssue",0,function(e){return Array.isArray(e.questions)&&0!==e.questions.length?0===e.sessionId.trim().length?"missing_session_id":null:e.terminal?.screenState==="repair_resting"?"repair_resting":e.terminal?.screenState==="caught_up"?"caught_up":"empty_questions"},"missionSessionStartIssueIsServerTerminal",0,function(e){return"caught_up"===e||"repair_resting"===e},"missionStartFailureCopy",0,function(e){return 429===function(e){if("object"!=typeof e||null===e)return null;let t=e.response;if("object"!=typeof t||null===t)return null;let r=t.status;return"number"==typeof r?r:null}(e)?"The climb could not start. Your progress is safe. Please wait a moment before trying again.":"The climb could not start. Your progress is safe. Check your connection and try again."},"missionSubjectViewState",0,function(e){let r=t(e.viewedSubjectId),i=!r||e.viewedSubjectId===e.homeSelectedSubjectId,n=!r||e.viewedSubjectId===e.activeSessionSubjectId;return{homeSelectionMatches:i,activeSessionMatches:n,inProgress:("in_progress_unanswered"===e.screenState||"in_progress_answered"===e.screenState)&&n,doneToday:"completed_today"===e.screenState&&i,needsChapter:"needs_chapter_choice"===e.screenState&&i,strengthenPending:e.scopedRepairHome?"needs_strengthening"===e.screenState:!!e.journeyStrengthenPending||"needs_strengthening"===e.screenState&&i}},"reconcileRepairPreflightScope",0,function(e,i){let n=t(i.selectedSubjectId)?i.selectedSubjectId:e.subjectId;if(!t(n))return null;if(i.activeSession?.mode==="repair")return r(n,i.selectedTopicId);let s=t(i.selectedTopicId)?i.selectedTopicId:n===e.subjectId?e.topicId:null;return r(n,s)},"releaseMissionStartFlight",0,function(e){e.current=!1}])},9172,e=>{"use strict";let t="clarity:maintenance-detected",r="Clarity is undergoing scheduled maintenance. Please try again shortly.";function i(e){return"object"!=typeof e||null===e||Array.isArray(e)?null:e}function n(e,t=r){if("string"!=typeof e)return t;let i=e.replace(/\s+/g," ").trim();return i?i.slice(0,500):t}function s(e){if("string"!=typeof e)return null;let t=e.trim();if(!t)return null;let r=new Date(/(?:z|[+-]\d{2}:?\d{2})$/i.test(t)?t:`${t}Z`);return Number.isFinite(r.getTime())?r:null}function a(e){let t=i(e),a=t?.maintenance_mode===!0;return{isInMaintenance:a,message:a?n(t?.message):r,startedAt:a?s(t?.started_at):null}}e.s(["MAINTENANCE_DETECTED_EVENT",0,t,"createMaintenanceCheckGate",0,function(){let e=0;return{beginCheck:()=>e,markDetected:()=>{e+=1},canCommit:t=>t===e}},"dispatchMaintenanceDetected",0,function(e){let r=a(e);r.isInMaintenance&&window.dispatchEvent(new CustomEvent(t,{detail:r}))},"maintenanceStartedCopy",0,function(e,t=new Date){if(!e||!Number.isFinite(e.getTime()))return"";let r=Math.max(0,Math.floor((t.getTime()-e.getTime())/6e4));if(r<1)return"Started moments ago";if(r<60)return`Started ${r} minutes ago`;let i=Math.floor(r/60);return i<24?`Started ${i} hours ago`:`Started ${Math.floor(i/24)} days ago`},"parseMaintenanceEventDetail",0,function(e){try{let t,r=i(e);if(r?.isInMaintenance!==!0)return null;let a=r.startedAt;if(a instanceof Date){let e=Date.prototype.getTime.call(a);t=Number.isFinite(e)?new Date(e):null}else t=s(a);return{isInMaintenance:!0,message:n(r.message),startedAt:t}}catch{return null}},"parseSystemStatusResponse",0,function(e,t){let r=i(t);return 503===e&&r?{isInMaintenance:!0,message:n(r.message,"Server under maintenance"),startedAt:s(r.started_at)}:a(t)}])},80166,e=>{"use strict";var t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r=new class{#e=t;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};e.s(["systemSetTimeoutZero",0,function(e){setTimeout(e,0)},"timeoutManager",0,r])},19273,e=>{"use strict";var t=e.i(80166),r="u"<typeof window||"Deno"in globalThis;function i(e,t){return(t?.queryKeyHashFn||n)(e)}function n(e){return JSON.stringify(e,(e,t)=>u(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function s(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(r=>s(e[r],t[r]))}var a=Object.prototype.hasOwnProperty;function o(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function u(e){if(!l(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!l(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function l(e){return"[object Object]"===Object.prototype.toString.call(e)}var c=Symbol();e.s(["addConsumeAwareSignal",0,function(e,t,r){let i,n=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e},"addToEnd",0,function(e,t,r=0){let i=[...e,t];return r&&i.length>r?i.slice(1):i},"addToStart",0,function(e,t,r=0){let i=[t,...e];return r&&i.length>r?i.slice(0,-1):i},"ensureQueryFn",0,function(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==c?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))},"functionalUpdate",0,function(e,t){return"function"==typeof e?e(t):e},"hashKey",0,n,"hashQueryKeyByOptions",0,i,"isServer",0,r,"isValidTimeout",0,function(e){return"number"==typeof e&&e>=0&&e!==1/0},"matchMutation",0,function(e,t){let{exact:r,status:i,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(n(t.options.mutationKey)!==n(o))return!1}
1else if(!s(t.options.mutationKey,o))return!1}return(!i||t.state.status===i)&&(!a||!!a(t))},"matchQuery",0,function(e,t){let{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:u,stale:l}=e;if(u){if(n){if(t.queryHash!==i(u,t.options))return!1}else if(!s(t.queryKey,u))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof l||t.isStale()===l)&&(!a||a===t.state.fetchStatus)&&(!o||!!o(t))},"noop",0,function(){},"partialMatchKey",0,s,"replaceData",0,function(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r,i=0){if(t===r)return t;if(i>500)return r;let n=o(t)&&o(r);if(!n&&!(u(t)&&u(r)))return r;let s=(n?t:Object.keys(t)).length,l=n?r:Object.keys(r),c=l.length,d=n?Array(c):{},h=0;for(let o=0;o<c;o++){let u=n?o:l[o],c=t[u],p=r[u];if(c===p){d[u]=c,(n?o<s:a.call(t,u))&&h++;continue}if(null===c||null===p||"object"!=typeof c||"object"!=typeof p){d[u]=p;continue}let f=e(c,p,i+1);d[u]=f,f===c&&h++}return s===c&&h===s?t:d}(e,t):t},"resolveEnabled",0,function(e,t){return"function"==typeof e?e(t):e},"resolveStaleTime",0,function(e,t){return"function"==typeof e?e(t):e},"shallowEqualObjects",0,function(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0},"shouldThrowError",0,function(e,t){return"function"==typeof e?e(...t):!!e},"skipToken",0,c,"sleep",0,function(e){return new Promise(r=>{t.timeoutManager.setTimeout(r,e)})},"timeUntilStale",0,function(e,t){return Math.max(e+(t||0)-Date.now(),0)}])},40143,e=>{"use strict";let t,r,i,n,s,a;var o=e.i(80166).systemSetTimeoutZero,u=(t=[],r=0,i=e=>{e()},n=e=>{e()},s=o,{batch:e=>{let a;r++;try{a=e()}finally{let e;--r||(e=t,t=[],e.length&&s(()=>{n(()=>{e.forEach(e=>{i(e)})})}))}return a},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a=e=>{r?t.push(e):s(()=>{i(e)})},setNotifyFunction:e=>{i=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{s=e}});e.s(["notifyManager",0,u])},75555,15823,e=>{"use strict";var t=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};e.s(["Subscribable",0,t],15823);var r=new class extends t{#r;#i;#n;constructor(){super(),this.#n=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#i||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#n=e,this.#i?.(),this.#i=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#r!==e&&(this.#r=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#r?this.#r:globalThis.document?.visibilityState!=="hidden"}};e.s(["focusManager",0,r],75555)},14448,93803,e=>{"use strict";var t=e.i(15823),r=new class extends t.Subscribable{#s=!0;#i;#n;constructor(){super(),this.#n=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#i||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#n=e,this.#i?.(),this.#i=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#s}};e.s(["onlineManager",0,r],14448),e.i(19273),e.s(["pendingThenable",0,function(){let e,t,r=new Promise((r,i)=>{e=r,t=i});function i(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{i({status:"fulfilled",value:t}),e(t)},r.reject=e=>{i({status:"rejected",reason:e}),t(e)},r}],93803)},73911,e=>{"use strict";let t;var r=e.i(19273),i=(t=()=>r.isServer,{isServer:()=>t(),setIsServer(e){t=e}});e.s(["environmentManager",0,i])},36553,e=>{"use strict";var t=e.i(75555),r=e.i(14448),i=e.i(93803),n=e.i(73911),s=e.i(19273);function a(e){return Math.min(1e3*2**e,3e4)}function o(e){return(e??"online")!=="online"||r.onlineManager.isOnline()}
1var u=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};e.s(["CancelledError",0,u,"canFetch",0,o,"createRetryer",0,function(e){let l,c=!1,d=0,h=(0,i.pendingThenable)(),p=()=>t.focusManager.isFocused()&&("always"===e.networkMode||r.onlineManager.isOnline())&&e.canRun(),f=()=>o(e.networkMode)&&e.canRun(),m=e=>{"pending"===h.status&&(l?.(),h.resolve(e))},y=e=>{"pending"===h.status&&(l?.(),h.reject(e))},g=()=>new Promise(t=>{l=e=>{("pending"!==h.status||p())&&t(e)},e.onPause?.()}).then(()=>{l=void 0,"pending"===h.status&&e.onContinue?.()}),b=()=>{let t;if("pending"!==h.status)return;let r=0===d?e.initialPromise:void 0;try{t=r??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(m).catch(t=>{if("pending"!==h.status)return;let r=e.retry??3*!n.environmentManager.isServer(),i=e.retryDelay??a,o="function"==typeof i?i(d,t):i,u=!0===r||"number"==typeof r&&d<r||"function"==typeof r&&r(d,t);c||!u?y(t):(d++,e.onFail?.(d,t),(0,s.sleep)(o).then(()=>p()?void 0:g()).then(()=>{c?y(t):b()}))})};return{promise:h,status:()=>h.status,cancel:t=>{if("pending"===h.status){let r=new u(t);y(r),e.onCancel?.(r)}},continue:()=>(l?.(),h),cancelRetry:()=>{c=!0},continueRetry:()=>{c=!1},canStart:f,start:()=>(f()?b():g().then(b),h)}}])},88587,e=>{"use strict";var t=e.i(80166),r=e.i(73911),i=e.i(19273),n=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,i.isValidTimeout)(this.gcTime)&&(this.#a=t.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(r.environmentManager.isServer()?1/0:3e5))}clearGcTimeout(){this.#a&&(t.timeoutManager.clearTimeout(this.#a),this.#a=void 0)}};e.s(["Removable",0,n])},86491,e=>{"use strict";var t=e.i(19273),r=e.i(40143),i=e.i(36553),n=e.i(88587),s=class extends n.Removable{#o;#u;#l;#c;#d;#h;#p;constructor(e){super(),this.#p=!1,this.#h=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#l=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=u(this.options),this.state=e.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#d?.promise}setOptions(e){if(this.options={...this.#h,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=u(this.options);void 0!==e.data&&(this.setState(o(e.data,e.dataUpdatedAt)),this.#o=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#l.remove(this)}setData(e,r){let i=(0,t.replaceData)(this.state.data,e,this.options);return this.#f({data:i,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),i}setState(e,t){this.#f({type:"setState",state:e,setStateOptions:t})}cancel(e){let r=this.#d?.promise;return this.#d?.cancel(e),r?r.then(t.noop).catch(t.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#o}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==(0,t.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===t.skipToken||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,t.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,t.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#d?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#d?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#l.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#d&&(this.#p||this.#m()?this.#d.cancel({revert:!0}):this.#d.cancelRetry()),this.scheduleGc()),this.#l.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#m(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#f({type:"invalidate"})}async fetch(e,r){let n;if("idle"!==this.state.fetchStatus&&this.#d?.status()!=="rejected"){if(void 0!==this.state.data&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#d)return this.#d.continueRetry(),this.#d.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let s=new AbortController,a=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#p=!0,s.signal)}
1)},o=()=>{let e,i=(0,t.ensureQueryFn)(this.options,r),n=(a(e={client:this.#c,queryKey:this.queryKey,meta:this.meta}),e);return(this.#p=!1,this.options.persister)?this.options.persister(i,n,this):i(n)},u=(a(n={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:o}),n);this.options.behavior?.onFetch(u,this),this.#u=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#f({type:"fetch",meta:u.fetchOptions?.meta}),this.#d=(0,i.createRetryer)({initialPromise:r?.initialPromise,fn:u.fetchFn,onCancel:e=>{e instanceof i.CancelledError&&e.revert&&this.setState({...this.#u,fetchStatus:"idle"}),s.abort()},onFail:(e,t)=>{this.#f({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#f({type:"pause"})},onContinue:()=>{this.#f({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{let e=await this.#d.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#l.config.onSuccess?.(e,this),this.#l.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof i.CancelledError){if(e.silent)return this.#d.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#f({type:"error",error:e}),this.#l.config.onError?.(e,this),this.#l.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#f(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...a(t.data,this.options),fetchMeta:e.meta??null};case"success":let r={...t,...o(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#u=e.manual?r:void 0,r;case"error":let i=e.error;return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),r.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#l.notify({query:this,type:"updated",action:e})})}};function a(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,i.canFetch)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function o(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function u(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,i=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}e.s(["Query",0,s,"fetchState",0,a])},18566,(e,t,r)=>{t.exports=e.r(76562)},5766,e=>{"use strict";let t,r;var i,n=e.i(71645);let s={data:""},a=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,o=/\/\*[^]*?\*\/| +/g,u=/\n+/g,l=(e,t)=>{let r="",i="",n="";for(let s in e){let a=e[s];"@"==s[0]?"i"==s[1]?r=s+" "+a+";":i+="f"==s[1]?l(a,s):s+"{"+l(a,"k"==s[1]?"":t)+"}":"object"==typeof a?i+=l(a,t?t.replace(/([^,])+/g,e=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):s):null!=a&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),n+=l.p?l.p(s,a):s+":"+a+";")}return r+(t&&n?t+"{"+n+"}":n)+i},c={},d=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+d(e[r]);return t}return e};function h(e){let t,r,i=this||{},n=e.call?e(i.p):e;return((e,t,r,i,n)=>{var s;let h=d(e),p=c[h]||(c[h]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(h));if(!c[p]){let t=h!==e?e:(e=>{let t,r,i=[{}];for(;t=a.exec(e.replace(o,""));)t[4]?i.shift():t[3]?(r=t[3].replace(u," ").trim(),i.unshift(i[0][r]=i[0][r]||{})):i[0][t[1]]=t[2].replace(u," ").trim();return i[0]})(e);c[p]=l(n?{["@keyframes "+p]:t}:t,r?"":"."+p)}let f=r&&c.g?c.g:null;return r&&(c.g=c[p]),s=c[p],f?t.data=t.data.replace(f,s):-1===t.data.indexOf(s)&&(t.data=i?s+t.data:t.data+s),p}
1)(n.unshift?n.raw?(t=[].slice.call(arguments,1),r=i.p,n.reduce((e,i,n)=>{let s=t[n];if(s&&s.call){let e=s(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;s=t?"."+t:e&&"object"==typeof e?e.props?"":l(e,""):!1===e?"":e}return e+i+(null==s?"":s)},"")):n.reduce((e,t)=>Object.assign(e,t&&t.call?t(i.p):t),{}):n,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||s})(i.target),i.g,i.o,i.k)}h.bind({g:1});let p,f,m,y=h.bind({k:1});function g(e,t){let r=this||{};return function(){let i=arguments;function n(s,a){let o=Object.assign({},s),u=o.className||n.className;r.p=Object.assign({theme:f&&f()},o),r.o=/ *go\d+/.test(u),o.className=h.apply(r,i)+(u?" "+u:""),t&&(o.ref=a);let l=e;return e[0]&&(l=o.as||e,delete o.as),m&&l[0]&&m(o),p(l,o)}return t?t(n):n}}var b=(e,t)=>"function"==typeof e?e(t):e,v=(t=0,()=>(++t).toString()),k=()=>{if(void 0===r&&"u">typeof window){let e=matchMedia("(prefers-reduced-motion: reduce)");r=!e||e.matches}return r},w="default",S=(e,t)=>{let{toastLimit:r}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,r)};case 1:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:i}=t;return S(e,{type:+!!e.toasts.find(e=>e.id===i.id),toast:i});case 3:let{toastId:n}=t;return{...e,toasts:e.toasts.map(e=>e.id===n||void 0===n?{...e,dismissed:!0,visible:!1}:e)};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+s}))}}},E=[],I={toasts:[],pausedAt:void 0,settings:{toastLimit:20}},_={},C=(e,t=w)=>{_[t]=S(_[t]||I,e),E.forEach(([e,r])=>{e===t&&r(_[t])})},x=e=>Object.keys(_).forEach(t=>C(e,t)),T=(e=w)=>t=>{C(t,e)},A={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},j=e=>(t,r)=>{let i,n=((e,t="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(null==r?void 0:r.id)||v()}))(t,e,r);return T(n.toasterId||(i=n.id,Object.keys(_).find(e=>_[e].toasts.some(e=>e.id===i))))({type:2,toast:n}),n.id},M=(e,t)=>j("blank")(e,t);M.error=j("error"),M.success=j("success"),M.loading=j("loading"),M.custom=j("custom"),M.dismiss=(e,t)=>{let r={type:3,toastId:e};t?T(t)(r):x(r)},M.dismissAll=e=>M.dismiss(void 0,e),M.remove=(e,t)=>{let r={type:4,toastId:e};t?T(t)(r):x(r)},M.removeAll=e=>M.remove(void 0,e),M.promise=(e,t,r)=>{let i=M.loading(t.loading,{...r,...null==r?void 0:r.loading});return"function"==typeof e&&(e=e()),e.then(e=>{let n=t.success?b(t.success,e):void 0;return n?M.success(n,{id:i,...r,...null==r?void 0:r.success}):M.dismiss(i),e}).catch(e=>{let n=t.error?b(t.error,e):void 0;n?M.error(n,{id:i,...r,...null==r?void 0:r.error}):M.dismiss(i)}),e};var P=1e3,O=y` 2from { 3 transform: scale(0) rotate(45deg); 4 opacity: 0; 5} 6to { 7 transform: scale(1) rotate(45deg); 8 opacity: 1; 9}`,F=y` 10from { 11 transform: scale(0); 12 opacity: 0; 13} 14to { 15 transform: scale(1); 16 opacity: 1; 17}`,q=y` 18from { 19 transform: scale(0) rotate(90deg); 20 opacity: 0; 21} 22to { 23 transform: scale(1) rotate(90deg); 24 opacity: 1; 25}`,$=g("div")` 26 width: 20px; 27 opacity: 0; 28 height: 20px; 29 border-radius: 10px; 30 background: ${e=>e.primary||"#ff4b4b"}; 31 position: relative; 32 transform: rotate(45deg); 33 34 animation: ${O} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 35 forwards; 36 animation-delay: 100ms; 37 38 &:after, 39 &:before { 40 content: ''; 41 animation: ${F} 0.15s ease-out forwards; 42 animation-delay: 150ms; 43 position: absolute; 44 border-radius: 3px; 45 opacity: 0; 46 background: ${e=>e.secondary||"#fff"}; 47 bottom: 9px; 48 left: 4px; 49 height: 2px; 50 width: 12px; 51 } 52 53 &:before { 54 animation: ${q} 0.15s ease-out forwards; 55 animation-delay: 180ms; 56 transform: rotate(90deg); 57 } 58`,D=y` 59 from { 60 transform: rotate(0deg); 61 } 62 to { 63 transform: rotate(360deg); 64 } 65`,R=g("div")` 66 width: 12px; 67 height: 12px; 68 box-sizing: border-box; 69 border: 2px solid; 70 border-radius: 100%; 71 border-color: ${e=>e.secondary||"#e0e0e0"}; 72 border-right-color: ${e=>e.primary||"#616161"}; 73 animation: ${D} 1s linear infinite; 74`,G=y` 75from { 76 transform: scale(0) rotate(45deg); 77 opacity: 0; 78} 79to { 80 transform: scale(1) rotate(45deg); 81 opacity: 1; 82}`,N=y` 830% { 84 height: 0; 85 width: 0; 86 opacity: 0; 87} 8840% { 89 height: 0; 90 width: 6px; 91 opacity: 1; 92} 93100% { 94 opacity: 1; 95 height: 10px; 96}`,U=g("div")`
97 width: 20px; 98 opacity: 0; 99 height: 20px; 100 border-radius: 10px; 101 background: ${e=>e.primary||"#61d345"}; 102 position: relative; 103 transform: rotate(45deg); 104 105 animation: ${G} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 106 forwards; 107 animation-delay: 100ms; 108 &:after { 109 content: ''; 110 box-sizing: border-box; 111 animation: ${N} 0.2s ease-out forwards; 112 opacity: 0; 113 animation-delay: 200ms; 114 position: absolute; 115 border-right: 2px solid; 116 border-bottom: 2px solid; 117 border-color: ${e=>e.secondary||"#fff"}; 118 bottom: 6px; 119 left: 6px; 120 height: 10px; 121 width: 6px; 122 } 123`,Q=g("div")` 124 position: absolute; 125`,B=g("div")` 126 position: relative; 127 display: flex; 128 justify-content: center; 129 align-items: center; 130 min-width: 20px; 131 min-height: 20px; 132`,K=y` 133from { 134 transform: scale(0.6); 135 opacity: 0.4; 136} 137to { 138 transform: scale(1); 139 opacity: 1; 140}`,L=g("div")` 141 position: relative; 142 transform: scale(0.6); 143 opacity: 0.4; 144 min-width: 20px; 145 animation: ${K} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) 146 forwards; 147`,z=({toast:e})=>{let{icon:t,type:r,iconTheme:i}=e;return void 0!==t?"string"==typeof t?n.createElement(L,null,t):t:"blank"===r?null:n.createElement(B,null,n.createElement(R,{...i}),"loading"!==r&&n.createElement(Q,null,"error"===r?n.createElement($,{...i}):n.createElement(U,{...i})))},H=g("div")` 148 display: flex; 149 align-items: center; 150 background: #fff; 151 color: #363636; 152 line-height: 1.3; 153 will-change: transform; 154 box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); 155 max-width: 350px; 156 pointer-events: auto; 157 padding: 8px 10px; 158 border-radius: 8px; 159`,W=g("div")` 160 display: flex; 161 justify-content: center; 162 margin: 4px 10px; 163 color: inherit; 164 flex: 1 1 auto; 165 white-space: pre-line; 166`,Y=n.memo(({toast:e,position:t,style:r,children:i})=>{let s=e.height?((e,t)=>{let r=e.includes("top")?1:-1,[i,n]=k()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[` 1670% {transform: translate3d(0,${-200*r}%,0) scale(.6); opacity:.5;} 168100% {transform: translate3d(0,0,0) scale(1); opacity:1;} 169`,` 1700% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} 171100% {transform: translate3d(0,${-150*r}%,-1px) scale(.6); opacity:0;} 172`];return{animation:t?`${y(i)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${y(n)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},a=n.createElement(z,{toast:e}),o=n.createElement(W,{...e.ariaProps},b(e.message,e));return n.createElement(H,{className:e.className,style:{...s,...r,...e.style}},"function"==typeof i?i({icon:a,message:o}):n.createElement(n.Fragment,null,a,o))});i=n.createElement,l.p=void 0,p=i,f=void 0,m=void 0;var J=({id:e,className:t,style:r,onHeightUpdate:i,children:s})=>{let a=n.useCallback(t=>{if(t){let r=()=>{i(e,t.getBoundingClientRect().height)};r(),new MutationObserver(r).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,i]);return n.createElement("div",{ref:a,className:t,style:r},s)},V=h` 173 z-index: 9999; 174 > * { 175 pointer-events: auto; 176 } 177`;e.s(["Toaster",0,({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:i,children:s,toasterId:a,containerStyle:o,containerClassName:u})=>{let{toasts:l,handlers:c}=((e,t="default")=>{let{toasts:r,pausedAt:i}=((e={},t=w)=>{let[r,i]=(0,n.useState)(_[t]||I),s=(0,n.useRef)(_[t]);(0,n.useEffect)(()=>(s.current!==_[t]&&i(_[t]),E.push([t,i]),()=>{let e=E.findIndex(([e])=>e===t);e>-1&&E.splice(e,1)}),[t]);let a=r.toasts.map(t=>{var r,i,n;return{...e,...e[t.type],...t,removeDelay:t.removeDelay||(null==(r=e[t.type])?void 0:r.removeDelay)||(null==e?void 0:e.removeDelay),duration:t.duration||(null==(i=e[t.type])?void 0:i.duration)||(null==e?void 0:e.duration)||A[t.type],style:{...e.style,...null==(n=e[t.type])?void 0:n.style,...t.style}}});return{...r,toasts:a}})(e,t),s=(0,n.useRef)(new Map).current,a=(0,n.useCallback)((e,t=P)=>{if(s.has(e))return;let r=setTimeout(()=>{s.delete(e),o({type:4,toastId:e})},t);s.set(e,r)},[]);(0,n.useEffect)(()=>{if(i)return;let e=Date.now(),n=r.map(r=>{if(r.duration===1/0)return;let i=(r.duration||0)+r.pauseDuration-(e-r.createdAt);if(i<0){r.visible&&M.dismiss(r.id);return}return setTimeout(()=>M.dismiss(r.id,t),i)});return()=>
177{n.forEach(e=>e&&clearTimeout(e))}},[r,i,t]);let o=(0,n.useCallback)(T(t),[t]),u=(0,n.useCallback)(()=>{o({type:5,time:Date.now()})},[o]),l=(0,n.useCallback)((e,t)=>{o({type:1,toast:{id:e,height:t}})},[o]),c=(0,n.useCallback)(()=>{i&&o({type:6,time:Date.now()})},[i,o]),d=(0,n.useCallback)((e,t)=>{let{reverseOrder:i=!1,gutter:n=8,defaultPosition:s}=t||{},a=r.filter(t=>(t.position||s)===(e.position||s)&&t.height),o=a.findIndex(t=>t.id===e.id),u=a.filter((e,t)=>t<o&&e.visible).length;return a.filter(e=>e.visible).slice(...i?[u+1]:[0,u]).reduce((e,t)=>e+(t.height||0)+n,0)},[r]);return(0,n.useEffect)(()=>{r.forEach(e=>{if(e.dismissed)a(e.id,e.removeDelay);else{let t=s.get(e.id);t&&(clearTimeout(t),s.delete(e.id))}})},[r,a]),{toasts:r,handlers:{updateHeight:l,startPause:u,endPause:c,calculateOffset:d}}})(r,a);return n.createElement("div",{"data-rht-toaster":a||"",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...o},className:u,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map(r=>{let a,o,u=r.position||t,l=c.calculateOffset(r,{reverseOrder:e,gutter:i,defaultPosition:t}),d=(a=u.includes("top"),o=u.includes("center")?{justifyContent:"center"}:u.includes("right")?{justifyContent:"flex-end"}:{},{left:0,right:0,display:"flex",position:"absolute",transition:k()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${l*(a?1:-1)}px)`,...a?{top:0}:{bottom:0},...o});return n.createElement(J,{id:r.id,key:r.id,onHeightUpdate:c.updateHeight,className:r.visible?V:"",style:d},"custom"===r.type?b(r.message,r):s?s(r):n.createElement(Y,{toast:r,position:u}))}))},"default",0,M],5766)},14272,e=>{"use strict";var t=e.i(40143),r=e.i(88587),i=e.i(36553),n=class extends r.Removable{#c;#y;#g;#d;constructor(e){super(),this.#c=e.client,this.mutationId=e.mutationId,this.#g=e.mutationCache,this.#y=[],this.state=e.state||s(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#y.includes(e)||(this.#y.push(e),this.clearGcTimeout(),this.#g.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#y=this.#y.filter(t=>t!==e),this.scheduleGc(),this.#g.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#y.length||("pending"===this.state.status?this.scheduleGc():this.#g.remove(this))}continue(){return this.#d?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#f({type:"continue"})},r={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#d=(0,i.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#f({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#f({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#g.canRun(this)});let n="pending"===this.state.status,s=!this.#d.canStart();try{if(n)t();else{this.#f({type:"pending",variables:e,isPaused:s}),this.#g.config.onMutate&&await this.#g.config.onMutate(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#f({type:"pending",context:t,variables:e,isPaused:s})}let i=await this.#d.start();return await this.#g.config.onSuccess?.(i,e,this.state.context,this,r),await this.options.onSuccess?.(i,e,this.state.context,r),await this.#g.config.onSettled?.(i,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(i,null,e,this.state.context,r),this.#f({type:"success",data:i}),i}catch(t){try{await this.#g.config.onError?.(t,e,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,r)}catch(e){Promise.reject(e)}try{await this.#g.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,r)}catch(e){Promise.reject(e)}throw this.#f({type:"error",error:t}),t}finally{this.#g.runNext(this)}}#f(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};
177case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.notifyManager.batch(()=>{this.#y.forEach(t=>{t.onMutationUpdate(e)}),this.#g.notify({mutation:this,type:"updated",action:e})})}};function s(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}e.s(["Mutation",0,n,"getDefaultState",0,s])},11390,e=>{"use strict";var t=e.i(43476),r=e.i(71645),i=e.i(18566);e.i(47167);let n={light:"#F4EFE3",dark:"#13110E"},s={light:"#F7F8FA",dark:"#0E1116"},a={light:"#2A190E",dark:"#2A190E"},o={light:"#D8EBD8",dark:"#10181C"},u={light:"#FFF7EC",dark:"#191410"},l=[.89,.95,1,1.05,1.11],c=(0,r.createContext)({theme:"system",isDark:!1,setTheme:()=>{},toggleTheme:()=>{},readingFontSize:19,setReadingFontSize:()=>{},readingFontLevel:2});e.s(["ThemeProvider",0,function({children:e}){let d=(0,i.usePathname)(),[h,p]=(0,r.useState)("system"),[f,m]=(0,r.useState)(!1),[y,g]=(0,r.useState)(!1),[b,v]=(0,r.useState)(2);(0,r.useEffect)(()=>{let e=!1,t=window.matchMedia("(prefers-color-scheme: dark)"),r=e=>m(e.matches);return t.addEventListener("change",r),queueMicrotask(()=>{if(!e){try{let e=localStorage.getItem("clarity_theme");("light"===e||"dark"===e||"system"===e)&&p(e);let t=localStorage.getItem("clarity_font_level"),r=Number(t);null!==t&&Number.isInteger(r)&&r>=0&&r<l.length&&v(r)}catch{}m(t.matches),g(!0)}}),()=>{e=!0,t.removeEventListener("change",r)}},[]);let k="dark"===h||"system"===h&&f;(0,r.useEffect)(()=>{y&&(k?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"))},[k,y]),(0,r.useEffect)(()=>{if(!y)return;let e=document.documentElement,t=()=>{let t=function(e,t=!0,r=!0,i){if(e.startsWith("/lessons/"))return o;if("/lessons"===e)return"shelf"===i?a:"book"===i?o:u;let l="/"===e&&r||"/missions"===e;return t&&l?s:n}(d,void 0,void 0,e.dataset.lessonsSurface)[k?"dark":"light"];document.querySelectorAll('meta[name="theme-color"][media="(prefers-color-scheme: light)"], meta[name="theme-color"][media="(prefers-color-scheme: dark)"]').forEach(e=>{e.content!==t&&(e.content=t)})};t();let r=new MutationObserver(t);return r.observe(document.head,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["content"]}),r.observe(e,{attributes:!0,attributeFilter:["data-lessons-surface"]}),()=>r.disconnect()},[k,y,d]);let w=e=>{p(e),localStorage.setItem("clarity_theme",e)},S=Math.round(19*l[b]);return(0,t.jsx)(c.Provider,{value:{theme:h,isDark:k,setTheme:w,toggleTheme:()=>{w(k?"light":"dark")},readingFontSize:S,setReadingFontSize:e=>{e>=0&&e<l.length&&(v(e),localStorage.setItem("clarity_font_level",String(e)))},readingFontLevel:b},children:e})},"useTheme",0,()=>(0,r.useContext)(c)],11390)},65678,e=>{"use strict";var t;let r={compactSheetEnabled:"true"===(t={compactSheet:"true",chapterJump:"true",celebrations:"true",sageWelcome:"true",sageClips:"true",streakHome:"true",modernIdentity:"true",climbScrollPolish:"true"}).compactSheet,chapterJumpEnabled:"true"===t.chapterJump,celebrationsEnabled:"true"===t.celebrations,sageWelcomeEnabled:"true"===t.sageWelcome,sageClipsEnabled:"true"===t.sageClips,streakHomeEnabled:"true"===t.streakHome,modernIdentityEnabled:"true"===t.modernIdentity,climbScrollPolishEnabled:"true"===t.climbScrollPolish},i={enabled:!0,climbV2Enabled:!0,compactSheetEnabled:r.compactSheetEnabled,chapterJumpEnabled:r.chapterJumpEnabled,celebrationsEnabled:r.celebrationsEnabled,sageWelcomeEnabled:r.sageWelcomeEnabled,sageClipsEnabled:r.sageClipsEnabled,streakHomeEnabled:r.streakHomeEnabled,modernIdentityEnabled:r.modernIdentityEnabled,climbScrollPolishEnabled:r.climbScrollPolishEnabled,catalogBridgeEnabled:!0,multiSubjectPortfolioEnabled:!0,paceControlEnabled:!0,defaultGoalQuestions:10,defaultRequiredAccuracy:90,strengthenDecoyCount:2,strengthenMaxTargets:3};e.s(["GuidedMissionsConfig",0,i])},62351,88295,93091,e=>{"use strict";var t=e.i(94403);function r(e){if(!Number.isSafeInteger(e)||e<=0)throw Error("Backend user id must be a positive safe integer");return e}function i(e){let r=(0,t.normalizeGuestIdentityApiBinding)(e);
177if(!r)throw Error("Identity API binding is invalid");return r}function n(e,t,n){let s=i(t),a=r(n);return`${e}:${encodeURIComponent(s)}:${a}`}function s(e){let t=r(e.backendUserId),s=function(e,t){let r=e.trim();if(!r)throw Error(`${t} cannot be empty`);return r}(e.token,"Guest token"),a=i(e.apiBinding);return{kind:"guest",epoch:function(e){if(!Number.isSafeInteger(e)||e<0)throw Error("Auth identity epoch must be a non-negative safe integer");return e}(e.epoch),backendUserId:t,token:s,apiBinding:a,cacheKey:n("guest",a,t)}}e.s(["authIdentityCacheKey",0,n,"createGuestAuthIdentity",0,s],88295);let a=/^[A-Za-z0-9_-]{32,128}$/;function o(e){return Number.isSafeInteger(e)&&e>0}function u(e,r,i=Date.now()){let n=(0,t.loadPermanentAccountMarker)(e,r);if("invalid"===n.status)return{kind:"blocked",reason:"corrupt"};if("present"===n.status)return{kind:"permanent",backendUserId:n.marker.backendUserId};let s=(0,t.loadGuestIdentityRecord)(e,r,i);switch(s.status){case"missing":return{kind:"none"};case"invalid":return{kind:"blocked",reason:"binding_mismatch"===s.reason?"binding_mismatch":"corrupt"};case"key_only":return{kind:"guest",guestKey:s.record.guestKey,backendUserId:null,token:null,expiresAtMs:null};case"expired":return{kind:"guest",guestKey:s.record.guestKey,backendUserId:s.record.backendUserId,token:null,expiresAtMs:s.record.expiresAtMs};case"active":return{kind:"guest",guestKey:s.record.guestKey,backendUserId:s.record.backendUserId,token:s.record.token,expiresAtMs:s.record.expiresAtMs}}}e.s(["createMissionGuestCoordinator",0,function(e){let t=e.nowMs??(()=>Date.now()),r=null,i=null,n=()=>({epoch:e.currentIdentityEpoch(),generation:e.currentIdentityGeneration?.()}),u=t=>e.identityEpochIsCurrent(t.epoch)&&(void 0===t.generation||e.identityGenerationIsCurrent?.(t.generation)===!0),l=e=>{let t=null!==e&&"object"==typeof e&&"code"in e?e.code:void 0;return"guest_credential_retired"===t||"guest_already_merged"===t?{kind:"recovery",reason:"merge_pending"}:"guest_record_invalid"===t||"guest_key_conflict"===t||"guest_token_invalid"===t||"invalid_response"===t?{kind:"recovery",reason:"guest_refresh"}:e instanceof Error&&"BrowserExclusiveLockUnavailableError"===e.name?{kind:"unavailable",reason:"coordination"}:"string"==typeof t&&(t.startsWith("storage_")||"secure_random_unavailable"===t)?{kind:"unavailable",reason:"storage"}:{kind:"unavailable",reason:"network"}},c=(i,c,d=n())=>{if(r)return r.guestKey===i?r.promise:Promise.resolve({kind:"recovery",reason:"guest_refresh"});let h=(async()=>{if(!a.test(i))return{kind:"recovery",reason:"guest_refresh"};try{let r=await e.exchangeGuest(i);if(!u(d))return{kind:"superseded"};
177if(!o(r.backendUserId)||void 0!==c&&r.backendUserId!==c)return{kind:"recovery",reason:"guest_refresh"};let n=e.tokenExpiresAtMs(r.token);if(!r.token.trim()||null===n||n<=t()+3e4)return{kind:"recovery",reason:"guest_refresh"};if(await e.persistGuest({apiBinding:e.apiBinding,guestKey:i,backendUserId:r.backendUserId,token:r.token,expiresAtMs:n}),!u(d))return{kind:"superseded"};return{kind:"guest",identity:s({epoch:d.epoch,backendUserId:r.backendUserId,token:r.token,apiBinding:e.apiBinding}),guestKey:i}}catch(e){if(!u(d))return{kind:"superseded"};return l(e)}})().finally(()=>{r?.promise===h&&(r=null)});return r={guestKey:i,promise:h},h},d=async r=>{let i,d;if(!e.enabled)return{kind:"unavailable",reason:"disabled"};if(!(e.apiBinding.trim().length>0))return{kind:"unavailable",reason:"configuration"};let h=n();try{i=e.loadSnapshot()}catch(e){return l(e)}if(!u(h))return{kind:"superseded"};if("permanent"===i.kind)return{kind:"recovery",reason:"permanent_account"};if("blocked"===i.kind)return{kind:"recovery",reason:"guest_refresh"};if("guest"===i.kind){let r=((r,i)=>{if(!a.test(r.guestKey)||null!==r.backendUserId&&!o(r.backendUserId))return{kind:"recovery",reason:"guest_refresh"};if(r.token&&null!==r.backendUserId&&null!==r.expiresAtMs&&r.expiresAtMs>t()+3e4)try{return{kind:"guest",identity:s({epoch:i,backendUserId:r.backendUserId,token:r.token,apiBinding:e.apiBinding}),guestKey:r.guestKey}}catch{return{kind:"recovery",reason:"guest_refresh"}}return null})(i,h.epoch);return r?u(h)?r:{kind:"superseded"}:c(i.guestKey,i.backendUserId??void 0,h)}if(!r)return{kind:"visitor"};try{d=await e.createGuestKey()}catch(e){return l(e)}return u(h)?c(d,void 0,h):{kind:"superseded"}};return{restoreForRead:()=>d(!1),ensureMissionIdentity:()=>{if(i)return i;let e=d(!0).finally(()=>{i===e&&(i=null)});return i=e,e}}}],62351),e.s(["createMissionGuestStorageAdapter",0,function(e){let r=e.nowMs??(()=>Date.now());return{loadSnapshot:()=>u(e.storage,e.apiBinding,r()),createGuestKey:()=>(0,t.ensureStableGuestKey)(e.storage,e.apiBinding,r(),e.randomSource),persistGuest:async i=>{if(i.apiBinding!==e.apiBinding)throw Error("Guest credential API binding changed during exchange");if((await (0,t.saveGuestIdentityCredential)(e.storage,{apiBinding:i.apiBinding,guestKey:i.guestKey,backendUserId:i.backendUserId,token:i.token},r())).expiresAtMs!==i.expiresAtMs)throw Error("Guest credential expiry did not match its JWT")}}},"loadMissionGuestIdentitySnapshot",0,u],93091)},96714,e=>{"use strict";e.i(47167);var t=e.i(43476),r=e.i(71645),i=e.i(91432),n=e.i(94403),s=e.i(62351),a=e.i(93091),o=e.i(88295),u=e.i(34282),l=e.i(19144),c=e.i(81949),d=e.i(72618),h=e.i(31409),p=e.i(22080),f=e.i(50261),m=e.i(98012);let y="/v1/missions",g=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,b=c.default.create({baseURL:"/api-proxy",timeout:3e4,headers:{"Content-Type":"application/json"}});(0,d.installAuthenticatedRequestFence)(b);class v extends Error{constructor(){super("Mission identity changed before the request could finish."),this.name="MissionApiIdentitySupersededError"}}class k extends Error{constructor(){super("Mission operation changed before the request could finish."),this.name="MissionApiOperationSupersededError"}}class w extends Error{constructor(){super("Mission API endpoint does not match the captured identity."),this.name="MissionApiBindingMismatchError"}}class S extends Error{constructor(e){super(e),this.name="MissionApiContractError"}}function E(e,t){throw new S(`${e} must be ${t}`)}function I(e,t){return"object"!=typeof e||null===e||Array.isArray(e)?E(t,"an object"):e}function _(e,t){return Array.isArray(e)?e:E(t,"an array")}function C(e,t){return"string"!=typeof e?E(t,"a string"):e}function x(e,t){return"boolean"!=typeof e?E(t,"a boolean"):e}function T(e,t,r,i=Number.MAX_SAFE_INTEGER){return"number"!=typeof e||!Number.isSafeInteger(e)||e<r||e>i?E(t,`a safe integer between ${r} and ${i}`):e}function A(e,t){return null===e?null:C(e,t)}function j(e,t,r){return null===e?null:T(e,t,r)}function M(e){let t=_(e.tracks,"fast-track.tracks"),r=_(e.available,"fast-track.available");return T(e.active_count,"fast-track.active_count",0),T(e.recommended_count,"fast-track.recommended_count",0),t.forEach((e,t)=>{let r=I(e,`fast-track.tracks[${t}]`);T(r.subject_id,`fast-track.tracks[${t}].subject_id`,1),C(r.subject_name,`fast-track.tracks[${t}].subject_name`),"active"!==r.status&&"removed"!==r.status&&"retired"!==r.status&&E(`fast-track.tracks[${t}].status`,"active, removed, or retired"),T(r.order,`fast-track.tracks[${t}].order`,0),T(r.streak_days,`fast-track.tracks[${t}].streak_days`,0),T(r.longest_streak,`fast-track.tracks[${t}].longest_streak`,0),T(r.xp,`fast-track.tracks[${t}].xp`,0),A(r.last_activity_date,`fast-track.tracks[${t}].last_activity_date`)}),r.forEach((e,t)=>{var r,i;let n=I(e,`fast-track.available[${t}]`);T(n.subject_id,`fast-track.available[${t}].subject_id`,1),C(n.name,`fast-track.available[${t}
177].name`),r=n.image_url,i=`fast-track.available[${t}].image_url`,void 0!==r&&C(r,i),C(n.caption,`fast-track.available[${t}].caption`),T(n.order,`fast-track.available[${t}].order`,0),x(n.active,`fast-track.available[${t}].active`),C(n.tone_key,`fast-track.available[${t}].tone_key`),null!==n.recommended_reason&&C(n.recommended_reason,`fast-track.available[${t}].recommended_reason`)}),(0,h.parseFastTrackStatusPayload)(e)}function P(e){C(e.date,"daily-path.date"),T(e.active_count,"daily-path.active_count",0),T(e.open_count,"daily-path.open_count",0),T(e.in_progress_count,"daily-path.in_progress_count",0),T(e.strengthen_count,"daily-path.strengthen_count",0),x(e.all_done,"daily-path.all_done");let t=new Set(["in_progress","done","strengthen","open","complete","resting"]),r=new Set(["today_open","today_gated","reset","in_repair","mastery_pending","crowned","premium_available","resting","ahead"]);return _(e.objectives,"daily-path.objectives").forEach((e,i)=>{let n=`daily-path.objectives[${i}]`,s=I(e,n);T(s.subject_id,`${n}.subject_id`,1),C(s.subject_name,`${n}.subject_name`),T(s.order,`${n}.order`,0),t.has(C(s.status,`${n}.status`))||E(`${n}.status`,"a supported objective status"),T(s.streak_days,`${n}.streak_days`,0),T(s.longest_streak,`${n}.longest_streak`,0),T(s.xp,`${n}.xp`,0),j(s.topic_id,`${n}.topic_id`,1),C(s.topic_name,`${n}.topic_name`),j(s.level,`${n}.level`,1),C(s.level_name,`${n}.level_name`),j(s.chapter_id,`${n}.chapter_id`,1),r.has(C(s.face,`${n}.face`))||E(`${n}.face`,"a supported jewel face"),x(s.servable,`${n}.servable`),C(s.gate_copy,`${n}.gate_copy`),A(s.session_id,`${n}.session_id`),T(s.answered_count,`${n}.answered_count`,0),void 0!==s.goal_count&&T(s.goal_count,`${n}.goal_count`,0),T(s.steps_cleared,`${n}.steps_cleared`,0),T(s.steps_total,`${n}.steps_total`,0)}),(0,h.parseDailyPath)(e)}function O(e){return _(e.nodes,"path.nodes").map((e,t)=>{let r=I(e,`path.nodes[${t}]`),i=T(r.state,`path.nodes[${t}].state`,0,2);return{title:C(r.title,`path.nodes[${t}].title`),meta:C(r.meta,`path.nodes[${t}].meta`),state:i,sub:C(r.sub,`path.nodes[${t}].sub`)}})}function F(e){let t=x(e.enabled,"pace.enabled"),r=T(e.min_selectable,"pace.min_selectable",1),i=T(e.max_selectable,"pace.max_selectable",r),n=T(e.unlocked_max,"pace.unlocked_max",r,i),s=T(e.best_streak,"pace.best_streak",0),a=e.daily_goal_sessions,o=null===a?null:T(a,"pace.daily_goal_sessions",r,i),u={};return _(e.tier_unlocks,"pace.tier_unlocks").forEach((e,t)=>{let n=I(e,`pace.tier_unlocks[${t}]`),s=T(n.sessions,`pace.tier_unlocks[${t}].sessions`,r,i),a=T(n.streak_days,`pace.tier_unlocks[${t}].streak_days`,1);Object.prototype.hasOwnProperty.call(u,s)&&E(`pace.tier_unlocks[${t}].sessions`,"unique"),u[s]=a}),{enabled:t,dailyGoalSessions:o,minSelectable:r,maxSelectable:i,unlockedMax:n,bestStreak:s,tierUnlocks:u}}function q(e,t=b){(0,d.installAuthenticatedRequestFence)(t);let r={Authorization:`Bearer ${function(e){let t=e.trim();if(!t||/\s/.test(t))throw Error("Mission authorization token is invalid");return t}(e.authorizationToken)}`,"X-Clarity-Device-ID":function(e){let t=e.trim();if(!g.test(t))throw Error("Mission installation id must be a UUIDv4");return t}(e.installationId)},i=window.location.origin,s=(0,n.normalizeGuestIdentityApiBinding)(t.defaults.baseURL,i),a=(0,n.normalizeGuestIdentityApiBinding)(e.apiBinding);if(!s||!a||s!==a)throw new w;let o=()=>{if(!e.identityIsCurrent())throw new v;if((0,n.normalizeGuestIdentityApiBinding)(t.defaults.baseURL,i)!==a)throw new w},u=e=>{o();if(e&&!e())throw new k},l=async(e,t,r)=>{u(r);let i=await e();return u(r),t(I(i.data,"mission response"))},c=(e,t)=>({headers:r,...e?{params:e}:{},...t?{signal:t}:{}}),S=Promise.resolve(),_=async(e,t)=>(await S,u(t),e()),C=(e,t)=>{let r=S.then(async()=>(u(t),e()));return S=r.then(()=>void 0,()=>void 0),r};return{getMissionHome:(e,r)=>_(()=>l(()=>t.get(`${y}/home`,c({...e?.subjectId!=null?{subject_id:e.subjectId}:{},...e?.topicId!=null?{topic_id:e.topicId}:{},...e?.extra?{extra:!0}:{}},r)),h.parseMissionHomePayload)),fetchSubjectJourney:(e,r)=>_(()=>l(()=>t.get(`${y}/journey/${e}`,c(void 0,r)),h.parseSubjectJourney)),fetchCatalogState:e=>l(()=>t.get(`${y}/catalog/${e}`,c()),p.parseCatalogTopicState),fetchCatalogStates:async e=>{let r=Array.from(new Set(e.filter(e=>e>0))),i={};for(let e=0;e<r.length;e+=80){o();let n=await t.post(`${y}/catalog/states`,{topic_ids:r.slice(e,e+80)},c());o();let s=n.data;for(let e of null!==s&&"object"==typeof s&&Array.isArray(s.states)?s.states:[])null!==e&&"object"==typeof e&&"number"==typeof e.topic_id&&(i[e.topic_id]=(0,p.parseCatalogTopicState)(e))}return i},startSession:async(e,r={},i)=>{await S;try{u(i);let n=await t.post(`${y}/sessions/start`,(0,f.buildGuidedStartSessionBody)(e,r),c());return u(i),(0,h.parseGuidedSessionState)(n.data)}catch(e){throw(0,f.guidedSessionConflictErrorFromHttp)(e)??e}},startStrengthenSession:(e,r)=>_(()=>l(()=>t.post(`${y}/sessions/strengthen`,{},c((0,m.buildStrengthenSessionParams)(e))),h.parseGuidedSessionState,r),r),startRetakeSession:(e,r)=>_(()=>l(()=>t.post(`${y}/sessions/retake`,{segment_id:e},c()),h.parseGuidedSessionState,r),r),completeSession:(e,r)=>l(()=>t.post(`${y}/sessions/${encodeURIComponent(e)}/complete`,{},c()),h.parseGuidedSessionOutcome,r),fetchPathNodes:()=>l(()=>t.get(`${y}/path`,c()),O),fetchFastTrack:e=>_(()=>l(()=>t.get(`${y}/fast-track`,c(void 0,e)),M)),enrollFastTrack:(e,r)=>C(()=>l(()=>t.post(`${y}/fast-track`,{subject_ids:e},c()),M,r),r),removeFastTrack:(e,r)=>{let i=T(e,"subjectId",1);return C(()=>l(()=>t.delete(`${y}/fast-track/${i}`,c()),M,r),r)},reorderFastTrack:(e,r)=>{let i=function(e,t){if(!Array.isArray(e)||e.length<1||e.length>20)return E(t,"an array containing 1 to 20 subject IDs");let r=e.map((e,r)=>T(e,`${t}[${r}]`,1));return new Set(r).size!==r.length?E(t,"a duplicate-free ordered subject list"):r}(e,"subjectIds");return C(()=>l(()=>t.post(`${y}/fast-track/reorder`,{subject_ids:i},c()),M,r),r)},fetchDailyPath:e=>_(()=>l(()=>t.get(`${y}/daily-path`,c(void 0,e)),P)),fetchPace:()=>l(()=>t.get(`${y}/pace`,c()),F),setPace:(e,r)=>{let i=null===e?null:T(e,"dailyGoalSessions",0,1e3);return l(()=>t.put(`${y}/pace`,{daily_goal_sessions:i},c()),F,r)}}}var $=e.i(65678);let D=async()=>null,R=new Proxy({},{get:()=>()=>Promise.reject(Error("A current mission identity is required for this request."))}),G=(0,r.createContext)({status:"restoring",api:R,identity:null,error:null,ensureGuestIdentity:D}),N=$.GuidedMissionsConfig.enabled||$.GuidedMissionsConfig.catalogBridgeEnabled||$.GuidedMissionsConfig.multiSubjectPortfolioEnabled||$.GuidedMissionsConfig.paceControlEnabled;function U(e,t,r=Date.now()){let i=(0,n.backendTokenClaims)(e);return Number.isFinite(r)&&null!==i&&"user"===i.scope&&i.userId===t&&i.expiresAtMs>r+3e4}function Q(e,t,r=Date.now()){let i=(0,n.backendTokenClaims)(e);return Number.isFinite(r)&&null!==i&&"guest"===i.scope&&i.userId===t&&i.expiresAtMs>r+3e4}function B(e){return(0,n.normalizeGuestIdentityApiBinding)("/api-proxy",e)}e.s(["MissionRuntimeProvider",0,function({children:c}){let{user:d,token:h,loading:p,identityEpoch:f,accountEntryPhase:m}=(0,i.useAuth)(),[y,g]=(0,r.useState)({status:"restoring",api:R,identity:null,error:null}),[b,v]=(0,r.useState)(0),k=(0,r.useRef)(D),w=(0,r.useCallback)(()=>k.current(),[]);(0,r.useEffect)(()=>{let e=e=>{let t=e.key;(null===t||t===u.AUTH_IDENTITY_EPOCH_KEY||t===u.AUTH_IDENTITY_GENERATION_KEY||t===l.GUEST_PROGRESS_MERGE_TRANSACTION_STORAGE_KEY||t.startsWith(n.GUEST_IDENTITY_STORAGE_PREFIX)||t.startsWith(n.PERMANENT_ACCOUNT_STORAGE_PREFIX))&&v(e=>e+1)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]),(0,r.useEffect)(()=>{let t=!1,r=null,i=0;k.current=D;let l=()=>{null!==r&&(window.clearTimeout(r),r=null)},c=()=>{t=!0,i+=1,k.current=D,l()};if(!N)return g({status:p?"restoring":d?"unavailable":"visitor",api:R,identity:null,error:null}),c;if(p)return g({status:"restoring",api:R,identity:null,error:null}),c;if("firebase_authenticating"===m||"transferring"===m||"awaiting_resolution"===m||"recovery"===m)return g({status:"unavailable",api:R,identity:null,error:"recovery"===m?"Finish recovering this device's mission progress before continuing.":null}),c;if(!d||!h||!d.apiUserId){let o;if(d||h)return g({status:"unavailable",api:R,identity:null,error:"The signed-in mission account is incomplete. Refresh to continue safely."}),c;let p=B(window.location.origin),f=function(e,t){if(!e.enabled||null!==e.configurationError||null===e.apiBinding)return null;let r=(0,n.normalizeGuestIdentityApiBinding)(e.apiBinding),i=(0,n.normalizeGuestIdentityApiBinding)(t);return null!==r&&r===i?r:null}(n.guestIdentityFeatureConfig,p);if(null===f){let e=n.guestIdentityFeatureConfig.enabled||null!==n.guestIdentityFeatureConfig.configurationError;return g({status:e?"unavailable":"visitor",api:R,identity:null,error:e?"The guest mission endpoint is not safely configured for this build.":null}),c}try{o=window.localStorage}catch{return g({status:"unavailable",api:R,identity:null,error:"This browser could not safely access saved mission progress."}),c}let m=(0,a.createMissionGuestStorageAdapter)({storage:o,apiBinding:f}),y=(0,s.createMissionGuestCoordinator)({enabled:!0,apiBinding:f,...m,exchangeGuest:async t=>{let{createGuestAuthTransport:r}=await e.A(3114),i=r({baseURL:f,apiBinding:f}),n=await i.exchangeGuest({guestKey:t});return{token:n.token,backendUserId:n.userId}},currentIdentityEpoch:u.readAuthIdentityEpoch,identityEpochIsCurrent:e=>(0,u.readAuthIdentityEpoch)()===e,currentIdentityGeneration:u.readAuthIdentityGeneration,identityGenerationIsCurrent:e=>(0,u.readAuthIdentityGeneration)()===e,tokenExpiresAtMs:e=>(0,n.backendTokenClaims)(e)?.expiresAtMs??null}),b=async(e,s,c,d)=>
177{if(t||s!==i||(0,u.readAuthIdentityEpoch)()!==c||(0,u.readAuthIdentityGeneration)()!==d||"superseded"===e.kind)return null;if("visitor"===e.kind)return g({status:"visitor",api:R,identity:null,error:null}),null;if("guest"!==e.kind)return g({status:"unavailable",api:R,identity:null,error:function(e){if("recovery"===e.kind)switch(e.reason){case"permanent_account":return"This device is already protected by an account. Sign in to continue.";case"merge_pending":return"This device has a pending progress transfer that must be recovered before continuing.";case"guest_refresh":return"This device's mission identity needs recovery before continuing."}if("unavailable"===e.kind)switch(e.reason){case"configuration":case"disabled":return"Guest missions are unavailable in this build.";case"storage":return"This browser could not safely save mission progress.";case"coordination":return"Another tab is updating this device's mission identity. Try again.";case"network":return"The mission identity could not be restored. Check your connection and try again."}return"The mission identity could not be restored."}(e)}),null;if(e.identity.epoch!==c||!Q(e.identity.token,e.identity.backendUserId))return g({status:"unavailable",api:R,identity:null,error:"The restored mission identity was not valid for this device."}),null;let h=await (0,n.getOrCreateInstallationId)(o),p=()=>{if(t||i!==s||(0,u.readAuthIdentityEpoch)()!==c||(0,u.readAuthIdentityGeneration)()!==d||!Q(e.identity.token,e.identity.backendUserId))return!1;try{let t=(0,a.loadMissionGuestIdentitySnapshot)(o,f);return"guest"===t.kind&&t.guestKey===e.guestKey&&t.backendUserId===e.identity.backendUserId&&t.token===e.identity.token}catch{return!1}};if(!p())return null;let m={...e.identity,installationId:h,isCurrent:p},y=q({authorizationToken:m.token,installationId:h,apiBinding:m.apiBinding,identityIsCurrent:p});if(!p())return null;l(),g({status:"ready",api:y,identity:m,error:null});let b=(0,n.backendTokenClaims)(m.token)?.expiresAtMs??0,v=()=>{let e=b-3e4-Date.now();if(e>2147e6){r=window.setTimeout(v,2147e6);return}r=window.setTimeout(()=>{r=null,t||i!==s||(0,u.readAuthIdentityEpoch)()!==c||(0,u.readAuthIdentityGeneration)()!==d||g({status:"unavailable",api:R,identity:null,error:"Your guest mission session expired. Continue again to restore it safely."})},Math.max(0,e))};return v(),m},v=async e=>{let r=++i,n=(0,u.readAuthIdentityEpoch)(),s=(0,u.readAuthIdentityGeneration)();l(),g({status:"restoring",api:R,identity:null,error:null});try{let t=e?await y.ensureMissionIdentity():await y.restoreForRead();return await b(t,r,n,s)}catch(e){if(t||r!==i||(0,u.readAuthIdentityEpoch)()!==n||(0,u.readAuthIdentityGeneration)()!==s)return null;return g({status:"unavailable",api:R,identity:null,error:e instanceof Error?e.message:"Mission identity could not be restored."}),null}};return k.current=()=>v(!0),v(!1),c}let f=d.apiUserId;if(!U(h,f))return g({status:"unavailable",api:R,identity:null,error:"The mission account token does not match the signed-in learner."}),c;let y={epoch:(0,u.readAuthIdentityEpoch)(),generation:(0,u.readAuthIdentityGeneration)(),backendUserId:f,authorizationToken:h};return g({status:"restoring",api:R,identity:null,error:null}),(async()=>{try{let e=B(window.location.origin);if(!e)throw Error("The mission API binding is invalid for this build.");let i=await (0,n.getOrCreateInstallationId)(window.localStorage);if(t||!(0,u.capturedAccountIdentityIsCurrent)(y))return;let s=()=>!t&&(0,u.capturedAccountIdentityIsCurrent)(y)&&U(h,f),a={kind:"account",backendUserId:f,token:h,apiBinding:e,installationId:i,cacheKey:(0,o.authIdentityCacheKey)("account",e,f),isCurrent:s},l=q({authorizationToken:h,installationId:i,apiBinding:e,identityIsCurrent:s});if(!s())return;g({status:"ready",api:l,identity:a,error:null});let c=(0,n.backendTokenClaims)(h)?.expiresAtMs??0,d=()=>{let e=c-3e4-Date.now();if(e>2147e6){r=window.setTimeout(d,2147e6);return}r=window.setTimeout(()=>{r=null,!t&&(0,u.capturedAccountIdentityIsCurrent)(y)&&g({status:"unavailable",api:R,identity:null,error:"Your mission session expired. Refresh to continue safely."})},Math.max(0,e))};d()}catch(e){if(t)return;g({status:"unavailable",api:R,identity:null,error:e instanceof Error?e.message:"Mission identity could not be restored."})}})(),c},[m,f,p,b,h,d]);let S=(0,r.useMemo)(()=>({...y,ensureGuestIdentity:w}),[w,y]);return(0,t.jsx)(G.Provider,{value:S,children:c})},"useMissionRuntime",0,function(){return(0,r.useContext)(G)}],96714)},2875,e=>{"use strict";async function t(){return!("u"<typeof navigator)&&"serviceWorker"
177in navigator?navigator.serviceWorker.register("/sw.js",{scope:"/",updateViaCache:"none"}):null}e.s(["listenForClarityServiceWorkerUpdate",0,function(e){if("u"<typeof navigator||!("serviceWorker"in navigator))return()=>{};let t=navigator.serviceWorker,r=null!==t.controller,i=!1,n=()=>{if(!r){r=!0;return}i||(i=!0,e())};return t.addEventListener("controllerchange",n),()=>{t.removeEventListener("controllerchange",n)}},"registerClarityServiceWorker",0,t])},92571,e=>{"use strict";var t=e.i(19273);function r(e,{pages:t,pageParams:i}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,i[n],i):void 0}function i(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}e.s(["hasNextPage",0,function(e,t){return!!t&&null!=r(e,t)},"hasPreviousPage",0,function(e,t){return!!t&&!!e.getPreviousPageParam&&null!=i(e,t)},"infiniteQueryBehavior",0,function(e){return{onFetch:(n,s)=>{let a=n.options,o=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],l=n.state.data?.pageParams||[],c={pages:[],pageParams:[]},d=0,h=async()=>{let s=!1,h=(0,t.ensureQueryFn)(n.options,n.fetchOptions),p=async(e,r,i)=>{let a;if(s)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);let o=(a={client:n.client,queryKey:n.queryKey,pageParam:r,direction:i?"backward":"forward",meta:n.options.meta},(0,t.addConsumeAwareSignal)(a,()=>n.signal,()=>s=!0),a),u=await h(o),{maxPages:l}=n.options,c=i?t.addToStart:t.addToEnd;return{pages:c(e.pages,u,l),pageParams:c(e.pageParams,r,l)}};if(o&&u.length){let e="backward"===o,t={pages:u,pageParams:l},n=(e?i:r)(a,t);c=await p(t,n,e)}else{let t=e??u.length;do{let e=0===d?l[0]??a.initialPageParam:r(a,c);if(d>0&&null==e)break;c=await p(c,e),d++}while(d<t)}return c};n.options.persister?n.fetchFn=()=>n.options.persister?.(h,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},s):n.fetchFn=h}}}])},11414,e=>{"use strict";var t=e.i(43476),r=e.i(11390),i=e.i(91432),n=e.i(19273),s=e.i(86491),a=e.i(40143),o=e.i(15823),u=class extends o.Subscribable{constructor(e={}){super(),this.config=e,this.#b=new Map}#b;build(e,t,r){let i=t.queryKey,a=t.queryHash??(0,n.hashQueryKeyByOptions)(i,t),o=this.get(a);return o||(o=new s.Query({client:e,queryKey:i,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){this.#b.has(e.queryHash)||(this.#b.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#b.get(e.queryHash);t&&(e.destroy(),t===e&&this.#b.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){a.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#b.get(e)}getAll(){return[...this.#b.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,n.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,n.matchQuery)(e,t)):t}notify(e){a.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){a.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){a.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},l=e.i(14272),c=o,d=class extends c.Subscribable{constructor(e={}){super(),this.config=e,this.#v=new Set,this.#k=new Map,this.#w=0}#v;#k;#w;build(e,t,r){let i=new l.Mutation({client:e,mutationCache:this,mutationId:++this.#w,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){this.#v.add(e);let t=h(e);if("string"==typeof t){let r=this.#k.get(t);r?r.push(e):this.#k.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#v.delete(e)){let t=h(e);if("string"==typeof t){let r=this.#k.get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#k.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=h(e);if("string"!=typeof t)return!0;{let r=this.#k.get(t),i=r?.find(e=>"pending"===e.state.status);return!i||i===e}}runNext(e){let t=h(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#k.get(t)?.find(t=>
177t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){a.notifyManager.batch(()=>{this.#v.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#v.clear(),this.#k.clear()})}getAll(){return Array.from(this.#v)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,n.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,n.matchMutation)(e,t))}notify(e){a.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return a.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(n.noop))))}};function h(e){return e.options.scope?.id}var p=e.i(75555),f=e.i(14448),m=e.i(92571),y=class{#S;#g;#h;#E;#I;#_;#C;#x;constructor(e={}){this.#S=e.queryCache||new u,this.#g=e.mutationCache||new d,this.#h=e.defaultOptions||{},this.#E=new Map,this.#I=new Map,this.#_=0}mount(){this.#_++,1===this.#_&&(this.#C=p.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#S.onFocus())}),this.#x=f.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#S.onOnline())}))}unmount(){this.#_--,0===this.#_&&(this.#C?.(),this.#C=void 0,this.#x?.(),this.#x=void 0)}isFetching(e){return this.#S.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#g.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#S.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#S.build(this,t),i=r.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,n.resolveStaleTime)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#S.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let i=this.defaultQueryOptions({queryKey:e}),s=this.#S.get(i.queryHash),a=s?.state.data,o=(0,n.functionalUpdate)(t,a);if(void 0!==o)return this.#S.build(this,i).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return a.notifyManager.batch(()=>this.#S.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#S.get(t.queryHash)?.state}removeQueries(e){let t=this.#S;a.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#S;return a.notifyManager.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(a.notifyManager.batch(()=>this.#S.findAll(e).map(e=>e.cancel(r)))).then(n.noop).catch(n.noop)}invalidateQueries(e,t={}){return a.notifyManager.batch(()=>(this.#S.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(a.notifyManager.batch(()=>this.#S.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(n.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(n.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#S.build(this,t);return r.isStaleByTime((0,n.resolveStaleTime)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(n.noop).catch(n.noop)}fetchInfiniteQuery(e){return e.behavior=(0,m.infiniteQueryBehavior)(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(n.noop).catch(n.noop)}ensureInfiniteQueryData(e){return e.behavior=(0,m.infiniteQueryBehavior)(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return f.onlineManager.isOnline()?this.#g.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#S}getMutationCache(){return this.#g}getDefaultOptions(){return this.#h}setDefaultOptions(e){this.#h=e}setQueryDefaults(e,t){this.#E.set((0,n.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#E.values()],r={};return t.forEach(t=>{(0,n.partialMatchKey)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#I.set((0,n.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#I.values()],r={};return t.forEach(t=>{(0,n.partialMatchKey)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#h.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,n.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===n.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#h.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#S.clear(),this.#g.clear()}},g=e.i(12598),b=e.i(5766),v=e.i(71645),k=e.i(2875);function w(){return(0,v.useEffect)(()=>
177{if(!("serviceWorker"in navigator))return;let e=(0,k.listenForClarityServiceWorkerUpdate)(()=>{window.location.reload()}),t=()=>{(0,k.registerClarityServiceWorker)().catch(()=>{})};return"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0}),()=>{window.removeEventListener("load",t),e()}},[]),null}var S=e.i(96714),E=e.i(9172);function I({children:e}){let r=(0,v.useRef)(!0),i=(0,v.useRef)(null),n=(0,v.useRef)(null),[s]=(0,v.useState)(E.createMaintenanceCheckGate),[a,o]=(0,v.useState)(null),[u,l]=(0,v.useState)(!1),c=null!==a,d=(0,v.useCallback)(()=>{if(i.current)return i.current;let e=s.beginCheck(),t=(async()=>{r.current&&l(!0);let t=new AbortController,i=window.setTimeout(()=>t.abort(),1e4);try{let i=await fetch("/public-content/system-status",{cache:"no-store",credentials:"omit",headers:{Accept:"application/json"},signal:t.signal});if(200!==i.status&&503!==i.status)return;let n=(0,E.parseSystemStatusResponse)(i.status,await i.json());r.current&&s.canCommit(e)&&o(n.isInMaintenance?n:null)}catch{}finally{window.clearTimeout(i),r.current&&l(!1)}})();return i.current=t,t.finally(()=>{i.current===t&&(i.current=null)}),t},[s]);if((0,v.useEffect)(()=>{r.current=!0,d();let e=e=>{let t=(0,E.parseMaintenanceEventDetail)(e.detail);t&&(s.markDetected(),o(t))},t=()=>void d(),i=()=>{"visible"===document.visibilityState&&d()},n=window.setInterval(()=>{"visible"===document.visibilityState&&d()},6e4);return window.addEventListener(E.MAINTENANCE_DETECTED_EVENT,e),window.addEventListener("online",t),document.addEventListener("visibilitychange",i),()=>{r.current=!1,window.clearInterval(n),window.removeEventListener(E.MAINTENANCE_DETECTED_EVENT,e),window.removeEventListener("online",t),document.removeEventListener("visibilitychange",i)}},[s,d]),(0,v.useEffect)(()=>{if(!c)return;let e=window.requestAnimationFrame(()=>{n.current?.focus()});return()=>window.cancelAnimationFrame(e)},[c]),!a)return e;let h=(0,E.maintenanceStartedCopy)(a.startedAt);return(0,t.jsx)("main",{className:"min-h-dvh bg-[var(--bg)] text-[var(--ink)] grid place-items-center p-8",role:"alertdialog","aria-modal":"true","aria-busy":u,"aria-labelledby":"maintenance-title","aria-describedby":"maintenance-message",children:(0,t.jsxs)("section",{className:"w-full max-w-md text-center",children:[(0,t.jsx)("div",{className:"mx-auto grid h-28 w-28 place-items-center rounded-[28px] border border-[var(--border)] bg-[var(--surface-2)]","aria-hidden":"true",children:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-16 w-16 text-[var(--accent)] motion-safe:animate-spin",style:{animationDuration:"5s"},fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,t.jsx)("path",{d:"M12 8.2a3.8 3.8 0 1 0 0 7.6 3.8 3.8 0 0 0 0-7.6Z"}),(0,t.jsx)("path",{d:"m19.1 13.4 1.3 1-.9 2.2-1.7-.2a8 8 0 0 1-1.4 1.4l.2 1.7-2.2.9-1-1.3a8 8 0 0 1-2 0l-1 1.3-2.2-.9.2-1.7A8 8 0 0 1 7 16.4l-1.7.2-.9-2.2 1.3-1a8 8 0 0 1 0-2l-1.3-1 .9-2.2 1.7.2A8 8 0 0 1 8.4 7l-.2-1.7 2.2-.9 1 1.3a8 8 0 0 1 2 0l1-1.3 2.2.9-.2 1.7a8 8 0 0 1 1.4 1.4l1.7-.2.9 2.2-1.3 1a8 8 0 0 1 0 2Z"})]})}),(0,t.jsx)("h1",{id:"maintenance-title",className:"mt-8 font-serif text-3xl font-semibold",children:"Under Maintenance"}),(0,t.jsx)("p",{id:"maintenance-message",className:"mx-auto mt-4 max-w-sm text-base leading-7 text-[var(--text-2)]",children:a.message}),h?(0,t.jsx)("p",{className:"mx-auto mt-5 w-fit rounded-full border border-[var(--border)] bg-[var(--surface-2)] px-4 py-2 text-sm text-[var(--text-3)]",children:h}):null,(0,t.jsx)("button",{ref:n,type:"button",disabled:u,onClick:()=>void d(),className:"mt-10 min-h-12 rounded-xl bg-[var(--accent)] px-8 py-3 font-semibold text-white disabled:cursor-wait disabled:opacity-65",children:u?"Checkingâ¦":"Try again"}),(0,t.jsx)("p",{className:"mt-4 text-xs text-[var(--text-3)]",children:"Weâll also check automatically every minute."})]})})}e.s(["Providers",0,function({children:e}){let[n]=(0,v.useState)(()=>new y({defaultOptions:{queries:{staleTime:6e4,retry:1}}}));return(0,t.jsx)(g.QueryClientProvider,{client:n,children:(0,t.jsx)(r.ThemeProvider,{children:(0,t.jsx)(I,{children:(0,t.jsx)(i.AuthProvider,{children:(0,t.jsxs)(S.MissionRuntimeProvider,{children:[(0,t.jsx)(w,{}),e,(0,t.jsx)(b.Toaster,{position:"top-center",toastOptions:{duration:3e3,style:{borderRadius:"12px",fontFamily:"Inter, sans-serif",fontSize:"14px"}}})]})})})})})}],11414)},26160,e=>{e.v(t=>Promise.all(["static/chunks/0fy30bcc9toil.js"].map(t=>e.l(t))).then(()=>t(13713)))},85404,e=>{e.v(t=>Promise.all(["static/chunks/336bg4gi4lptb.js"].map(t=>e.l(t))).then(()=>t(20080)))},30778,e=>{e.v(t=>Promise.all(["static/chunks/0xefp0v_19xbw.js","static/chunks/26zkdysx_-ccw.js","static/chunks/33t0bnb8uqi-o.js"].map(t=>e.l(t))).then(()=>t(59306)))},21028,e=>{e.v(t=>Promise.all(["static/chunks/3tqj6arekesqv.js","static/chunks/26zkdysx_-ccw.js","static/chunks/33t0bnb8uqi-o.js"].map(t=>e.l(t))).then(()=>t(50624)))},53753,e=>{e.v(t=>Promise.all(["static/chunks/3n7hzd257xt_w.js","static/chunks/26zkdysx_-ccw.js","static/chunks/33t0bnb8uqi-o.js"].map(t=>e.l(t))).then(()=>t(26348)))},9730,e=>{e.v(t=>Promise.all(["static/chunks/3q1whh8arzkdy.js","static/chunks/26zkdysx_-ccw.js","static/chunks/33t0bnb8uqi-o.js"].map(t=>e.l(t))).then(()=>t(93671)))},16514,e=>{e.v(t=>Promise.all(["static/chunks/0nlw2lv7hlv2s.js","static/chunks/191uov6qv-aip.js","static/chunks/1ikb1s31k2g3n.js","static/chunks/33t0bnb8uqi-o.js"].map(t=>e.l(t))).then(()=>t(85228)))},3114,e=>{e.v(t=>Promise.all(["static/chunks/0clqvilmjhusb.js"].map(t=>e.l(t))).then(()=>t(50906)))}]);
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.