PageSourceSearch

https://maths-angel.com/_next/static/chunks/1t7rb6j7892t6.js

js maths-angel.com collected 2026-10-09 22:36:46 UTC 45,199 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,965389,875372,e=>{"use strict";var t=e.i(713039),r=e.i(775428);e.i(215331);var n=e.i(624440);e.s([],875372);var s=e.i(271645),i=e.i(827085),o=(0,t.buildErrorThrower)({packageName:"@clerk/clerk-react"}),[a,l]=(0,i.createContextAndHook)("AuthContext"),c=i.ClerkInstanceContext,u=i.useClerkInstanceContext,d=e=>{(0,i.useAssertWrappedByClerkProvider)(()=>{o.throwMissingClerkProviderError({source:e})})},h=e=>new Promise(t=>{let r=n=>{["ready","degraded"].includes(n)&&(t(),e.off("status",r))};e.on("status",r,{notify:!0})});function p(e,{treatPendingAsSignedOut:t=!0}={}){let{userId:n,orgId:i,orgRole:a,has:l,signOut:c,getToken:u,orgPermissions:d,factorVerificationAge:h,sessionClaims:f}=null!=e?e:{},m=(0,s.useCallback)(e=>l?l(e):(0,r.createCheckAuthorization)({userId:n,orgId:i,orgRole:a,orgPermissions:d,factorVerificationAge:h,features:(null==f?void 0:f.fea)||"",plans:(null==f?void 0:f.pla)||""})(e),[l,n,i,a,d,h,f]),g=(0,r.resolveAuthState)({authObject:{...e,getToken:u,signOut:c,has:m},options:{treatPendingAsSignedOut:t}});return g||o.throw("Invalid state. Feel free to submit a bug or reach out to support here: https://clerk.com/support")}e.s(["AuthContext",0,a,"IsomorphicClerkContext",0,c,"customLinkWrongProps",0,e=>`Missing props. <${e}.Link /> component requires the following props: url, label and labelIcon.`,"customMenuItemsIgnoredComponent",0,"<UserButton.MenuItems /> component can only accept <UserButton.Action /> and <UserButton.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.","customPageWrongProps",0,e=>`Missing props. <${e}.Page /> component requires the following props: url, label, labelIcon, alongside with children to be rendered inside the page.`,"customPagesIgnoredComponent",0,e=>`<${e} /> can only accept <${e}.Page /> and <${e}.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.`,"errorThrower",0,o,"incompatibleRoutingWithPathProvidedError",0,e=>`The \`path\` prop will only be respected when the Clerk component uses path-based routing. To resolve this error, pass \`routing='path'\` to the <${e}/> component, or drop the \`path\` prop to switch to hash-based routing. For more details please refer to our docs: https://clerk.com/docs`,"multipleChildrenInButtonComponent",0,e=>`You've passed multiple children components to <${e}/>. You can only pass a single child component or text.`,"multipleClerkProvidersError",0,"You've added multiple <ClerkProvider> components in your React component tree. Wrap your components in a single <ClerkProvider>.","noPathProvidedError",0,e=>`The <${e}/> component uses path-based routing by default unless a different routing strategy is provided using the \`routing\` prop. When path-based routing is used, you need to provide the path where the component is mounted on by using the \`path\` prop. Example: <${e} path={'/my-path'} />`,"organizationProfileLinkRenderedError",0,"<OrganizationProfile.Link /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.","organizationProfilePageRenderedError",0,"<OrganizationProfile.Page /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.","setErrorThrowerOptions",0,function(e){o.setMessages(e).setPackageName(e)},"unsupportedNonBrowserDomainOrProxyUrlFunction",0,"Unsupported usage of isSatellite, domain or proxyUrl. The usage of isSatellite, domain or proxyUrl as function is not supported in non-browser environments.","useAssertWrappedByClerkProvider",0,d,"useAuth",0,(e={})=>{var t;d("useAuth");let{treatPendingAsSignedOut:r,...i}=null!=e?e:{},o=l();void 0===o.sessionId&&void 0===o.userId&&(o=null!=i?i:{});let a=u(),c=(0,s.useCallback)(async e=>(await h(a),a.session)?a.session.getToken(e):null,[a]),f=(0,s.useCallback)(async(...e)=>(await h(a),a.signOut(...e)),[a]);return null==(t=a.telemetry)||t.record((0,n.eventMethodCalled)("useAuth",{treatPendingAsSignedOut:r})),p({...o,getToken:c,signOut:f},{treatPendingAsSignedOut:r})},"useDerivedAuth",0,p,"useEmailLink",0,function(e){let{startEmailLinkFlow:t,cancelEmailLinkFlow:r}=s.default.useMemo(()=>e.createEmailLinkFlow(),[e]);return s.default.useEffect(()=>r,[]),{startEmailLinkFlow:t,cancelEmailLinkFlow:r}},"useIsomorphicClerkContext",0,u,"useSignIn",0,()=>{var e;d("useSignIn");let t=u(),r=(0,i.useClientContext)();return(null==(e=t.telemetry)||e.record((0,n.eventMethodCalled)("useSignIn")),r)?{isLoaded:!0,signIn:r.signIn,setActive:t.setActive}
1:{isLoaded:!1,signIn:void 0,setActive:void 0}},"useSignUp",0,()=>{var e;d("useSignUp");let t=u(),r=(0,i.useClientContext)();return(null==(e=t.telemetry)||e.record((0,n.eventMethodCalled)("useSignUp")),r)?{isLoaded:!0,signUp:r.signUp,setActive:t.setActive}:{isLoaded:!1,signUp:void 0,setActive:void 0}},"userButtonIgnoredComponent",0,"<UserButton /> can only accept <UserButton.UserProfilePage />, <UserButton.UserProfileLink /> and <UserButton.MenuItems /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.","userButtonMenuActionRenderedError",0,"<UserButton.Action /> component needs to be a direct child of `<UserButton.MenuItems />`.","userButtonMenuItemLinkWrongProps",0,"Missing props. <UserButton.Link /> component requires the following props: href, label and labelIcon.","userButtonMenuItemsActionWrongsProps",0,"Missing props. <UserButton.Action /> component requires the following props: label.","userButtonMenuItemsRenderedError",0,"<UserButton.MenuItems /> component needs to be a direct child of `<UserButton />`.","userButtonMenuLinkRenderedError",0,"<UserButton.Link /> component needs to be a direct child of `<UserButton.MenuItems />`.","userProfileLinkRenderedError",0,"<UserProfile.Link /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.","userProfilePageRenderedError",0,"<UserProfile.Page /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.","withClerk",0,(e,t)=>{let r=("string"==typeof t?t:null==t?void 0:t.component)||e.displayName||e.name||"Component";e.displayName=r;let n="string"==typeof t?void 0:t,i=t=>{d(r||"withClerk");let i=u();return i.loaded||(null==n?void 0:n.renderWhileLoading)?s.default.createElement(e,{...t,component:r,clerk:i}):null};return i.displayName=`withClerk(${r})`,i}],965389)},338703,e=>{"use strict";e.i(192448);var t=e.i(965389);e.i(797651);var r=e.i(474041),n=e.i(271645);let s=n.default.createContext(null);e.s(["useAuth",0,function(e={}){let i=(0,r.useRouter)(),o=n.default.useContext(s),a=o;return(o&&"then"in o&&(a=n.default.use(o)),"u"<typeof window)?i?(0,t.useAuth)(e):(0,t.useDerivedAuth)({...a,...e}):(0,t.useAuth)({...a,...e})}],338703)},90317,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={bindSnapshot:function(){return c},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return u}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class o{disable(){throw i}getStore(){}run(){throw i}exit(){throw i}enterWith(){throw i}static bind(e){return e}}let a="u">typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return a?new a:new o}function c(e){return a?a.bind(e):o.bind(e)}function u(){return a?a.snapshot():function(e,...t){return e(...t)}}},242344,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(90317).createAsyncLocalStorage)()},563599,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=e.r(242344)},309885,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},667585,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return s}});let n=e.r(132061);function s({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},652157,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return l}});let n=e.r(843476),s=e.r(174080),i=e.r(563599),o=e.r(309885),a=e.r(543369);function l({moduleIds:e}){if("u">typeof window)return null;let t=i.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,a.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,o.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,s.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},869093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let n=e.r(843476),s=e.r(271645),i=e.r(667585),o=e.r(652157);function a(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(a(()=>null)),loading:null,ssr:!0},c=function(e){let t={...l,...e},r=(0,s.lazy)(()=>t.loader().then(a)),c=t.loading;function u(e){let a=c?(0,n.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,u=l?s.Suspense:s.Fragment,d=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(o.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(i.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(u,{...l?{fallback:a}:{},children:d})}return u.displayName="LoadableComponent",u}},770703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let n=e.r(555682)._(e.r(869093));function s(e,t){let r={};"function"==typeof e&&(r.loader=e);let s={...r,...t};return(0,n.default)({...s,modules:s.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},618566,(e,t,r)=>{t.exports=e.r(976562)},755838,(e,t,r)=>{"use strict";var n=e.r(271645),s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,o=n.useEffect,a=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!s(e,r)}catch(e){return!0}}var u="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),s=n[0].inst,u=n[1];return a(function(){s.value=r,s.getSnapshot=t,c(s)&&u({inst:s})},[e,r,t]),o(function(){return c(s)&&u({inst:s}),e(function(){c(s)&&u({inst:s})})},[e]),l(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u},802239,(e,t,r)=>{"use strict";e.i(247167),t.exports=e.r(755838)},64155,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(657688);let s={lock:"UNLOCK",play:"KEEP GOING",progress:"ALMOST THERE",crown:"ALL ACCESS",gift:""};function i(){return(0,t.jsxs)("svg",{viewBox:"0 0 40 40",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{className:"wc-lock-shackle",d:"M14 22 V14.5 a6 6 0 0 1 12 0 V22",fill:"none",stroke:"currentColor",strokeWidth:"3.6",strokeLinecap:"round"}),(0,t.jsx)("rect",{className:"wc-lock-body",x:"9",y:"21",width:"22",height:"15",rx:"4.5",fill:"currentColor"}),(0,t.jsx)("circle",{className:"wc-lock-hole",cx:"20",cy:"28",r:"2.3"}),(0,t.jsx)("rect",{className:"wc-lock-hole",x:"18.85",y:"28.7",width:"2.3",height:"4.6",rx:"1.15"})]})}function o(){return(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M8 5v14l11-7z"})})}function a(){return(0,t.jsxs)("svg",{viewBox:"0 0 56 56",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"28",cy:"28",r:"22",stroke:"currentColor",strokeOpacity:"0.22",strokeWidth:"4"}),(0,t.jsx)("circle",{cx:"28",cy:"28",r:"22",stroke:"currentColor",strokeWidth:"4.5",strokeLinecap:"round",strokeDasharray:"103.67 34.56",transform:"rotate(-90 28 28)"})]})}
1function l(){return(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3 7l4.6 3.5L12 4l4.4 6.5L21 7l-1.7 11.1a1 1 0 0 1-1 .85H5.7a1 1 0 0 1-1-.85L3 7z"})})}function c(){return(0,t.jsxs)("svg",{viewBox:"0 0 40 40",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"9",y:"19.5",width:"22",height:"14.5",rx:"2.5",fill:"currentColor"}),(0,t.jsx)("rect",{x:"17.4",y:"19.5",width:"5.2",height:"14.5",fill:"#7A66E8"}),(0,t.jsxs)("g",{className:"wc-gift-lid",children:[(0,t.jsx)("rect",{x:"6.5",y:"13.5",width:"27",height:"6.6",rx:"2",fill:"currentColor"}),(0,t.jsx)("rect",{x:"17.4",y:"13.5",width:"5.2",height:"6.6",fill:"#7A66E8"}),(0,t.jsx)("ellipse",{cx:"16",cy:"10.8",rx:"3.1",ry:"2.5",fill:"currentColor"}),(0,t.jsx)("ellipse",{cx:"24",cy:"10.8",rx:"3.1",ry:"2.5",fill:"currentColor"}),(0,t.jsx)("circle",{cx:"20",cy:"11.6",r:"1.9",fill:"#7A66E8"})]})]})}function u({variant:e,label:r,onActivate:n}){let d=r??s[e];if("lock"===e)return(0,t.jsx)("div",{className:"wc-seal wc-seal--lock",children:(0,t.jsxs)("div",{className:"wc-seal-in",children:[(0,t.jsx)("div",{className:"seal-icon wc-lock",children:(0,t.jsx)(i,{})}),d?(0,t.jsx)("div",{className:"seal-txt",children:d}):null]})});if("play"===e){let e=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"wc-play-big",children:(0,t.jsx)(o,{})}),d?(0,t.jsx)("div",{className:"seal-txt",children:d}):null]});return(0,t.jsx)("div",{className:"wc-seal wc-seal--play",children:n?(0,t.jsx)("button",{type:"button",className:"wc-seal-in wc-seal-btn",onClick:n,"aria-label":d||"Keep watching",children:e}):(0,t.jsx)("div",{className:"wc-seal-in",children:e})})}return"progress"===e?(0,t.jsx)("div",{className:"wc-seal wc-seal--progress",children:(0,t.jsxs)("div",{className:"wc-seal-in",children:[(0,t.jsx)("div",{className:"wc-progress-ring",children:(0,t.jsx)(a,{})}),d?(0,t.jsx)("div",{className:"seal-txt",children:d}):null]})}):"crown"===e?(0,t.jsx)("div",{className:"wc-seal wc-seal--crown",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"seal-icon",children:(0,t.jsxs)("span",{className:"crown ca-sparkle",children:[(0,t.jsx)(l,{}),(0,t.jsx)("i",{className:"ca-sparkle__spark ca-sparkle__spark--1"}),(0,t.jsx)("i",{className:"ca-sparkle__spark ca-sparkle__spark--2"}),(0,t.jsx)("i",{className:"ca-sparkle__spark ca-sparkle__spark--3"})]})}),d?(0,t.jsx)("div",{className:"seal-txt",children:d}):null]})}):(0,t.jsx)("div",{className:"wc-seal wc-seal--gift",children:(0,t.jsxs)("div",{className:"wc-seal-in",children:[(0,t.jsx)("div",{className:"wc-gift",children:(0,t.jsx)(c,{})}),d?(0,t.jsx)("div",{className:"seal-txt",children:d}):null]})})}var d=e.i(276695);e.s(["AuthShell",0,function({seal:e,sealLabel:s,headline:i,onClose:o,children:a,cardClass:l="wc-formwall",brand:c=!1,inPlayer:h=!1,onSealActivate:p,keepEntryHeight:f=!1}){let m=(0,r.useRef)(null),[g,w]=(0,r.useState)(),[C,v]=(0,r.useState)(),y=l.split(/\s+/).includes("wc-verify-card")||f;return(0,r.useLayoutEffect)(()=>{let e=m.current;if(!e||y)return;let t=!0,r=new ResizeObserver(([r])=>{if(!t||!r)return;w(r.borderBoxSize?.[0]?.blockSize??e.offsetHeight);let n=e.querySelector(".wc-right");n&&v(getComputedStyle(n).paddingTop)});return r.observe(e),()=>{t=!1,r.disconnect()}},[y]),(0,t.jsx)("div",{className:`wc-glass${h?" wc-glass--inplayer":""}`,onClick:e=>e.stopPropagation(),children:(0,t.jsxs)("div",{ref:m,className:`welcome-card ${l}${c?" wc-brand-card":""}${y?" wc-fixed-height":""}`,style:y&&g?{height:g,minHeight:g,"--wc-entry-padding-top":C}:void 0,children:[(0,t.jsx)("button",{type:"button",className:"wc-close",onClick:o,"aria-label":"Close",children:(0,t.jsx)(d.CloseIcon,{})}),c?(0,t.jsxs)("div",{className:"wc-left wc-left--brand",children:[(0,t.jsx)("span",{className:"wc-brand-logo-wrap",children:(0,t.jsx)(n.default,{src:"/logos/jimmy_avatar.webp",alt:"Maths Angel",width:96,height:96,className:"wc-brand-logo",priority:!0})}),(0,t.jsx)("div",{className:"wc-left-head",children:i})]}):(0,t.jsxs)("div",{className:"wc-left",children:[(0,t.jsx)(u,{variant:e,label:s,onActivate:p}),(0,t.jsx)("div",{className:"wc-left-head",children:i})]}),(0,t.jsx)("div",{className:"wc-right",children:a})]})})}],64155)},648284,e=>{"use strict";var t=e.i(843476),r=e.i(276695);e.s(["OAuthButtons",0,function({onOAuth:e,busy:n=!1}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"wc-oauth",children:[(0,t.jsxs)("button",{type:"button",className:"wc-oauth-btn",disabled:n,onClick:()=>e("oauth_google"),children:[(0,t.jsx)(r.GoogleIcon,{})," Google"]}),(0,t.jsxs)("button",{type:"button",className:"wc-oauth-btn",disabled:n,onClick:()=>e("oauth_microsoft"),children:[(0,t.jsx)(r.MicrosoftIcon,{})," Microsoft"]})]}),(0,t.jsx)("div",{className:"wc-or",children:(0,t.jsx)("span",{children:"or"})})]})}])},358784,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(276695),s=e.i(648284);e.s(["SignInForm",0,function({pill:e,title:i,sub:o,onSubmit:a,onOAuth:l,onSwitchToSignUp:c,loading:u,waitingForService:d=!1,loadNotice:h,error:p,initialEmail:f="",focusEmail:m=!1}){let[g,w]=(0,r.useState)(f),C=(0,r.useRef)(null),v=(0,r.useId)();(0,r.useEffect)(()=>{m&&!u&&C.current?.focus({preventScroll:!0})},[m,u]),(0,r.useEffect)(()=>{p?.field!=="identifier"||u||C.current?.focus()},[p,u]);let y=p?.field==="identifier"?p.message:null,x=y||(p?.field==="general"?p.message:null);return(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),u||d||a(g.trim())},noValidate:!0,children:[(0,t.jsx)("span",{className:"wc-pill",children:e}),(0,t.jsx)("h3",{className:"wc-title",children:i}),(0,t.jsx)("p",{className:"wc-sub",children:o}),(0,t.jsx)(s.OAuthButtons,{onOAuth:l,busy:u||d}),(0,t.jsxs)("div",{className:"wc-field",children:[(0,t.jsx)("input",{ref:C,className:`wc-in
1put${y?" is-error":""}`,type:"email",placeholder:"Enter your email address","aria-label":"Email address","aria-invalid":!!y||void 0,"aria-describedby":y?v:void 0,autoComplete:"email",value:g,onChange:e=>w(e.target.value),disabled:u}),x&&(0,t.jsxs)("div",{id:v,className:"wc-error",role:"alert",children:[(0,t.jsx)(n.WarnIcon,{}),(0,t.jsx)("span",{children:x})]})]}),(0,t.jsx)("div",{id:"clerk-captcha",className:"wc-captcha-slot"}),(0,t.jsx)("button",{type:"submit",className:`wc-cta${u||d?" is-loading":""}`,disabled:u||d,children:d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"wc-cta-spin","aria-hidden":"true"})," Loading sign-in…"]}):u?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"wc-cta-spin"})," Processing…"]}):(0,t.jsxs)(t.Fragment,{children:["Continue ",(0,t.jsx)(n.ArrowIcon,{})]})}),h,(0,t.jsxs)("div",{className:"wc-signin",children:["New here?",(0,t.jsx)("button",{type:"button",onClick:()=>c(g.trim()),disabled:u,children:"Create an account"})]})]})}])},589762,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(276695),s=e.i(648284);e.s(["SignUpForm",0,function({pill:e,title:i,sub:o,ctaLabel:a,escape:l,onSubmit:c,onOAuth:u,onSwitchToSignIn:d,loading:h,waitingForService:p=!1,loadNotice:f,error:m,initialEmail:g="",focusEmail:w=!1}){let[C,v]=(0,r.useState)(g),y=(0,r.useRef)(null),x=(0,r.useId)();(0,r.useEffect)(()=>{w&&!h&&y.current?.focus({preventScroll:!0})},[w,h]),(0,r.useEffect)(()=>{m?.field!=="email"||h||y.current?.focus()},[m,h]);let k=m?.field==="email"?m.message:null,S=m&&("general"===m.field||"identifier"===m.field)?m.message:null;return(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),h||p||c(C.trim())},noValidate:!0,children:[(0,t.jsx)("span",{className:"wc-pill",children:e}),(0,t.jsx)("h3",{className:"wc-title",children:i}),(0,t.jsx)("p",{className:"wc-sub",children:o}),(0,t.jsx)(s.OAuthButtons,{onOAuth:u,busy:h||p}),(0,t.jsxs)("div",{className:"wc-field",children:[(0,t.jsx)("input",{ref:y,className:`wc-input${k?" is-error":""}`,type:"email",placeholder:"Enter your email address","aria-label":"Email address","aria-invalid":!!k||void 0,"aria-describedby":k?x:void 0,autoComplete:"email",value:C,onChange:e=>v(e.target.value),disabled:h}),k&&(0,t.jsxs)("div",{id:x,className:"wc-error",role:"alert",children:[(0,t.jsx)(n.WarnIcon,{}),(0,t.jsx)("span",{children:k})]})]}),(0,t.jsx)("div",{id:"clerk-captcha",className:"wc-captcha-slot"}),(0,t.jsx)("button",{type:"submit",className:`wc-cta${h||p?" is-loading":""}`,disabled:h||p,children:p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"wc-cta-spin","aria-hidden":"true"})," Loading sign-up…"]}):h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"wc-cta-spin"})," Processing…"]}):(0,t.jsxs)(t.Fragment,{children:[a||"Sign up free"," ",(0,t.jsx)(n.ArrowIcon,{})]})}),f,S&&(0,t.jsxs)("div",{className:"wc-error",role:"alert",children:[(0,t.jsx)(n.WarnIcon,{}),(0,t.jsx)("span",{children:S})]}),(0,t.jsxs)("div",{className:"wc-signin",children:["Already have an account?",(0,t.jsx)("button",{type:"button",onClick:()=>d(C.trim()),disabled:h,children:"Sign in"})]}),l&&(0,t.jsx)("button",{type:"button",className:"wc-dismiss",onClick:l.onEscape,children:l.label})]})}])},74174,e=>{"use strict";var t=e.i(843476);let r={seal:"lock",headline:(0,t.jsxs)(t.Fragment,{children:["Welcome back.",(0,t.jsx)("br",{}),"Pick up where you left off."]}),pill:"Good to see you again",title:"Sign in to keep watching 👋",sub:"Sign in or create your free account."},n={generic:{signUp:{seal:"lock",headline:(0,t.jsxs)(t.Fragment,{children:["Save your progress.",(0,t.jsx)("br",{}),"Chat with AI tutor."]}),pill:"Track your progress",title:"Create your free account ✨",sub:"Join our 10k+ student community. No card needed."},signIn:{...r,title:"Welcome back 👋"}},signup:{signUp:{seal:"play",headline:(0,t.jsxs)(t.Fragment,{children:["Finish this lesson free.",(0,t.jsx)("br",{}),"Next one is a bonus."]}),pill:"Enjoying this lesson?",title:"Sign up free to keep watching 🍿",sub:"Watch in full and unlock more. No card needed."},signIn:r},final:{signUp:{seal:"progress",headline:(0,t.jsxs)(t.Fragment,{children:["One step to finish",(0,t.jsx)("br",{}),"what you started."]}),pill:"Ready when you are",title:"Create your free account ✨",sub:"Finish this lesson and save your progress."},signIn:r},freeEnd:{signUp:{seal:"lock",headline:(0,t.jsxs)(t.Fragment,{children:["Save your progress.",(0,t.jsx)("br",{}),"Chat with AI tutor."]}),pill:"Free lesson complete",title:"Sign up free to watch more 🎬",sub:"Join our 10k+ student community. No card needed."},signIn:r}};e.s(["AUTH_COPY",0,n])},276695,e=>{"use strict";var t=e.i(843476);e.s(["ArrowIcon",0,function(){return(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M5 12h14"}),(0,t.jsx)("path",{d:"m12 5 7 7-7 7"})]})},"CheckIcon",0,function(){return(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("rect",{width:"8",he
1ight:"4",x:"8",y:"2",rx:"1"}),(0,t.jsx)("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),(0,t.jsx)("path",{d:"m9 14 2 2 4-4"})]})},"CloseIcon",0,function(){return(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M18 6 6 18"}),(0,t.jsx)("path",{d:"m6 6 12 12"})]})},"CopyIcon",0,function(){return(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]})},"GoogleIcon",0,function(){return(0,t.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,t.jsx)("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),(0,t.jsx)("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),(0,t.jsx)("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),(0,t.jsx)("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})},"MicrosoftIcon",0,function(){return(0,t.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,t.jsx)("path",{fill:"#F25022",d:"M2 2h9.3v9.3H2z"}),(0,t.jsx)("path",{fill:"#7FBA00",d:"M12.7 2H22v9.3h-9.3z"}),(0,t.jsx)("path",{fill:"#00A4EF",d:"M2 12.7h9.3V22H2z"}),(0,t.jsx)("path",{fill:"#FFB900",d:"M12.7 12.7H22V22h-9.3z"})]})},"WarnIcon",0,function(){return(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("path",{d:"M12 8v4"}),(0,t.jsx)("path",{d:"M12 16h.01"})]})}])},456989,e=>{"use strict";var t=e.i(247167),r=e.i(843476),n=e.i(271645),s=e.i(338703),i=e.i(200092);let o="cookie_consent",a=(0,n.createContext)(void 0);e.s(["CookieConsentProvider",0,function({children:e}){let l="1"===t.default.env.NEXT_PUBLIC_B2B_LOCAL_TEST,[c,u]=(0,n.use
1State)(!1),[d,h]=(0,n.useState)(null),[p,f]=(0,n.useState)(!1),{isSignedIn:m,isLoaded:g}=(0,s.useAuth)(),w=(0,i.useApi)();(0,n.useEffect)(()=>{let e=localStorage.getItem(o);("accepted"===e||"declined"===e)&&h(e),f(!0)},[]),(0,n.useEffect)(()=>{if(l||!g||!m||!p)return;let e=!1;return async function(){try{let{cookieConsent:t}=await w.getCookieConsent();if(e)return;t?(h(t),localStorage.setItem(o,t)):d&&w.saveCookieConsent(d).catch(()=>{})}catch{}}(),()=>{e=!0}},[g,m,p,l]);let C=(0,n.useCallback)(e=>{h(e),localStorage.setItem(o,e),!l&&m&&w.saveCookieConsent(e).catch(()=>{})},[m,w,l]),v=(0,n.useCallback)(()=>{u(!0)},[]);return(0,r.jsx)(a.Provider,{value:{showBanner:c,setShowBanner:u,openCookieSettings:v,consentChoice:d,saveConsent:C,consentLoaded:p},children:e})},"useCookieConsent",0,function(){let e=(0,n.useContext)(a);if(void 0===e)throw Error("useCookieConsent must be used within a CookieConsentProvider");return e}])},372299,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(338703),s=e.i(770703),i=e.i(618566),o=e.i(720565),a=e.i(456989),l=e.i(301719),c=e.i(877964);let u=(0,s.default)(()=>e.A(296445).then(e=>e.MathsCheckPromoDialog),{loadableGenerated:{modules:[643293]},ssr:!1}),d=(0,r.createContext)(null);function h(){return[...document.querySelectorAll('[role="dialog"], [aria-modal="true"]')].some(e=>!e.closest('[data-maths-check-promo-dialog="true"]')&&!e.hidden&&"true"!==e.getAttribute("aria-hidden")&&"closed"!==e.getAttribute("data-state"))}function p(){try{return{hasVisitorResult:(0,c.hasMathsCheckVisitorResult)(),visitorDraftAnswerCount:(0,c.draftAnsweredCount)((0,c.readMathsCheckDraft)(c.MATHS_CHECK_VISITOR_OWNER))}}catch{return{hasVisitorResult:!1,visitorDraftAnswerCount:0}}}e.s(["MathsCheckPromoProvider",0,function({children:e}){let s=(0,i.usePathname)(),f=(0,o.usePostHog)(),{isLoaded:m,isSignedIn:g}=(0,n.useAuth)(),{consentChoice:w,consentLoaded:C,showBanner:v}=(0,a.useCookieConsent)(),[y,x]=(0,r.useState)(!1),[k,S]=(0,r.useState)(null),[b,_]=(0,r.useState)(null),[j,A]=(0,r.useState)({hasVisitorResult:!1,visitorDraftAnswerCount:0}),[E,M]=(0,r.useState)(null),[P,O]=(0,r.useState)(0),[I,N]=(0,r.useState)(!1),[T,R]=(0,r.useState)(!0),[L,H]=(0,r.useState)(0),[U,B]=(0,r.useState)(!1),[D,K]=(0,r.useState)(null),F=(0,r.useRef)(new Set),W=(0,r.useRef)(null),V=(0,r.useRef)(!1),G=(0,r.useRef)(!1),z=(0,r.useCallback)(e=>{try{window.sessionStorage.setItem(l.MATHS_CHECK_PROMO_SESSION_STORAGE_KEY,JSON.stringify(e))}catch{}},[]),$=(0,r.useCallback)(e=>{let t=e(W.current??(0,l.createMathsCheckPromoSessionState)(Date.now()));W.current=t,z(t),S(t)},[z]),Y=(0,r.useCallback)(e=>{_(e);try{window.localStorage.setItem(l.MATHS_CHECK_PROMO_STORAGE_KEY,(0,l.serializeMathsCheckPromoPersistentState)(e))}catch{}},[]);(0,r.useEffect)(()=>{let e=window.setTimeout(()=>{let e=Date.now(),t=(0,l.createMathsCheckPromoSessionState)(e),r=null;try{t=(0,l.parseMathsCheckPromoSessionState)(window.sessionStorage.getItem(l.MATHS_CHECK_PROMO_SESSION_STORAGE_KEY),e)??t,r=(0,l.parseMathsCheckPromoPersistentState)(window.localStorage.getItem(l.MATHS_CHECK_PROMO_STORAGE_KEY))}catch{}V.current=t.shown,W.current=t,S(t),_(r),A(p()),O(e),R("visible"===document.visibilityState),x(!0)},0);return()=>window.clearTimeout(e)},[]),(0,r.useEffect)(()=>{let e=window.setTimeout(()=>{M(Date.now()),A(p())},0);return()=>window.clearTimeout(e)},[s]),(0,r.useEffect)(()=>{if(null===E)return;let e=E+l.MATHS_CHECK_PROMO_PAGE_DWELL_MS-Date.now(),t=window.setTimeout(()=>
1O(Date.now()),Math.max(e,0));return()=>window.clearTimeout(t)},[E]),(0,r.useEffect)(()=>{let e,t=(0,l.mathsCheckPromoSuppressionExpiresAt)(b);if(null===t||!Number.isFinite(t))return;let r=()=>{let n=t-Date.now();n<=0?O(Date.now()):e=window.setTimeout(r,Math.min(n,2147e6))};return e=window.setTimeout(r,Math.min(Math.max(t-Date.now(),0),2147e6)),()=>window.clearTimeout(e)},[b]),(0,r.useEffect)(()=>{let e=()=>{let e="visible"===document.visibilityState;R(e),e&&O(Date.now())};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]);let q=m&&!1===g&&(0,l.isMathsCheckPromoRoute)(s)&&!j.hasVisitorResult&&0===j.visitorDraftAnswerCount&&null!==E&&P-E>=l.MATHS_CHECK_PROMO_PAGE_DWELL_MS,J=!!k?.shown||!!k?.suppressed||(0,l.isMathsCheckPromoSuppressed)(b,P),X=U||y&&C&&null!==w&&!v&&0===L&&T&&!J&&q;(0,r.useEffect)(()=>{if(!X)return;let e=()=>{N(h())};e();let t=new MutationObserver(e);return t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-hidden","aria-modal","role","data-state","hidden"]}),()=>t.disconnect()},[X]);let Q=(0,r.useCallback)((e,t)=>{let r=F.current,n=r.size;t?r.add(e):r.delete(e),r.size!==n&&H(r.size)},[]),Z=(0,r.useCallback)(e=>{$(t=>({...t,suppressed:!0,suppressionReason:e})),B(!1)},[$]);(0,r.useEffect)(()=>{let e=e=>{let t=e.detail;Z("string"==typeof t?.reason?t.reason:"conversion_started")};return window.addEventListener(l.MATHS_CHECK_PROMO_SUPPRESS_EVENT,e),()=>window.removeEventListener(l.MATHS_CHECK_PROMO_SUPPRESS_EVENT,e)},[Z]),(0,r.useEffect)(()=>{let e=e=>{if(e.key===l.MATHS_CHECK_PROMO_STORAGE_KEY){_((0,l.parseMathsCheckPromoPersistentState)(e.newValue)),B(!1);return}(e.key===c.MATHS_CHECK_VISITOR_RESULT_STORAGE_KEY||e.key===c.MATHS_CHECK_VISITOR_DRAFT_STORAGE_KEY)&&A(p())};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]);let ee=y&&C&&null!==w&&!v&&0===L&&!I&&T;(0,r.useEffect)(()=>{if(!y||!k||U)return;let e=P||Date.now();if(!(0,l.isMathsCheckPromoEligible)({authLoaded:m,isSignedIn:g,pathname:s,millisecondsOnPage:null===E?0:e-E,persistentState:b,nowMs:e,hasShownThisSession:k.shown||V.current,isSuppressedThisSession:k.suppressed,isSafeToOpen:ee,hasVisitorMathsCheckResult:j.hasVisitorResult,visitorDraftAnswerCount:j.visitorDraftAnswerCount}))return;let t={audience:"signed_out",pathname:s,triggerSignal:"page_dwell"},r=window.setTimeout(()=>{if(V.current||F.current.size>0||"visible"!==document.visibilityState||h())return;V.current=!0,G.current=!1;let e={...k,shown:!0};W.current=e,z(e),S(e),K(t),B(!0),f?.capture("maths_check_popup_shown",{campaign_id:l.MATHS_CHECK_PROMO_CAMPAIGN_ID,audience:t.audience,pathname:t.pathname,trigger_signal:t.triggerSignal,is_signed_in:!1})},150);return()=>window.clearTimeout(r)},[m,y,P,U,ee,g,j,E,s,b,z,f,k]),(0,r.useEffect)(()=>{if(!U||!D)return;let e=m&&!1===g&&(0,l.isMathsCheckPromoRoute)(s),t=y&&C&&null!==w&&!v&&0===L&&!I;if(e&&t)return;let r=window.setTimeout(()=>B(!1),0);return()=>window.clearTimeout(r)},[m,L,y,w,C,U,g,I,s,D,v]);let et=(0,r.useCallback)(e=>{U&&!G.current&&(G.current=!0,B(!1),Y((0,l.createMathsCheckPromoDismissedState)(b,Date.now())),f?.capture("maths_check_popup_dismissed",{campaign_id:l.MATHS_CHECK_PROMO_CAMPAIGN_ID,audience:D?.audience,pathname:D?.pathname??s,trigger_signal:D?.triggerSignal,dismiss_method:e,is_signed_in:!1}))},[U,s,Y,b,f,D]),er=(0,r.useCallback)(()=>{if(U&&!G.current){G.current=!0,B(!1);try{window.sessionStorage.setItem(l.MATHS_CHECK_PROMO_ENTRY_STORAGE_KEY,l.MATHS_CHECK_PROMO_ENTRY_SOURCE)}catch{}Y((0,l.createMathsCheckPromoClickedState)(Date.now())),f?.capture("maths_check_popup_cta_clicked",{campaign_id:l.MATHS_CHECK_PROMO_CAMPAIGN_ID,audience:D?.audience,pathname:D?.pathname??s,trigger_signal:D?.triggerSignal,is_signed_in:!1})}},[U,s,Y,f,D]),en=(0,r.useMemo)(()=>({isOpen:U,setBlocker:Q,suppressForSession:Z}),[U,Q,Z]);return(0,t.jsxs)(d.Provider,{value:en,children:[e,U?(0,t.jsx)(u,{open:!0,onDismiss:et,onCtaClick:er}):null]})},"useMathsCheckPromo",0,function(){let e=(0,r.useContext)(d);if(!e)throw Error("useMathsCheckPromo must be used within MathsCheckPromoProvider");return e}])},200092,e=>{"use strict";var t=e.i(338703),r=e.i(41931),n=e.i(184761),s=e.i(271645);let i=new Map;async function o(e,t,r){let s=await function(e,t){let r=i.get(e);if(r)return r.promise;let n={},s=t().finally(()=>{i.get(e)?.marker===n&&i.delete(e)});return i.set(e,{sessionKey:e,marker:n,promise:s}),s}(e,r);if(!s||!(0,n.clerkTokenBelongsToUser)(s,t))throw Error("Authentication changed while preparing the request");return s}e.s(["useApi",0,function(){let{getToken:e,isSignedIn:n,sessionId:i,userId:a}=(0,t.useAuth)();return(0,s.useMemo)(()=>new r.ApiClient(async()=>{let t=i??a;if(!n)return null;if(!t||!a)throw Error("Authenticated Clerk session is unavailable");try{return await o(t,a,e)}catch(e){throw console.error("Failed to get Clerk token:",e),e}}),[e,n,i,a])}])},403999,640029,e=>{"use strict";var t=e.i(271645);let r={publicLessons:[],previewPercent:100,previewPercentByLesson:{},escapeSeconds:45,free:{credits:0,creditExpiryDays:0},pro:{promoCode:"",promoEnabled:!1},walls:{signupTitle:"",signupCta:"",escapeText:"",goProTitle:""},dashboard:{manyPasses:{line1:"",line2:"",cta:""},oneLeft:{line1:"",line2:"",cta:""}}};e.s(["FALLBACK_VIDEO_LOCKING_CONFIG",0,r],640029);let n=null,s=null,i=!1;e.s(["useVideoLockingConfig",0,function(){let[e,o]=(0,t.useState)(n??r),[a,l]=(0,t.useState)(!n),[c,u]=(0,t.useState)(i);return(0,t.useEffect)(()=>{let e=!0;if(n){o(n),l(!1),u(i);return}return(n?Promise.resolve(n):s||(s=fetch("https://mathangel-website-backend.azurewebsites.net/api/video_locking_config_api").then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();if(!Array.isArray(t.publicLessons))throw Error("config payload has no publicLessons array");let s="default"!==t.source;return n={...r,...t},i=s,n}).catch(e=>n=r).finally(()=>{s=null}))).then(t=>{e&&(o(t),l(!1),u(i))}),()=>{e=!1}},[]),{config:e,isLoading:a,isReady:c}}],403999)},184761,e=>{"use strict";e.s(["clerkTokenBelongsToUser",0,function(e,t){try{let r=e.split(".");if(3!==r.length||!r[1])return!1;let n=r[1].replace(/-/g,"+").replace(/_/g,"/"),s=n.padEnd(4*Math.ceil(n.length/4),"="),i=Uint8Array.from(atob(s),e=>e.charCodeAt(0));return JSON.parse(new TextDecoder().decode(i)).sub===t}catch{return!1}}])},877964,141538,e=>{"use strict";var t=e.i(604570);function r({countrySel:e,adult:t,ukYear:n,savedCountryCode:s,savedYearGroup:i,savedNotInSchool:o=!1,fillEmptyOnly:a=!1}){let l={},c=e&&/^[A-Z]{2}$/i.test(e)?e.toUpperCase():null;if(c){let e=s?s.toUpperCase():null;(a?e:c===e)||(l.countryCode=c)}return t?a&&null!=i||o||(l.notInSchool=!0):(a?null==i&&!o:null==i||i>=6&&i<=11)&&n!==i&&(l.yearGroup=n),Object.keys(l).length>0?l:null}e.s(["buildRegionPatch",0,r],141538);let n="visitor",s=e=>`ma-mathscheck-draft:${e}`,i="ma-mathscheck-visitor-result",o="ma-mathscheck-return",a="ma-mathscheck-probe",l=s(n);function c(){try{if(!window.localStorage)return!1;return window.localStorage.setItem(a,"1"),window.localStorage.removeItem(a),!0}catch{return!1}}function u(e){return!!e&&"object"==typeof e&&"string"==typeof e.userId&&Number.isInteger(e.ukYear)&&"boolean"==typeof e.adult&&Array.isArray(e.questionUids)&&16===e.questionUids.length&&e.questionUids.every(e=>"string"==typeof e)&&Array.isArray(e.order)&&16===e.order.length&&Array.isArray(e.answers
1)&&16===e.answers.length&&e.answers.every(e=>null===e||"unsure"===e||Number.isInteger(e)&&e>=0)&&"string"==typeof e.startedAt&&(void 0===e.countryCode||null===e.countryCode||"string"==typeof e.countryCode)}function d(e){if(!e||!c())return null;try{let t=window.localStorage.getItem(s(e));if(!t)return null;let r=JSON.parse(t);if(!u(r)||r.userId!==e)return window.localStorage.removeItem(s(e)),null;return r}catch{return null}}function h(e){if(e.userId&&c()){try{let t=window.localStorage.getItem(s(e.userId));if(t){let r=JSON.parse(t);if(u(r)&&r.userId===e.userId&&Date.parse(r.startedAt)>Date.parse(e.startedAt))return}}catch{}try{window.localStorage.setItem(s(e.userId),JSON.stringify(e))}catch{}}}function p(e){if(e&&c())try{window.localStorage.removeItem(s(e))}catch{}}function f(e){return e?e.answers.filter(e=>null!==e).length:0}function m(){if(!c())return null;try{let e=window.localStorage.getItem(i);if(!e)return null;let t=JSON.parse(e);if(!function(e){var t;if(!e||"object"!=typeof e)return!1;let r=e.result;return!!(t=e.body)&&"object"==typeof t&&"string"==typeof t.submissionUuid&&t.submissionUuid.length>0&&Number.isInteger(t.ukYear)&&"boolean"==typeof t.adult&&Array.isArray(t.answers)&&16===t.answers.length&&t.answers.every(e=>!!e&&"object"==typeof e&&"string"==typeof e.questionUid&&(null===e.selectedOptionNo||Number.isInteger(e.selectedOptionNo)&&e.selectedOptionNo>=1))&&(null===e.countryCode||"string"==typeof e.countryCode)&&"string"==typeof e.finishedAt&&!!r&&"object"==typeof r&&Number.isInteger(r.correctCount)&&Array.isArray(r.topics)&&Array.isArray(r.review)&&16===r.review.length&&!!r.xp&&"object"==typeof r.xp}(t))return window.localStorage.removeItem(i),null;return t}catch{return null}}function g(e){return"/"===e.split(/[?#]/,1)[0]?e.split("#",1)[0]:e}function w(){if(c())try{window.localStorage.removeItem(i)}catch{}p(n)}let C=new Map;e.s(["MATHS_CHECK_VISITOR_DRAFT_STORAGE_KEY",0,l,"MATHS_CHECK_VISITOR_OWNER",0,n,"MATHS_CHECK_VISITOR_RESULT_STORAGE_KEY",0,i,"clearMathsCheckDraft",0,p,"consumeMathsCheckReturnPath",0,function(){let e=function(){try{if(!window.sessionStorage)return null;let e=window.sessionStorage.getItem(o);return e&&e.startsWith("/")?g(e):null}catch{return null}}();try{window.sessionStorage&&window.sessionStorage.removeItem(o)}catch{}return e},"draftAnsweredCount",0,f,"handoverVisitorMathsCheck",0,function(e,{entry:s,userId:i}){if(!i)return Promise.resolve("none");let o=C.get(i);if(o)return o.entries.includes(s)||o.entries.push(s),o.promise;let a={promise:Promise.resolve("none"),entries:[s]};return a.promise=(async()=>{let t=m();if(!t)return!function(e,t=new Date){if(!e)return;let r=d(n);if(!r)return;let s=Date.parse(r.startedAt);!Number.isFinite(s)||t.getTime()-s>2592e6?p(n):d(e)||(h({...r,userId:e}),p(n))}(i),{outcome:"none",event:null,extra:{}};if(!function(e,t=new Date){let r=Date.parse(e.finishedAt);return!!Number.isFinite(r)&&t.getTime()-r<=2592e6}(t))return w(),{outcome:"expired",event:"expired",extra:{}};let{ukYear:s,adult:o}=t.body;try{let n=await e.postMathsCheck(t.body);if("retry"===n.outcome)return{outcome:"retry",event:"retry",extra:{ukYear:s,adult:o}};if(w(),"saved"===n.outcome){try{let n=await e.getStudentRegion(),i=r({countrySel:t.countryCode,adult:o,ukYear:s,savedCountryCode:n.countryCode,savedYearGroup:n.yearGroup,savedNotInSchool:n.notInSchool,fillEmptyOnly:!0});i&&await e.updateStudentRegion(i)}catch{}return{outcome:"saved",event:"saved",extra:{ukYear:s,adult:o,alreadyCompleted:n.alreadyCompleted}}}return{outcome:"discarded",event:n.outcome,extra:{ukYear:s,adult:o}}}catch{return{outcome:"retry",event:"retry",extra:{ukYear:s,adult:o,reason:"exception"}}}})().then(({outcome:e,event:r,extra:n})=>(r&&function(e,r,n={}){try{t.default.capture("mathscheck_visitor_handover",{outcome:e,entry:r[0],entries:r,...n})}catch{}}(r,a.entries,n),e)).finally(()=>{C.get(i)===a&&C.delete(i)}),C.set(i,a),a.promise},"hasMathsCheckVisitorResult",0,function(){return null!==m()},"mathsCheckDemoAwareInvitationLabel",0,function(e,t){return e?"in_progress"===e.mode&&"number"==typeof e.answeredCount&&e.answeredCount>0?"Continue the check":"Start the check":f(t)>0?"Continue the check":"Start the check"},"mathsCheckStorageAvailable",0,c,"readMathsCheckDraft",0,d,"readMathsCheckVisitorResult",0,m,"rememberCurrentMathsCheckReturnPath",0,function(){let{pathname:e,search:t,hash:r}=window.location;!function(e){if(!(!e||!e.startsWith("/")||e.startsWith("//")||e.includes("\\")||"/maths-check"===e||e.startsWith("/maths-check/")||e.startsWith("/maths-check?")||e.startsWith("/maths-check#")))try{if
1(!window.sessionStorage)return;window.sessionStorage.setItem(o,g(e))}catch{}}(`${e}${t}${r}`)},"writeMathsCheckDraft",0,h,"writeMathsCheckVisitorResult",0,function(e){if(!c()||m())return!1;try{return window.localStorage.setItem(i,JSON.stringify(e)),!0}catch{return!1}}],877964)},301719,e=>{"use strict";let t=["/maths-check","/checkout","/sso-callback","/sign-in","/sign-up","/upload","/chat","/privacy-policy","/terms-of-service","/cookies","/safeguarding","/dashboard","/my-dashboard","/skills","/skills-map","/profile","/exam-prep","/examprep","/examprep_qa2","/missioncontrol"];function r(e){return"number"==typeof e&&Number.isFinite(e)&&e>=0}function n(e){let r,n="/"===(r=e.split(/[?#]/,1)[0]||"/")?r:r.replace(/\/+$/,"")||"/";return!t.some(e=>n===e||n.startsWith(`${e}/`))}function s(e){if(!e)return null;if("clicked"===e.status)return e.clickedAt+12096e5;let t=e.dismissCount<=1?6048e5:2592e6;return e.dismissedAt+t}function i(e,t){let n=s(e);return null!==n&&(!r(t)||t<n)}e.s(["MATHS_CHECK_PROMO_CAMPAIGN_ID",0,"maths_check_promo_v1","MATHS_CHECK_PROMO_ENTRY_SOURCE",0,"popup","MATHS_CHECK_PROMO_ENTRY_STORAGE_KEY",0,"ma-mathscheck-entry","MATHS_CHECK_PROMO_PAGE_DWELL_MS",0,4e4,"MATHS_CHECK_PROMO_SESSION_STORAGE_KEY",0,"ma-mathscheck-promo-v1-session","MATHS_CHECK_PROMO_STORAGE_KEY",0,"ma-mathscheck-promo-v1","MATHS_CHECK_PROMO_SUPPRESS_EVENT",0,"maths-check-promo:suppress-for-session","createMathsCheckPromoClickedState",0,function(e){return{version:1,status:"clicked",clickedAt:e}},"createMathsCheckPromoDismissedState",0,function(e,t){return{version:1,status:"dismissed",dismissedAt:t,dismissCount:(e?.status==="dismissed"?e.dismissCount:0)+1}},"createMathsCheckPromoSessionState",0,function(e){return{version:1,startedAt:e,shown:!1,suppressed:!1}},"isMathsCheckPromoEligible",0,function(e){return e.authLoaded&&!1===e.isSignedIn&&n(e.pathname)&&r(e.millisecondsOnPage)&&e.millisecondsOnPage>=4e4&&!e.hasVisitorMathsCheckResult&&0===e.visitorDraftAnswerCount&&r(e.nowMs)&&!i(e.persistentState,e.nowMs)&&!e.hasShownThisSession&&!e.isSuppressedThisSession&&e.isSafeToOpen},"isMathsCheckPromoRoute",0,n,"isMathsCheckPromoSuppressed",0,i,"mathsCheckPromoSuppressionExpiresAt",0,s,"parseMathsCheckPromoPersistentState",0,function(e){if(!e)return null;try{let t=JSON.parse(e);if(!t||"object"!=typeof t||1!==t.version)return null;if("dismissed"===t.status&&r(t.dismissedAt))return{version:1,status:"dismissed",dismissedAt:t.dismissedAt,dismissCount:r(t.dismissCount)&&t.dismissCount>=1?Math.floor(t.dismissCount):1};if("clicked"===t.status&&r(t.clickedAt))return{version:1,status:"clicked",clickedAt:t.clickedAt}}catch{}return null},"parseMathsCheckPromoSessionState",0,function(e,t){if(!e)return null;try{let n=JSON.parse(e);if(!n||"object"!=typeof n||1!==n.version||!r(n.startedAt)||n.startedAt>t||"boolean"!=typeof n.shown||"boolean"!=typeof n.suppressed)return null;return{version:1,startedAt:n.startedAt,shown:n.shown,suppressed:n.suppressed,suppressionReason:"string"==typeof n.suppressionReason?n.suppressionReason:void 0}}catch{return null}},"serializeMathsCheckPromoPersistentState",0,function(e){return JSON.stringify(e)}])}]);

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.