1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0d237-a173-0000-21ea-55c56bd90a6b";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="30498d28-6d11-5e69-aa0f-51d1b53fc8c1")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,508696,e=>{"use strict";e.s(["COOKIE_CONSENT",0,"cookieconsent_status"])},740489,741819,e=>{"use strict";let t;var n=e.i(263786);let r=new Uint8Array(16);function o(){if(!t){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");t=crypto.getRandomValues.bind(crypto)}return t(r)}let i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));let a={};function s(e,t,n,r,o,i,a=0){if(e.length<16)throw Error("Random bytes length must be >= 16");if(i){if(a<0||a+16>i.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`)}else i=new Uint8Array(16),a=0;t??=Date.now(),n??=0,r??=(e[8]<<8|e[9])&16383,o??=e.slice(10,16);let u=((0xfffffff&(t+=122192928e5))*1e4+n)%0x100000000;i[a++]=u>>>24&255,i[a++]=u>>>16&255,i[a++]=u>>>8&255,i[a++]=255&u;let c=t/0x100000000*1e4&0xfffffff;i[a++]=c>>>8&255,i[a++]=255&c,i[a++]=c>>>24&15|16,i[a++]=c>>>16&255,i[a++]=r>>>8|128,i[a++]=255&r;for(let e=0;e<6;++e)i[a++]=o[e];return i}let u=function(e,t,n){let r,u=e?._v6??!1;if(e){let t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)r=s(e.random??e.rng?.()??o(),e.msecs,e.nsecs,e.clockseq,e.node,t,n);else{var c,l,d;let e=Date.now(),i=o();c=a,l=e,d=i,c.msecs??=-1/0,c.nsecs??=0,l===c.msecs?(c.nsecs++,c.nsecs>=1e4&&(c.node=void 0,c.nsecs=0)):l>c.msecs?c.nsecs=0:l<c.msecs&&(c.node=void 0),c.node||(c.node=d.slice(10,16),c.node[0]|=1,c.clockseq=(d[8]<<8|d[9])&16383),c.msecs=l,r=s(i,a.msecs,a.nsecs,u?void 0:a.clockseq,u?void 0:a.node,t,n)}return t??function(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}(r)};var c=e.i(244900),l=e.i(950119);let d=async()=>await l.default.doesSessionExist()?await l.default.getUserId():null;var f=e.i(508696),p=e.i(985816);let h="https://api.supertokens.com/0/antcs/ents",g="st_antcs",v="st_antcs";function m(){let e=window.location.hostname;return window.location.hostname.endsWith("supertokens.com")&&(e=".supertokens.com"),{domain:e,sameSite:"Lax",expires:1e4}}try{["localhost","127.0.0.1","test.supertokens.com","supertokens.vercel.app"].includes(window.location.hostname)}catch(e){}let b={"supertokens.com":!0,"www.supertokens.com":!0},y={"st-team-udid1234":!0},w={timeout:2e4,maxRedirects:20,withCredentials:!0,headers:{"Content-Type":"application/json","api-version":0}};class _{constructor(){this.userId=null,this.pageViewEventSent=!1}getUserId(){let e=null===localStorage?null:localStorage.getItem(g);if("st-team-udid1234"===e)return e;if(!1!==k()){let t=c.default.get(v);if(void 0!==t)return t;if(null!==e)return c.default.set(v,e,m()),localStorage.removeItem(g),e;let n=u();return c.default.set(v,n,m()),n}return"untracked_user"}getCommonData(){null===this.userId&&(this.userId=this.getUserId());let e=this.userId;return{page:window.location.href,userId:e}}shouldSendEventsToApi(){let e=window.location.hostname,t=this.getCommonData().userId;return!!((!0===b[e]||e.endsWith(".demo.supertokens.com"))&&!1===y.hasOwnProperty(t)&&k())}async sendEvent(e,t,r){if(!1!==k()){let o=this.getCommonData(),i=await d(),a={timestamp:Date.now(),version:r,sessionUserId:i,...o,...t};this.shouldSendEventsToApi()?(n.default.post(h,{eventName:e,data:a},w).then(()=>{this.pageViewEventSent=!0}
1).catch(()=>{this.pageViewEventSent=!0}),"page_view"!==e&&(0,p.trackEvent)(e,a)):(this.pageViewEventSent=!0,console.log(e,a));return}}async sendSupertokensSDKLogs(e){let t=this.getCommonData(),r=await d(),o={timestamp:Date.now(),version:"v1",sessionUserId:r,...t};if(this.shouldSendEventsToApi())try{await n.default.post(h,{eventName:"auth_error_sdk_logs",data:{type:"auth_error_sdk_logs",...o,...e}},{})}catch(e){}else console.log({eventName:"auth_error_sdk_logs",data:{...o,...e}})}async sendPageViewEvents(){await this.sendEvent("page_view",{type:"page_view",referrer:document.referrer},"v5")}addPageTimeAnalytics(){if(!1!==k()){let e,t,n=this.getCommonData(),r=Date.now();return void 0!==document.hidden?(e="hidden",t="visibilitychange"):void 0!==document.msHidden?(e="msHidden",t="msvisibilitychange"):void 0!==document.webkitHidden&&(e="webkitHidden",t="webkitvisibilitychange"),{visibilityChange:t,hideHandler:async()=>{if(document[e]){let e={timeElapsed:Date.now()-r,pageURL:n.page,userId:n.userId};if(navigator.sendBeacon&&this.shouldSendEventsToApi()){let t=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon("https://api.supertokens.com/0/antcs/website/page-time-spent",t)}}else{let t=Date.now();for(;Date.now()-t<1e3;){if(!document[e]){r=Date.now();break}await new Promise(e=>setTimeout(e,100))}}}}}}}function I(){return void 0===_.instance&&(_.instance=new _),_.instance}function k(){let e=c.default.get(f.COOKIE_CONSENT);if(e)if("deny"===e)return!1;else return!0}e.s(["getInstance",0,I],741819);var S=e.i(622391);function T(){return new Promise((e,t)=>{e(I())})}function R(e,t="v5",n){T().then(r=>r.sendEvent(e,{type:"button_click",...n},t))}async function x(){try{return(await T()).getUserId()}catch(e){return""}}e.s(["VERSION",0,"v6","getAnalytics",0,T,"getCurrentUserId",0,x,"getPathAndSelectedPage",0,function(){let e,t={home:"home","about-us":"about_us",blog:"blog",pricing:"pricing",contribute:"contribute",docs:"documentation","product-roadmap":"product_roadmap",product:"product","use-oss":"use_oss",dashboard:"dashboard_saas","dashboard-saas":"dashboard_saas",signup:"signup",careers:"careers"},n=t[(e="/"===window.location.pathname.toLowerCase()?"home":window.location.pathname.split("/")[1]).toLowerCase()];return{path:e,pageSelected:n,currentPageToEventData:t}},"sendAsyncButtonAnalytics",0,function(e,t="v1",n){setTimeout(()=>{R(e,t,n)},0)},"sendButtonAnalytics",0,R,"sendEventToGoogleAnalytics",0,function(e,t){if((0,S.isDev)()||(0,S.isTestEnv)())return void console.log("Sending a google analytics event",{eventName:e,payload:t});try{"gtag"in window&&window.gtag("event",e,t)}catch(e){}},"sendGenericAnalyticsEvent",0,function(e){T().then(t=>t.sendGenericEvent(e))},"sendPageViewAnalytics",0,function(e,t="v5",n){T().then(r=>r.sendEvent(e,{type:"page_view",...n},t))},"sendScrollAnalytics",0,function(e,t="v5",n){T().then(r=>r.sendEvent(e,{type:"scroll",...n},t))}],740489)},762609,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,n){var r=e.locked.get(t);void 0===r?void 0===n?e.locked.set(t,[]):e.locked.set(t,[n]):void 0!==n&&(r.unshift(n),e.locked.set(t,r))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise(function(n,r){e.isLocked(t)?e.addToLocked(t,n):(e.addToLocked(t),n())})},this.unlock=function(t){var n=e.locked.get(t);if(void 0===n||0===n.length)return void e.locked.delete(t);var r=n.pop();e.locked.set(t,n),void 0!==r&&setTimeout(r,0)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();n.default=function(){return r.getInstance()}},586796,(e,t,n)=>{"use strict";var r=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}},i=e.e;Object.defineProperty(n,"__esModule",{value:!0});var a=e.r(762609),s="browser-tabs-lock-key",u={key:function(e){return r(i,void 0,void 0,function(){return o(this,function(e){throw Error("Unsupported")})})},getItem:function(e){return r(i,void 0,void 0,function(){return o(this,function(e){throw Error("Unsupported")})})},clear:function(){return r(i,void 0,void 0,function(){return o(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return r(i,void 0,void 0,function(){return o(this,function(e){throw Error("Unsupported")})})},setItem:function(e,t){return r(i,void 0,void 0,function(){return o(this,function(e){throw Error("Unsupported")})})},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function c(e){return new Promise(function(t){return setTimeout(t,e)})}function l(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",n="",r=0;r<e;r++){var o=Math.floor(Math.random()*t.length);n+=t[o]}return n}n.default=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+l(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,n){return void 0===n&&(n=5e3),r(this,void 0,void 0,function(){var r,i,a,d,f,p,h;return o(this,function(o){switch(o.label){case 0:r=Date.now()+l(4),i=Date.now()+n,a=s+"-"+t,d=void 0===this.storageHandler?u:this.storageHandler,o.label=1;case 1:if(!(Date.now()<i))return[3,8];return[4,c(30)];case 2:if(o.sent(),null!==d.getItemSync(a))return[3,5];return f=this.id+"-"+t+"-"+r,[4,c(Math.floor(25*Math.random()))];case 3:return o.sent(),d.setItemSync(a,JSON.stringify({id:this.id,iat:r,timeoutKey:f,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,c(30)];case 4:if(o.sent(),null!==(p=d.getItemSync(a))&&(h=JSON.parse(p)).id===this.id&&h.iat===r)return this.acquiredIatSet.add(r),this.refreshLockWhileAcquired(a,r),[2,!0];return[3,7];case 5:return e.lockCorrector(void 0===this.storageHandler?u:this.storageHandler),[4,this.waitForSomethingToChange(i)];case 6:o.sent(),o.label=7;case 7:return r=Date.now()+l(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(e,t){return r(this,void 0,void 0,function(){var n=this;return o(this,function(i){return setTimeout(function(){return r(n,void 0,void 0,function(){var n,r,i;return o(this,function(o){switch(o.label){case 0:return[4,a.default().lock(t)];case 1:if(o.sent(),!this.acquiredIatSet.has(t)||null===(r=(n=void 0===this.storageHandler?u:this.storageHandler).getItemSync(e)))return a.default().unlock(t),[2];return(i=JSON.parse(r)).timeRefreshed=Date.now(),n.setItemSync(e,JSON.stringify(i)),a.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2]}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,new Promise(function(n){var r=!1,o=Date.now(),i=!1;function a(){if(i||(window.removeEventListener("storage",a),e.removeFromWaiting(a),clearTimeout(s),i=!0),!r){r=!0;var t=50-(Date.now()-o);t>0?setTimeout(n,t):n(null)}}window.addEventListener("storage",a),e.addToWaiting(a);var s=setTimeout(a,Math.max(0,t-Date.now()))})];case 1:return n.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter(function(e){return e!==t}))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEac
1h(function(e){return e()})},e.prototype.releaseLock=function(e){return r(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}})})},e.prototype.releaseLock__private__=function(t){return r(this,void 0,void 0,function(){var n,r,i,c;return o(this,function(o){switch(o.label){case 0:if(n=void 0===this.storageHandler?u:this.storageHandler,r=s+"-"+t,null===(i=n.getItemSync(r)))return[2];if((c=JSON.parse(i)).id!==this.id)return[3,2];return[4,a.default().lock(c.iat)];case 1:o.sent(),this.acquiredIatSet.delete(c.iat),n.removeItemSync(r),a.default().unlock(c.iat),e.notifyWaiters(),o.label=2;case 2:return[2]}})})},e.lockCorrector=function(t){for(var n=Date.now()-5e3,r=[],o=0;;){var i=t.keySync(o);if(null===i)break;r.push(i),o++}for(var a=!1,u=0;u<r.length;u++){var c=r[u];if(c.includes(s)){var l=t.getItemSync(c);if(null!==l){var d=JSON.parse(l);(void 0===d.timeRefreshed&&d.timeAcquired<n||void 0!==d.timeRefreshed&&d.timeRefreshed<n)&&(t.removeItemSync(c),a=!0)}}}a&&e.notifyWaiters()},e.waiters=void 0,e}()},554294,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LockFactoryReference=void 0;var r=e.r(586796),o=function(){function e(e){this.lockFactory=e}return e.init=function(t,n){void 0===this.instance&&(this.instance=new e(null!=t?t:function(){return Promise.resolve(new r.default(n))}))},e.getReferenceOrThrow=function(){if(void 0===e.instance)throw Error("SuperTokensLockReference must be initialized before calling this method.");return e.instance},e}();n.LockFactoryReference=o,n.default=o},711122,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logDebugMessage=n.disableLogging=n.enableLogging=void 0;var r=e.r(541233),o=!1;n.enableLogging=function(){o=!0},n.disableLogging=function(){o=!1},n.logDebugMessage=function(e){o&&console.log("".concat("com.supertokens",' {t: "').concat(new Date().toISOString(),'", message: "').concat(e,'", supertokens-website-ver: "').concat(r.package_version,'"}'))}},244900,e=>{"use strict";function t(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)"__proto__"!==r&&(e[r]=n[r])}return e}var n=function e(n,r){function o(e,o,i){if("u">typeof document){"number"==typeof(i=t({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in i)i[s]&&(a+="; "+s,!0!==i[s]&&(a+="="+i[s].split(";")[0]));return document.cookie=e+"="+n.write(o,e)+a}}return Object.create({set:o,get:function(e){if("u">typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],r={},o=0;o<t.length;o++){var i=t[o].split("="),a=i.slice(1).join("=");try{var s=decodeURIComponent(i[0]);if(s in r||(r[s]=n.read(a,s)),e===s)break}catch(e){}}return e?r[e]:r}},remove:function(e,n){o(e,"",t({},n,{expires:-1}))},withAttributes:function(n){return e(this.converter,t({},this.attributes,n))},withConverter:function(n){return e(t({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});e.s(["default",0,n])},525430,(e,t,n)=>{"use strict";var r=e.r(34712),o=e.r(224616);n.normaliseAuthRecipe=function(e){return o.normaliseRecipeModuleConfig(e)},n.selectComponentsToCoverAllFirstFactors=function e(t,n){if(0!==n.length)for(var o=0;o<t.length;++o){var i=function(o){var i=t[o],a=n.filter(function(e){return!i.factorIds.includes(e)});if(0===a.length)return{value:[i]};var s=t.filter(function(e){return e.factorIds.every(function(e){return a.includes(e)})});if(0!==s.length){var u=e(s,a);if(void 0!==u)return{value:r.__spreadArray([i],u,!0)}}}(o);if("object"==typeof i)return i.value}}},584529,(e,t,n)=>{"use strict";var r=e.r(34712),o=e.r(815330),i=e.r(75204),a=e.r(224616),s=i&&i.__esModule?i:{default:i};n.createGenericComponentsOverrideContext=function(e,t){void 0===e&&(e={});var n=s.default.createContext(e);return[function(){var e,o=s.default.useContext(n);return r.__assign(r.__assign({},null==(e=a.SuperTokens.getInstance())?void 0:e.componentOverrides[t]),o)},function(e){var t=e.children,i=e.components;return o.jsx(n.Provider,r.__assign({value:i},{children:t}))},n.Consumer]}},75306,(e,t,n)=>{"use strict";var r=e.r(34712),o=e.r(815330),i=e.r(75204),a=e.r(224616),s=e.r(827880),u=e.r(247471),c=e.r(507718),l=e.r(877207),d=e.r(790720),f=e.r(244067),p=e.r(64138),h=e.r(624468),g=e.r(584529),v=e.r(525430),m=e.r(478499);
1function b(e){return e&&e.__esModule?e:{default:e}}var y=b(i),w=b(s),_=b(m),I=y.default.createContext("IS_DEFAULT");function k(){return o.jsx("svg",r.__assign({version:"1.1",viewBox:"25 25 50 50","data-supertokens":"spinnerIcon"},{children:o.jsxs("circle",r.__assign({cx:"50",cy:"50",r:"20",fill:"none",stroke:"rgb(var(--palette-primary))",strokeWidth:"5",strokeLinecap:"round",strokeDashoffset:"0",strokeDasharray:"100, 200"},{children:[o.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 50 50",to:"360 50 50",dur:"4s",repeatCount:"indefinite"}),o.jsx("animate",{attributeName:"stroke-dashoffset",values:"0;-30;-124",dur:"2s",repeatCount:"indefinite"}),o.jsx("animate",{attributeName:"stroke-dasharray",values:"0,200;110,200;110,200",dur:"2s",repeatCount:"indefinite"})]}))}))}var S=function(e){var t=i.useContext(I);if("IS_DEFAULT"===t)throw Error("Cannot use component override outside ComponentOverrideContext provider.");var n=t[e];return void 0===n?null:n},T=function(e,t){var n=e+"_Override";return t.displayName=n,function(e){var i=S(n);return null!==i?o.jsx(i,r.__assign({DefaultComponent:t},e)):o.jsx(t,r.__assign({},e))}},R=function(e){var t=e.children,n=e.userStyles;return o.jsxs(i.Fragment,{children:[t,o.jsxs("style",{children:['[data-supertokens~="container"] {\n --palette-background: 255, 255, 255;\n --palette-inputBackground: 250, 250, 250;\n --palette-inputBorder: 224, 224, 224;\n --palette-primary: 28, 34, 42;\n --palette-primaryBorder: 45, 54, 68;\n --palette-success: 65, 167, 0;\n --palette-successBackground: 217, 255, 191;\n --palette-error: 255, 23, 23;\n --palette-errorBackground: 255, 241, 235;\n --palette-textTitle: 0, 0, 0;\n --palette-textLabel: 0, 0, 0;\n --palette-textInput: 0, 0, 0;\n --palette-textPrimary: 128, 128, 128;\n --palette-textLink: 0, 122, 255;\n --palette-buttonText: 255, 255, 255;\n --palette-textGray: 54, 54, 54;\n --palette-superTokensBrandingBackground: 242, 245, 246;\n --palette-superTokensBrandingText: 173, 189, 196;\n --palette-buttonGreyedOut: 221, 221, 221;\n --palette-caution: 124, 96, 62;\n --palette-errorDark: 207, 54, 68;\n\n --font-size-0: 12px;\n --font-size-1: 14px;\n --font-size-2: 16px;\n --font-size-3: 19px;\n --font-size-4: 24px;\n --font-size-5: 28px;\n}\n/*\n * Default styles.\n */\n@keyframes slideTop {\n 0% {\n transform: translateY(-5px);\n }\n 100% {\n transform: translateY(0px);\n }\n}\n@keyframes swing-in-top-fwd {\n 0% {\n transform: rotateX(-100deg);\n transform-origin: top;\n opacity: 0;\n }\n 100% {\n transform: rotateX(0deg);\n transform-origin: top;\n opacity: 1;\n }\n}\n[data-supertokens~="container"] {\n font-family: "Arial", sans-serif;\n margin: 12px auto;\n margin-top: 26px;\n margin-bottom: 26px;\n width: 420px;\n text-align: center;\n border-radius: 8px;\n box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.16);\n background-color: rgb(var(--palette-background));\n}\n@media (max-width: 440px) {\n [data-supertokens~="container"] {\n width: 95vw;\n }\n}\n[data-supertokens~="row"] {\n margin: 0 auto;\n width: 76%;\n padding-top: 30px;\n padding-bottom: 10px;\n}\n[data-supertokens~="superTokensBranding"] {\n display: block;\n margin: 10px auto 0;\n background: rgb(var(--palette-superTokensBrandingBackground));\n color: rgb(var(--palette-superTokensBrandingText));\n text-decoration: none;\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n border-radius: 6px 6px 0 0;\n padding: 4px 9px;\n font-weight: 400;\n font-size: var(--font-size-0);\n letter-spacing: 0.4px;\n}\n[data-supertokens~="generalError"] {\n background: rgb(var(--palette-errorBackground));\n padding-top: 10px;\n padding-bottom: 10px;\n margin-bottom: 10px;\n margin-top: 24px;\n padding-left: 18px;\n padding-right: 18px;\n letter-spacing: 0.2px;\n font-size: var(--font-size-1);\n border-radius: 8px;\n color: rgb(var(--palette-error));\n animation: swing-in-top-fwd 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;\n word-wrap: break-word;\n}\n[data-supertokens~="headerTitle"] {\n font-size: var(--font-size-4);\n line-height: 27.6px;\n letter-spacing: 0.58px;\n font-weight: 700;\n margin-bottom: 20px;\n color: rgb(var(--palette-textTitle));\n}\n[data-supertokens~="headerSubtitle"] {\n font-weight: 400;\n color: rgb(var(--palette-textGray));\n margin-bottom: 21px;\n}\n[data-supertokens~="headerSubtitle"][data-supertokens~="secondaryText"] {\n color: rgb(var(--palette-textGray));\n font-weight: 400;\n}\n[data-supertokens~="privacyPolicyAndTermsAndConditions"] {\n max-width: 300px;\n margin-top: 10px;\n}\n[data-supertokens~="privacyPolicyAndTermsAndConditions"] a {\n line-height: 21px;\n}\n/* TODO: split the link style into separate things*/\n/* We add this before primary and secondary text, because if they are applied to the same element the other ones take priority */\n[data-supertokens~="link"] {\n padding-left: 3px;\n padding-right: 3px;\n color: rgb(var(--palette-textLink));\n font-size: var(--font-size-1);\n cursor: pointer;\n letter-spacing: 0.16px;
1\n line-height: 26px;\n}\n[data-supertokens~="primaryText"] {\n font-size: var(--font-size-2);\n font-weight: 400;\n letter-spacing: 0.4px;\n line-height: 21px;\n color: rgb(var(--palette-textLabel));\n}\n[data-supertokens~="secondaryText"] {\n font-size: var(--font-size-1);\n font-weight: 400;\n letter-spacing: 0.4px;\n color: rgb(var(--palette-textPrimary));\n}\n[data-supertokens~="secondaryText"] strong {\n font-weight: 600;\n}\n[data-supertokens~="divider"] {\n margin-top: 1.5em;\n margin-bottom: 1.5em;\n border-bottom: 0.3px solid #dddddd;\n align-items: center;\n padding-bottom: 5px;\n flex: 3 3;\n}\n[data-supertokens~="headerTinyTitle"] {\n margin-top: 24px;\n font-size: var(--font-size-5);\n letter-spacing: 1.1px;\n font-weight: 700;\n line-height: 28px;\n}\n[data-supertokens~="secondaryLinkWithArrow"] {\n margin-top: 10px;\n margin-bottom: 30px;\n cursor: pointer;\n}\n[data-supertokens~="secondaryLinkWithArrow"]:hover {\n position: relative;\n left: 2px;\n word-spacing: 4px;\n}\n[data-supertokens~="generalSuccess"] {\n color: rgb(var(--palette-success));\n font-size: var(--font-size-1);\n background: rgb(var(--palette-successBackground));\n animation: swing-in-top-fwd 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;\n padding: 9px 15px 9px 15px;\n border-radius: 6px;\n display: inline-block;\n}\n[data-supertokens~="spinner"] {\n width: 80px;\n height: auto;\n padding-top: 20px;\n padding-bottom: 40px;\n margin: 0 auto;\n}\n[data-supertokens~="error"] {\n color: rgb(var(--palette-error));\n}\n[data-supertokens~="linkButton"] {\n font-family: "Arial", sans-serif;\n background-color: transparent;\n border: 0;\n}\n[data-supertokens~="secondaryLinkWithLeftArrow"] {\n color: rgb(var(--palette-textGray));\n font-weight: 400;\n margin-top: 10px;\n margin-bottom: 40px;\n cursor: pointer;\n}\n[data-supertokens~="secondaryLinkWithLeftArrow"] svg {\n margin-right: 0.3em;\n}\n[data-supertokens~="secondaryLinkWithLeftArrow"]:hover svg {\n position: relative;\n left: -4px;\n}\n[data-supertokens~="button"] {\n font-family: "Arial", sans-serif;\n background-color: rgb(var(--palette-primary));\n color: rgb(var(--palette-buttonText));\n width: 100%;\n height: 34px;\n font-weight: 600;\n border-width: 1px;\n border-style: solid;\n border-radius: 6px;\n border-color: rgb(var(--palette-primaryBorder));\n background-position: center;\n transition: all 0.4s;\n background-size: 12000%;\n cursor: pointer;\n}\n[data-supertokens~="buttonGreyedOut"] {\n background-color: rgb(var(--palette-buttonGreyedOut));\n border-color: rgb(var(--palette-buttonGreyedOut));\n}\n[data-supertokens~="buttonWithIcon"] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n}\n[data-supertokens~="button"]:disabled {\n border: none;\n cursor: no-drop;\n}\n[data-supertokens~="button"]:active {\n outline: none;\n transition: all 0s;\n background-size: 100%;\n filter: brightness(0.85);\n}\n[data-supertokens~="button"]:focus {\n outline: none;\n}\n[data-supertokens~="backButtonCommon"] {\n width: 16px;\n height: 13px;\n}\n[data-supertokens~="backButton"] {\n cursor: pointer;\n border: none;\n background-color: transparent;\n padding: 0px;\n}\n[data-supertokens~="backButtonPlaceholder"] {\n display: block;\n}\n[data-supertokens~="delayedRender"] {\n animation-duration: 0.1s;\n animation-name: animate-fade;\n animation-delay: 0.2s;\n animation-fill-mode: backwards;\n}\n@keyframes animate-fade {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n[data-supertokens~="footerLinkGroupVert"] {\n display: flex;\n flex-direction: column;\n margin-top: 10px;\n gap: 24px;\n}\n[data-supertokens~="footerLinkGroupVert"] > div {\n cursor: pointer;\n margin: 0;\n}\n[data-supertokens~="footerLinkGroupVert"] [data-supertokens~="secondaryText"] {\n font-weight: 400;\n}\n[data-supertokens~="footerLinkGroupVert"] [data-supertokens~="secondaryLinkWithLeftArrow"] {\n font-weight: 400;\n position: relative;\n left: -6px; /* half the width of the left arrow */\n}\n@media (max-width: 360px) {\n [data-supertokens~="footerLinkGroupVert"] {\n flex-direction: column;\n }\n [data-supertokens~="footerLinkGroupVert"] > div {\n margin: 0 auto;\n }\n}\n[data-supertokens~="footerLinkGroupVert"] div:only-child {\n margin-left: auto;\n margin-right: auto;\n margin-top: 14px;\n}\n[data-supertokens~="withBackButton"] {\n position: relative;\n display: flex;\n justify-content: space-between;
1\n align-items: center;\n}\n[data-supertokens~="dividerWithOr"] {\n padding-top: 5px;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n color: rgb(var(--palette-textPrimary));\n}\n[data-supertokens~="dividerText"] {\n flex: 1 1;\n font-weight: 400;\n font-size: var(--font-size-1);\n}\n[data-supertokens~="formLabelWithLinkWrapper"] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n[data-supertokens~="formLabelLinkBtn"] {\n width: auto;\n margin-top: 0;\n line-height: 24px;\n font-size: var(--font-size-0);\n}\n[data-supertokens~="formLabelLinkBtn"]:hover {\n text-decoration: underline;\n}\n[data-supertokens~="formLabelLinkBtn"]:disabled {\n color: rgb(var(--palette-textPrimary));\n cursor: default;\n text-decoration: none;\n}\n[data-supertokens~="authComponentList"] {\n padding-bottom: 20px;\n}\n[data-supertokens~="authPageTitleOAuthClient"] {\n color: rgb(var(--palette-textGray));\n font-size: var(--font-size-1);\n font-weight: 400;\n margin: 10px 0 25px;\n}\n[data-supertokens~="authPageTitleOAuthClientUrl"] {\n text-decoration: none;\n}\n[data-supertokens~="authPageTitleOAuthClientLogo"] {\n width: 44px;\n height: 44px;\n margin-bottom: 10px;\n}\n[data-supertokens~="authPageTitleOAuthClient"] [data-supertokens~="authPageTitleOAuthClientName"] {\n color: rgb(var(--palette-textTitle));\n}\n[data-supertokens~="buttonWithArrow"] {\n border-radius: 6px;\n border: 1px solid #d0d5dd;\n width: 100%;\n color: rgb(var(--palette-textGray));\n display: flex;\n justify-content: center;
1\n align-items: center;\n gap: 5px;\n margin: 24px 0;\n min-height: 48px;\n cursor: pointer;\n}\n[data-supertokens~="buttonWithArrow"]:hover {\n background-color: rgb(var(--palette-inputBackground));\n}\n[data-supertokens~="buttonWithArrow"] [data-supertokens~="secondaryText"] {\n font-weight: 700;\n font-size: var(--font-size-2);\n color: rgb(var(--palette-textGray));\n margin: 0;\n}\n[data-supertokens~="buttonWithArrow"]:hover [data-supertokens~="secondaryLinkWithRightArrow"] ~ svg {\n position: relative;\n left: 2px;\n}\n[data-supertokens~="buttonWithArrow"]:hover [data-supertokens~="secondaryLinkWithLeftArrow"] svg {\n position: relative;\n left: -2px;\n}\n[data-supertokens~="buttonWithArrow"] [data-supertokens~="secondaryLinkWithLeftArrow"] {\n display: flex;\n align-items: center;\n}\n',n.join("\n")]})]})},x=T("MultitenancyDynamicLoginMethodsSpinnerTheme",function(){return o.jsx("div",r.__assign({"data-supertokens":"container delayedRender"},{children:o.jsx("div",r.__assign({"data-supertokens":"row"},{children:o.jsx("div",r.__assign({"data-supertokens":"spinner delayedRender"},{children:o.jsx(k,{})}))}))}))}),C=function(e){var t=a.SuperTokens.getInstanceOrThrow().rootStyle;return o.jsx(R,r.__assign({userStyles:[t,e.config.recipeRootStyle]},{children:o.jsx(x,{})}))},A=function(){var e=a.Multitenancy.getInstanceOrThrow(),t=d.useContext();return o.jsx(I.Provider,r.__assign({value:t},{children:o.jsx(L,r.__assign({useShadowDom:a.SuperTokens.getInstanceOrThrow().useShadowDom},{children:o.jsx(C,{config:e.config})}))}))},P=y.default.createContext(void 0),O=function(e){var t=e.value,n=e.children;return o.jsx(P.Provider,r.__assign({value:void 0===t?{loaded:!1}:{loaded:!0,loginMethods:t}},{children:n}))},E=y.default.createContext(void 0),D=function(){return y.default.useContext(E)},M=function(e){var t=e.children,n=e.userContext,a=i.useState(r.getNormalisedUserContext(n))[0];return o.jsx(E.Provider,r.__assign({value:a},{children:t}))};function F(e){var t=e.children,n=i.useRef(null),a=i.useState(),s=a[0],u=a[1];return i.useEffect(function(){n.current&&u(function(e){return e||n.current.shadowRoot||n.current.attachShadow({mode:"open",delegatesFocus:!1})})},[n]),o.jsx("div",r.__assign({id:r.ST_ROOT_ID,ref:n},{children:s&&l.createPortal(t,s)}))}function L(e){var t=e.children;return!1===e.useShadowDom?o.jsxs("div",r.__assign({id:r.ST_ROOT_ID},{children:[t,o.jsx(U,{})]})):o.jsxs(F,{children:[t,o.jsx(U,{})]})}function U(){return o.jsx("style",r.__assign({type:"text/css"},{children:"input.supertokens-input:-webkit-autofill,input.supertokens-input:-webkit-autofill:focus,input.supertokens-input:-webkit-autofill:hover,select:-webkit-autofill,select:-webkit-autofill:focus,select:-webkit-autofill:hover,textarea:-webkit-autofill,textarea:-webkit-autofill:focus,textarea:-webkit-autofill:hover{transition:background-color 5000s ease-in-out 0s}"}))}var H=y.default.createContext({loading:!0,isDefault:!0}),N=function(){var e=y.default.useContext(H);if(!0===e.isDefault)throw Error("Cannot use useSessionContext outside auth wrapper components.");return e},j=g.createGenericComponentsOverrideContext({},"authRecipe"),B=j[0],G=j[1];function W(){var e=u.useTranslation();return o.jsxs("a",r.__assign({"data-supertokens":"superTokensBranding",href:"https://supertokens.com?utm_campaign=poweredby",target:"_blank"},{children:[e("BRANDING_POWERED_BY_START"),o.jsx("strong",{children:"SuperTokens"}),e("BRANDING_POWERED_BY_END")]}))}function V(e){return void 0!==e.userContext?o.jsx(M,r.__assign({userContext:e.userContext},{children:e.children})):o.jsx(E.Consumer,{children:function(t){return void 0===t?o.jsx(M,{children:e.children}):e.children}})}function q(e){var t=e.error,n=u.useTranslation();return o.jsx("div",r.__assign({"data-supertokens":"generalError"},{children:n(t)}))}var z=function(e){var t=e.children,n=e.userStyles;return o.jsxs(i.Fragment,{children:[t,o.jsxs("style",{children:['[data-supertokens~="container"] {\n --palette-background: 255, 255, 255;\n --palette-inputBackground: 250, 250, 250;\n --palette-inputBorder: 224, 224, 224;\n --palette-primary: 28, 34, 42;\n --palette-primaryBorder: 45, 54, 68;\n --palette-success: 65, 167, 0;
1\n --palette-successBackground: 217, 255, 191;\n --palette-error: 255, 23, 23;\n --palette-errorBackground: 255, 241, 235;\n --palette-textTitle: 0, 0, 0;\n --palette-textLabel: 0, 0, 0;\n --palette-textInput: 0, 0, 0;\n --palette-textPrimary: 128, 128, 128;\n --palette-textLink: 0, 122, 255;\n --palette-buttonText: 255, 255, 255;\n --palette-textGray: 54, 54, 54;\n --palette-superTokensBrandingBackground: 242, 245, 246;\n --palette-superTokensBrandingText: 173, 189, 196;\n --palette-buttonGreyedOut: 221, 221, 221;\n --palette-caution: 124, 96, 62;\n --palette-errorDark: 207, 54, 68;\n\n --font-size-0: 12px;\n --font-size-1: 14px;\n --font-size-2: 16px;\n --font-size-3: 19px;\n --font-size-4: 24px;\n --font-size-5: 28px;\n}\n/*\n * Default styles.\n */\n@keyframes slideTop {\n 0% {\n transform: translateY(-5px);\n }\n 100% {\n transform: translateY(0px);\n }\n}\n@keyframes swing-in-top-fwd {\n 0% {\n transform: rotateX(-100deg);\n transform-origin: top;\n opacity: 0;\n }\n 100% {\n transform: rotateX(0deg);\n transform-origin: top;\n opacity: 1;\n }\n}\n[data-supertokens~="container"] {\n font-family: "Arial", sans-serif;\n margin: 12px auto;\n margin-top: 26px;\n margin-bottom: 26px;\n width: 420px;\n text-align: center;\n border-radius: 8px;\n box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.16);\n background-color: rgb(var(--palette-background));\n}\n@media (max-width: 440px) {\n [data-supertokens~="container"] {\n width: 95vw;\n }\n}\n[data-supertokens~="row"] {\n margin: 0 auto;\n width: 76%;\n padding-top: 30px;\n padding-bottom: 10px;\n}\n[data-supertokens~="superTokensBranding"] {\n display: block;\n margin: 10px auto 0;\n background: rgb(var(--palette-superTokensBrandingBackground));\n color: rgb(var(--palette-superTokensBrandingText));\n text-decoration: none;\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n border-radius: 6px 6px 0 0;\n padding: 4px 9px;\n font-weight: 400;\n font-size: var(--font-size-0);\n letter-spacing: 0.4px;\n}\n[data-supertokens~="generalError"] {\n background: rgb(var(--palette-errorBackground));\n padding-top: 10px;\n padding-bottom: 10px;\n margin-bottom: 10px;\n margin-top: 24px;\n padding-left: 18px;\n padding-right: 18px;\n letter-spacing: 0.2px;\n font-size: var(--font-size-1);\n border-radius: 8px;\n color: rgb(var(--palette-error));\n animation: swing-in-top-fwd 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;\n word-wrap: break-word;\n}\n[data-supertokens~="headerTitle"] {\n font-size: var(--font-size-4);\n line-height: 27.6px;\n letter-spacing: 0.58px;\n font-weight: 700;\n margin-bottom: 20px;\n color: rgb(var(--palette-textTitle));\n}\n[data-supertokens~="headerSubtitle"] {\n font-weight: 400;\n color: rgb(var(--palette-textGray));\n margin-bottom: 21px;\n}\n[data-supertokens~="headerSubtitle"][data-supertokens~="secondaryText"] {\n color: rgb(var(--palette-textGray));\n font-weight: 400;\n}\n[data-supertokens~="privacyPolicyAndTermsAndConditions"] {\n max-width: 300px;\n margin-top: 10px;\n}\n[data-supertokens~="privacyPolicyAndTermsAndConditions"] a {\n line-height: 21px;\n}\n/* TODO: split the link style into separate things*/\n/* We add this before primary and secondary text, because if they are applied to the same element the other ones take priority */\n[data-supertokens~="link"] {\n padding-left: 3px;\n padding-right: 3px;\n color: rgb(var(--palette-textLink));\n font-size: var(--font-size-1);\n cursor: pointer;\n letter-spacing: 0.16px;\n line-height: 26px;\n}\n[data-supertokens~="primaryText"] {\n font-size: var(--font-size-2);\n font-weight: 400;\n letter-spacing: 0.4px;\n line-height: 21px;\n color: rgb(var(--palette-textLabel));\n}\n[data-supertokens~="secondaryText"] {\n font-size: var(--font-size-1);\n font-weight: 400;\n letter-spacing: 0.4px;\n color: rgb(var(--palette-textPrimary));\n}\n[data-supertokens~="secondaryText"] strong {\n font-weight: 600;\n}\n[data-supertokens~="divider"] {\n margin-top: 1.5em;\n margin-bottom: 1.5em;\n border-bottom: 0.3px solid #dddddd;
1\n align-items: center;\n padding-bottom: 5px;\n flex: 3 3;\n}\n[data-supertokens~="headerTinyTitle"] {\n margin-top: 24px;\n font-size: var(--font-size-5);\n letter-spacing: 1.1px;\n font-weight: 700;\n line-height: 28px;\n}\n[data-supertokens~="secondaryLinkWithArrow"] {\n margin-top: 10px;\n margin-bottom: 30px;\n cursor: pointer;\n}\n[data-supertokens~="secondaryLinkWithArrow"]:hover {\n position: relative;\n left: 2px;\n word-spacing: 4px;\n}\n[data-supertokens~="generalSuccess"] {\n color: rgb(var(--palette-success));\n font-size: var(--font-size-1);\n background: rgb(var(--palette-successBackground));\n animation: swing-in-top-fwd 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;\n padding: 9px 15px 9px 15px;\n border-radius: 6px;\n display: inline-block;\n}\n[data-supertokens~="spinner"] {\n width: 80px;\n height: auto;\n padding-top: 20px;\n padding-bottom: 40px;\n margin: 0 auto;\n}\n[data-supertokens~="error"] {\n color: rgb(var(--palette-error));\n}\n[data-supertokens~="linkButton"] {\n font-family: "Arial", sans-serif;\n background-color: transparent;\n border: 0;\n}\n[data-supertokens~="secondaryLinkWithLeftArrow"] {\n color: rgb(var(--palette-textGray));\n font-weight: 400;\n margin-top: 10px;\n margin-bottom: 40px;\n cursor: pointer;\n}\n[data-supertokens~="secondaryLinkWithLeftArrow"] svg {\n margin-right: 0.3em;\n}\n[data-supertokens~="secondaryLinkWithLeftArrow"]:hover svg {\n position: relative;\n left: -4px;\n}\n[data-supertokens~="button"] {\n font-family: "Arial", sans-serif;\n background-color: rgb(var(--palette-primary));\n color: rgb(var(--palette-buttonText));\n width: 100%;\n height: 34px;\n font-weight: 600;\n border-width: 1px;\n border-style: solid;\n border-radius: 6px;\n border-color: rgb(var(--palette-primaryBorder));\n background-position: center;\n transition: all 0.4s;\n background-size: 12000%;\n cursor: pointer;\n}\n[data-supertokens~="buttonGreyedOut"] {\n background-color: rgb(var(--palette-buttonGreyedOut));\n border-color: rgb(var(--palette-buttonGreyedOut));\n}\n[data-supertokens~="buttonWithIcon"] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n}\n[data-supertokens~="button"]:disabled {\n border: none;\n cursor: no-drop;\n}\n[data-supertokens~="button"]:active {\n outline: none;\n transition: all 0s;\n background-size: 100%;\n filter: brightness(0.85);\n}\n[data-supertokens~="button"]:focus {\n outline: none;\n}\n[data-supertokens~="backButtonCommon"] {\n width: 16px;\n height: 13px;\n}\n[data-supertokens~="backButton"] {\n cursor: pointer;\n border: none;\n background-color: transparent;\n padding: 0px;\n}\n[data-supertokens~="backButtonPlaceholder"] {\n display: block;\n}\n[data-supertokens~="delayedRender"] {\n animation-duration: 0.1s;\n animation-name: animate-fade;\n animation-delay: 0.2s;\n animation-fill-mode: backwards;\n}\n@keyframes animate-fade {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n[data-supertokens~="footerLinkGroupVert"] {\n display: flex;\n flex-direction: column;\n margin-top: 10px;\n gap: 24px;\n}\n[data-supertokens~="footerLinkGroupVert"] > div {\n cursor: pointer;\n margin: 0;\n}\n[data-supertokens~="footerLinkGroupVert"] [data-supertokens~="secondaryText"] {\n font-weight: 400;\n}\n[data-supertokens~="footerLinkGroupVert"] [data-supertokens~="secondaryLinkWithLeftArrow"] {\n font-weight: 400;\n position: relative;\n left: -6px; /* half the width of the left arrow */\n}\n@media (max-width: 360px) {\n [data-supertokens~="footerLinkGroupVert"] {\n flex-direction: column;\n }\n [data-supertokens~="footerLinkGroupVert"] > div {\n margin: 0 auto;\n }\n}\n[data-supertokens~="footerLinkGroupVert"] div:only-child {\n margin-left: auto;\n margin-right: auto;\n margin-top: 14px;\n}\n[data-supertokens~="withBackButton"] {\n position: relative;\n display: flex;\n justify-content: space-between;
1\n align-items: center;\n}\n[data-supertokens~="dividerWithOr"] {\n padding-top: 5px;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n color: rgb(var(--palette-textPrimary));\n}\n[data-supertokens~="dividerText"] {\n flex: 1 1;\n font-weight: 400;\n font-size: var(--font-size-1);\n}\n[data-supertokens~="formLabelWithLinkWrapper"] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n[data-supertokens~="formLabelLinkBtn"] {\n width: auto;\n margin-top: 0;\n line-height: 24px;\n font-size: var(--font-size-0);\n}\n[data-supertokens~="formLabelLinkBtn"]:hover {\n text-decoration: underline;\n}\n[data-supertokens~="formLabelLinkBtn"]:disabled {\n color: rgb(var(--palette-textPrimary));\n cursor: default;\n text-decoration: none;\n}\n[data-supertokens~="authComponentList"] {\n padding-bottom: 20px;\n}\n[data-supertokens~="authPageTitleOAuthClient"] {\n color: rgb(var(--palette-textGray));\n font-size: var(--font-size-1);\n font-weight: 400;\n margin: 10px 0 25px;\n}\n[data-supertokens~="authPageTitleOAuthClientUrl"] {\n text-decoration: none;\n}\n[data-supertokens~="authPageTitleOAuthClientLogo"] {\n width: 44px;\n height: 44px;\n margin-bottom: 10px;\n}\n[data-supertokens~="authPageTitleOAuthClient"] [data-supertokens~="authPageTitleOAuthClientName"] {\n color: rgb(var(--palette-textTitle));\n}\n[data-supertokens~="buttonWithArrow"] {\n border-radius: 6px;\n border: 1px solid #d0d5dd;\n width: 100%;\n color: rgb(var(--palette-textGray));\n display: flex;\n justify-content: center;
1\n align-items: center;\n gap: 5px;\n margin: 24px 0;\n min-height: 48px;\n cursor: pointer;\n}\n[data-supertokens~="buttonWithArrow"]:hover {\n background-color: rgb(var(--palette-inputBackground));\n}\n[data-supertokens~="buttonWithArrow"] [data-supertokens~="secondaryText"] {\n font-weight: 700;\n font-size: var(--font-size-2);\n color: rgb(var(--palette-textGray));\n margin: 0;\n}\n[data-supertokens~="buttonWithArrow"]:hover [data-supertokens~="secondaryLinkWithRightArrow"] ~ svg {\n position: relative;\n left: 2px;\n}\n[data-supertokens~="buttonWithArrow"]:hover [data-supertokens~="secondaryLinkWithLeftArrow"] svg {\n position: relative;\n left: -2px;\n}\n[data-supertokens~="buttonWithArrow"] [data-supertokens~="secondaryLinkWithLeftArrow"] {\n display: flex;\n align-items: center;\n}\n',n.join("\n")]})]})},X=T("AuthPageComponentList",function(e){for(var t=u.useTranslation(),n=[e.authComponents[0]],i=function(i){n.push(function(){return o.jsxs("div",r.__assign({"data-supertokens":"dividerWithOr"},{children:[o.jsx("div",{"data-supertokens":"divider"}),o.jsx("div",r.__assign({"data-supertokens":"dividerText"},{children:t("DIVIDER_OR")})),o.jsx("div",{"data-supertokens":"divider"})]}),"divider-".concat(i))}),n.push(e.authComponents[i])},a=1;a<e.authComponents.length;++a)i(a);return o.jsx("div",r.__assign({"data-supertokens":"authComponentList"},{children:n.map(function(t){return t(r.__assign({},e))})}))}),J=T("AuthPageFooter",function(e){var t=e.hasSeparateSignUpView,n=e.isSignUp,i=e.termsOfServiceLink,a=e.privacyPolicyLink,s=u.useTranslation();return void 0===i&&void 0===a||t&&!n?null:o.jsxs("div",r.__assign({"data-supertokens":"secondaryText privacyPolicyAndTermsAndConditions"},{children:[s("AUTH_PAGE_FOOTER_START"),void 0!==i&&o.jsx("a",r.__assign({"data-supertokens":"link",href:i,target:"_blank",rel:"noopener noreferer"},{children:s("AUTH_PAGE_FOOTER_TOS")})),void 0!==i&&void 0!==a&&s("AUTH_PAGE_FOOTER_AND"),void 0!==a&&o.jsx("a",r.__assign({"data-supertokens":"link",href:a,target:"_blank",rel:"noopener noreferer"},{children:s("AUTH_PAGE_FOOTER_PP")})),s("AUTH_PAGE_FOOTER_END")]}))});function Q(e){var t=e.color;return o.jsx("svg",r.__assign({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"13",viewBox:"0 0 16 13","data-supertokens":"heavyArrowLeftIcon"},{children:o.jsx("path",{fill:t,d:"M13 6.8h.022H3.8l2.9 2.9a.761.761 0 0 1 0 1.07l-.451.451a.754.754 0 0 1-1.064 0L.22 6.254a.759.759 0 0 1 0-1.068L5.186.22a.755.755 0 0 1 1.064 0l.45.451a.746.746 0 0 1 .22.532.724.724 0 0 1-.22.522l-2.93 2.92h9.24a.781.781 0 0 1 .764.773v.638A.766.766 0 0 1 13 6.8z",transform:"translate(1.182 .708)"})}))}function K(e){var t=e.onClick;return o.jsx("button",r.__assign({onClick:t,"data-supertokens":"backButton backButtonCommon"},{children:o.jsx(Q,{color:"rgb(var(--palette-textTitle))"})}))}var Y=T("AuthPageHeader",function(e){var t=e.onSignInUpSwitcherClick,n=e.hasSeparateSignUpView,a=e.isSignUp,s=e.showBackButton,c=e.resetFactorList,l=e.oauth2ClientInfo,d=e.headerLabel,f=e.hideSignInSwitcher,p=u.useTranslation();return o.jsxs(i.Fragment,{children:[(null==l?void 0:l.logoUri)&&o.jsx("img",{src:l.logoUri,alt:l.clientName,"data-supertokens":"authPageTitleOAuthClientLogo"}),o.jsxs("div",r.__assign({"data-supertokens":"headerTitle withBackButton"},{children:[s?o.jsx(K,{onClick:c}):o.jsx("span",{"data-supertokens":"backButtonPlaceholder backButtonCommon"}),p(void 0!==d?d:n?a?"AUTH_PAGE_HEADER_TITLE_SIGN_UP":"AUTH_PAGE_HEADER_TITLE_SIGN_IN":"AUTH_PAGE_HEADER_TITLE_SIGN_IN_AND_UP"),o.jsx("span",{"data-supertokens":"backButtonPlaceholder backButtonCommon"})]})),l&&void 0!==l.clientName&&l.clientName.length>0&&o.jsxs("div",r.__assign({"data-supertokens":"authPageTitleOAuthClient"},{children:[p("AUTH_PAGE_HEADER_TITLE_SIGN_IN_UP_TO_APP"),void 0!==l.clientUri?o.jsx("a",r.__assign({"data-supertokens":"authPageTitleOAuthClientUrl link",href:l.clientUri},{children:l.clientName})):o.jsx("span",r.__assign({"data-supertokens":"authPageTitleOAuthClientName"},{children:l.clientName}))]})),!(void 0!==f&&f)&&n&&(a?o.jsxs("div",r.__assign({"data-supertokens":"headerSubtitle secondaryText"},{children:[p("AUTH_PAGE_HEADER_SUBTITLE_SIGN_UP_START"),o.jsx("span",r.__assign({"data-supertokens":"link",onClick:t},{children:p("AUTH_PAGE_HEADER_SUBTITLE_SIGN_UP_SIGN_IN_LINK")})),p("AUTH_PAGE_HEADER_SUBTITLE_SIGN_UP_END")]})):o.jsxs("div",r.__assign({"data-supertokens":"headerSubtitle secondaryText"},{children:[p("AUTH_PAGE_HEADER_SUBTITLE_SIGN_IN_START"),o.jsx("span",r.__assign({"data-supertokens":"link",onClick:t},{children:p("AUTH_PAGE_HEADER_SUBTITLE_SIGN_IN_SIGN_UP_LINK")})),p("AUTH_PAGE_HEADER_SUBTITLE_SIGN_IN_END")]}))),o.jsx("div",{"data-supertokens":"divider"})]})});function $(e){return e.fullPageCompWithPreloadedInfo?o.jsx(o.Fragment,{children:e.fullPageCompWithPreloadedInfo.component(r.__assign(r.__assign({},e),{preloadInfo:e.fullPageCompWithPreloadedInfo.preloadInfo,showBackButton:e.showBackButton}))}):o.jsxs("div",r.__assign({"data-supertokens":"container authPage ".concat(e.factorIds.length>1?"multiFactor":"singleFactor")},{children:[o.jsxs("div",r.__assign({"data-supertokens":"row"},{children:[o.jsx(Y,{factorIds:e.factorIds,isSignUp:e.isSignUp,onSignInUpSwitcherClick:e.onSignInUpSwitcherClick,hasSeparateSignUpView:e.hasSeparateSignUpView,resetFactorList:e.resetFactorList,showBackButton:e.showBackButton,oauth2ClientInfo:e.oauth2ClientInfo}),void 0!==e.error&&o.jsx(q,{error:e.error}),o.jsx(X,r.__assign({},e)),o.jsx(J,{factorIds:e.factorIds,isSignUp:e.isSignUp,hasSeparateSignUpView:e.hasSeparateSignUpView,privacyPolicyLink:e.privacyPolicyLink,termsOfServiceLink:e.termsOfServiceLink})]})),o.jsx(W,{})]}))}function Z(e){var t=a.SuperTokens.getInstanceOrThrow().rootStyle;return o.jsx(V,r.__assign({userContext:e.userContext},{children:o.jsx(z,r.__assign({userStyles:[t]},{children:o.jsx($,r.__assign({},e))}))}))}var ee={signin:"SOMETHING_WENT_WRONG_ERROR",no_email_present:"THIRD_PARTY_ERROR_NO_EMAIL",restart_link:"ERROR_SIGN_IN_UP_LINK"},et=function(e){var t=B();return o.jsx(M,r.__assign({userContext:e.userContext},{children:o.jsx(ev,r.__assign({requireAuth:!1,doRedirection:!1},{children:o.jsx(I.Provider,r.__assign({value:t},{children:o.jsx(en,r.__assign({},e))}))}))}))},en=function(e){if(void 0!==e.factors&&0===e.factors.length)throw Error("The factors array cannot be empty");var t,n,s,l,d,g=new URLSearchParams(c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getSearch()),m=g.get("show"),b=!0!==e.useSignUpStateFromQueryString||null===m?void 0:"signup"===m,w=null!==g.get("error")&&null!=(n=null!=(t=g.get("message"))?t:g.get("error"))?n:void 0;w=void 0!==w?null!=(s=ee[w])?s:w:void 0;var _=i.useRef(m),I=i.useRef(w),k=g.get("loginChallenge"),S="true"===g.get("forceFreshAuth"),T=N(),R=D(),x=r.useRethrowInRender(),C=i.useState(void 0),P=C[0],E=C[1],M=i.useState(void 0),F=M[0],U=M[1],H=i.useState(w),j=H[0],B=H[1],G=i.useState(!1),W=G[0],V=G[1],q=a.SuperTokens.getInstanceOrThrow(),z=i.useState(e.factors),X=z[0],J=z[1],Q=i.useState(null!=(d=null!=(l=e.isSignUp)?l:b)?d:q.defaultToSignUp),K=Q[0],Y=Q[1],$=i.useState(0),et=$[0],en=$[1],er=i.useRef({buildReq:void 0});i.useEffect(function(){if(e.useSignUpStateFromQueryString&&_.current!==m){var t=!0!==e.useSignUpStateFromQueryString||null===m?void 0:"signup"===m;_.current=m;var n=null!=t?t:q.defaultToSignUp;
1K!==n&&(Y(n),en(function(e){return e+1}))}}),i.useEffect(function(){I.current!==w&&(I.current=w,B(w))});var eo=i.useCallback(function(){!0===e.useSignUpStateFromQueryString&&r.updateQueryParam("show",K?"signin":"signup"),B(void 0),Y(!K),en(function(e){return e+1})},[K,Y,en,B,e.useSignUpStateFromQueryString]);i.useEffect(function(){P||a.Multitenancy.getInstanceOrThrow().getCurrentDynamicLoginMethods({userContext:R}).then(function(e){return E(e)},function(e){return x(e)})},[P,E]),r.useOnMountAPICall(function(){return r.__awaiter(void 0,void 0,void 0,function(){var e;return r.__generator(this,function(t){return F?[2]:void 0!==(e=h.OAuth2Provider.getInstance())&&null!==k?[2,e.webJSRecipe.getLoginChallengeInfo({loginChallenge:k,userContext:R})]:[2,void 0]})})},function(e){return r.__awaiter(void 0,void 0,void 0,function(){return r.__generator(this,function(t){return void 0!==e&&("OK"===e.status?U(e.info):B("SOMETHING_WENT_WRONG_ERROR")),[2]})})},function(){r.clearQueryParams(["loginChallenge"]),B("SOMETHING_WENT_WRONG_ERROR")}),i.useEffect(function(){if(!W&&!1===T.loading)if(T.doesSessionExist)if(void 0!==e.onSessionAlreadyExists)e.onSessionAlreadyExists();else if(!1===e.redirectOnSessionExists||S)V(!0);else{p.Session.getInstanceOrThrow().config.onHandleEvent({action:"SESSION_ALREADY_EXISTS"});var t=h.OAuth2Provider.getInstance();null!==k&&void 0!==t?(function(){return r.__awaiter(this,void 0,void 0,function(){var n;return r.__generator(this,function(o){switch(o.label){case 0:return[4,t.webJSRecipe.getRedirectURLToContinueOAuthFlow({loginChallenge:k,userContext:R})];case 1:return n=o.sent().frontendRedirectTo,[2,p.Session.getInstanceOrThrow().validateGlobalClaimsAndHandleSuccessRedirection({action:"SUCCESS_OAUTH2",frontendRedirectTo:n,createdNewUser:!1,isNewRecipeUser:!1,newSessionCreated:!1,tenantIdFromQueryParams:r.getTenantIdFromQueryParams(),recipeId:p.Session.RECIPE_ID},p.Session.RECIPE_ID,r.getRedirectToPathFromURL(),R,e.navigate)]}})})})().catch(x):p.Session.getInstanceOrThrow().validateGlobalClaimsAndHandleSuccessRedirection(void 0,p.Session.RECIPE_ID,r.getRedirectToPathFromURL(),R,e.navigate).catch(x)}else V(!0)},[T.loading]);var ei=i.useState(),ea=ei[0],es=ei[1],eu=void 0!==X&&(void 0===e.factors||e.factors.some(function(e){return!X.includes(e)})),ec=a.SuperTokens.getInstanceOrThrow(),el=ec.privacyPolicyLink,ed=ec.termsOfServiceLink;i.useEffect(function(){var t=new AbortController;if(er.current.buildReq!==et)return W&&(void 0!==P||!a.SuperTokens.usesDynamicLoginMethods)&&(function(e,t,n,o,i,s,u){var c,l,d,h,g;return r.__awaiter(this,void 0,void 0,function(){var m,b,y,w,_,I,k,S,T,R,x,C,A,P,O,E,D,M,F,L,U,H,N,j;return r.__generator(this,function(B){switch(B.label){case 0:if(m=a.SuperTokens.getInstanceOrThrow().recipeList.filter(function(e){return"firstFactorIds"in e}),b=null!=(d=null!=(c=null!=o?o:null==t?void 0:t.firstFactors)?c:null==(l=f.MultiFactorAuth.getInstance())?void 0:l.config.firstFactors)?d:m.reduce(function(e,t){return r.__spreadArray(r.__spreadArray([],e,!0),t.getFirstFactorsForAuthPage(),!0)},[]),void 0===o&&(null==t?void 0:t.firstFactors)===void 0&&(null==(h=f.MultiFactorAuth.getInstance())?void 0:h.config.firstFactors)===void 0&&(y=m.filter(function(t){return!e.some(function(e){return e.recipeInstance.recipeID===t.recipeID})})).length>0)throw Error("Factor list not set but PreBuiltUI not added for ".concat(y.map(function(e){return e.recipeID})));if(0===b.length)throw Error("There are no enabled factors to show");if(b.includes(p.FactorIds.THIRDPARTY)&&void 0!==(w=e.find(function(e){return e.recipeInstance.recipeID===p.FactorIds.THIRDPARTY}))&&0===w.recipeInstance.config.signInAndUpFeature.providers.length&&(!a.SuperTokens.usesDynamicLoginMethods||0===t.thirdparty.providers.length)&&0===(b=b.filter(function(e){return e!==p.FactorIds.THIRDPARTY})).length)throw Error("The only enabled first factor is thirdparty, but no providers were defined. Please define at least one provider.");for(I=(_=e.some(function(e){return e.requiresSignUpPage&&e.recipeInstance.firstFactorIds.some(function(e){return b.includes(e)})}))&&i,k=[],S=0,T=e;S<T.length;S++)R=T[S],k.push.apply(k,R.getAuthComponents());x=0,C=k,B.label=1;case 1:if(!(x<C.length))return[3,4];if("FULL_PAGE"!==(A=C[x]).type)return[3,3];
1return[4,A.preloadInfoAndRunChecks(b,n,I)];case 2:if(P=B.sent(),u.aborted)return[2];if(P.shouldDisplay)return s({authComponents:[],fullPageCompWithPreloadedInfo:{component:A.component,preloadInfo:P.preloadInfo},isSignUp:I,hasSeparateSignUpView:_,factorIds:b}),[2];B.label=3;case 3:return x++,[3,1];case 4:if(u.aborted)return[2];if((O=(O=k.filter(function(e){return"FULL_PAGE"!==e.type&&e.factorIds.every(function(e){return b.includes(e)})})).filter(function(e){return"SIGN_IN_UP"===e.type||(I?"SIGN_UP"===e.type:"SIGN_IN"===e.type)})).sort(function(e,t){return t.factorIds.length-e.factorIds.length}),void 0===(E=v.selectComponentsToCoverAllFirstFactors(O,b))){for(D=new Set,M=0,F=O;M<F.length;M++)for(L=F[M],U=0,H=L.factorIds;U<H.length;U++)N=H[U],D.add(N);throw j=void 0!==o?"local state or props":(null==t?void 0:t.firstFactors)!==void 0?"dynamic tenant configuration":(null==(g=f.MultiFactorAuth.getInstance())?void 0:g.config.firstFactors)!==void 0?"the config passed to the MFA recipe":"all recipes initialized",Error("Couldn't cover all first factors: ".concat(b.join(", ")," (from ").concat(j,"), available components: ").concat(Array.from(D).join(", "),".\n")+"You may have missed adding a recipe into the list of prebuiltUIs passed to list of prebuiltUIs passed to getSuperTokensRoutesForReactRouterDom, canHandleRoute, handleRoute functions or the AuthPage component.\nAnother common error is adding a non-existent factor id into the list, e.g.: passwordless instead of otp-email/phone")}return s({authComponents:E.sort(function(e,t){return e.displayOrder-t.displayOrder}).map(function(e){return e.component}),factorIds:b,hasSeparateSignUpView:_,isSignUp:I}),[2]}})})})(e.preBuiltUIList,P,R,X,K,es,t.signal).then(function(){er.current.buildReq=et},x),function(){t.abort()}},[W,et,en,e.preBuiltUIList,P,R,X,K,es,x]);var ef=i.useCallback(function(t){return r.__awaiter(void 0,void 0,void 0,function(){var n,o;return r.__generator(this,function(i){switch(i.label){case 0:if(n=h.OAuth2Provider.getInstance(),null===k||void 0===n)return[2,p.Session.getInstanceOrThrow().validateGlobalClaimsAndHandleSuccessRedirection(r.__assign(r.__assign({},t),{action:"SUCCESS",tenantIdFromQueryParams:r.getTenantIdFromQueryParams(),redirectToPath:r.getRedirectToPathFromURL()}),t.recipeId,r.getRedirectToPathFromURL(),R,e.navigate)];return[4,n.webJSRecipe.getRedirectURLToContinueOAuthFlow({loginChallenge:k,userContext:R})];case 1:return o=i.sent().frontendRedirectTo,[2,p.Session.getInstanceOrThrow().validateGlobalClaimsAndHandleSuccessRedirection(r.__assign(r.__assign({},t),{action:"SUCCESS_OAUTH2",tenantIdFromQueryParams:r.getTenantIdFromQueryParams(),frontendRedirectTo:o}),t.recipeId,r.getRedirectToPathFromURL(),R,e.navigate)]}})})},[k]),ep=void 0!==ea&&(null===k||void 0!==F||void 0===h.OAuth2Provider.getInstance())?r.__assign(r.__assign({},ea),{oauth2ClientInfo:F,onAuthSuccess:ef,error:j,onError:function(e){B(e)},clearError:function(){return B(void 0)},navigate:e.navigate,onSignInUpSwitcherClick:eo,privacyPolicyLink:el,rebuildAuthPage:function(){return en(function(e){return e+1})},setFactorList:function(e){J(e),en(function(e){return e+1})},resetFactorList:function(){J(e.factors),en(function(e){return e+1})},showBackButton:eu,termsOfServiceLink:ed,userContext:R}):void 0,eh=i.useMemo(function(){var t=a.defaultTranslationsCommon;if(void 0!==ea)for(var n=0,o=e.preBuiltUIList;n<o.length;n++){var i=o[n];t=r.mergeObjects(t,i.languageTranslations)}return r.mergeObjects(t,q.languageTranslations.userTranslationStore)},[q.languageTranslations.userTranslationStore,ea]);return void 0===ep?o.jsx(A,{}):o.jsx(O,r.__assign({value:P},{children:o.jsx(u.TranslationContextProvider,r.__assign({defaultLanguage:q.languageTranslations.defaultLanguage,defaultStore:eh,translationControlEventSource:q.languageTranslations.translationEventSource,userTranslationFunc:q.languageTranslations.userTranslationFunc},{children:o.jsx(L,r.__assign({useShadowDom:q.useShadowDom},{children:o.jsxs(i.Fragment,{children:[void 0===e.children&&o.jsx(Z,r.__assign({},ep)),e.children&&y.default.Children.map(e.children,function(e){return y.default.isValidElement(e)?y.default.cloneElement(e,ep):e})]})}))}))}))},er=[{rid:"thirdpartyemailpassword",includes:["thirdparty","emailpassword"],factorsProvided:[p.FactorIds.THIRDPARTY,p.FactorIds.EMAILPASSWORD]},{rid:"thirdpartypasswordless",includes:["thirdparty","passwordless"],factorsProvided:[p.FactorIds.THIRDPARTY,p.FactorIds.OTP_PHONE,p.FactorIds.OTP_EMAIL,p.FactorIds.LINK_PHONE,p.FactorIds.LINK_EMAIL]},{rid:"emailpassword",includes:["emailpassword"],factorsProvided:[p.FactorIds.EMAILPASSWORD]},{rid:"passwordless",includes:["passwordless"],factorsProvided:[p.FactorIds.OTP_PHONE,p.FactorIds.OTP_EMAIL,p.FactorIds.LINK_PHONE,p.FactorIds.LINK_EMAIL]},{rid:"thirdparty",includes:["thirdparty"],factorsProvided:[p.FactorIds.THIRDPARTY]}];function eo(e,t){for(var n,o,i=function(i,a){if(e.every(function(e){return a.includes(e)})){var s=t.find(function(e){return e.recipeID===i});if(s&&(n=i,o=s,e.length===a.length))return r.logDebugMessage("Rendering ".concat(i," because it matches factors: ").concat(e," exactly")),{value:s}}},a=0;a<er.length;a++){var s=er[a],u=s.rid,c=i(u,s.factorsProvided);if("object"==typeof c)return c.value}if(void 0!==o)return r.logDebugMessage("Rendering ".concat(n," to cover ").concat(e," as a fallback")),o;var l=[];e.includes(p.FactorIds.EMAILPASSWORD)&&l.push("emailpassword"),e.includes(p.FactorIds.THIRDPARTY)&&l.push("thirdparty"),[p.FactorIds.OTP_PHONE,p.FactorIds.OTP_EMAIL,p.FactorIds.LINK_PHONE,p.FactorIds.LINK_EMAIL].some(function(t){return e.includes(t)})&&l.push("passwordless"),r.logDebugMessage("Choosing component using fallback logic w/ ".concat(l.join(", ")," enabled"));for(var d=l.length,f=function(e,n){if(d===n.length&&n.every(function(e){return l.includes(e)})){var r=t.find(function(t){return t.recipeID===e});if(r)return{value:r}}},h=0;h<er.length;h++){var g=er[h],u=g.rid,v=g.includes,m=f(u,v);if("object"==typeof m)return m.value}for(var b=function(e,n){if(n.some(function(e){return l.includes(e)})){var r=t.find(function(t){return t.recipeID===e});if(r)return{value:r}}},y=0;y<er.length;y++){var w=er[y],u=w.rid,v=w.includes,_=b(u,v);if("object"==typeof _)return _.value}throw Error("No enabled recipes overlap with the requested firstFactors: "+e)}var ei=function(){function e(){var e=this;this.getPathsToFeatureComponentWithRecipeIdMap=function(){if(void 0!==e.pathsToFeatureComponentWithRecipeIdMap)return e.pathsToFeatureComponentWithRecipeIdMap;for(var t={},n=e.getFeatures(),r=Object.keys(n),o=0;o<r.length;o++){var i=r[o];void 0===t[i]&&(t[i]=[]),t[i].push(n[i])}return e.pathsToFeatureComponentWithRecipeIdMap=t,e.pathsToFeatureComponentWithRecipeIdMap},this.requiresSignUpPage=!1}return e.getMatchingComponentForRouteAndRecipeIdFromPreBuiltUIList=function(e,t,n,r){var o,i=e.getAsStringDangerous(),s=i===a.SuperTokens.getInstanceOrThrow().appInfo.websiteBasePath.getAsStringDangerous(),u=t.reduce(function(e,t){for(var n=t.getPathsToFeatureComponentWithRecipeIdMap(),r=function(t,n){(t===i||RegExp("^"+t.replace(/:\w+/g,"[^/]+").replace(/\/\*/g,"/[^/]+")+"$").test(i))&&(e=e.concat(n.map(function(e){return{comp:e,route:t}})))},o=0,a=Object.entries(n);o<a.length;o++){var s=a[o];r(s[0],s[1])}return e},[]),c=u.find(function(e){return e.comp.matches()});o=0===u.length?void 0:void 0!==c?c.comp:u[0].comp;var l=u.find(function(e){return!er.map(function(e){return e.rid}).includes(e.comp.recipeID)||e.route!==a.SuperTokens.getInstanceOrThrow().appInfo.websiteBasePath.getAsStringDangerous()});if(l)return l.comp;if(n)return o;var d=f.MultiFactorAuth.getInstance();if(!1===a.SuperTokens.usesDynamicLoginMethods)return c?c.comp:s&&d&&void 0!==d.config.firstFactors?eo(d.config.firstFactors,u.map(function(e){return e.comp})):o;if(void 0===r)throw Error("Should never come here: dynamic login methods info has not been loaded but recipeRouter rendered");return c&&(!er.map(function(e){return e.rid}).includes(c.comp.recipeID)||er.some(function(e){return e.rid===c.comp.recipeID&&e.factorsProvided.some(function(e){return r.firstFactors.includes(e)})}))?c.comp:s?eo(r.firstFactors,u.map(function(e){return e.comp})):void 0},e}();function ea(e){var t,n,s=D(),u=r.useRethrowInRender(),c=i.useState(void 0),l=c[0],d=c[1],f=null==(t=e.getReactRouterDomWithCustomHistory())?void 0:t.useHistoryCustom(),p=e.path,h=p===a.SuperTokens.getInstanceOrThrow().appInfo.websiteBasePath.getAsStringDangerous(),g=a.SuperTokens.getInstanceOrThrow().pluginRouteHandlers,v=null==(n=e.getReactRouterDomWithCustomHistory())?void 0:n.useLocation(),m=y.default.useMemo(function(){if(!h){var t=new w.default(p),n=g.find(function(e){return e.path===p});if(n)return{component:n.handler,recipeId:void 0};if(void 0!==l||!1===a.SuperTokens.usesDynamicLoginMethods){var r=ei.getMatchingComponentForRouteAndRecipeIdFromPreBuiltUIList(t,e.preBuiltUIList,!1,l);return void 0===r&&!0===a.SuperTokens.usesDynamicLoginMethods&&eI({navigate:f,redirectBack:!1}),r}}},[p,v,l,e.preBuiltUIList]);return(i.useEffect(function(){l||a.Multitenancy.getInstanceOrThrow().getCurrentDynamicLoginMethods({userContext:s}).then(function(e){return d(e)},function(e){return u(e)})},[l,d]),h)?o.jsx(et,{preBuiltUIList:e.preBuiltUIList,navigate:f,useSignUpStateFromQueryString:!0}):a.SuperTokens.usesDynamicLoginMethods&&void 0===l?o.jsx(A,{}):void 0===m||void 0===l&&a.SuperTokens.usesDynamicLoginMethods?null:o.jsx(m.component,{navigate:f})}function es(e,t){var n=t;if(void 0!==e)if(n.startsWith(e))(n=n.slice(e.length)).startsWith("/")||(n="/"+n);else throw Error("basePath has to be a prefix of websiteBasePath passed to SuperTokens.init");return n}function eu(e,t){if(void 0!==e)if(t.startsWith(e))(t=t.slice(e.length)).startsWith("/")||(t="/"+t);else throw Error("basePath has to be a prefix of websiteBasePath passed to SuperTokens.init");return t}var ec=function(){function e(){}return e.getSuperTokensRoutesForReactRouterDom=function(t,n,i){if(void 0===n&&(n=[]),void 0===t||0===n.length)throw Error('Please use getSuperTokensRoutesForReactRouterDom like getSuperTokensRoutesForReactRouterDom(require("react-router-dom"), [EmailPasswordPreBuiltUI]) in your render function');var s=n.map(function(e){return e.getInstanceOrInitAndGetInstance()});return(void 0===e.reactRouterDomIsV6&&(e.reactRouterDomIsV6=void 0===t.withRouter),e.reactRouterDomIsV6)?(void 0===e.reactRouterDom&&(e.reactRouterDom={router:t,useHistoryCustom:function(){var e=t.useNavigate(),n=y.default.useState(void 0),r=n[0],o=n[1];return y.default.useEffect(function(){void 0!==r&&(o(void 0),e(r))},[r,e,o]),o},useLocation:t.useLocation}),function(e){var t=e.getReactRouterDomWithCustomHistory,n=e.recipeList,r=e.basePath,i=t();if(void 0===i)return[];for(var s=i.router.Route,u=Object.values(n.reduce(function(e,i){return Object.keys(i.getPathsToFeatureComponentWithRecipeIdMap()).forEac
1h(function(i){var a=eu(r,i=""===i?"/":i);i in e||(e[i]=o.jsx(s,{path:a,element:o.jsx(ea,{getReactRouterDomWithCustomHistory:t,preBuiltUIList:n,path:i})},"st-".concat(i)))}),e},{})),c=a.SuperTokens.getInstanceOrThrow().pluginRouteHandlers,l=0;l<c.length;l++){var d=c[l].path;u.push(o.jsx(s,{path:d,element:o.jsx(ea,{getReactRouterDomWithCustomHistory:t,preBuiltUIList:n,path:d})},"st-plugin-".concat(d)))}if(!a.SuperTokens.getInstanceOrThrow().disableAuthRoute&&n.some(function(e){return 0!==e.getAuthComponents().length})){var d=a.SuperTokens.getInstanceOrThrow().appInfo.websiteBasePath.appendPath(new _.default("/")).getAsStringDangerous();u.push(o.jsx(s,{path:eu(r,d),element:o.jsx(ea,{getReactRouterDomWithCustomHistory:t,preBuiltUIList:n,path:d})},"st-/auth"))}return u}({getReactRouterDomWithCustomHistory:e.getReactRouterDomWithCustomHistory,recipeList:s,basePath:i})):(void 0===e.reactRouterDom&&(e.reactRouterDom={router:t,useHistoryCustom:t.useHistory,useLocation:t.useLocation}),function(e){var t=e.getReactRouterDomWithCustomHistory,n=e.recipeList,i=e.basePath,s=t();if(void 0===s)return[];for(var u=s.router.Route,c=Object.values(n.reduce(function(e,a){return Object.keys(a.getPathsToFeatureComponentWithRecipeIdMap()).forEach(function(a){var s=es(i,a=""===a?"/":a);a in e||(e[a]=o.jsx(u,r.__assign({exact:!0,path:s},{children:o.jsx(ea,{getReactRouterDomWithCustomHistory:t,preBuiltUIList:n,path:a})}),"st-".concat(a)))}),e},{})),l=a.SuperTokens.getInstanceOrThrow().pluginRouteHandlers,d=0;d<l.length;d++){var f=l[d].path;c.push(o.jsx(u,r.__assign({exact:!0,path:f},{children:o.jsx(ea,{getReactRouterDomWithCustomHistory:t,preBuiltUIList:n,path:f})}),"st-plugin-".concat(f)))}if(!a.SuperTokens.getInstanceOrThrow().disableAuthRoute&&n.some(function(e){return 0!==e.getAuthComponents().length})){var f=a.SuperTokens.getInstanceOrThrow().appInfo.websiteBasePath.appendPath(new _.default("/")).getAsStringDangerous();c.push(o.jsx(u,r.__assign({exact:!0,path:es(i,f)},{children:o.jsx(ea,{getReactRouterDomWithCustomHistory:t,preBuiltUIList:n,path:f})}),"st-/auth"))}return c}({getReactRouterDomWithCustomHistory:e.getReactRouterDomWithCustomHistory,recipeList:s,basePath:i}))},e.canHandleRoute=function(e){var t=e.map(function(e){return e.getInstanceOrInitAndGetInstance()});return r.getCurrentNormalisedUrlPath().getAsStringDangerous()===a.SuperTokens.getInstanceOrThrow().appInfo.websiteBasePath.getAsStringDangerous()?!a.SuperTokens.getInstanceOrThrow().disableAuthRoute:void 0!==ei.getMatchingComponentForRouteAndRecipeIdFromPreBuiltUIList(r.getCurrentNormalisedUrlPath(),t,!0)},e.getRoutingComponent=function(t){var n=t.map(function(e){return e.getInstanceOrInitAndGetInstance()});return o.jsx(ea,{getReactRouterDomWithCustomHistory:e.getReactRouterDomWithCustomHistory,path:r.getCurrentNormalisedUrlPath().getAsStringDangerous(),preBuiltUIList:n})},e.languageTranslations=a.defaultTranslationsCommon,e.getReactRouterDomWithCustomHistory=function(){return e.reactRouterDom},e.AuthPage=function(e){return o.jsx(et,r.__assign({},e,{preBuiltUIList:e.preBuiltUIList.map(function(e){return e.getInstanceOrInitAndGetInstance()})}))},e.AuthPageTheme=$,e.AuthPageFooter=J,e.AuthPageHeader=Y,e.AuthPageComponentList=X,e.AuthRecipeComponentsOverrideContextProvider=G,e}(),el=ec.languageTranslations,ed=ec.getSuperTokensRoutesForReactRouterDom,ef=ec.canHandleRoute,ep=ec.getRoutingComponent,eh=ec.AuthPage,eg=function(e){var t,n,s=e.children,u=r.__rest(e,["children"]),c=i.useRef(u.requireAuth);if(u.requireAuth!==c.current)throw Error('requireAuth prop should not change. If you are seeing this, it probably means that you are using SessionAuth in multiple routes with different values for requireAuth. To solve this, try adding the "key" prop to all uses of SessionAuth like <SessionAuth key="someUniqueKeyPerRoute" requireAuth={...}>');var l=i.useState({loading:!0}),d=l[0],f=l[1],h=i.useCallback(function(e){f(function(t){return JSON.stringify(t)!==JSON.stringify(e)?e:t})},[f]),g=i.useRef(),v=i.useRef(null==(t=ec.getReactRouterDomWithCustomHistory())?void 0:t.useHistoryCustom);try{v.current&&(n=v.current())}catch(e){}var m=D(),b=r.useRethrowInRender(),y=i.useCallback(function(){a.SuperTokens.getInstanceOrThrow().redirectToAuth({navigate:n,userContext:m,redirectBack:!0})},[]),w=i.useCallback(function(){return r.__awaiter(void 0,void 0,void 0,function(){var e,t,n,o;return r.__generator(this,function(r){switch(r.label){case 0:return void 0===g.current&&(g.current=p.Session.getInstanceOrThrow()),[4,g.current.doesSessionExist({userContext:m})];case 1:if(!1===r.sent())return[2,{loading:!1,doesSessionExist:!1,accessTokenPayload:{},invalidClaims:[],userId:""}];r.label=2;case 2:return r.trys.push([2,4,,6]),[4,g.current.validateClaims({overrideGlobalClaimValidators:u.overrideGlobalClaimValidators,userContext:m})];case 3:return e=r.sent(),[3,6];case 4:return t=r.sent(),[4,g.current.doesSessionExist({userContext:m})];case 5:if(r.sent())throw t;return[2,{loading:!1,doesSessionExist:!1,accessTokenPayload:{},invalidClaims:[],userId:""}];case 6:return r.trys.push([6,9,,11]),o={loading:!1,doesSessionExist:!0,invalidClaims:e},[4,g.current.getAccessTokenPayloadSecurely({userContext:m})];case 7:return o.accessTokenPayload=r.sent(),[4,g.current.getUserId({userContext:m})];case 8:return[2,(o.userId=r.sent(),o)];case 9:return n=r.sent(),[4,g.current.doesSessionExist({userContext:m})];case 10:if(r.sent())throw n;return[2,{loading:!1,doesSessionExist:!1,accessTokenPayload:{},invalidClaims:[],userId:""}];case 11:return[2]}})})},[]),_=i.useCallback(function(e){return r.__awaiter(void 0,void 0,void 0,function(){var t,o;return r.__generator(this,function(i){switch(i.label){case 0:if(!1===d.loading)return[2];if(!1===u.doRedirection)return[3,8];if(!e.doesSessionExist&&!1!==u.requireAuth)return y(),[2];if(0===e.invalidClaims.length)return[3,8];t=void 0,i.label=1;case 1:return i.trys.push([1,6,,7]),[4,p.getFailureRedirectionInfo({invalidClaims:e.invalidClaims,overrideGlobalClaimValidators:u.overrideGlobalClaimValidators,userContext:m})];case 2:if(void 0===(t=i.sent()).redirectPath)return[3,5];if(!p.validateAndCompareOnFailureRedirectionURLToCurrent(t.redirectPath))return[3,3];return h(e),[2];case 3:return[4,a.SuperTokens.getInstanceOrThrow().redirectToUrl(t.redirectPath,n)];case 4:return[2,i.sent()];case 5:return[3,7];case 6:throw b(o=i.sent()),o;case 7:if(void 0!==u.accessDeniedScreen&&void 0!==t.failedClaim)return console.warn({message:"Showing access denied
1screen because a claim validator failed",claimValidationError:t.failedClaim}),[2,h(r.__assign(r.__assign({},e),{accessDeniedValidatorError:t.failedClaim}))];i.label=8;case 8:return h(e),[2]}})})},[d.loading,u.doRedirection,u.requireAuth,u.overrideGlobalClaimValidators,u.accessDeniedScreen,y,m,n]);return(r.useOnMountAPICall(w,_),i.useEffect(function(){if(void 0===g.current&&(g.current=p.Session.getInstanceOrThrow()),!1===d.loading)return g.current.addEventListener(function(e){return r.__awaiter(this,void 0,void 0,function(){var t,o,i;return r.__generator(this,function(s){switch(s.label){case 0:switch(e.action){case"SESSION_CREATED":case"REFRESH_SESSION":case"ACCESS_TOKEN_PAYLOAD_UPDATED":case"API_INVALID_CLAIM":return[3,1];case"SIGN_OUT":return[3,11];case"UNAUTHORISED":return[3,12]}return[3,13];case 1:return[4,g.current.validateClaims({overrideGlobalClaimValidators:u.overrideGlobalClaimValidators,userContext:m})];case 2:if(t=s.sent(),!1===u.doRedirection)return[3,10];o=void 0,s.label=3;case 3:return s.trys.push([3,8,,9]),[4,p.getFailureRedirectionInfo({invalidClaims:t,overrideGlobalClaimValidators:u.overrideGlobalClaimValidators,userContext:m})];case 4:if(!(o=s.sent()).redirectPath)return[3,7];if(!p.validateAndCompareOnFailureRedirectionURLToCurrent(o.redirectPath))return[3,5];return h(r.__assign(r.__assign({},e.sessionContext),{loading:!1,invalidClaims:t})),[3,7];case 5:return[4,a.SuperTokens.getInstanceOrThrow().redirectToUrl(o.redirectPath,n)];case 6:return[2,s.sent()];case 7:return[3,9];case 8:throw b(i=s.sent()),i;case 9:if(void 0!==u.accessDeniedScreen&&void 0!==o.failedClaim)return console.warn({message:"Showing access denied screen because a claim validator failed",claimValidationError:o.failedClaim}),[2,h(r.__assign(r.__assign({},e.sessionContext),{loading:!1,invalidClaims:t,accessDeniedValidatorError:o.failedClaim}))];s.label=10;case 10:return h(r.__assign(r.__assign({},e.sessionContext),{loading:!1,invalidClaims:t})),[2];case 11:return h(r.__assign(r.__assign({},e.sessionContext),{loading:!1,invalidClaims:[]})),[2];case 12:return h(r.__assign(r.__assign({},e.sessionContext),{loading:!1,invalidClaims:[]})),void 0!==u.onSessionExpired?u.onSessionExpired():!1!==u.requireAuth&&!1!==u.doRedirection&&y(),[2];case 13:return[2]}})})})},[u,h,d.loading,m,n,y]),!1!==u.requireAuth&&(d.loading||!d.doesSessionExist))?null:!d.loading&&d.accessDeniedValidatorError&&u.accessDeniedScreen?o.jsx(u.accessDeniedScreen,{userContext:m,navigate:n,validationError:d.accessDeniedValidatorError}):o.jsx(H.Provider,r.__assign({value:d},{children:s}))},ev=function(e){return o.jsx(V,r.__assign({userContext:e.userContext},{children:o.jsx(eg,r.__assign({},e))}))},em=function(e){return o.jsx(ev,r.__assign({},e,{requireAuth:!1,doRedirection:!1}))},eb=function(){function e(){}return e.init=function(e){a.SuperTokens.init(e)},e.changeLanguage=function(e){return a.SuperTokens.getInstanceOrThrow().changeLanguage(e)},e.loadTranslation=function(e){return a.SuperTokens.getInstanceOrThrow().loadTranslation(e)},e.isRecipeInitialized=function(e){return a.SuperTokens.getInstanceOrThrow().recipeList.map(function(e){return e.recipeID}).includes(e)},e.SuperTokensWrapper=em,e.redirectToAuth=function(t){return r.__awaiter(void 0,void 0,void 0,function(){var n;return r.__generator(e,function(e){return[2,a.SuperTokens.getInstanceOrThrow().redirectToAuth(r.__assign(r.__assign({},t),{redirectBack:null==(n=null==t?void 0:t.redirectBack)||n,userContext:r.getNormalisedUserContext(null==t?void 0:t.userContext)}))]})})},e.useTranslation=u.useTranslation,e.getTranslationFunction=a.getTranslationFunction,e.useUserContext=D,e}(),ey=eb.init,ew=eb.changeLanguage,e_=eb.loadTranslation,eI=eb.redirectToAuth,ek=eb.isRecipeInitialized;n.AuthPage=eh,n.AuthPageComponentList=X,n.AuthPageFooter=J,n.AuthPageHeader=Y,n.AuthPageTheme=$,n.BackButton=K,n.ComponentOverrideContext=I,n.DynamicLoginMethodsSpinner=A,n.FeatureWrapper=function(e){var t=e.children,n=e.useShadowDom,s=e.defaultStore,c=D(),l=r.useRethrowInRender(),d=i.useState(void 0),f=d[0],p=d[1],h=a.SuperTokens.getInstanceOrThrow();return(i.useEffect(function(){f||a.Multitenancy.getInstanceOrThrow().getCurrentDynamicLoginMethods({userContext:c}).then(function(e){return p(e)},function(e){return l(e)})},[f,p]),a.SuperTokens.usesDynamicLoginMethods&&!f)?o.jsx(A,{}):o.jsx(O,r.__assign({value:f},{children:o.jsx(u.TranslationContextProvider,r.__assign({defaultLanguage:h.languageTranslations.defaultLanguage,defaultStore:r.mergeObjects(s,h.languageTranslations.userTranslationStore),translationControlEventSource:h.languageTranslations.translationEventSource,userTranslationFunc:h.languageTranslations.userTranslationFunc},{children:o.jsx(L,r.__assign({useShadowDom:n},{children:t}))}))}))},n.GeneralError=q,n.Provider=G,n.RecipeRouter=ei,n.SessionAuthWrapper=ev,n.SessionContext=H,n.SpinnerIcon=k,n.SuperTokensAPIWrapper=eb,n.SuperTokensBranding=W,n.SuperTokensWrapper=em,n.UI=ec,n.UserContextContext=E,n.UserContextWrapper=V,n.canHandleRoute=ef,n.changeLanguage=ew,n.getRoutingComponent=ep,n.getSuperTokensRoutesForReactRouterDom=ed,n.init=ey,n.isRecipeInitialized=ek,n.languageTranslations=el,n.loadTranslation=e_,n.redirectToAuth=eI,n.useDynamicLoginMethods=function(){var e=y.default.useContext(P);if(void 0===e)throw Error("useDynamicLoginMethods used outside of a valid provider (FeatureWrapper)");return e},n.useSessionContext=N,n.useUserContext=D,n.withOverride=T},64138,(e,t,n)=>{"use strict";var r=e.r(34712),o=e.r(264858),i=e.r(224616),a=e.r(624468),s=e.r(30176),u=e.r(475234),c=e.r(507718),l=o&&o.__esModule?o:{default:o},d=function(e){var t=e.invalidClaims,n=e.overrideGlobalClaimValidators,o=e.userContext;return r.__awaiter(void 0,void 0,void 0,function(){var e,i,a,s,c,l,d;return r.__generator(this,function(f){switch(f.label){case 0:e=u.getGlobalClaimValidators({overrideGlobalClaimValidators:n,userContext:o}),i=void 0,a=function(e){var n,a,s;return r.__generator(this,function(r){switch(r.label){case 0:if(void 0===(n=t.find(function(t){return t.id===e.id}))||!(a=e.onFailureRedirection))return[3,2];return[4,a({reason:n.reason,userContext:o})];case 1:if(void 0!==(s=r.sent()))return[2,{value:{redirectPath:s,failedClaim:n}}];r.label=2;case 2:return!1!==e.showAccessDeniedOnFailure&&void 0===i&&(i=n),[2]}})},s=0,c=e,f.label=1;case 1:if(!(s<c.length))return[3,4];return l=c[s],[5,a(l)];case 2:if("object"==typeof(d=f.sent()))return[2,d.value];f.label=3;case 3:return s++,[3,1];case 4:return[2,{redirectPath:void 0,failedClaim:i}]}})})};function f(e){var t,n=c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getHref();try{new URL(e),t=e}catch(n){if(!e.startsWith("/"))throw Error("onFailureRedirectionURL returned a relative url: ".concat(e));var r=i.SuperTokens.getInstanceOrThrow().appInfo;t="".concat(r.websiteDomain.getAsStringDangerous()).concat(e)}return n===t}var p=function(e){function t(n,o){void 0===o&&(o=l.default);var s=e.call(this,n)||this;return s.webJSRecipe=o,s.recipeID=t.RECIPE_ID,s.eventListeners=new Set,s.getUserId=function(e){return s.webJSRecipe.getUserId(e)},s.getAccessToken=function(e){return s.webJSRecipe.getAccessToken(e)},s.getClaimValue=function(e){return s.webJSRecipe.getClaimValue(e)},s.getAccessTokenPayloadSecurely=function(e){return r.__awaiter(s,void 0,void 0,function(){return r.__generator(this,function(t){return[2,this.webJSRecipe.getAccessTokenPayloadSecurely(e)]})})},s.doesSessionExist=function(e){return s.webJSRecipe.doesSessionExist(e)},s.signOut=function(e){return s.webJSRecipe.signOut(e)},s.attemptRefreshingSession=function(){return r.__awaiter(s,void 0,void 0,function(){return r.__generator(this,function(e){return[2,this.webJSRecipe.attemptRefreshingSession()]})})},s.validateClaims=function(e){return s.webJSRecipe.validateClaims(e)},s.getInvalidClaimsFromResponse=function(e){return s.webJSRecipe.getInvalidClaimsFromResponse(e)},s.addEventListener=function(e){return s.eventListeners.add(e),function(){return s.eventListeners.delete(e)}},s.validateGlobalClaimsAndHandleSuccessRedirection=function(e,t,n,o,u){return r.__awaiter(s,void 0,void 0,function(){var s,c,l,p,h;return r.__generator(this,function(g){switch(g.label){case 0:return o=r.getNormalisedUserContext(o),[4,this.doesSessionExist({userContext:o})];case 1:if(!g.sent())return[2,i.SuperTokens.getInstanceOrThrow().redirectToAuth({navigate:u,redirectBack:!1,userContext:o})];return[4,this.validateClaims({userContext:o})];case 2:if(!((s=g.sent()).length>0))return[3,6];if(void 0===e)return[3,4];return c=JSON.stringify({successRedirectContext:e,redirectToPath:n}),[4,r.setLocalStorage("supertokens-success-redirection-context",c)];case 3:g.sent(),g.label=4;case 4:return[4,d({invalidClaims:s,userContext:o})];case 5:if(void 0!==(l=g.sent()).redirectPath){if(f(l.redirectPath))throw Error("onFailureRedirectionURL returned the current URL (".concat(l.redirectPath,") during success redirection. This indicates that the user is in a stuck state."));return[2,i.SuperTokens.getInstanceOrThrow().redirectToUrl(l.redirectPath,u)]}g.label=6;case 6:if(void 0!==e)return[3,13];return[4,r.getLocalStorage("supertokens-success-redirection-context")];case 7:if(null===(p=g.sent()))return[3,12];g.label=8;case 8:return g.trys.push([8,,9,11]),e=(h=JSON.parse(p)).successRedirectContext,void 0===n&&(n=h.redirectToPath),[3,11];case 9:return[4,r.removeFromLocalStorage("supertokens-success-redirection-context")];case 10:return g.sent(),[7];case 11:return[3,13];case 12:e={recipeId:t,action:"SUCCESS",createdNewUser:!1,isNewRecipeUser:!1,newSessionCreated:!1,tenantIdFromQueryParams:r.getTenantIdFromQueryParams()},g.label=13;case 13:if(void 0===e)throw Error("This should never happen: successRedirectContext undefined ");if("SUCCESS_OAUTH2"===e.action)return[2,a.OAuth2Provider.getInstanceOrThrow().redirect(e,u,{},o)];return"SUCCESS"===e.action&&void 0!==n&&(e.redirectToPath=n),[2,i.SuperTokens.getInstanceOrThrow().redirect(e,u,{},o)]}})})},s.getDefaultRedirectionURL=function(){return r.__awaiter(s,void 0,void 0,function(){return r.__generator(this,function(e){return[2,"/"]})})},s.notifyListeners=function(e){return r.__awaiter(s,void 0,void 0,function(){var t;return r.__generator(this,function(n){switch(n.label){case 0:return[4,this.get
1SessionContext(e)];case 1:return t=n.sent(),Array.from(this.eventListeners).forEach(function(n){return n(r.__assign({sessionContext:t},e))}),[2]}})})},s}return r.__extends(t,e),t.prototype.getSessionContext=function(e){var t=e.action,n=e.userContext;return r.__awaiter(this,void 0,void 0,function(){var e,o;return r.__generator(this,function(r){switch(r.label){case 0:if("SESSION_CREATED"!==t&&"REFRESH_SESSION"!==t&&"API_INVALID_CLAIM"!==t&&"ACCESS_TOKEN_PAYLOAD_UPDATED"!==t)return[3,2];return[4,Promise.all([this.getUserId({userContext:n}),this.getAccessTokenPayloadSecurely({userContext:n})])];case 1:return o=(e=r.sent())[0],[2,{doesSessionExist:!0,accessTokenPayload:e[1],userId:o}];case 2:if("SIGN_OUT"===t||"UNAUTHORISED"===t)return[2,{doesSessionExist:!1,accessTokenPayload:{},userId:""}];throw Error("Unhandled recipe event: ".concat(t))}})})},t.addAxiosInterceptors=function(e,t){return l.default.addAxiosInterceptors(e,t)},t.init=function(e){var n,o,a,s,u,c,d=this,f=(void 0===(n=e)&&(n={}),u=null!=(a=null==(o=n.accessDeniedScreen)?void 0:o.style)?a:"",c=r.__assign({functions:function(e){return e}},n.override),r.__assign(r.__assign({},i.normaliseRecipeModuleConfig(n)),{invalidClaimStatusCode:null!=(s=n.invalidClaimStatusCode)?s:403,accessDeniedScreen:{style:u},override:c}));return{recipeID:t.RECIPE_ID,authReact:function(e){return t.instance=new t(r.__assign(r.__assign({},f),{appInfo:e,recipeId:t.RECIPE_ID})),t.instance},webJS:l.default.init(r.__assign(r.__assign({},f),{onHandleEvent:function(e){void 0!==f.onHandleEvent&&f.onHandleEvent(e),t.getInstanceOrThrow().notifyListeners(e)},preAPIHook:function(e){return r.__awaiter(d,void 0,void 0,function(){var n;return r.__generator(this,function(o){return(n=r.__assign(r.__assign({},e),{requestInit:r.__assign(r.__assign({},e.requestInit),{headers:r.__assign(r.__assign({},e.requestInit.headers),{rid:t.RECIPE_ID})})}),void 0===f.preAPIHook)?[2,n]:[2,f.preAPIHook(e)]})})}}))}},t.getInstanceOrThrow=function(){if(void 0===t.instance)throw Error("No instance of Session found. Make sure to call the Session.init method. See https://supertokens.io/docs/emailpassword/quick-setup/frontend");return t.instance},t.getInstance=function(){return t.instance},t.reset=function(){r.isTest()&&(t.instance=void 0)},t.RECIPE_ID="session",t}(s.RecipeModule);n.FactorIds={EMAILPASSWORD:"emailpassword",OTP_EMAIL:"otp-email",OTP_PHONE:"otp-phone",LINK_EMAIL:"link-email",LINK_PHONE:"link-phone",THIRDPARTY:"thirdparty",TOTP:"totp",WEBAUTHN:"webauthn"},n.Session=p,n.getFailureRedirectionInfo=d,n.validateAndCompareOnFailureRedirectionURLToCurrent=f},244067,(e,t,n)=>{"use strict";var r=e.r(34712),o=e.r(686601),i=e.r(475234),a=e.r(717928),s=e.r(820942),u=e.r(507718),c=e.r(224616),l=e.r(30176),d=e.r(64138),f=o&&o.__esModule?o:{default:o},p="/mfa",h="st-mfa-info-cache",g=void 0,v=function(e,t,n){var i=this;this.webJSClaim=new o.MultiFactorAuthClaimClass(function(){return e().webJSRecipe}),this.refresh=this.webJSClaim.refresh,this.getLastFetchedTime=this.webJSClaim.getLastFetchedTime,this.getValueFromPayload=this.webJSClaim.getValueFromPayload,this.id=this.webJSClaim.id;var a=function(n){var o=n.reason,a=n.userContext;return r.__awaiter(i,void 0,void 0,function(){var n,i,s,u;return r.__generator(this,function(c){switch(c.label){case 0:if(n=e(),void 0===(i=o.oneOf||o.allOfInAnyOrder||(void 0!==o.factorId?[o.factorId]:void 0)))return[3,1];if(r.logDebugMessage("Redirecting to MFA on next array from validation failure: "+i.join(", ")),1===(s=n.getSecondaryFactors(a).filter(function(e){return i.factors.next.includes(e.id)}).map(function(e){return e.id})).length)return[2,t({action:"GO_TO_FACTOR",factorId:s[0]},a)];return[2,t({action:"FACTOR_CHOOSER",nextFactorOptions:i},a)];case 1:return[4,n.webJSRecipe.resyncSessionAndFetchMFAInfo({userContext:a})];case 2:if(u=c.sent(),s=n.getSecondaryFactors(a).filter(function(e){return u.factors.next.includes(e.id)}).map(function(e){return e.id}),r.logDebugMessage("Redirecting to MFA on next array from backend: "+s.join(", ")),1===s.length)return[2,t({action:"GO_TO_FACTOR",factorId:s[0]},a)];return[2,t({action:"FACTOR_CHOOSER"},a)];case 3:return[2,void 0]}})})};this.validators=r.__assign(r.__assign({},this.webJSClaim.validators),{hasCompletedMFARequirementsForAuth:function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var o=i.webJSClaim.validators.hasCompletedMFARequirementsForAuth();return r.__assign(r.__assign({},o),{showAccessDeniedOnFailure:t,onFailureRedirection:null!=n?n:function(t){var n=t.reason,r=t.userContext;return e?a({reason:n,userContext:r}):void 0}})},hasCompletedFactors:function(e,t,o){void 0===t&&(t=!0),void 0===o&&(o=!0);var s=i.webJSClaim.validators.hasCompletedFactors(e);return r.__assign(r.__assign({},s),{showAccessDeniedOnFailure:o,onFailureRedirection:null!=n?n:function(e){var n=e.reason,r=e.userContext;return t?a({reason:n,userContext:r}):void 0}})}})},m=function(e){function t(n,o){void 0===o&&(o=f.default);var i=e.call(this,n)||this;return i.webJSRecipe=o,i.recipeID=t.RECIPE_ID,i.secondaryFactors=[],i.getDefaultRedirectionURL=function(e,t){return r.__awaiter(i,void 0,void 0,function(){var n,o;return r.__generator(this,function(i){if("FACTOR_CHOOSER"===e.action)return n=e.nextFactorOptions&&e.nextFactorOptions.length>0?e.nextFactorOptions.join(","):void 0,[2,r.getDefaultRedirectionURLForPath(this.config,p,e,{n:n,stepUp:e.stepUp?"true":void 0})];if("GO_TO_FACTOR"!==e.action)return[2,"/"];if(void 0!==(o=this.getSecondaryFactors(t).find(function(t){return t.id===e.factorId})))return[2,r.getDefaultRedirectionURLForPath(this.config,o.path,e,{setup:e.forceSetup?"true":void 0,stepUp:e.stepUp?"true":void 0})];throw Error("Requested redirect to unknown factor id: "+e.factorId)})})}
1,a.PostSuperTokensInitCallbacks.addPostInitCallback(function(){var e=t.MultiFactorAuthClaim.validators.hasCompletedMFARequirementsForAuth();s.SessionClaimValidatorStore.addClaimValidatorFromOtherRecipe(e),d.Session.getInstanceOrThrow().addEventListener(function(){u.WindowHandlerReference.getReferenceOrThrow().windowHandler.sessionStorage.removeItemSync(h)})}),i}return r.__extends(t,e),t.init=function(e){var n,o,i,a,s=(void 0===(n=e)&&(n={}),i=!0===n.disableDefaultUI,a=r.__assign({functions:function(e){return e}},n.override),r.__assign(r.__assign({},c.normaliseRecipeModuleConfig(n)),{disableDefaultUI:i,firstFactors:null==n?void 0:n.firstFactors,getSecondaryFactorInfo:function(e){return e},factorChooserScreen:null!=(o=n.factorChooserScreen)?o:{},override:a}));return{recipeID:t.RECIPE_ID,authReact:function(e){return t.instance=new t(r.__assign(r.__assign({},s),{appInfo:e,recipeId:t.RECIPE_ID})),t.instance},webJS:f.default.init(r.__assign(r.__assign({},s),{override:{functions:function(e,t){var n=(s.onHandleEvent,function(e){return r.__assign(r.__assign({},e),{resyncSessionAndFetchMFAInfo:function(t){return r.__awaiter(this,void 0,void 0,function(){var n,o,i,a,s,c;return r.__generator(this,function(l){switch(l.label){case 0:return n=u.WindowHandlerReference.getReferenceOrThrow(),[4,g];case 1:return l.sent(),[4,n.windowHandler.sessionStorage.getItem(h)];case 2:if(null!==(o=l.sent())&&(i=JSON.parse(o)).t>Date.now()-1e3)return[2,r.__assign(r.__assign({},i.v),{fetchResponse:new Response(null,{status:304})})];l.label=3;case 3:if(void 0===g)return[3,5];return[4,g];case 4:return l.sent(),[3,3];case 5:g=new Promise(function(e){return a=e}),l.label=6;case 6:return l.trys.push([6,,11,12]),[4,n.windowHandler.sessionStorage.getItem(h)];case 7:if(null!==(s=l.sent())&&(i=JSON.parse(s)).t>Date.now()-1e3)return[2,r.__assign(r.__assign({},i.v),{fetchResponse:new Response(null,{status:304})})];return[4,e.resyncSessionAndFetchMFAInfo(t)];case 8:if("OK"!==(c=l.sent()).status)return[3,10];return[4,n.windowHandler.sessionStorage.setItem(h,JSON.stringify({t:Date.now(),v:{emails:c.emails,phoneNumbers:c.phoneNumbers,factors:c.factors,status:c.status}}))];case 9:l.sent(),l.label=10;case 10:return[2,c];case 11:return g=void 0,a(),[7];case 12:return[2]}})})}})});return t.override(n),t.override(s.override.functions),e}}}))}},t.getInstance=function(){return t.instance},t.getInstanceOrThrow=function(){if(void 0===t.instance){var e="No instance of MultiFactorAuth found. Make sure to call the MultiFactorAuth.init method.";throw"u"<typeof window&&(e+=r.SSR_ERROR),Error(e)}return t.instance},t.prototype.addMFAFactors=function(e){this.secondaryFactors=r.__spreadArray(r.__spreadArray([],this.secondaryFactors.filter(function(t){return e.every(function(e){return t.id!==e.id})}),!0),e,!0)},t.prototype.isFirstFactorEnabledOnClient=function(e){return void 0===this.config.firstFactors||this.config.firstFactors.includes(e)},t.prototype.getSecondaryFactors=function(e){return this.config.getSecondaryFactorInfo(this.secondaryFactors,e)},t.prototype.redirectToFactor=function(e){var t=e.factorId,n=e.forceSetup,o=e.stepUp,a=e.redirectBack,s=e.navigate,u=e.userContext;return r.__awaiter(this,void 0,void 0,function(){var e,l;return r.__generator(this,function(d){switch(d.label){case 0:return[4,this.getRedirectUrl({action:"GO_TO_FACTOR",forceSetup:n,stepUp:o,factorId:t,tenantIdFromQueryParams:r.getTenantIdFromQueryParams()},i.getNormalisedUserContext(u))];case 1:if(null===(e=d.sent()))return[2];return a?(l=r.getCurrentNormalisedUrlPathWithQueryParamsAndFragments(),e=r.appendQueryParamsToURL(e,{redirectToPath:l})):(l=r.getRedirectToPathFromURL())&&(e=r.appendQueryParamsToURL(e,{redirectToPath:l})),[2,c.SuperTokens.getInstanceOrThrow().redirectToUrl(e,s)]}})})},t.prototype.redirectToFactorChooser=function(e){var t=e.redirectBack,n=void 0!==t&&t,o=e.nextFactorOptions,a=void 0===o?[]:o,s=e.stepUp,u=e.navigate,l=e.userContext;return r.__awaiter(this,void 0,void 0,function(){var e,t;return r.__generator(this,function(o){switch(o.label){case 0:return[4,this.getRedirectUrl({action:"FACTOR_CHOOSER",nextFactorOptions:a,stepUp:s,tenantIdFromQueryParams:r.getTenantIdFromQueryParams()},i.getNormalisedUserContext(l))];case 1:if(null===(e=o.sent()))return[2];return n?(t=r.getCurrentNormalisedUrlPathWithQueryParamsAndFragments(),e=r.appendQueryParamsToURL(e,{redirectToPath:t})):(t=r.getRedirectToPathFromURL())&&(e=r.appendQueryParamsToURL(e,{redirectToPath:t})),[2,c.SuperTokens.getInstanceOrThrow().redirectToUrl(e,u)]}})})},t.reset=function(){r.isTest()&&(t.instance=void 0)},t.RECIPE_ID="multifactorauth",t.MultiFactorAuthClaim=new v(function(){return t.getInstanceOrThrow()},function(e,n){return r.__awaiter(void 0,void 0,void 0,function(){return r.__generator(t,function(t){switch(t.label){case 0:return[4,this.getInstanceOrThrow().getRedirectUrl(r.__assign(r.__assign({},e),{tenantIdFromQueryParams:r.getTenantIdFromQueryParams()}),n)];case 1:return[2,t.sent()||void 0]}})})}),t}(l.RecipeModule);n.DEFAULT_FACTOR_CHOOSER_PATH=p,n.MultiFactorAuth=m,n.getAvailableFactors=function(e,t,n,o){r.logDebugMessage("getAvailableFactors: allowed to setup: ".concat(e.allowedToSetup)),r.logDebugMessage("getAvailableFactors: already setup: ".concat(e.alreadySetup)),r.logDebugMessage("getAvailableFactors: next from factorInfo: ".concat(e.next)),r.logDebugMessage("getAvailableFactors: nextArrayQueryParam: ".concat(t)),r.logDebugMessage("getAvailableFactors: secondary factors: ".concat(n.getSecondaryFactors(o).map(function(e){return e.id})));var i=void 0!==t?t.split(","):e.next;return n.getSecondaryFactors(o).filter(function(t){var n=t.id;return 0===i.length?e.allowedToSetup.includes(n)||e.alreadySetup.includes(n):i.includes(n)})}},790720,(e,t,n)=>{"use strict";var r=e.r(584529),o=e.r(224616),i=r.createGenericComponentsOverrideContext(void 0,o.Multitenancy.RECIPE_ID),a=i[0];n.Provider=i[1],n.useContext=a},624468,(e,t,n)=>{"use strict";var r=e.r(34712),o=e.r(232650),i=e.r(30176),a=e.r(224616),s=o&&o.__esModule?o:{default:o};n.OAuth2Provider=function(e){function t(n,r){void 0===r&&(r=s.default);var o=e.call(this,n)||this;return o.webJSRecipe=r,o.recipeID=t.RECIPE_ID,o}return r.__extends(t,e),t.init=function(e){var n,o=r.__assign(r.__assign({},a.normaliseRecipeModuleConfig(e)),{disableDefaultUI:null!=(n=null==e?void 0:e.disableDefaultUI)&&n,tryRefreshPage:r.__assign({disableDefaultUI:!1},null==e?void 0:e.tryRefreshPage),oauth2LogoutScreen:r.__assign({disableDefaultUI:!1,style:""},null==e?void 0:e.oauth2LogoutScreen),override:r.__assign({functions:function(e){return e}},null==e?void 0:e.override)});return{recipeID:t.RECIPE_ID,authReact:function(e){return t.instance=new t(r.__assign(r.__assign({},o),{appInfo:e,recipeId:t.RECIPE_ID})),t.instance},webJS:s.default.init(r.__assign(r.__assign({},o),{override:{functions:function(e,t){var n,i=(n=o.onHandleEvent,function(e){return r.__assign(r.__assign({},e),{getLoginChallengeInfo:function(t){return r.__awaiter(this,void 0,void 0,function(){var o;return r.__generator(this,function(r){switch(r.label){case 0:return[4,e.getLoginChallengeInfo(t)];case 1:return o=r.sent(),n({action:"LOADED_LOGIN_CHALLENGE",loginChallenge:t.loginChallenge,loginInfo:o.info,userContext:t.userContext}),[2,o]}})})},logOut:function(t){return r.__awaiter(this,void 0,void 0,function(){var o;return r.__generator(this,function(r){switch(r.label){case 0:return[4,e.logOut(t)];case 1:return n({action:"OAUTH2_LOGOUT_SUCCESS",frontendRedirectTo:(o=r.sent()).frontendRedirectTo,userContext:t.userContext}),[2,o]}})})}})});return t.override(i),t.override(o.override.functions),e}}}))}},t.getInstanceOrThrow=function(){if(void 0===t.instance){var e="No instance of OAuth2Provider found. Make sure to call the OAuth2Provider.init method.See https://supertokens.io/docs/oauth2/quick-setup/frontend";throw"u"<typeof window&&(e+=r.SSR_ERROR),Error(e)}return t.instance},t.getInstance=function(){return t.instance},t.prototype.getDefaultRedirectionURL=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){if("SUCCESS_OAUTH2"===e.action||"CONTINUE_OAUTH2_AFTER_REFRESH"===e.action||"POST_OAUTH2_LOGOUT_REDIRECT"===e.action)return[2,e.frontendRedirectTo];throw Error("Should never come here: unknown action in OAuth2Provider.getDefaultRedirectionURL")})})},t.reset=function(){r.isTest()&&(t.instance=void 0)},t.RECIPE_ID="oauth2provider",t}(i.RecipeModule)},30176,(e,t,n)=>{"use strict";var r=e.r(34712),o=e.r(224616);n.RecipeModule=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.redirect=function(e,n,i,a){return r.__awaiter(t,void 0,void 0,function(){var t;return r.__generator(this,function(s){switch(s.label){case 0:return[4,this.getRedirectUrl(e,r.getNormalisedUserContext(a))];case 1:if(null===(t=s.sent()))return r.logDebugMessage("Skipping redirection because the user override returned null for context ".concat(JSON.stringify(e,null,2))),[2];
1return t=r.appendQueryParamsToURL(t,i),[2,o.SuperTokens.getInstanceOrThrow().redirectToUrl(t,n)]}})})},t.getRedirectUrl=function(e,n){return r.__awaiter(t,void 0,void 0,function(){var t;return r.__generator(this,function(r){switch(r.label){case 0:return[4,this.config.getRedirectionURL(e,n)];case 1:if(void 0!==(t=r.sent()))return[2,t];return[4,this.getDefaultRedirectionURL(e,n)];case 2:return[2,r.sent()]}})})},t}return r.__extends(t,e),t.prototype.getDefaultRedirectionURL=function(e,t){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){throw Error("getDefaultRedirectionURL is not implemented.")})})},t}(o.BaseRecipeModule)},625610,(e,t,n)=>{"use strict";var r=e.r(584529),o=e.r(64138),i=r.createGenericComponentsOverrideContext(void 0,o.Session.RECIPE_ID),a=i[0];n.Provider=i[1],n.useContext=a},740013,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e.r(34712),o=e.r(264858),i=e.r(625610),a=e.r(64138),s=e.r(75306);e.r(75204),e.r(654858),e.r(758504),e.r(863953),e.r(827880),e.r(507718),e.r(584529),e.r(815330),e.r(224616),e.r(90654),e.r(717928),e.r(492603),e.r(475234),e.r(624468),e.r(232650),e.r(30176),e.r(247471),e.r(877207),e.r(790720),e.r(244067),e.r(686601),e.r(820942),e.r(525430),e.r(478499);var u=function(e){function t(t){var n=e.call(this,t)||this,o=r.__assign({},n.validators);for(var i in o)!function(e){var n=o[e];o[e]=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return r.__assign(r.__assign({},n.apply(void 0,e)),{onFailureRedirection:t.onFailureRedirection,showAccessDeniedOnFailure:t.showAccessDeniedOnFailure})}}(i);return n.validators=o,n}return r.__extends(t,e),t}(o.BooleanClaim),c=function(e){function t(t){var n=e.call(this,t)||this,o=r.__assign({},n.validators);for(var i in o)!function(e){var n=o[e];o[e]=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return r.__assign(r.__assign({},n.apply(void 0,e)),{onFailureRedirection:t.onFailureRedirection,showAccessDeniedOnFailure:t.showAccessDeniedOnFailure})}}(i);return n.validators=o,n}return r.__extends(t,e),t}(o.PrimitiveArrayClaim),l=function(e){function t(t){var n=e.call(this,t)||this,o=r.__assign({},n.validators);for(var i in o)!function(e){var n=o[e];o[e]=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return r.__assign(r.__assign({},n.apply(void 0,e)),{onFailureRedirection:t.onFailureRedirection,showAccessDeniedOnFailure:t.showAccessDeniedOnFailure})}}(i);return n.validators=o,n}return r.__extends(t,e),t}(o.PrimitiveClaim),d=function(e){var t=s.useSessionContext();return t.loading?{loading:!0}:!1===t.doesSessionExist?{loading:!1,doesSessionExist:!1,value:void 0}:{loading:!1,doesSessionExist:!0,value:e.getValueFromPayload(t.accessTokenPayload)}},f=function(){function e(){}return e.init=function(e){return a.Session.init(e)},e.getUserId=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,a.Session.getInstanceOrThrow().getUserId({userContext:r.getNormalisedUserContext(null==e?void 0:e.userContext)})]})})},e.getAccessToken=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,a.Session.getInstanceOrThrow().getAccessToken({userContext:r.getNormalisedUserContext(null==e?void 0:e.userContext)})]})})},e.getAccessTokenPayloadSecurely=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,a.Session.getInstanceOrThrow().getAccessTokenPayloadSecurely({userContext:r.getNormalisedUserContext(null==e?void 0:e.userContext)})]})})},e.attemptRefreshingSession=function(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return[2,a.Session.getInstanceOrThrow().attemptRefreshingSession()]})})},e.doesSessionExist=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,a.Session.getInstanceOrThrow().doesSessionExist({userContext:r.getNormalisedUserContext(null==e?void 0:e.userContext)})]})})},e.addAxiosInterceptors=function(e,t){return a.Session.addAxiosInterceptors(e,r.getNormalisedUserContext(t))},e.signOut=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,a.Session.getInstanceOrThrow().signOut({userContext:r.getNormalisedUserContext(null==e?void 0:e.userContext)})]})})},e.validateClaims=function(e){return a.Session.getInstanceOrThrow().validateClaims({overrideGlobalClaimValidators:null==e?void 0:e.overrideGlobalClaimValidators,userContext:r.getNormalisedUserContext(null==e?void 0:e.userContext)})},e.getInvalidClaimsFromResponse=function(e){return a.Session.getInstanceOrThrow().getInvalidClaimsFromResponse(e)},e.getClaimValue=function(e){return a.Session.getInstanceOrThrow().getClaimValue({claim:e.claim,userContext:r.getNormalisedUserContext(null==e?void 0:e.userContext)})},e.useSessionContext=s.useSessionContext,e.useClaimValue=d,e.SessionAuth=s.SessionAuthWrapper,e.ComponentsOverrideProvider=i.Provider,e}(),p=f.useSessionContext,h=f.useClaimValue,g=f.SessionAuth,v=f.init,m=f.getUserId,b=f.getAccessToken,y=f.getAccessTokenPayloadSecurely,w=f.attemptRefreshingSession,_=f.doesSessionExist,I=f.addAxiosInterceptors,k=f.signOut,S=f.validateClaims,T=f.getInvalidClaimsFromResponse,R=f.getClaimValue,x=f.ComponentsOverrideProvider;n.SessionContext=s.SessionContext,n.BooleanClaim=u,n.PrimitiveArrayClaim=c,n.PrimitiveClaim=l,n.SessionAuth=g,n.SessionComponentsOverrideProvider=x,n.addAxiosInterceptors=I,n.attemptRefreshingSession=w,n.default=f,n.doesSessionExist=_,n.getAccessToken=b,n.getAccessTokenPayloadSecurely=y,n.getClaimValue=R,n.getInvalidClaimsFromResponse=T,n.getUserId=m,n.init=v,n.signOut=k,n.useClaimValue=h,n.useSessionContext=p,n.validateClaims=S},224616,(e,t,n)=>{"use strict";var r=e.r(34712),o=e.r(90654),i=e.r(758504),a=e.r(717928),s=e.r(507718),u=e.r(492603),c=e.r(475234);
1function l(e){return e&&e.__esModule?e:{default:e}}var d=l(o),f=l(u),p=function(e){this.config=e};function h(e){var t=this;void 0===e&&(e={});var n=e.onHandleEvent,o=e.getRedirectionURL,i=e.preAPIHook,a=e.postAPIHook;void 0===n&&(n=function(e){}),void 0===o&&(o=function(e){return r.__awaiter(t,void 0,void 0,function(){return r.__generator(this,function(e){return[2,void 0]})})}),void 0===i&&(i=function(e){return r.__awaiter(t,void 0,void 0,function(){return r.__generator(this,function(t){return[2,e]})})}),void 0===a&&(a=function(){return r.__awaiter(t,void 0,void 0,function(){return r.__generator(this,function(e){return[2]})})});var s=void 0===e.style?"":e.style;return r.__assign(r.__assign({},e),{getRedirectionURL:o,onHandleEvent:n,preAPIHook:i,postAPIHook:a,recipeRootStyle:s})}var g=function(e){function t(n,r){void 0===r&&(r=f.default);var o=e.call(this,n)||this;return o.webJSRecipe=r,o.recipeID=t.RECIPE_ID,o.dynamicLoginMethodsCache={},o}return r.__extends(t,e),t.prototype.getCurrentDynamicLoginMethods=function(e){var n;return r.__awaiter(this,void 0,void 0,function(){var o,i,a;return r.__generator(this,function(r){switch(r.label){case 0:if(!1===S.usesDynamicLoginMethods)return[2,void 0];return o=c.getNormalisedUserContext(e.userContext),[4,t.getInstanceOrThrow().webJSRecipe.getTenantId()];case 1:return i=null!=(n=r.sent())?n:"public",void 0===this.dynamicLoginMethodsCache[i]&&(this.dynamicLoginMethodsCache[i]=t.getDynamicLoginMethods({tenantId:i,userContext:o})),[4,this.dynamicLoginMethodsCache[i]];case 2:var s,u;if(s=a=r.sent(),u=S.getInstanceOrThrow().recipeList.filter(function(e){return"firstFactorIds"in e}),!s.firstFactors.some(function(e){return u.some(function(t){return t.firstFactorIds.includes(e)})}))throw Error("Initialized recipes have no overlap with core recipes or could not load login methods");return[2,a]}})})},t.getDynamicLoginMethods=function(e){return r.__awaiter(this,void 0,void 0,function(){var t;return r.__generator(this,function(n){switch(n.label){case 0:return[4,f.default.getLoginMethods(e)];case 1:return[2,{thirdparty:(t=n.sent()).thirdParty,firstFactors:t.firstFactors}]}})})},t.init=function(e){var n=r.__assign(r.__assign({},h(e)),{override:r.__assign({functions:function(e){return e}},null==e?void 0:e.override)});return{recipeID:t.RECIPE_ID,authReact:function(e){return t.instance=new t(r.__assign(r.__assign({},n),{appInfo:e,recipeId:t.RECIPE_ID})),t.instance},webJS:f.default.init(r.__assign({},n))}},t.getInstanceOrThrow=function(){if(void 0===t.instance){var e="No instance of Multitenancy found. Make sure to call the Multitenancy.init method.See https://supertokens.io/docs/multitenancy/quick-setup/frontend";throw"u"<typeof window&&(e+=r.SSR_ERROR),Error(e)}return t.instance},t.reset=function(){r.isTest()&&(t.instance=void 0)},t.RECIPE_ID="multitenancy",t}(p),v={en:{AUTH_PAGE_HEADER_TITLE_SIGN_IN_AND_UP:"Sign Up / Sign In",AUTH_PAGE_HEADER_TITLE_SIGN_IN:"Sign In",AUTH_PAGE_HEADER_TITLE_SIGN_UP:"Sign Up",AUTH_PAGE_HEADER_TITLE_SIGN_IN_UP_TO_APP:" to continue to ",AUTH_PAGE_HEADER_SUBTITLE_SIGN_IN_START:"Not registered yet?",AUTH_PAGE_HEADER_SUBTITLE_SIGN_IN_SIGN_UP_LINK:"Sign Up",AUTH_PAGE_HEADER_SUBTITLE_SIGN_IN_END:"",AUTH_PAGE_HEADER_SUBTITLE_SIGN_UP_START:"Already have an account?",AUTH_PAGE_HEADER_SUBTITLE_SIGN_UP_SIGN_IN_LINK:"Sign In",AUTH_PAGE_HEADER_SUBTITLE_SIGN_UP_END:"",AUTH_PAGE_FOOTER_START:"By continuing, you agree to our ",AUTH_PAGE_FOOTER_TOS:"Terms of Service",AUTH_PAGE_FOOTER_AND:" and ",AUTH_PAGE_FOOTER_PP:"Privacy Policy",AUTH_PAGE_FOOTER_END:"",DIVIDER_OR:"or",BRANDING_POWERED_BY_START:"Powered by ",BRANDING_POWERED_BY_END:"",SOMETHING_WENT_WRONG_ERROR:"Something went wrong. Please try again.",SOMETHING_WENT_WRONG_ERROR_RELOAD:"Something went wrong. Please try again later or reload the page."}},m=function(){function e(){this.handlers=new Map}return e.prototype.emit=function(e,t){for(var n=this.handlers.get(e)||[],r=0;r<n.length;r++)(0,n[r])(e,t)},e.prototype.on=function(e,t){var n=this.handlers.get(e)||[];this.handlers.set(e,n.concat(t))},e.prototype.off=function(e,t){var n=this.handlers.get(e)||[];this.handlers.set(e,n.filter(function(e){return e!==t}))},e}(),b="sCurrLanguage";function y(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,r.getCookieValue(b)];case 1:return[2,e.sent()];case 2:return e.sent(),[2,null];case 3:return[2]}})})}var w=function(e){var t=e.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/);if(!t)throw Error("Invalid version format: ".concat(e));return{major:parseInt(t[1]),minor:parseInt(t[2]),patch:parseInt(t[3]),prerelease:t[4]}},_=function(e,t){return e.major!==t.major?e.major-t.major:e.minor!==t.minor?e.minor-t.minor:e.patch!==t.patch?e.patch-t.patch:e.prerelease&&!t.prerelease?-1:!e.prerelease&&t.prerelease?1:e.prerelease&&t.prerelease?e.prerelease.localeCompare(t.prerelease):0},I=function(e,t){var n=w(e);if(t===e)return!0;var r=t.match(/^([<>=~^]+)\s*(.+)$/);if(r){var o=r[1],i=w(r[2]),a=_(n,i);switch(o){case">=":return a>=0;case">":return a>0;case"<=":return a<=0;case"<":return a<0;case"=":case"==":return 0===a;case"~":return n.major===i.major&&n.minor===i.minor&&n.patch>=i.patch;case"^":if(0===i.major)return 0===n.major&&n.minor===i.minor&&n.patch>=i.patch;return n.major===i.major&&n.minor>=i.minor;default:return!1}}var s=t.match(/^(\d+)\.(\d+)\.x$/);if(s)return n.major===parseInt(s[1],10)&&n.minor===parseInt(s[2],10);var u=t.match(/^(\d+)\.x$/);return u?n.major===parseInt(u[1],10):0===_(n,w(t))},k=function(e,t){for(var n=Array.isArray(t)?t:[t],r=0;r<n.length;r++)if(I(e,n[r]))return!0;return!1},S=function(){function e(t,n){var o,i,s,u,c,l,d,f,p=this;if(this.pluginList=[],this.recipeList=[],this.componentOverrides={},this.pluginRouteHandlers=[],this.changeLanguage=function(e){return r.__awaiter(p,void 0,void 0,function(){return r.__generator(this,function(t){switch(t.label){case 0:return[4,function(e,t){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,r.setFrontendCookie(b,e,t)];case 1:case 2:return n.sent(),[3,3];case 3:return[2]}})})}(e,this.languageTranslations.currentLanguageCookieScope)];case 1:return t.sent(),this.languageTranslations.translationEventSource.emit("LanguageChange",e),[2]}})})},this.redirectToAuth=function(e){return r.__awaiter(p,void 0,void 0,function(){var t,n;return r.__generator(this,function(o){switch(o.label){case 0:return t=void 0===e.queryParams?{}:e.queryParams,void 0!==e.show&&(t.show=e.show),!0===e.redirectBack&&(t.redirectToPath=r.getCurrentNormalisedUrlPathWithQueryParamsAndFragments()),[4,this.getRedirectUrl({action:"TO_AUTH",showSignIn:"signin"===e.show,tenantIdFromQueryParams:r.getTenantIdFromQueryParams()},e.userContext)];case 1:if(null===(n=o.sent()))return r.logDebugMessage("Skipping redirection because the user override returned null"),[2];return n=r.appendQueryParamsToURL(n,t),[2,this.redirectToUrl(n,e.navigate)]}})})},this.redirectToUrl=function(e,t){return r.__awaiter(p,void 0,void 0,function(){return r.__generator(this,function(n){return function(e,t,n){try{new URL(t)}catch(o){if(r.getOriginOfPage().getAsStringDangerous()!==e.websiteDomain.getAsStringDangerous()){t="".concat(e.websiteDomain.getAsStringDangerous()).concat(t),r.redirectWithFullPageReload(t);return}if(void 0!==n)return void r.redirectWithNavigate(t,n)}r.redirectWithFullPageReload(t)}(this.appInfo,e,t),[2]})})},this.redirect=function(t,n,o,i){return r.__awaiter(p,void 0,void 0,function(){var a;return r.__generator(this,function(s){switch(s.label){case 0:return[4,this.getRedirectUrl(t,r.getNormalisedUserContext(i))];case 1:if(null===(a=s.sent()))return r.logDebugMessage("Skipping redirection because the user override returned null for context ".concat(JSON.stringify(t,null,2))),[2];return a=r.appendQueryParamsToURL(a,o),[2,e.getInstanceOrThrow().redirectToUrl(a,n)]}})})}
1,this.appInfo=r.normaliseInputAppInfoOrThrowError(t.appInfo),void 0===t.recipeList||0===t.recipeList.length)throw Error("Please provide at least one recipe to the supertokens.init function call. See https://supertokens.io/docs/emailpassword/quick-setup/frontend");this.componentOverrides={};for(var h=0;h<n.length;h++){var g=n[h];if(void 0!==g.overrideMap)for(var v=0,y=Object.keys(g.overrideMap);v<y.length;v++){var w=y[v];this.componentOverrides[w]=r.__assign(r.__assign({},this.componentOverrides[w]),null!=(i=null==(o=g.overrideMap[w])?void 0:o.components)?i:{})}this.componentOverrides.authRecipe=r.__assign(r.__assign({},null!=(s=this.componentOverrides.authRecipe)?s:{}),null!=(u=g.generalAuthRecipeComponentOverrides)?u:{})}this.pluginList=n.map(r.getPublicPlugin);for(var _=r.getPublicConfig(r.__assign(r.__assign({},t),{appInfo:this.appInfo})),I=function(e){var t,o=n[e].init;o&&!k.pluginList[e].initialized&&a.PostSuperTokensInitCallbacks.addPostInitCallback(function(){o(_,p.pluginList,r.package_version),p.pluginList[e].initialized=!0});var i=n[e].routeHandlers;if(i){var s=[];if("function"==typeof i){var u=i(_,k.pluginList,r.package_version);if("ERROR"===u.status)throw Error(u.message);s=u.routeHandlers}else s=i;(t=k.pluginRouteHandlers).push.apply(t,s)}},k=this,S=0;S<this.pluginList.length;S+=1)I(S);var T=void 0===t.languageTranslations?{}:t.languageTranslations;this.languageTranslations={defaultLanguage:void 0===T.defaultLanguage?"en":T.defaultLanguage,currentLanguageCookieScope:void 0!==T.currentLanguageCookieScope?r.normaliseCookieScopeOrThrowError(T.currentLanguageCookieScope):r.getDefaultCookieScope(),userTranslationStore:void 0!==T.translations?T.translations:{},translationEventSource:new m,userTranslationFunc:T.translationFunc};var R=!!(null==t?void 0:t.enableDebugLogs);R&&r.enableLogging(),this.userGetRedirectionURL=t.getRedirectionURL,this.recipeList=t.recipeList.map(function(e){return(0,e.authReact)(p.appInfo,R)}),this.rootStyle=null!=(c=t.style)?c:"",this.privacyPolicyLink=t.privacyPolicyLink,this.termsOfServiceLink=t.termsOfServiceLink,this.useShadowDom=null==(l=t.useShadowDom)||l,this.defaultToSignUp=null!=(d=t.defaultToSignUp)&&d,this.disableAuthRoute=null!=(f=t.disableAuthRoute)&&f}return e.init=function(t){if(i.CookieHandlerReference.init(t.cookieHandler),s.WindowHandlerReference.init(t.windowHandler),void 0!==e.instance)return void console.warn("SuperTokens was already initialized");e.usesDynamicLoginMethods=null!=(n=t.usesDynamicLoginMethods)&&n;var n,o,u=void 0!==t.recipeList.find(function(e){return e.recipeID===g.RECIPE_ID})?t.recipeList:t.recipeList.concat(g.init({})),c=r.normaliseInputAppInfoOrThrowError(t.appInfo),l=r.getPublicConfig(r.__assign(r.__assign({},t),{appInfo:c})),f=[];if(null==(o=t.experimental)?void 0:o.plugins)for(var p=0,h=t.experimental.plugins;p<h.length;p++){var v=h[p];if(v.compatibleAuthReactSDKVersions&&!k(r.package_version,v.compatibleAuthReactSDKVersions))throw Error("Incompatible SDK version for plugin ".concat(v.id,'. Version "').concat(r.package_version,'" not found in compatible versions: ').concat(JSON.stringify(v.compatibleAuthReactSDKVersions)));if(v.dependencies){var m=v.dependencies(l,f.map(r.getPublicPlugin),r.package_version);if("ERROR"===m.status)throw Error(m.message);m.pluginsToAdd&&f.push.apply(f,m.pluginsToAdd)}f.push(v)}var b=f.filter(function(e,t){return f.some(function(n,r){return n.id===e.id&&r!==t})});if(b.length>0)throw Error("Duplicate plugin IDs: ".concat(b.map(function(e){return e.id}).join(", ")));for(var y=0;y<f.length;y++){var v=f[y];if(v.config){var w=v.config(r.getPublicConfig(r.__assign(r.__assign({},t),{appInfo:c})))||{};delete w.appInfo,t=r.__assign(r.__assign({},t),w)}}d.default.init(r.__assign(r.__assign({},t),{recipeList:u.map(function(e){return e.webJS}),experimental:{plugins:f.map(function(e){return{id:e.id,overrideMap:e.overrideMap}})}})),e.instance=new e(r.__assign(r.__assign({},t),{recipeList:u}),f),a.PostSuperTokensInitCallbacks.runPostInitCallbacks()},e.getInstance=function(){return e.instance},e.getInstanceOrThrow=function(){if(void 0===e.instance){var t="SuperTokens must be initialized before calling this method.";throw"u"<typeof window&&(t+=r.SSR_ERROR),Error(t)}return e.instance},e.prototype.getRecipeOrThrow=function(e){var t=this.recipeList.find(function(t){return t.config.recipeId===e});if(void 0===t)throw Error("Missing recipe: ".concat(e));return t},e.prototype.loadTranslation=function(e){this.languageTranslations.translationEventSource.emit("TranslationLoaded",e)},e.prototype.getRedirectUrl=function(e,t){var n;return r.__awaiter(this,void 0,void 0,function(){var o,i,a,s;return r.__generator(this,function(u){switch(u.label){case 0:if(!this.userGetRedirectionURL)return[3,2];return[4,this.userGetRedirectionURL(e,t)];case 1:if(void 0!==(o=u.sent()))return[2,o];u.label=2;case 2:if("TO_AUTH"===e.action){if(i=this.appInfo.websiteBasePath.getAsStringDangerous(),a=r.appendTrailingSlashToURL(i),e.tenantIdFromQueryParams)return[2,r.appendQueryParamsToURL(a,((s={})[r.TENANT_ID_QUERY_PARAM]=e.tenantIdFromQueryParams,s))];return[2,a]}if("SUCCESS"===e.action)return[2,null!=(n=e.redirectToPath)?n:"/"];throw Error("Should never come here: unexpected redirection context")}})})},e.reset=function(){r.isTest()&&(e.instance=void 0)},e.usesDynamicLoginMethods=!1,e}();n.BaseRecipeModule=p,n.Multitenancy=g,n.SuperTokens=S,n.defaultTranslationsCommon=v,n.getCurrentLanguageFromCookie=y,n.getTranslationFunction=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=S.getInstanceOrThrow().languageTranslations,o=n.translationEventSource,i=n.userTranslationFunc,a=n.defaultLanguage,s=n.userTranslationStore,u=r.__spreadArray(r.__spreadArray([v],e,!0),[s],!1).reduce(r.mergeObjects,{}),c=function(){return u},l=function(e){u=e},d=a,f=function(){return d},p=function(e){d=e},h=function(e,t){p(t)},g=function(e,t){l(r.mergeObjects(u,t))};return o.off("LanguageChange",h),o.off("TranslationLoaded",g),o.on("LanguageChange",h),o.on("TranslationLoaded",g),y().then(function(e){e&&p(e)}),function(e,t){if(void 0===t&&(t={}),i)return i(e);if(void 0!==f()){var n=c()[f()]&&c()[f()][e],r=c()[a]&&c()[a][e];return void 0===n?void 0!==r?r:e:n.replace(/{(\w+)}/g,function(e,n){return t[n]||e})}throw Error("Should never come here")}},n.normaliseRecipeModuleConfig=h},247471,(e,t,n)=>{"use strict";var r=e.r(34712),o=e.r(815330),i=e.r(75204),a=e.r(224616),s=(i&&i.__esModule?i:{default:i}).default.createContext({translate:function(){throw Error("Cannot use translation func outside TranslationContext provider.")}});n.TranslationContextProvider=function(e){var t=e.children,n=e.defaultLanguage,u=e.userTranslationFunc,c=e.defaultStore,l=e.translationControlEventSource,d=i.useState(c),f=d[0],p=d[1],h=i.useState(void 0),g=h[0],v=h[1];i.useEffect(function(){!function(){r.__awaiter(this,void 0,void 0,function(){var e,t;return r.__generator(this,function(r){switch(r.label){case 0:return[4,a.getCurrentLanguageFromCookie()];case 1:return t=null===(e=r.sent())?n:e,v(function(e){return void 0!==e?e:t}),[2]}})})}()},[n,v]),i.useEffect(function(){var e=function(e,t){v(t)},t=function(e,t){p(function(e){return r.mergeObjects(e,t)})};return l.on("LanguageChange",e),l.on("TranslationLoaded",t),function(){l.off("LanguageChange",e),l.off("TranslationLoaded",t)}});var m=i.useCallback(function(e){if(void 0!==u)return u(e);
1if(void 0!==g){var t=f[g]&&f[g][e],r=f[n]&&f[n][e];return void 0===t?void 0!==r?r:e:t}throw Error("Should never come here")},[f,g,n,u]);return void 0===g?null:o.jsx(s.Provider,r.__assign({value:{translate:m}},{children:t}))},n.useTranslation=function(){return i.useContext(s).translate}},34712,(e,t,n)=>{"use strict";var r=e.i(742271),o=e.r(75204),i=e.r(654858),a=e.r(758504),s=e.r(863953),u=e.r(827880),c=e.r(507718);function l(e){return e&&e.__esModule?e:{default:e}}var d=l(i),f=l(s),p=l(u),h=function(e,t){return(h=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function v(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){var c=[s,u];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}n.__assign=function(){return n.__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.__assign.apply(this,arguments)},"function"==typeof SuppressedError&&SuppressedError;var m="tenantId",b="0.51.3",y=!1,w=["experimental"];function _(e){for(var t=new URL(c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getHref()),n=0;n<e.length;n++){var r=e[n];t.searchParams.delete(r)}c.WindowHandlerReference.getReferenceOrThrow().windowHandler.history.replaceState(c.WindowHandlerReference.getReferenceOrThrow().windowHandler.history.getState(),"",t.toString())}function I(e){return new URLSearchParams(c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getSearch()).get(e)}function k(e,t){return new p.default(void 0!==t?t:e)}function S(){return new p.default(c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getPathName())}function T(e){var t=function(e){(e=e.trim().toLowerCase()).startsWith(".")&&(e=e.substring(1)),e.startsWith("http://")||e.startsWith("https://")||(e="http://"+e);try{return(e=new URL(e).hostname).startsWith(".")&&(e=e.substring(1)),e}catch(e){throw Error("Please provide a valid cookie scope")}}(e);return"localhost"===t||/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(t)?t:e.startsWith(".")?"."+t:t}n.SSR_ERROR="\nIf you are trying to use this method doing server-side-rendering, please make sure you move this method inside a componentDidMount method or useEffect hook.",n.ST_ROOT_ID="supertokens-root",n.TENANT_ID_QUERY_PARAM=m,n.__awaiter=g,n.__extends=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},n.__generator=v,n.__rest=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},n.__spreadArray=function(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},n.appendQueryParamsToURL=function(e,t){if(void 0===t)return e;try{var n=new URL(e);return Object.entries(t).forEach(function(e){var t=e[0],r=e[1];n.searchParams.set(t,r)}),n.href}catch(n){var r=e.startsWith("/")?"http://localhost":"http://localhost/",o=new URL("".concat(r).concat(e));return Object.entries(t).forEach(function(e){var t=e[0],n=e[1];o.searchParams.set(t,n)}),"".concat(o.pathname).concat(o.search).concat(o.hash)}},n.appendTrailingSlashToURL=function(e){return e.endsWith("/")?e:e+"/"},n.clearErrorQueryParam=function(){_(["error","message"])},n.clearQueryParams=_,n.enableLogging=function(){y=!0},n.getCookieValue=function(e){return g(this,void 0,void 0,function(){var t,n,r,o;return v(this,function(i){switch(i.label){case 0:return t="; ",[4,a.CookieHandlerReference.getReferenceOrThrow().cookieHandler.getCookie()];case 1:if((n=(t+i.sent()).split("; "+e+"=")).length>=2&&void 0!==(r=n.pop())){if(void 0===(o=r.split(";").shift()))return[2,null];return[2,o]}return[2,null]}})})},n.getCurrentNormalisedUrlPath=S,n.getCurrentNormalisedUrlPathWithQueryParamsAndFragments=function(){return S().getAsStringDangerous()+c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getSearch()+c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getHash()},n.getDefaultCookieScope=function(){try{return T(c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getHostName())}catch(e){return}},n.getDefaultRedirectionURLForPath=function(e,t,n,r){var o=e.appInfo.websiteBasePath.appendPath(new p.default(t)).getAsStringDangerous(),i=new URLSearchParams;return(void 0!==n.tenantIdFromQueryParams&&i.set(m,n.tenantIdFromQueryParams),void 0!==r&&Object.entries(r).forEach(function(e){var t=e[0],n=e[1];void 0!==n&&i.set(t,n)}),""!==i.toString())?"".concat(o,"?").concat(i.toString()):o},n.getLocalStorage=function(e){return g(this,void 0,void 0,function(){var t;return v(this,function(n){return null==(t=c.WindowHandlerReference.getReferenceOrThrow().windowHandler.localStorage.getItem(e))?[2,null]:[2,t]})})},n.getNormalisedUserContext=function(e){return void 0===e?{}:e},n.getOriginOfPage=function(){return new f.default(c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getOrigin())},n.getPublicConfig=function(e){return Object.keys(e).reduce(function(t,r){var o;return w.includes(r)?t:n.__assign(n.__assign({},t),((o={})[r]=e[r],o))},{})},n.getPublicPlugin=function(e){return{id:e.id,initialized:!e.init,version:e.version,exports:e.exports,c
1ompatibleAuthReactSDKVersions:e.compatibleAuthReactSDKVersions,compatibleWebJSSDKVersions:e.compatibleWebJSSDKVersions}},n.getQueryParams=I,n.getRedirectToPathFromURL=function(){var e=I("redirectToPath");if(null!==e)try{var t=void 0;try{t=new URL(e)}catch(r){var n=e.startsWith("/")?"http://localhost":"http://localhost/";t=new URL("".concat(n).concat(e))}if(e.startsWith("//"))try{new URL("http:".concat(e));return}catch(e){}var r=new p.default(e).getAsStringDangerous(),o=t.search||"",i=t.hash||"",a=r+o+i;if(0===r.length&&a.length>0&&!a.startsWith("/"))return"/"+a;return a}catch(e){return}},n.getTenantIdFromQueryParams=function(){var e;return null!=(e=I(m))?e:void 0},n.getURLHash=function(){return c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getHash().substring(1)},n.handleCallAPI=function(e){var t=e.apiFields,n=e.fieldUpdates,r=e.callAPI;return g(void 0,void 0,void 0,function(){var e,o,i,a;return v(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,r(t||[],function(e,t){return n.push({id:e,value:t})})];case 1:return e=s.sent(),[3,3];case 2:if(a=s.sent(),d.default.isThisError(a))o=a;else if(a instanceof Response)i=a;else throw a;return[3,3];case 3:return[2,{result:e,generalError:o,fetchError:i}]}})})},n.isTest=function(){try{return"testing"===r.default.env.TEST_MODE||"testing"===r.default.env.REACT_APP_TEST_MODE}catch(e){return!1}},n.logDebugMessage=function(e){y&&console.log("".concat("com.supertokens.auth-react",' {t: "').concat(new Date().toISOString(),'", message: "').concat(e,'", supertokens-auth-react-ver: "').concat(b,'"}'))},n.matchRecipeIdUsingQueryParams=function(e){return function(){return new URLSearchParams(c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getSearch()).get("rid")===e}},n.mergeObjects=function e(t,r){var o=n.__assign({},t);for(var i in r)"object"==typeof o[i]&&"object"==typeof r[i]?o[i]=e(o[i],r[i]):o[i]=r[i];return o},n.normaliseCookieScopeOrThrowError=T,n.normaliseInputAppInfoOrThrowError=function(e){if(void 0===e)throw Error("Please provide the appInfo object when calling supertokens.init");if(void 0===e.apiDomain)throw Error("Please provide your apiDomain inside the appInfo object when calling supertokens.init");if(void 0===e.appName)throw Error("Please provide your appName inside the appInfo object when calling supertokens.init");if(void 0===e.websiteDomain)throw Error("Please provide your websiteDomain inside the appInfo object when calling supertokens.init");var t=new p.default("");return void 0!==e.apiGatewayPath&&(t=new p.default(e.apiGatewayPath)),{appName:e.appName,apiDomain:new f.default(e.apiDomain),websiteDomain:new f.default(e.websiteDomain),apiBasePath:t.appendPath(k("/auth",e.apiBasePath)),websiteBasePath:k("/auth",e.websiteBasePath)}},n.package_version=b,n.redirectWithFullPageReload=function(e){""===e.trim()&&(e="/"),c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.setHref(e)},n.redirectWithNavigate=function(e,t){""===e.trim()&&(e="/"),"push"in t?t.push(e):t(e)},n.removeFromLocalStorage=function(e){return g(this,void 0,void 0,function(){return v(this,function(t){switch(t.label){case 0:return[4,c.WindowHandlerReference.getReferenceOrThrow().windowHandler.localStorage.removeItem(e)];case 1:return t.sent(),[2]}})})},n.setFrontendCookie=function(e,t,n){return g(this,void 0,void 0,function(){var r,o;return v(this,function(i){switch(i.label){case 0:if(r="Thu, 01 Jan 1970 00:00:01 GMT",o="",void 0!==t&&(o=t,r=void 0),"localhost"!==n&&n!==c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getHostName()&&void 0!==n)return[3,5];if(void 0===r)return[3,2];return[4,a.CookieHandlerReference.getReferenceOrThrow().cookieHandler.setCookie("".concat(e,"=").concat(o,";expires=").concat(r,";path=/;samesite=lax"))];case 1:return i.sent(),[3,4];case 2:return[4,a.CookieHandlerReference.getReferenceOrThrow().cookieHandler.setCookie("".concat(e,"=").concat(o,";expires=Fri, 31 Dec 9999 23:59:59 GMT;path=/;samesite=lax"))];case 3:i.sent(),i.label=4;case 4:return[3,9];case 5:if(void 0===r)return[3,7];return[4,a.CookieHandlerReference.getReferenceOrThrow().cookieHandler.setCookie("".concat(e,"=").concat(o,";expires=").concat(r,";domain=").concat(n,";path=/;samesite=lax"))];case 6:return i.sent(),[3,9];case 7:return[4,a.CookieHandlerReference.getReferenceOrThrow().cookieHandler.setCookie("".concat(e,"=").concat(o,";domain=").concat(n,";expires=Fri, 31 Dec 9999 23:59:59 GMT;path=/;samesite=lax"))];case 8:i.sent(),i.label=9;case 9:return[2]}})})},n.setLocalStorage=function(e,t){return g(this,void 0,void 0,function(){return v(this,function(n){switch(n.label){case 0:return[4,c.WindowHandlerReference.getReferenceOrThrow().windowHandler.localStorage.setItem(e,t)];case 1:return n.sent(),[2]}})})},n.updateQueryParam=function(e,t){var n=new URL(c.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getHref());n.searchParams.set(e,t),c.WindowHandlerReference.getReferenceOrThrow().windowHandler.history.replaceState(c.WindowHandlerReference.getReferenceOrThrow().windowHandler.history.getState(),"",n.toString())},n.useOnMountAPICall=function(e,t,n,r){void 0===r&&(r=!0);var i=o.useRef(),a=o.useState(void 0),s=a[0],u=a[1];if(o.useEffect(function(){if(r){var o,a=new AbortController;return o=a.signal,g(void 0,void 0,void 0,function(){var r,a;return v(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,9]),void 0===i.current&&(i.current=e()),[4,i.current];case 1:return r=s.sent(),o.aborted||t(r),[3,9];case 2:if(a=s.sent(),o.aborted)return[3,8];if(void 0===n)return[3,7];s.label=3;case 3:return s.trys.push([3,5,,6]),[4,n(a,r)];case 4:return s.sent(),[3,6];case 5:return u(s.sent()),[3,6];case 6:return[3,8];case 7:u(a),s.label=8;case 8:return[3,9];case 9:return[2]}})}),function(){a.abort()}}},[u,i,e,t,n,r]),s)throw s},n.useRethrowInRender=function(){var e=o.useState(void 0),t=e[0],n=e[1];if(t)throw t;return n},n.validateForm=function(e,t){return g(this,void 0,void 0,function(){var n,r,o;return v(this,function(i){switch(i.label){case 0:if(n=[],t.length!==e.length)throw Error("Are you sending too many / too few formFields?");r=function(r){var o,i,a,s;return v(this,function(u){switch(u.label){case 0:return o=t[r],a=(i=e.find(function(e){return e.id===o.id})).value,"email"===i.id&&(a=a.trim()),[4,o.validate(a)];case 1:return void 0!==(s=u.sent())&&n.push({error:s,id:o.id}),[2]}})},o=0,i.label=1;case 1:if(!(o<t.length))return[3,4];return[5,r(o)];case 2:i.sent(),i.label=3;case 3:return o++,[3,1];case 4:return[2,n]}})})}},950119,(e,t,n)=>{"use strict";n.__esModule=!0;var r=e.r(740013);for(var o in r)n.hasOwnProperty(o)||(n[o]=r[o])},823357,(e,t,n)=>{"use strict";var r=e.e&&e.e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.getProxyObject=void 0,n.getProxyObject=function(e){for(var t=r(r({},e),{_call:function(e,t){throw Error("This function should only be called through the recipe object")}}),n=Object.keys(t),o=function(e){"_call"!==e&&(t[e]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this._call(e,t)})},i=0;i<n.length;i++)o(n[i]);return t}},3634,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OverrideableBuilder=void 0;var r=e.r(823357),o=function(){function e(e){this.layers=[e],this.proxies=[]}return e.prototype.override=function(e){for(var t=(0,r.getProxyObject)(this.layers[0]),n=e(t,this),o=0,i=Object.keys(this.layers[0]);o<i.length;o++){var a=i[o];
1n[a]===t[a]||"_call"===a?delete n[a]:void 0===n[a]&&(n[a]=null)}return this.layers.push(n),this.proxies.push(t),this},e.prototype.build=function(){var e=this;if(this.result)return this.result;this.result={};for(var t=0,n=this.layers;t<n.length;t++)for(var r=n[t],o=0,i=Object.keys(r);o<i.length;o++){var a=i[o],s=r[a];void 0!==s&&(null===s?this.result[a]=void 0:"function"==typeof s?this.result[a]=s.bind(this.result):this.result[a]=s)}for(var u=function(t){c.proxies[t]._call=function(n,r){for(var o=t;o>=0;--o){var i=e.layers[o][n];if(null!=i)return i.bind(e.result).apply(void 0,r)}}},c=this,l=0;l<this.proxies.length;++l)u(l);return this.result},e}();n.OverrideableBuilder=o,n.default=o},280551,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SSR_ERROR=n.DEFAULT_API_BASE_PATH=void 0,n.DEFAULT_API_BASE_PATH="/auth",n.SSR_ERROR="\nIf you are trying to use this method doing server-side-rendering, please make sure you move this method inside a componentDidMount method or useEffect hook."},751144,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DateProviderReference=void 0;var r=e.r(59733);Object.defineProperty(n,"DateProviderReference",{enumerable:!0,get:function(){return r.DateProviderReference}})},881654,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var t=this;this.getAsStringDangerous=function(){return t.value},this.value=function e(t,n){void 0===n&&(n=!1),t=t.trim();try{if(!t.startsWith("http://")&&!t.startsWith("https://"))throw Error("Error converting to proper URL");var r,o=new URL(t);return t=n?o.hostname.startsWith("localhost")||(r=o.hostname,/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(r))?"http://"+o.host:"https://"+o.host:o.protocol+"//"+o.host}catch(e){}if(t.startsWith("/"))throw Error("Please provide a valid domain name");if(0===t.indexOf(".")&&(t=t.substr(1)),(-1!==t.indexOf(".")||t.startsWith("localhost"))&&!t.startsWith("http://")&&!t.startsWith("https://")){t="https://"+t;try{return new URL(t),e(t,!0)}catch(e){}}throw Error("Please provide a valid domain name")}(e)}},478499,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function e(t){var n=this;this.startsWith=function(e){return n.value.startsWith(e.value)},this.appendPath=function(t){return new e(n.value+t.value)},this.getAsStringDangerous=function(){return n.value},this.value=function e(t){t=t.trim();try{if(!t.startsWith("http://")&&!t.startsWith("https://"))throw Error("Error converting to proper URL");if(t=new URL(t).pathname,"/"===t.charAt(t.length-1))return t.substr(0,t.length-1);return t}catch(e){}if((function(e){if(-1===e.indexOf(".")||e.startsWith("/"))return!1;try{var t=new URL(e);return -1!==t.hostname.indexOf(".")}catch(e){}try{var t=new URL("http://"+e);return -1!==t.hostname.indexOf(".")}catch(e){}return!1}(t)||t.startsWith("localhost"))&&!t.startsWith("http://")&&!t.startsWith("https://"))return e(t="http://"+t);"/"!==t.charAt(0)&&(t="/"+t);try{return new URL("http://example.com"+t),e("http://example.com"+t)}catch(e){throw Error("Please provide a valid URL path")}}(t)}},102817,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PostSuperTokensInitCallbacks=void 0,n.PostSuperTokensInitCallbacks=function(){function e(){}return e.addPostInitCallback=function(t){e.postInitCallbacks.push(t)},e.runPostInitCallbacks=function(){for(var t=0,n=e.postInitCallbacks;t<n.length;t++)(0,n[t])()},e.postInitCallbacks=[],e}()},547786,(e,t,n)=>{"use strict";var r=e.e&&e.e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0});var a=e.r(478499),s=e.r(217190),u=e.r(654858);n.default=function(){function e(e,t){var n=this;this.recipeId=e,this.appInfo=t,this.getPath=function(e){for(var t,n,r="string"==typeof e?e:e.path,o="string"==typeof e?{}:null!=(t=e.pathParams)?t:{},i="string"==typeof e?{}:null!=(n=e.queryParams)?n:{},s=String(r),u=0,c=Object.entries(o);u<c.length;u++){var l=c[u],d=l[0],f=l[1];s=s.replace(RegExp("<".concat(d,">"),"g"),String(f))}(s=new a.default(s).getAsStringDangerous()).startsWith("/public/")&&(s=s.substring(7));var p=new URLSearchParams(i);return p.toString().length>0&&(s+="?"+p.toString()),s}
1,this.safelyStringifyBody=function(e){return e?JSON.stringify(e):"{}"},this.get=function(e,t,a,s){return o(n,void 0,void 0,function(){var n,o;return i(this,function(i){switch(i.label){case 0:return n=this.getFullUrl(e),[4,this.fetch(n,r(r({method:"GET"},t),{body:void 0}),a,s)];case 1:return o=i.sent(),[4,this.getResponseJsonOrThrowGeneralError(o)];case 2:return[2,{jsonBody:i.sent(),fetchResponse:o}]}})})},this.post=function(e,t,a,s){return o(n,void 0,void 0,function(){var n;return i(this,function(o){switch(o.label){case 0:return[4,this.fetch(this.getFullUrl(e),r(r({method:"POST"},t),{body:this.safelyStringifyBody(t.body)}),a,s)];case 1:return n=o.sent(),[4,this.getResponseJsonOrThrowGeneralError(n)];case 2:return[2,{jsonBody:o.sent(),fetchResponse:n}]}})})},this.delete=function(e,t,a,s){return o(n,void 0,void 0,function(){var n;return i(this,function(o){switch(o.label){case 0:return[4,this.fetch(this.getFullUrl(e),r(r({method:"DELETE"},t),{body:this.safelyStringifyBody(t.body)}),a,s)];case 1:return n=o.sent(),[4,this.getResponseJsonOrThrowGeneralError(n)];case 2:return[2,{jsonBody:o.sent(),fetchResponse:n}]}})})},this.put=function(e,t,a,s){return o(n,void 0,void 0,function(){var n;return i(this,function(o){switch(o.label){case 0:return[4,this.fetch(this.getFullUrl(e),r(r({method:"PUT"},t),{body:this.safelyStringifyBody(t.body)}),a,s)];case 1:return n=o.sent(),[4,this.getResponseJsonOrThrowGeneralError(n)];case 2:return[2,{jsonBody:o.sent(),fetchResponse:n}]}})})},this.fetch=function(e,t,a,u){return o(n,void 0,void 0,function(){var n,o,c,l,d;return i(this,function(i){switch(i.label){case 0:return n=void 0===t?{}:t.headers,[4,this.callPreAPIHook({preAPIHook:a,url:e,requestInit:r(r({},t),{headers:r(r({},n),{"fdi-version":s.supported_fdi.join(","),"Content-Type":"application/json",rid:this.recipeId})})})];case 1:return c=(o=i.sent()).requestInit,[4,fetch(o.url,c)];case 2:if((l=i.sent()).status>=300)throw l;if(void 0===u)return[3,4];return d=l.clone(),[4,u({requestInit:c,url:e,fetchResponse:d})];case 3:i.sent(),i.label=4;case 4:return[2,l]}})})},this.callPreAPIHook=function(e){return o(n,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:if(void 0===e.preAPIHook)return[2,{url:e.url,requestInit:e.requestInit}];return[4,e.preAPIHook({url:e.url,requestInit:e.requestInit})];case 1:return[2,t.sent()]}})})},this.getFullUrl=function(e){var t=n.appInfo.apiBasePath.getAsStringDangerous(),r=n.getPath(e);return"".concat(n.appInfo.apiDomain.getAsStringDangerous()).concat(t).concat(r)},this.getResponseJsonOrThrowGeneralError=function(e){return o(n,void 0,void 0,function(){var t,n;return i(this,function(r){switch(r.label){case 0:return[4,e.clone().json()];case 1:if("GENERAL_ERROR"===(t=r.sent()).status)throw n=void 0===t.message?"No Error Message Provided":t.message,new u.default(n);return[2,t]}})})}}return e.preparePreAPIHook=function(t){var n=t.recipePreAPIHook,a=t.action,s=t.options,u=t.userContext;return function(t){return o(void 0,void 0,void 0,function(){var o;return i(e,function(e){switch(e.label){case 0:return[4,n(r(r({},t),{action:a,userContext:u}))];case 1:if(o=e.sent(),void 0===s||void 0===s.preAPIHook)return[2,o];return[2,s.preAPIHook({url:o.url,requestInit:o.requestInit,userContext:u})]}})})}},e.preparePostAPIHook=function(t){var n=t.recipePostAPIHook,a=t.action,s=t.userContext;return function(t){return o(void 0,void 0,void 0,function(){return i(e,function(e){switch(e.label){case 0:return[4,n(r(r({},t),{userContext:s,action:a}))];case 1:return e.sent(),[2]}})})}},e}()},918379,(e,t,n)=>{"use strict";var r,o=e.e&&e.e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}
1),i=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},a=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0});var s=e.r(158855),u=e.r(835593);n.default=function(e){function t(t){var n=e.call(this,t)||this;return n.signOut=function(e){return i(n,void 0,void 0,function(){return a(this,function(t){switch(t.label){case 0:return[4,u.default.getInstanceOrThrow().signOut({userContext:e.userContext})];case 1:return[2,t.sent()]}})})},n}return o(t,e),t}(s.default)},273018,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.normaliseAuthRecipe=void 0;var r=e.r(238779);n.normaliseAuthRecipe=function(e){return(0,r.normaliseRecipeModuleConfig)(e)}},159993,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.EMAILVERIFICATION_CLAIM_ID=void 0,n.EMAILVERIFICATION_CLAIM_ID="st-ev"},121415,(e,t,n)=>{"use strict";var r,o=e.e&&e.e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=e.e&&e.e.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.Recipe=void 0;
1var a=e.r(513819),s=e.r(3634),u=e.r(285139),c=e.r(715057),l=e.r(918379),d=e.r(102817),f=e.r(142377),p=e.r(897032),h=function(e){function t(n){var r=e.call(this,(0,a.normaliseUserInput)(n))||this,o=new s.default((0,u.default)({recipeId:r.config.recipeId,appInfo:r.config.appInfo,clientType:r.config.clientType,preAPIHook:r.config.preAPIHook,postAPIHook:r.config.postAPIHook}));return r.recipeImplementation=o.override(r.config.override.functions).build(),d.PostSuperTokensInitCallbacks.addPostInitCallback(function(){f.SessionClaimValidatorStore.addClaimValidatorFromOtherRecipe(t.MultiFactorAuthClaim.validators.hasCompletedMFARequirementsForAuth())}),r}return o(t,e),t.init=function(e){return function(n,r,o,a){return t.instance=new t(i(i({},(0,c.applyPlugins)(t.RECIPE_ID,e,null!=a?a:[])),{recipeId:t.RECIPE_ID,appInfo:n,clientType:r})),t.instance}},t.getInstanceOrThrow=function(){if(void 0===t.instance){var e="No instance of MultiFactorAuth found. Make sure to call the MultiFactorAuth.init method.";throw Error(e=(0,c.checkForSSRErrorAndAppendIfNeeded)(e))}return t.instance},t.reset=function(){(0,c.isTest)()&&(t.instance=void 0)},t.RECIPE_ID="multifactorauth",t.MultiFactorAuthClaim=new p.MultiFactorAuthClaimClass(function(){return t.getInstanceOrThrow().recipeImplementation}),t}(l.default);n.Recipe=h,n.default=h},297014,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MultiFactorAuthClaimClass=n.MultiFactorAuthClaim=n.resyncSessionAndFetchMFAInfo=n.init=void 0;var r=e.r(897032);Object.defineProperty(n,"MultiFactorAuthClaimClass",{enumerable:!0,get:function(){return r.MultiFactorAuthClaimClass}});var o=e.r(121415),i=e.r(715057),a=function(){function e(){}return e.init=function(e){return o.default.init(e)},e.resyncSessionAndFetchMFAInfo=function(e){var t;return o.default.getInstanceOrThrow().recipeImplementation.resyncSessionAndFetchMFAInfo({options:null!=(t=null==e?void 0:e.options)?t:{},userContext:(0,i.getNormalisedUserContext)(null==e?void 0:e.userContext)})},e.MultiFactorAuthClaim=o.default.MultiFactorAuthClaim,e}();n.default=a,n.init=a.init,n.resyncSessionAndFetchMFAInfo=a.resyncSessionAndFetchMFAInfo,n.MultiFactorAuthClaim=a.MultiFactorAuthClaim},686601,(e,t,n)=>{"use strict";n.__esModule=!0;var r=e.r(297014);for(var o in r)n.hasOwnProperty(o)||(n[o]=r[o])},285139,(e,t,n)=>{"use strict";var r=e.e&&e.e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.getRecipeImplementation=void 0;var a=e.r(547786);function s(e){var t=new a.default(e.recipeId,e.appInfo);return{resyncSessionAndFetchMFAInfo:function(n){var s=n.options,u=n.userContext;return o(this,void 0,void 0,function(){var n,o,c;return i(this,function(i){switch(i.label){case 0:return[4,t.put("/mfa/info",{},a.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:"GET_MFA_INFO",options:s,userContext:u}),a.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:"GET_MFA_INFO",userContext:u}))];case 1:return o=(n=i.sent()).jsonBody,c=n.fetchResponse,[2,r(r({},o),{fetchResponse:c})]}})})}}}n.default=s,n.getRecipeImplementation=s},513819,(e,t,n)=>{"use strict";var r=e.e&&e.e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.checkFactorRequirement=n.normaliseUserInput=void 0;var o=e.r(273018);n.normaliseUserInput=function(e){var t=r({functions:function(e){return e}},e.override);return r(r({},(0,o.normaliseAuthRecipe)(e)),{override:t})},n.checkFactorRequirement=function(e,t){return{id:e,isValid:void 0!==t[e],message:"Not completed"}}},897032,(e,t,n)=>{"use strict";var r=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Prom
1ise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.MultiFactorAuthClaimClass=void 0;var i=e.r(513819);n.MultiFactorAuthClaimClass=function(){function e(e){var t=this;this.getRecipeImpl=e,this.id="st-mfa",this.validators={hasCompletedMFARequirementsForAuth:function(){return{id:t.id,refresh:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.refresh.apply(t,e)},shouldRefresh:function(e,n){return void 0===t.getValueFromPayload(e,n)},validate:function(e,n){return r(t,void 0,void 0,function(){var t;return o(this,function(r){return void 0===(t=this.getValueFromPayload(e,n))?[2,{isValid:!1,reason:{message:"MFA info not available in payload"}}]:t.v?[2,{isValid:!0}]:[2,{isValid:!1,reason:{message:"not all required factors have been completed"}}]})})}}},hasCompletedFactors:function(e){return{id:t.id,shouldRefresh:function(e,n){return void 0===t.getValueFromPayload(e,n)},refresh:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.refresh.apply(t,e)},validate:function(n,r){var o=t.getValueFromPayload(n,r);if(void 0===o)return{isValid:!1,reason:{message:"MFA info not available in payload"}};for(var a=o.c,s=0;s<e.length;s++){var u=e[s];if("object"==typeof u&&"oneOf"in u){var c=u.oneOf.map(function(e){return(0,i.checkFactorRequirement)(e,a)}).filter(function(e){return!1===e.isValid});if(c.length===u.oneOf.length)return{isValid:!1,reason:{message:"All factor checkers failed in the list",oneOf:u.oneOf,failures:c}}}else if("object"==typeof u&&"allOfInAnyOrder"in u){var c=u.allOfInAnyOrder.map(function(e){return(0,i.checkFactorRequirement)(e,a)}).filter(function(e){return!1===e.isValid});if(0!==c.length)return{isValid:!1,reason:{message:"Some factor checkers failed in the list",allOfInAnyOrder:u.allOfInAnyOrder,failures:c}}}else{var c=(0,i.checkFactorRequirement)(u,a);if(!0!==c.isValid)return{isValid:!1,reason:{message:"Factor validation failed: "+c.message,factorId:c.id}}}}return{isValid:!0}}}}}}return e.prototype.refresh=function(e){return r(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,this.getRecipeImpl().resyncSessionAndFetchMFAInfo(e)];case 1:return t.sent(),[2]}})})},e.prototype.getValueFromPayload=function(e,t){if(void 0!==e[this.id])return{c:e[this.id].c,v:e[this.id].v}},e.prototype.getLastFetchedTime=function(e,t){var n;return null==(n=e[this.id])?void 0:n.t},e}()},372180,(e,t,n)=>{"use strict";var r,o=e.e&&e.e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=e.e&&e.e.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)}
1,a=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},s=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.AllowedDomainsClaim=n.AllowedDomainsClaimClass=void 0;var u=e.r(43347),c=function(e){function t(){var t=e.call(this,{id:"st-t-dmns",refresh:function(){return a(t,void 0,void 0,function(){return s(this,function(e){return[2]})})},defaultMaxAgeInSeconds:Number.MAX_SAFE_INTEGER})||this;return t.validators=i(i({},t.validators),{hasAccessToCurrentDomain:function(){return{id:t.id,refresh:t.refresh,shouldRefresh:function(){return!1},validate:function(e,n){return a(t,void 0,void 0,function(){var t;return s(this,function(r){return t=u.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getHostName(),[2,this.validators.includes(t,Number.MAX_SAFE_INTEGER,this.id).validate(e,n)]})})}}}}),t}return o(t,e),t}(e.r(11458).PrimitiveArrayClaim);n.AllowedDomainsClaimClass=c,n.AllowedDomainsClaim=new c},199415,(e,t,n)=>{"use strict";var r=e.e&&e.e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.AllowedDomainsClaim=n.getTenantId=n.getLoginMethods=n.init=void 0;var o=e.r(715057),i=e.r(372180);Object.defineProperty(n,"AllowedDomainsClaim",{enumerable:!0,get:function(){return i.AllowedDomainsClaim}});var a=e.r(872843),s=function(){function e(){}return e.init=function(e){return a.default.init(e)},e.getLoginMethods=function(e){return a.default.getInstanceOrThrow().recipeImplementation.getLoginMethods(r(r({},e),{userContext:(0,o.getNormalisedUserContext)(null==e?void 0:e.userContext)}))},e.getTenantId=function(e){return a.default.getInstanceOrThrow().recipeImplementation.getTenantId(r(r({},e),{userContext:(0,o.getNormalisedUserContext)(null==e?void 0:e.userContext)}))},e.AllowedDomainsClaim=i.AllowedDomainsClaim,e}();n.default=s,n.init=s.init,n.getLoginMethods=s.getLoginMethods,n.getTenantId=s.getTenantId},492603,(e,t,n)=>{"use strict";n.__esModule=!0;var r=e.r(199415);for(var o in r)n.hasOwnProperty(o)||(n[o]=r[o])},872843,(e,t,n)=>{"use strict";var r,o=e.e&&e.e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=e.e&&e.e.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.Recipe=void 0;var a=e.r(242976),s=e.r(3634),u=e.r(495748),c=e.r(715057),l=function(e){function t(t){var n=e.call(this,(0,a.normaliseUserInput)(t))||this,r=new s.default((0,u.default)({recipeId:n.config.recipeId,appInfo:n.config.appInfo,clientType:n.config.clientType,preAPIHook:n.config.preAPIHook,postAPIHook:n.config.postAPIHook}));return n.recipeImplementation=r.override(n.config.override.functions).build(),n}return o(t,e),t.init=function(e){return function(n,r,o,a){return t.instance=new t(i(i({},(0,c.applyPlugins)(t.RECIPE_ID,e,null!=a?a:[])),{recipeId:t.RECIPE_ID,appInfo:n,clientType:r})),t.instance}},t.getInstanceOrThrow=function(){if(void 0===t.instance){var e="No instance of Multitenancy found. Ensure that 'SuperTokens.init' method has been called.";throw Error(e=(0,c.checkForSSRErrorAndAppendIfNeeded)(e))}return t.instance},t.reset=function(){(0,c.isTest)()&&(t.instance=void 0)},t.RECIPE_ID="multitenancy",t}(e.r(918379).default);n.Recipe=l,n.default=l},495748,(e,t,n)=>{"use strict";var r=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Prom
1ise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.getRecipeImplementation=void 0;var i=e.r(547786),a=e.r(715057);function s(e){var t=new i.default(e.recipeId,e.appInfo);return{getTenantId:function(){var e=(0,a.getQueryParams)("tenantId");if((null==e?void 0:e.trim())!=="")return e},getLoginMethods:function(n){var a=n.tenantId,s=n.options,u=n.userContext;return r(this,void 0,void 0,function(){var n,r,c,l,d;return o(this,function(o){switch(o.label){case 0:return n={},void 0!==e.clientType&&(n.clientType=e.clientType),[4,t.get({path:"/<tenantId>/loginmethods",pathParams:{tenantId:a||"public"},queryParams:n},{},i.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:"GET_LOGIN_METHODS",options:s,userContext:u}),i.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:"GET_LOGIN_METHODS",userContext:u}))];case 1:return c=(r=o.sent()).jsonBody,l=r.fetchResponse,void 0===c.firstFactors?(d=[],c.emailPassword.enabled&&d.push("emailpassword"),c.thirdParty.enabled&&d.push("thirdparty"),c.passwordless.enabled&&(d.push("otp-email"),d.push("otp-phone"),d.push("link-email"),d.push("link-phone"))):d=c.firstFactors,[2,{status:"OK",thirdParty:{providers:c.thirdParty.providers},firstFactors:d,fetchResponse:l}]}})})}}}n.default=s,n.getRecipeImplementation=s},242976,(e,t,n)=>{"use strict";var r=e.e&&e.e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.normaliseUserInput=void 0;var o=e.r(273018);n.normaliseUserInput=function(e){var t=r({functions:function(e){return e}},e.override);return r(r({},(0,o.normaliseAuthRecipe)(e)),{override:t})}},298761,(e,t,n)=>{"use strict";var r,o=e.e&&e.e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=e.e&&e.e.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.Recipe=void 0;var a=e.r(785334),s=e.r(3634),u=e.r(762304),c=e.r(715057),l=function(e){function t(t){var n=e.call(this,(0,a.normaliseUserInput)(t))||this,r=new s.default((0,u.default)({recipeId:n.config.recipeId,appInfo:n.config.appInfo,clientType:n.config.clientType,preAPIHook:n.config.preAPIHook,postAPIHook:n.config.postAPIHook}));return n.recipeImplementation=r.override(n.config.override.functions).build(),n}return o(t,e),t.init=function(e){return function(n,r,o,a){return t.instance=new t(i(i({},(0,c.applyPlugins)(t.RECIPE_ID,e,null!=a?a:[])),{recipeId:t.RECIPE_ID,appInfo:n,clientType:r})),t.instance}},t.getInstanceOrThrow=function(){if(void 0===t.instance){var e="No instance of OAuth2Provider found. Ensure that the 'OAuth2Provider.init' method is called within the 'SuperTokens.init' recipeList.";throw Error(e=(0,c.checkForSSRErrorAndAppendIfNeeded)(e))}return t.instance},t.reset=function(){(0,c.isTest)()&&(t.instance=void 0)},t.RECIPE_ID="oauth2provider",t}(e.r(918379).default);n.Recipe=l,n.default=l},840178,(e,t,n)=>{"use strict";var r=e.e&&e.e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.logOut=n.getRedirectURLToContinueOAuthFlow=n.getLoginChallengeInfo=n.init=void 0;var o=e.r(715057),i=e.r(298761),a=function(){function e(){}return e.init=function(e){return i.default.init(e)},e.getLoginChallengeInfo=function(e){return i.default.getInstanceOrThrow().recipeImplementation.getL
1oginChallengeInfo(r(r({},e),{userContext:(0,o.getNormalisedUserContext)(e.userContext)}))},e.getRedirectURLToContinueOAuthFlow=function(e){return i.default.getInstanceOrThrow().recipeImplementation.getRedirectURLToContinueOAuthFlow(r(r({},e),{userContext:(0,o.getNormalisedUserContext)(e.userContext)}))},e.logOut=function(e){return i.default.getInstanceOrThrow().recipeImplementation.logOut(r(r({},e),{userContext:(0,o.getNormalisedUserContext)(e.userContext)}))},e}();n.default=a,n.init=a.init,n.getLoginChallengeInfo=a.getLoginChallengeInfo,n.getRedirectURLToContinueOAuthFlow=a.getRedirectURLToContinueOAuthFlow,n.logOut=a.logOut},232650,(e,t,n)=>{"use strict";n.__esModule=!0;var r=e.r(840178);for(var o in r)n.hasOwnProperty(o)||(n[o]=r[o])},762304,(e,t,n)=>{"use strict";var r=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.getRecipeImplementation=void 0;var i=e.r(547786);function a(e){var t=new i.default(e.recipeId,e.appInfo);return{getLoginChallengeInfo:function(n){var a=n.loginChallenge,s=n.options,u=n.userContext;return r(this,void 0,void 0,function(){var n,r,c;return o(this,function(o){switch(o.label){case 0:return[4,t.get({path:"/oauth/login/info",pathParams:void 0,queryParams:{loginChallenge:a}},{},i.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:"GET_LOGIN_CHALLENGE_INFO",options:s,userContext:u}),i.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:"GET_LOGIN_CHALLENGE_INFO",userContext:u}))];case 1:return r=(n=o.sent()).jsonBody,c=n.fetchResponse,[2,{status:"OK",info:r.info,fetchResponse:c}]}})})},getRedirectURLToContinueOAuthFlow:function(n){var a=n.loginChallenge,s=n.options,u=n.userContext;return r(this,void 0,void 0,function(){var n,r,c;return o(this,function(o){switch(o.label){case 0:return[4,t.get({path:"/oauth/login",pathParams:void 0,queryParams:{loginChallenge:a}},{},i.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:"GET_REDIRECT_URL_TO_CONTINUE_OAUTH_FLOW",options:s,userContext:u}),i.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:"GET_REDIRECT_URL_TO_CONTINUE_OAUTH_FLOW",userContext:u}))];case 1:return r=(n=o.sent()).jsonBody,c=n.fetchResponse,[2,{status:"OK",frontendRedirectTo:r.frontendRedirectTo,fetchResponse:c}]}})})},logOut:function(n){var a=n.logoutChallenge,s=n.options,u=n.userContext;return r(this,void 0,void 0,function(){var n,r,c;return o(this,function(o){switch(o.label){case 0:return[4,t.post("/oauth/logout",{body:{logoutChallenge:a}},i.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:"LOG_OUT",options:s,userContext:u}),i.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:"LOG_OUT",userContext:u}))];case 1:return r=(n=o.sent()).jsonBody,c=n.fetchResponse,[2,{status:"OK",frontendRedirectTo:r.frontendRedirectTo,fetchResponse:c}]}})})}}}n.default=a,n.getRecipeImplementation=a},785334,(e,t,n)=>{"use strict";var r=e.e&&e.e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.normaliseUserInput=void 0;var o=e.r(273018);n.normaliseUserInput=function(e){var t=r({functions:function(e){return e}},e.override);return r(r({},(0,o.normaliseAuthRecipe)(e)),{override:t})}},158855,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){this.config=e}},238779,(e,t,n)=>{"use strict";var r=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Prom
1ise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.normaliseRecipeModuleConfig=void 0,n.normaliseRecipeModuleConfig=function(e){var t=this,n=e.preAPIHook;void 0===n&&(n=function(e){return r(t,void 0,void 0,function(){return o(this,function(t){return[2,e]})})});var i=e.postAPIHook;return void 0===i&&(i=function(){return r(t,void 0,void 0,function(){return o(this,function(e){return[2]})})}),{recipeId:e.recipeId,appInfo:e.appInfo,clientType:e.clientType,preAPIHook:n,postAPIHook:i}}},11458,(e,t,n)=>{"use strict";var r=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.getInvalidClaimsFromResponse=n.getClaimValue=n.validateClaims=n.signOut=n.addAxiosInterceptors=n.doesSessionExist=n.attemptRefreshingSession=n.getAccessToken=n.getAccessTokenPayloadSecurely=n.getUserId=n.init=n.BooleanClaim=n.PrimitiveArrayClaim=n.PrimitiveClaim=void 0;var i=e.r(715057),a=e.r(835593),s=function(){function e(){}return e.init=function(e){return a.default.init(e)},e.getUserId=function(e){return a.default.getInstanceOrThrow().getUserId({userContext:(0,i.getNormalisedUserContext)(null==e?void 0:e.userContext)})},e.getAccessToken=function(e){return a.default.getInstanceOrThrow().getAccessToken({userContext:(0,i.getNormalisedUserContext)(null==e?void 0:e.userContext)})},e.getAccessTokenPayloadSecurely=function(e){return r(this,void 0,void 0,function(){return o(this,function(t){return[2,a.default.getInstanceOrThrow().getAccessTokenPayloadSecurely({userContext:(0,i.getNormalisedUserContext)(null==e?void 0:e.userContext)})]})})},e.attemptRefreshingSession=function(){return r(this,void 0,void 0,function(){return o(this,function(e){return[2,a.default.getInstanceOrThrow().attemptRefreshingSession()]})})},e.doesSessionExist=function(e){return a.default.getInstanceOrThrow().doesSessionExist({userContext:(0,i.getNormalisedUserContext)(null==e?void 0:e.userContext)})},e.addAxiosInterceptors=function(e,t){return a.default.addAxiosInterceptors(e,(0,i.getNormalisedUserContext)(t))},e.signOut=function(e){return a.default.getInstanceOrThrow().signOut({userContext:(0,i.getNormalisedUserContext)(null==e?void 0:e.userContext)})},e.getClaimValue=function(e){return a.default.getInstanceOrThrow().getClaimValue({claim:e.claim,userContext:(0,i.getNormalisedUserContext)(null==e?void 0:e.userContext)})},e.validateClaims=function(e){return a.default.getInstanceOrThrow().validateClaims({overrideGlobalClaimValidators:null==e?void 0:e.overrideGlobalClaimValidators,userContext:(0,i.getNormalisedUserContext)(null==e?void 0:e.userContext)})},e.getInvalidClaimsFromResponse=function(e){return a.default.getInstanceOrThrow().getInvalidClaimsFromResponse({response:e.response,userContext:(0,i.getNormalisedUserContext)(null==e?void 0:e.userContext)})},e}();n.default=s,n.init=s.init,n.getUserId=s.getUserId,n.getAccessTokenPayloadSecurely=s.getAccessTokenPayloadSecurely,n.getAccessToken=s.getAccessToken,n.attemptRefreshingSession=s.attemptRefreshingSession,n.doesSessionExist=s.doesSessionExist,n.addAxiosInterceptors=s.addAxiosInterceptors,n.signOut=s.signOut,n.validateClaims=s.validateClaims,n.getClaimValue=s.getClaimValue,n.getInvalidClaimsFromResponse=s.getInvalidClaimsFromResponse;var u=e.r(990971);Object.defineProperty(n,"PrimitiveClaim",{enumerable:!0,get:function(){return u.PrimitiveClaim}}),Object.defineProperty(n,"PrimitiveArrayClaim",{enumerable:!0,get:function(){return u.PrimitiveArrayClaim}}),Object.defineProperty(n,"BooleanClaim",{enumerable:!0,get:function(){return u.BooleanClaim}})},835593,(e,t,n)=>{"use strict";var r,o=e.e&&e.e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=e.e&&e.e.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},s=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}},u=e.e&&e.e.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(n,"__esModule",{value:!0}),n.Recipe=void 0;var c=e.r(158855),l=e.r(990971),d=e.r(715057),f=[e.r(159993).EMAILVERIFICATION_CLAIM_ID],p=function(e){function t(t){var n=e.call(this,t)||this;return n.getUserId=function(e){return l.default.getUserId({userContext:e.userContext})},n.getAccessToken=function(e){return a(n,void 0,void 0,function(){return s(this,function(t){return[2,l.default.getAccessToken({userContext:e.userContext})]})})},n.getAccessTokenPayloadSecurely=function(e){return a(n,void 0,void 0,function(){return s(this,function(t){return[2,l.default.getAccessTokenPayloadSecurely({userContext:e.userContext})]})})},n.doesSessionExist=function(e){return l.default.doesSessionExist({userContext:e.userContext})},n.signOut=function(e){return l.default.signOut({userContext:e.userContext})},n.attemptRefreshingSession=function(){return a(n,void 0,void 0,function(){return s(this,function(e){return[2,l.default.attemptRefreshingSession()]})})},n.validateClaims=function(e){return l.default.validateClaims(e.overrideGlobalClaimValidators,e.userContext)},l.default.init(i(i({},t),{override:{functions:function(e,n){var r;return n.override(function(e){return i(i({},e),{getGlobalClaimValidators:function(t){var n=e.getGlobalClaimValidators(t);return u(u([],n.filter(function(e){return f.includes(e.id)}),!0),n.filter(function(e){return!f.includes(e.id)}),!0)}})}),(null==(r=t.override)?void 0:r.functions)&&n.override(t.override.functions),e}},preAPIHook:function(e){return a(n,void 0,void 0,function(){var n,r;return s(this,function(o){return((n=new Headers(e.requestInit.headers)).set("rid",t.recipeId),r=i(i({},e),{requestInit:i(i({},e.requestInit),{headers:n})}),void 0===t.preAPIHook)?[2,r]:[2,t.preAPIHook(e)]})})},apiDomain:t.appInfo.apiDomain.getAsStringDangerous(),apiBasePath:t.appInfo.apiBasePath.getAsStringDangerous()})),n}return o(t,e),t.init=function(e){return function(n,r,o,a){return t.instance=new t(i(i({},(0,d.applyPlugins)(t.RECIPE_ID,e,null!=a?a:[])),{appInfo:n,recipeId:t.RECIPE_ID,enableDebugLogs:o})),t.instance}},t.prototype.getClaimValue=function(e){return l.default.getClaimValue(e)},t.prototype.getInvalidClaimsFromResponse=function(e){return l.default.getInvalidClaimsFromResponse(e)},t.addAxiosInterceptors=function(e,t){return l.default.addAxiosInterceptors(e,t)},t.getInstanceOrThrow=function(){if(void 0===t.instance){var e="No instance of Session found. Ensure that the 'Session.init' method is called within the 'SuperTokens.init' recipeList.";throw Error(e=(0,d.checkForSSRErrorAndAppendIfNeeded)(e))}return t.instance},t.reset=function(){(0,d.isTest)()&&(t.instance=void 0)},t.RECIPE_ID="session",t}(c.default);n.Recipe=p,n.default=p},985019,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SessionClaimValidatorStore=void 0;var r=e.r(142377);Object.defineProperty(n,"SessionClaimValidatorStore",{enumerable:!0,get:function(){return r.SessionClaimValidatorStore}})},552231,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.nonPublicConfigProperties=void 0,n.nonPublicConfigProperties=["experimental"]},217190,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.supported_fdi=n.package_version=void 0,n.package_version="0.16.0",n.supported_fdi=["3.1","4.0","4.1","4.2"]},406728,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isVersionCompatible=void 0;var r=function(e){var t=e.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/);if(!t)throw Error("Invalid version format: ".concat(e));return{major:parseInt(t[1]),minor:parseInt(t[2]),patch:parseInt(t[3]),prerelease:t[4]}},o=function(e,t){return e.major!==t.major?e.major-t.major:e.minor!==t.minor?e.minor-t.minor:e.patch!==t.patch?e.patch-t.patch:e.prerelease&&!t.prerelease?-1:!e.prerelease&&t.prerelease?1:e.prerelease&&t.prerelease?e.prerelease.localeCompare(t.prerelease):0},i=function(e,t){var n=r(e);
1if(t===e)return!0;var i=t.match(/^([<>=~^]+)\s*(.+)$/);if(i){var a=i[1],s=r(i[2]),u=o(n,s);switch(a){case">=":return u>=0;case">":return u>0;case"<=":return u<=0;case"<":return u<0;case"=":case"==":return 0===u;case"~":return n.major===s.major&&n.minor===s.minor&&n.patch>=s.patch;case"^":if(0===s.major)return 0===n.major&&n.minor===s.minor&&n.patch>=s.patch;return n.major===s.major&&n.minor>=s.minor;default:return!1}}var c=t.match(/^(\d+)\.(\d+)\.x$/);if(c)return n.major===parseInt(c[1],10)&&n.minor===parseInt(c[2],10);var l=t.match(/^(\d+)\.x$/);return l?n.major===parseInt(l[1],10):0===o(n,r(t))};n.isVersionCompatible=function(e,t){for(var n=Array.isArray(t)?t:[t],r=0;r<n.length;r++)if(i(e,n[r]))return!0;return!1}},264957,(e,t,n)=>{"use strict";var r=e.e&&e.e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=e.e&&e.e.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};Object.defineProperty(n,"__esModule",{value:!0});var i=e.r(715057),a=e.r(647029),s=e.r(891098),u=e.r(102817),c=e.r(872843),l=e.r(751144),d=e.r(217190),f=e.r(406728);n.default=function(){function e(e){var t,n=this;if(this.recipeList=[],this.pluginList=[],this.appInfo=(0,i.normaliseInputAppInfoOrThrowError)(e.appInfo),void 0===e.recipeList||0===e.recipeList.length)throw Error("Please provide at least one recipe to the supertokens.init function call. See https://supertokens.io/docs/emailpassword/quick-setup/frontend");var a=[];if(null==(t=e.experimental)?void 0:t.plugins)for(var s=0,l=e.experimental.plugins;s<l.length;s++){var p=l[s];if(p.compatibleWebJSSDKVersions&&!(0,f.isVersionCompatible)(d.package_version,p.compatibleWebJSSDKVersions))throw Error("Incompatible SDK version for plugin ".concat(p.id,'. Version "').concat(d.package_version,'" not found in compatible versions: ').concat(JSON.stringify(p.compatibleWebJSSDKVersions)));if(p.dependencies){var h=p.dependencies((0,i.getPublicConfig)(r(r({},e),{appInfo:this.appInfo})),a.map(i.getPublicPlugin),d.package_version);if("ERROR"===h.status)throw Error(h.message);h.pluginsToAdd&&a.push.apply(a,h.pluginsToAdd)}a.push(p)}var g=a.filter(function(e,t){return a.some(function(n,r){return n.id===e.id&&r!==t})});if(g.length>0)throw Error("Duplicate plugin IDs: ".concat(g.map(function(e){return e.id}).join(", ")));this.pluginList=a.map(i.getPublicPlugin);for(var v=function(t){var s=a[t];if(s.config){var c=s.config((0,i.getPublicConfig)(r(r({},e),{appInfo:m.appInfo})))||{},l=(c.appInfo,o(c,["appInfo"]));e=r(r({},e),l)}var f=a[t].init;f&&u.PostSuperTokensInitCallbacks.addPostInitCallback(function(){f((0,i.getPublicConfig)(r(r({},e),{appInfo:n.appInfo})),n.pluginList,d.package_version),n.pluginList[t].initialized=!0})},m=this,b=0;b<this.pluginList.length;b+=1)v(b);var y=a.filter(function(e){return void 0!==e.overrideMap}).map(function(e){return e.overrideMap}),w=!1;void 0!==e.enableDebugLogs&&(w=e.enableDebugLogs);var _=!1;this.recipeList=e.recipeList.map(function(t){var r=t(n.appInfo,e.clientType,w,y);return r.config.recipeId===c.Recipe.RECIPE_ID&&(_=!0),r}),_||this.recipeList.push(c.Recipe.init()(this.appInfo,e.clientType,w,y))}return e.init=function(t){(a.CookieHandlerReference.init(t.cookieHandler),s.WindowHandlerReference.init(t.windowHandler),l.DateProviderReference.init(t.dateProvider),void 0!==e.instance)?console.warn("SuperTokens was already initialized"):(e.instance=new e(t),u.PostSuperTokensInitCallbacks.runPostInitCallbacks())},e.getInstanceOrThrow=function(){if(void 0===e.instance){var t="SuperTokens must be initialized before calling this method.";throw Error(t=(0,i.checkForSSRErrorAndAppendIfNeeded)(t))}return e.instance}
1,e.reset=function(){(0,i.isTest)()?(c.Recipe.reset(),e.instance=void 0):console.warn("Calling reset() is only supported during testing")},e}()},678216,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.init=void 0;var r=e.r(264957),o=function(){function e(){}return e.init=function(e){r.default.init(e)},e}();n.default=o,n.init=o.init},90654,(e,t,n)=>{"use strict";n.__esModule=!0;var r=e.r(678216);for(var o in r)n.hasOwnProperty(o)||(n[o]=r[o])},891098,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WindowHandlerReference=void 0;var r=e.r(43347);Object.defineProperty(n,"WindowHandlerReference",{enumerable:!0,get:function(){return r.WindowHandlerReference}})},264858,(e,t,n)=>{"use strict";n.__esModule=!0;var r=e.r(11458);for(var o in r)n.hasOwnProperty(o)||(n[o]=r[o])},758504,(e,t,n)=>{"use strict";n.__esModule=!0;let r=e.r(647029);var o=void 0!==r.default?r:{default:r,...r};for(var i in o)n.hasOwnProperty(i)||(n[i]=o[i])},475234,(e,t,n)=>{"use strict";n.__esModule=!0;let r=e.r(715057);var o=void 0!==r.default?r:{default:r,...r};for(var i in o)n.hasOwnProperty(i)||(n[i]=o[i])},863953,(e,t,n)=>{"use strict";n.__esModule=!0;let r=e.r(881654);var o=void 0!==r.default?r:{default:r,...r};for(var i in o)n.hasOwnProperty(i)||(n[i]=o[i])},827880,(e,t,n)=>{"use strict";n.__esModule=!0;let r=e.r(478499);var o=void 0!==r.default?r:{default:r,...r};for(var i in o)n.hasOwnProperty(i)||(n[i]=o[i])},717928,(e,t,n)=>{"use strict";n.__esModule=!0;var r=e.r(102817);for(var o in r)n.hasOwnProperty(o)||(n[o]=r[o])},820942,(e,t,n)=>{"use strict";n.__esModule=!0;let r=e.r(985019);var o=void 0!==r.default?r:{default:r,...r};for(var i in o)n.hasOwnProperty(i)||(n[i]=o[i])},507718,(e,t,n)=>{"use strict";n.__esModule=!0;var r=e.r(891098);for(var o in r)n.hasOwnProperty(o)||(n[o]=r[o])},687739,(e,t,n)=>{"use strict";var r=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.createAxiosErrorFromFetchResp=void 0,n.createAxiosErrorFromFetchResp=function(e){return r(this,void 0,void 0,function(){var t,n,r,i,a;return o(this,function(o){switch(o.label){case 0:if(t={url:e.url,headers:e.headers},!(n="status"in e))return[3,12];if(i=e.headers.get("content-type"),a=void 0,null!==i)return[3,5];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,e.text()];case 2:return a=o.sent(),[3,4];case 3:return o.sent(),a="",[3,4];case 4:return[3,11];case 5:if(!i.includes("application/json"))return[3,7];return[4,e.json()];case 6:case 8:return a=o.sent(),[3,11];case 7:if(!i.includes("text/"))return[3,9];return[4,e.text()];case 9:return[4,e.blob()];case 10:a=o.sent(),o.label=11;case 11:r={data:a,status:e.status,statusText:e.statusText,headers:e.headers,config:t,request:void 0},o.label=12;case 12:var s,u,c,l,d;return[2,(s=n?Error("Request failed with status code "+e.status):e,u=t,c=e.code,l=void 0,d=r,s.config=u,c&&(s.code=c),s.request=l,s.response=d,s.isAxiosError=!0,s.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},s)]}})})}},240287,(e,t,n)=>{"use strict";var r=e.e&&e.e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)}
1,o=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.responseErrorInterceptor=n.responseInterceptor=n.interceptorFunctionRequestFulfilled=void 0;var a=e.r(687739),s=e.r(299034),u=e.r(619714),c=e.r(983128),l=e.r(711122);function d(e){var t=void 0===e.url?"":e.url,n=e.baseURL;return void 0!==n&&(t="/"===t.charAt(0)&&"/"===n.charAt(n.length-1)?n+t.substr(1):"/"!==t.charAt(0)&&"/"!==n.charAt(n.length-1)?n+"/"+t:n+t),t}n.interceptorFunctionRequestFulfilled=function(e){return o(this,void 0,void 0,function(){var t,n,o,a,f,h;return i(this,function(i){switch(i.label){case 0:(0,l.logDebugMessage)("interceptorFunctionRequestFulfilled: started axios interception"),t=d(e),n=!1;try{n="string"==typeof t&&!s.default.recipeImpl.shouldDoInterceptionBasedOnUrl(t,s.default.config.apiDomain,s.default.config.sessionTokenBackendDomain)}catch(e){if("Please provide a valid domain name"===e.message)(0,l.logDebugMessage)("interceptorFunctionRequestFulfilled: Trying shouldDoInterceptionBasedOnUrl with location.origin"),n=!s.default.recipeImpl.shouldDoInterceptionBasedOnUrl(c.default.getReferenceOrThrow().windowHandler.location.getOrigin(),s.default.config.apiDomain,s.default.config.sessionTokenBackendDomain);else throw e}if((0,l.logDebugMessage)("interceptorFunctionRequestFulfilled: Value of doNotDoInterception: "+n),n)return(0,l.logDebugMessage)("interceptorFunctionRequestFulfilled: Returning config unchanged"),[2,e];return(0,l.logDebugMessage)("interceptorFunctionRequestFulfilled: Modifying config"),u.ProcessState.getInstance().addState(u.PROCESS_STATE.CALLING_INTERCEPTION_REQUEST),[4,(0,s.getLocalSessionState)(!0)];case 1:if(o=i.sent(),a=e,"EXISTS"!==o.status)return[3,3];return[4,s.AntiCsrfToken.getToken(o.lastAccessTokenUpdate)];case 2:void 0!==(f=i.sent())&&((0,l.logDebugMessage)("interceptorFunctionRequestFulfilled: Adding anti-csrf token to request"),a=r(r({},a),{headers:void 0===a?{"anti-csrf":f}:r(r({},a.headers),{"anti-csrf":f})})),i.label=3;case 3:return s.default.config.autoAddCredentials&&void 0===a.withCredentials&&((0,l.logDebugMessage)("interceptorFunctionRequestFulfilled: Adding credentials include"),a=r(r({},a),{withCredentials:!0})),(0,l.logDebugMessage)("interceptorFunctionRequestFulfilled: Adding rid header: anti-csrf (it may be overriden by the user's provided rid)"),a=r(r({},a),{headers:void 0===a?{rid:"anti-csrf"}:r({rid:"anti-csrf"},a.headers)}),h=s.default.config.tokenTransferMethod,(0,l.logDebugMessage)("interceptorFunctionRequestFulfilled: Adding st-auth-mode header: "+h),a.headers["st-auth-mode"]=h,[4,g(a)];case 4:return[4,p(a=i.sent())];case 5:return i.sent(),(0,l.logDebugMessage)("interceptorFunctionRequestFulfilled: returning modified config"),[2,a]}})})},n.responseInterceptor=function(e){var t=this;return function(n){return o(t,void 0,void 0,function(){var t,r,o,a;return i(this,function(i){switch(i.label){case 0:if(t=!1,!s.default.initCalled)throw Error("init function not called");(0,l.logDebugMessage)("responseInterceptor: started"),(0,l.logDebugMessage)("responseInterceptor: already intercepted: "+n.headers["x-supertokens-xhr-intercepted"]),r=d(n.config);try{t="string"==typeof r&&!s.default.recipeImpl.shouldDoInterceptionBasedOnUrl(r,s.default.config.apiDomain,s.default.config.sessionTokenBackendDomain)||!!n.headers["x-supertokens-xhr-intercepted"]}catch(e){if("Please provide a valid domain name"===e.message)(0,l.logDebugMessage)("responseInterceptor: Trying shouldDoInterceptionBasedOnUrl with location.origin"),t=!s.default.recipeImpl.shouldDoInterceptionBasedOnUrl(c.default.getReferenceOrThrow().windowHandler.location.getOrigin(),s.default.config.apiDomain,s.default.config.sessionTokenBackendDomain)||!!n.headers["x-supertokens-xhr-intercepted"];else throw e}if((0,l.logDebugMessage)("responseInterceptor: Value of doNotDoInterception: "+t),t)return(0,l.logDebugMessage)("responseInterceptor: Returning without interception"),[2,n];return(0,l.logDebugMessage)("responseInterceptor: Interception started"),u.ProcessState.getInstance().addState(u.PROCESS_STATE.CALLING_INTERCEPTION_RESPONSE),[4,(0,s.getLocalSessionState)(!1)];case 1:return o=i.sent(),[4,h(n)];case 2:if(i.sent(),(0,s.fireSessionUpdateEventsIfNecessary)("EXISTS"===o.status,n.status,n.headers["front-token"]),n.status!==s.default.config.sessionExpiredStatusCode)return[3,3];return(0,l.logDebugMessage)("responseInterceptor: Status code is: "+n.status),a=n.config,[2,f.doRequest(function(t){return e(t)},a,r,n,void 0,!0)];
1case 3:if(n.status!==s.default.config.invalidClaimStatusCode)return[3,5];return[4,(0,s.onInvalidClaimResponse)(n)];case 4:i.sent(),i.label=5;case 5:return[2,n]}})})}},n.responseErrorInterceptor=function(e){var t=this;return function(n){return o(t,void 0,void 0,function(){var t;return i(this,function(r){switch(r.label){case 0:if((0,l.logDebugMessage)("responseErrorInterceptor: called"),(0,l.logDebugMessage)("responseErrorInterceptor: already intercepted: "+(n.response&&n.response.headers["x-supertokens-xhr-intercepted"])),void 0===n.response||n.response.headers["x-supertokens-xhr-intercepted"])throw n;if(void 0===n.response||n.response.status!==s.default.config.sessionExpiredStatusCode)return[3,1];return(0,l.logDebugMessage)("responseErrorInterceptor: Status code is: "+n.response.status),t=n.config,[2,f.doRequest(function(t){return e(t)},t,d(t),void 0,n,!0)];case 1:if(void 0===n.response||n.response.status!==s.default.config.invalidClaimStatusCode)return[3,3];return[4,(0,s.onInvalidClaimResponse)(n.response)];case 2:r.sent(),r.label=3;case 3:throw n}})})}};var f=function(){function e(){}return e.doRequest=function(t,n,u,d,f,v){return void 0===v&&(v=!1),o(void 0,void 0,void 0,function(){var o,m,b,y,w,_,I,k,S,T,R,x,C,A;return i(e,function(e){var i,P;switch(e.label){case 0:if(!s.default.initCalled)throw Error("init function not called");(0,l.logDebugMessage)("doRequest: called"),o=!1;try{o="string"==typeof u&&!s.default.recipeImpl.shouldDoInterceptionBasedOnUrl(u,s.default.config.apiDomain,s.default.config.sessionTokenBackendDomain)&&v}catch(e){if("Please provide a valid domain name"===e.message)(0,l.logDebugMessage)("doRequest: Trying shouldDoInterceptionBasedOnUrl with location.origin"),o=!s.default.recipeImpl.shouldDoInterceptionBasedOnUrl(c.default.getReferenceOrThrow().windowHandler.location.getOrigin(),s.default.config.apiDomain,s.default.config.sessionTokenBackendDomain)&&v;else throw e}if((0,l.logDebugMessage)("doRequest: Value of doNotDoInterception: "+o),!o)return[3,2];if((0,l.logDebugMessage)("doRequest: Returning without interception"),void 0!==f)throw f;if(void 0!==d)return[2,d];return[4,t(n)];case 1:return[2,e.sent()];case 2:return(0,l.logDebugMessage)("doRequest: Interception started"),[4,g(n)];case 3:n=e.sent(),m=void 0,e.label=4;case 4:return[4,(0,s.getLocalSessionState)(!0)];case 5:if(b=e.sent(),y=n,"EXISTS"!==b.status)return[3,7];return[4,s.AntiCsrfToken.getToken(b.lastAccessTokenUpdate)];case 6:void 0!==(w=e.sent())&&((0,l.logDebugMessage)("doRequest: Adding anti-csrf token to request"),y=r(r({},y),{headers:void 0===y?{"anti-csrf":w}:r(r({},y.headers),{"anti-csrf":w})})),e.label=7;case 7:return s.default.config.autoAddCredentials&&void 0===y.withCredentials&&((0,l.logDebugMessage)("doRequest: Adding credentials include"),y=r(r({},y),{withCredentials:!0})),(0,l.logDebugMessage)("doRequest: Adding rid header: anti-csrf (May get overriden by user's rid)"),y=r(r({},y),{headers:void 0===y?{rid:"anti-csrf"}:r({rid:"anti-csrf"},y.headers)}),_=s.default.config.tokenTransferMethod,(0,l.logDebugMessage)("doRequest: Adding st-auth-mode header: "+_),y.headers["st-auth-mode"]=_,[4,p(y)];case 8:e.sent(),e.label=9;case 9:if(e.trys.push([9,14,,27]),I=f,k=d,f=void 0,d=void 0,void 0!==I)throw(0,l.logDebugMessage)("doRequest: Not making call because localPrevError is not undefined"),I;if(void 0!==k?(0,l.logDebugMessage)("doRequest: Not making call because localPrevResponse is not undefined"):(0,l.logDebugMessage)("doRequest: Making user's http call"),void 0!==k)return[3,11];return[4,t(y)];case 10:return T=e.sent(),[3,12];case 11:T=k,e.label=12;case 12:return S=T,(0,l.logDebugMessage)("doRequest: User's http call ended"),[4,h(S)];case 13:return e.sent(),(0,s.fireSessionUpdateEventsIfNecessary)("EXISTS"===b.status,S.status,S.headers["front-token"]),[2,S];case 14:if(void 0===(S=(R=e.sent()).response))return[3,25];return[4,h(S)];case 15:if(e.sent(),(0,s.fireSessionUpdateEventsIfNecessary)("EXISTS"===b.status,S.status,S.headers["front-token"]),S.status!==s.default.config.sessionExpiredStatusCode)return[3,21];if((0,l.logDebugMessage)("doRequest: Status code is: "+S.status),void 0===(i=n).__supertokensSessionRefreshAttempts&&(i.__supertokensSessionRefreshAttempts=0),i.__supertokensSessionRefreshAttempts>=s.default.config.maxRetryAttemptsForSessionRefresh)throw(0,l.logDebugMessage)("doRequest: Maximum session refresh attempts reached. sessionRefreshAttempts: ".concat(n.__supertokensSessionRefreshAttempts,", maxRetryAttemptsForSessionRefresh: ").concat(s.default.config.maxRetryAttemptsForSessionRefresh)),console.error(x="Received a 401 response from ".concat(u,". Attempted to refresh the session and retry the request with the updated session tokens ").concat(s.default.config.maxRetryAttemptsForSessionRefresh," times, but each attempt resulted in a 401 error. The maximum session refresh limit has been reached. Please investigate your API. To increase the session refresh attempts, update maxRetryAttemptsForSessionRefresh in the config.")),Error(x);return[4,(0,s.onUnauthorisedResponse)(b)];case 16:if(C=e.sent(),void 0===(P=n).__supertokensSessionRefreshAttempts&&(P.__supertokensSessionRefreshAttempts=0),P.__supertokensSessionRefreshAttempts++,(0,l.logDebugMessage)("doRequest: sessionRefreshAttempts: "+n.__supertokensSessionRefreshAttempts),"RETRY"===C.result)return[3,20];if((0,l.logDebugMessage)("doRequest: Not retrying original request"),void 0===C.error)return[3,18];return[4,(0,a.createAxiosErrorFromFetchResp)(C.error)];case 17:return A=e.sent(),[3,19];case 18:A=R,e.label=19;case 19:return m=A,[3,28];case 20:return(0,l.logDebugMessage)("doRequest: Retrying original request"),[3,24];
1case 21:if(S.status!==s.default.config.invalidClaimStatusCode)return[3,23];return[4,(0,s.onInvalidClaimResponse)(S)];case 22:e.sent(),e.label=23;case 23:case 25:throw R;case 24:return[3,26];case 26:return[3,27];case 27:return[3,4];case 28:throw m}})})},e}();function p(e){return o(this,void 0,void 0,function(){var t,n;return i(this,function(o){switch(o.label){case 0:return void 0===e.headers&&(e.headers={}),(0,l.logDebugMessage)("setAuthorizationHeaderIfRequired: adding existing tokens as header"),[4,(0,s.getTokenForHeaderAuth)("access")];case 1:return t=o.sent(),[4,(0,s.getTokenForHeaderAuth)("refresh")];case 2:return n=o.sent(),void 0!==t&&void 0!==n?void 0!==e.headers.Authorization||void 0!==e.headers.authorization?(0,l.logDebugMessage)("setAuthorizationHeaderIfRequired: Authorization header defined by the user, not adding"):((0,l.logDebugMessage)("setAuthorizationHeaderIfRequired: added authorization header"),e.headers=r(r({},e.headers),{Authorization:"Bearer ".concat(t)}),e.__supertokensAddedAuthHeader=!0):(0,l.logDebugMessage)("setAuthorizationHeaderIfRequired: token for header based auth not found"),[2]}})})}function h(e){return o(this,void 0,void 0,function(){var t,n,r,o,a,u;return i(this,function(i){switch(i.label){case 0:if((0,l.logDebugMessage)("saveTokensFromHeaders: Saving updated tokens from the response"),void 0===(t=e.headers["st-refresh-token"]))return[3,2];return(0,l.logDebugMessage)("saveTokensFromHeaders: saving new refresh token"),[4,(0,s.setToken)("refresh",t)];case 1:i.sent(),i.label=2;case 2:if(void 0===(n=e.headers["st-access-token"]))return[3,4];return(0,l.logDebugMessage)("saveTokensFromHeaders: saving new access token"),[4,(0,s.setToken)("access",n)];case 3:i.sent(),i.label=4;case 4:if(void 0===(r=e.headers["front-token"]))return[3,6];return(0,l.logDebugMessage)("doRequest: Setting sFrontToken: "+r),[4,s.FrontToken.setItem(r)];case 5:i.sent(),o=new Headers,Object.entries(e.headers).forEach(function(e){var t=e[0],n=e[1];Array.isArray(n)?n.forEach(function(e){return o.append(t,e)}):o.append(t,n)}),(0,s.updateClockSkewUsingFrontToken)({frontToken:r,responseHeaders:o}),i.label=6;case 6:if(void 0===(a=e.headers["anti-csrf"]))return[3,9];return[4,(0,s.getLocalSessionState)(!1)];case 7:if("EXISTS"!==(u=i.sent()).status)return[3,9];return(0,l.logDebugMessage)("doRequest: Setting anti-csrf token"),[4,s.AntiCsrfToken.setItem(u.lastAccessTokenUpdate,a)];case 8:i.sent(),i.label=9;case 9:return[2]}})})}function g(e){return o(this,void 0,void 0,function(){var t,n,o,a;return i(this,function(i){switch(i.label){case 0:return[4,(0,s.getTokenForHeaderAuth)("access")];case 1:return t=i.sent(),[4,(0,s.getTokenForHeaderAuth)("refresh")];case 2:if(n=i.sent(),o=e.headers.Authorization||e.headers.authorization,void 0!==t&&void 0!==n&&(o==="Bearer ".concat(t)||"__supertokensAddedAuthHeader"in e))return(0,l.logDebugMessage)("removeAuthHeaderIfMatchesLocalToken: Removing Authorization from user provided headers because it contains our access token"),a=r(r({},e),{headers:r({},e.headers)}),delete a.headers.authorization,delete a.headers.Authorization,[2,a];return[2,e]}})})}n.default=f},981980,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PrimitiveClaim=void 0;var r=e.r(16500);n.PrimitiveClaim=function(){function e(e){var t=this;this.validators={hasValue:function(e,n,o){void 0===n&&(n=t.defaultMaxAgeInSeconds);var i=r.default.getReferenceOrThrow().dateProvider;return{id:void 0!==o?o:t.id,refresh:function(e){return t.refresh(e)},shouldRefresh:function(e,r){if(void 0!==n&&n<i.getThresholdInSeconds())throw Error("maxAgeInSeconds must be greater than or equal to the DateProvider threshold value -> ".concat(i.getThresholdInSeconds()));return void 0===t.getValueFromPayload(e,r)||void 0!==n&&e[t.id].t<i.now()-1e3*n},validate:function(r,o){var a=t.getValueFromPayload(r,o);if(void 0===a)return{isValid:!1,reason:{message:"value does not exist",expectedValue:e,actualValue:a}};var s=(i.now()-t.getLastFetchedTime(r,o))/1e3;return void 0!==n&&s>n?{isValid:!1,reason:{message:"expired",ageInSeconds:s,maxAgeInSeconds:n}}:a!==e?{isValid:!1,reason:{message:"wrong value",expectedValue:e,actualValue:a}}:{isValid:!0}}}}},this.id=e.id,this.refresh=e.refresh,this.defaultMaxAgeInSeconds=e.defaultMaxAgeInSeconds}return e.prototype.getValueFromPayload=function(e,t){return void 0!==e[this.id]?e[this.id].v:void 0},e.prototype.getLastFetchedTime=function(e,t){return void 0!==e[this.id]?e[this.id].t:void 0},e}()},66719,(e,t,n)=>{"use strict";var r=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Prom
1ise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.PrimitiveArrayClaim=void 0;var i=e.r(16500);n.PrimitiveArrayClaim=function(){function e(e){var t=this;this.validators={includes:function(e,n,a){void 0===n&&(n=t.defaultMaxAgeInSeconds);var s=i.default.getReferenceOrThrow().dateProvider;return{id:void 0!==a?a:t.id,refresh:function(e){return t.refresh(e)},shouldRefresh:function(e,r){if(void 0!==n&&n<s.getThresholdInSeconds())throw Error("maxAgeInSeconds must be greater than or equal to the DateProvider threshold value -> ".concat(s.getThresholdInSeconds()));return void 0===t.getValueFromPayload(e,r)||void 0!==n&&e[t.id].t<s.now()-1e3*n},validate:function(i,a){return r(t,void 0,void 0,function(){var t,r;return o(this,function(o){return void 0===(t=this.getValueFromPayload(i,a))?[2,{isValid:!1,reason:{message:"value does not exist",expectedToInclude:e,actualValue:t}}]:(r=(s.now()-this.getLastFetchedTime(i,a))/1e3,void 0!==n&&r>n)?[2,{isValid:!1,reason:{message:"expired",ageInSeconds:r,maxAgeInSeconds:n}}]:t.includes(e)?[2,{isValid:!0}]:[2,{isValid:!1,reason:{message:"wrong value",expectedToInclude:e,actualValue:t}}]})})}}},excludes:function(e,n,a){void 0===n&&(n=t.defaultMaxAgeInSeconds);var s=i.default.getReferenceOrThrow().dateProvider;return{id:void 0!==a?a:t.id,refresh:function(e){return t.refresh(e)},shouldRefresh:function(e,r){if(void 0!==n&&n<s.getThresholdInSeconds())throw Error("maxAgeInSeconds must be greater than or equal to the DateProvider threshold value -> ".concat(s.getThresholdInSeconds()));return void 0===t.getValueFromPayload(e,r)||void 0!==n&&e[t.id].t<s.now()-1e3*n},validate:function(i,a){return r(t,void 0,void 0,function(){var t,r;return o(this,function(o){return void 0===(t=this.getValueFromPayload(i,a))?[2,{isValid:!1,reason:{message:"value does not exist",expectedToNotInclude:e,actualValue:t}}]:(r=(s.now()-this.getLastFetchedTime(i,a))/1e3,void 0!==n&&r>n)?[2,{isValid:!1,reason:{message:"expired",ageInSeconds:r,maxAgeInSeconds:n}}]:t.includes(e)?[2,{isValid:!1,reason:{message:"wrong value",expectedToNotInclude:e,actualValue:t}}]:[2,{isValid:!0}]})})}}},includesAll:function(e,n,a){void 0===n&&(n=t.defaultMaxAgeInSeconds);var s=i.default.getReferenceOrThrow().dateProvider;return{id:void 0!==a?a:t.id,refresh:function(e){return t.refresh(e)},shouldRefresh:function(e,r){if(void 0!==n&&n<s.getThresholdInSeconds())throw Error("maxAgeInSeconds must be greater than or equal to the DateProvider threshold value -> ".concat(s.getThresholdInSeconds()));return void 0===t.getValueFromPayload(e,r)||void 0!==n&&e[t.id].t<s.now()-1e3*n},validate:function(i,a){return r(t,void 0,void 0,function(){var t,r,u,c;return o(this,function(o){return void 0===(t=this.getValueFromPayload(i,a))?[2,{isValid:!1,reason:{message:"value does not exist",expectedToInclude:e,actualValue:t}}]:(r=(s.now()-this.getLastFetchedTime(i,a))/1e3,void 0!==n&&r>n)?[2,{isValid:!1,reason:{message:"expired",ageInSeconds:r,maxAgeInSeconds:n}}]:(u=new Set(t),[2,(c=e.every(function(e){return u.has(e)}))?{isValid:c}:{isValid:c,reason:{message:"wrong value",expectedToInclude:e,actualValue:t}}])})})}}},includesAny:function(e,n,a){void 0===n&&(n=t.defaultMaxAgeInSeconds);var s=i.default.getReferenceOrThrow().dateProvider;return{id:void 0!==a?a:t.id,refresh:function(e){return t.refresh(e)},shouldRefresh:function(e,r){if(void 0!==n&&n<s.getThresholdInSeconds())throw Error("maxAgeInSeconds must be greater than or equal to the DateProvider threshold value -> ".concat(s.getThresholdInSeconds()));return void 0===t.getValueFromPayload(e,r)||void 0!==n&&e[t.id].t<s.now()-1e3*n},validate:function(i,a){return r(t,void 0,void 0,function(){var t,r,u,c;return o(this,function(o){return void 0===(t=this.getValueFromPayload(i,a))?[2,{isValid:!1,reason:{message:"value does not exist",expectedToInclude:e,actualValue:t}}]:(r=(s.now()-this.getLastFetchedTime(i,a))/1e3,void 0!==n&&r>n)?[2,{isValid:!1,reason:{message:"expired",ageInSeconds:r,maxAgeInSeconds:n}}]:(u=new Set(t),[2,(c=e.some(function(e){return u.has(e)}))?{isValid:c}:{isValid:c,reason:{message:"wrong value",expectedToIncludeAtLeastOneOf:e,actualValue:t}}])})})}}},excludesAll:function(e,n,a){void 0===n&&(n=t.defaultMaxAgeInSeconds);var s=i.default.getReferenceOrThrow().dateProvider;return{id:void 0!==a?a:t.id,refresh:function(e){return t.refresh(e)},shouldRefresh:function(e,r){if(void 0!==n&&n<s.getThresholdInSeconds())throw Error("maxAgeInSeconds must be greater than or equal to the DateProvider threshold value -> ".concat(s.getThresholdInSeconds()));return void 0===t.getValueFromPayload(e,r)||void 0!==n&&e[t.id].t<s.now()-1e3*n},validate:function(i,a){return r(t,void 0,void 0,function(){var t,r,u,c;return o(this,function(o){return void 0===(t=this.getValueFromPayload(i,a))?[2,{isValid:!1,reason:{message:"value does not exist",expectedToNotInclude:e,actualValue:t}}]:(r=(s.now()-this.getLastFetchedTime(i,a))/1e3,void 0!==n&&r>n)?[2,{isValid:!1,reason:{message:"expired",ageInSeconds:r,maxAgeInSeconds:n}}]:(u=new Set(t),[2,(c=e.every(function(e){return!u.has(e)}))?{isValid:c}:{isValid:c,reason:{message:"wrong value",expectedToNotInclude:e,actualValue:t}}])})})}}}},this.id=e.id,this.refresh=e.refresh,this.defaultMaxAgeInSeconds=e.defaultMaxAgeInSeconds}return e.prototype.getValueFromPayload=function(e,t){return void 0!==e[this.id]?e[this.id].v:void 0},e.prototype.getLastFetchedTime=function(e,t){return void 0!==e[this.id]?e[this.id].t:void 0},e}()},10775,(e,t,n)=>{"use strict";var r,o=e.e&&e.e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=e.e&&e.e.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.BooleanClaim=void 0,n.BooleanClaim=function(e){function t(t){var n=e.call(this,t)||this;return n.validators=i(i({},n.validators),{isTrue:function(e){return n.validators.hasValue(!0,e)},isFalse:function(e){return n.validators.hasValue(!1,e)}}),n}return o(t,e),t}(e.r(981980).PrimitiveClaim)},860653,(e,t,n)=>{"use strict";var r=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.BooleanClaim=n.PrimitiveArrayClaim=n.PrimitiveClaim=n.getInvalidClaimsFromResponse=n.getClaimValue=n.validateClaims=n.signOut=n.addAxiosInterceptors=n.doesSessionExist=n.attemptRefreshingSession=n.getAccessToken=n.getAccessTokenPayloadSecurely=n.getUserId=n.init=void 0;var i=e.r(299034),a=e.r(385034),s=e.r(3634),u=e.r(524463),c=e.r(760124),l=e.r(983128),d=e.r(554294),f=e.r(688339),p=e.r(711122),h=e.r(16500),g=function(){function e(){}return e.init=function(t){c.default.init(t.cookieHandler),l.default.init(t.windowHandler),h.default.init(t.dateProvider),d.default.init(t.lockFactory,l.default.getReferenceOrThrow().windowHandler.localStorage);var n=(0,u.validateAndNormaliseInputOrThrowError)(t);void 0!==t.enableDebugLogs&&t.enableDebugLogs&&(0,p.enableLogging)();var r=new s.default((0,a.default)({onHandleEvent:n.onHandleEvent,preAPIHook:n.preAPIHook,postAPIHook:n.postAPIHook,sessionExpiredStatusCode:n.sessionExpiredStatusCode})).override(n.override.functions).build();i.default.init(n,r),e.axiosInterceptorQueue.forEach(function(e){e()}),e.axiosInterceptorQueue=[]},e.getUserId=function(e){return i.default.recipeImpl.getUserId({userContext:(0,u.getNormalisedUserContext)(void 0===e?void 0:e.userContext)})},e.getAccessTokenPayloadSecurely=function(e){return r(this,void 0,void 0,function(){return o(this,function(t){return[2,i.default.recipeImpl.getAccessTokenPayloadSecurely({userContext:(0,u.getNormalisedUserContext)(void 0===e?void 0:e.userContext)})]})})},e.axiosInterceptorQueue=[],e.attemptRefreshingSession=function(){return r(void 0,void 0,void 0,function(){return o(e,function(e){return[2,i.default.attemptRefreshingSession()]})})},e.doesSessionExist=function(e){return i.default.recipeImpl.doesSessionExist({userContext:(0,u.getNormalisedUserContext)(void 0===e?void 0:e.userContext)})},e.addAxiosInterceptors=function(t,n){i.default.initCalled?i.default.recipeImpl.addAxiosInterceptors({axiosInstance:t,userContext:(0,u.getNormalisedUserContext)(n)}):e.axiosInterceptorQueue.push(function(){i.default.recipeImpl.addAxiosInterceptors({axiosInstance:t,userContext:(0,u.getNormalisedUserContext)(n)})})},e.signOut=function(e){return i.default.recipeImpl.signOut({userContext:(0,u.getNormalisedUserContext)(void 0===e?void 0:e.userContext)})},e.getInvalidClaimsFromResponse=function(e){return r(this,void 0,void 0,function(){return o(this,function(t){return[2,i.default.recipeImpl.getInvalidClaimsFromResponse({response:e.response,userContext:(0,u.getNormalisedUserContext)(e.userContext)})]})})},e.getClaimValue=function(t){return r(this,void 0,void 0,function(){var n,r;return o(this,function(o){switch(o.label){case 0:return n=(0,u.getNormalisedUserContext)(void 0===t?void 0:t.userContext),[4,e.getAccessTokenPayloadSecurely({userContext:n})];case 1:return r=o.sent(),[2,t.claim.getValueFromPayload(r,n)]}})})},e.validateClaims=function(e,t){var n=(0,u.getNormalisedUserContext)(t),r=f.SessionClaimValidatorStore.getClaimValidatorsAddedByOtherRecipes(),o=i.default.recipeImpl.getGlobalClaimValidators({claimValidatorsAddedByOtherRecipes:r,userContext:n}),a=void 0!==e?e(o,n):o;return 0===a.length?[]:i.default.recipeImpl.validateClaims({claimValidators:a,userContext:(0,u.getNormalisedUserContext)(t)})},e.getAccessToken=function(t){return r(void 0,void 0,void 0,function(){return o(e,function(e){switch(e.label){case 0:return[4,i.default.recipeImpl.doesSessionExist({userContext:(0,u.getNormalisedUserContext)(void 0===t?void 0:t.userContext)})];case 1:if(e.sent())return[2,(0,i.getTokenForHeaderAuth)("access")];return[2,void 0]}})})},e}();
1n.default=g,n.init=g.init,n.getUserId=g.getUserId,n.getAccessTokenPayloadSecurely=g.getAccessTokenPayloadSecurely,n.getAccessToken=g.getAccessToken,n.attemptRefreshingSession=g.attemptRefreshingSession,n.doesSessionExist=g.doesSessionExist,n.addAxiosInterceptors=g.addAxiosInterceptors,n.signOut=g.signOut,n.validateClaims=g.validateClaims,n.getClaimValue=g.getClaimValue,n.getInvalidClaimsFromResponse=g.getInvalidClaimsFromResponse;var v=e.r(981980);Object.defineProperty(n,"PrimitiveClaim",{enumerable:!0,get:function(){return v.PrimitiveClaim}});var m=e.r(66719);Object.defineProperty(n,"PrimitiveArrayClaim",{enumerable:!0,get:function(){return m.PrimitiveArrayClaim}});var b=e.r(10775);Object.defineProperty(n,"BooleanClaim",{enumerable:!0,get:function(){return b.BooleanClaim}})},990971,(e,t,n)=>{"use strict";n.__esModule=!0;var r=e.r(860653);for(var o in r)n.hasOwnProperty(o)||(n[o]=r[o])},825625,(e,t,n)=>{"use strict";var r,o=e.e&&e.e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.STGeneralError=void 0,n.STGeneralError=function(e){function t(t){var n=e.call(this,t)||this;return n.isSuperTokensGeneralError=!0,n}return o(t,e),t.isThisError=function(e){return!0===e.isSuperTokensGeneralError},t}(Error)},299034,(e,t,n)=>{"use strict";var r=e.e&&e.e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.updateClockSkewUsingFrontToken=n.fireSessionUpdateEventsIfNecessary=n.setFrontToken=n.getFrontToken=n.setAntiCSRF=n.saveLastAccessTokenUpdate=n.getTokenForHeaderAuth=n.setToken=n.getStorageNameForToken=n.getLocalSessionState=n.onInvalidClaimResponse=n.onTokenUpdate=n.onUnauthorisedResponse=n.FrontToken=n.AntiCsrfToken=void 0;var a=e.r(619714),s=e.r(541233),u=e.r(760124),c=e.r(983128),l=e.r(554294),d=e.r(711122),f=e.r(16500),p=function(){function e(){}return e.getToken=function(t){return o(this,void 0,void 0,function(){var n;return i(this,function(r){switch(r.label){case 0:if((0,d.logDebugMessage)("AntiCsrfToken.getToken: called"),void 0===t)return e.tokenInfo=void 0,(0,d.logDebugMessage)("AntiCsrfToken.getToken: returning undefined"),[2,void 0];if(void 0!==e.tokenInfo)return[3,2];return[4,function(){return o(this,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:return(0,d.logDebugMessage)("getAntiCSRFToken: called"),[4,I(!0)];case 1:if("EXISTS"!==t.sent().status)return(0,d.logDebugMessage)("getAntiCSRFToken: Returning because local session state != EXISTS"),[2,null];return[4,function(){return o(this,void 0,void 0,function(){var e,t,n,r;return i(this,function(o){switch(o.label){case 0:return e="; ",[4,u.default.getReferenceOrThrow().cookieHandler.getCookie()];case 1:if((t=(e+o.sent()).split("; "+m+"=")).length>
1=2&&void 0!==(n=t.pop())){if(void 0===(r=n.split(";").shift()))return[2,null];return[2,r]}return[2,null]}})})}()];case 2:return e=t.sent(),(0,d.logDebugMessage)("getAntiCSRFToken: returning: "+e),[2,e]}})})}()];case 1:if(null===(n=r.sent()))return(0,d.logDebugMessage)("AntiCsrfToken.getToken: returning undefined"),[2,void 0];return e.tokenInfo={antiCsrf:n,associatedAccessTokenUpdate:t},[3,4];case 2:if(e.tokenInfo.associatedAccessTokenUpdate===t)return[3,4];return e.tokenInfo=void 0,[4,e.getToken(t)];case 3:return[2,r.sent()];case 4:return(0,d.logDebugMessage)("AntiCsrfToken.getToken: returning: "+e.tokenInfo.antiCsrf),[2,e.tokenInfo.antiCsrf]}})})},e.removeToken=function(){return o(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return(0,d.logDebugMessage)("AntiCsrfToken.removeToken: called"),e.tokenInfo=void 0,[4,E(void 0)];case 1:return t.sent(),[2]}})})},e.setItem=function(t,n){return o(this,void 0,void 0,function(){return i(this,function(r){switch(r.label){case 0:if(void 0===t)return e.tokenInfo=void 0,[2];return(0,d.logDebugMessage)("AntiCsrfToken.setItem: called"),[4,E(n)];case 1:return r.sent(),e.tokenInfo={antiCsrf:n,associatedAccessTokenUpdate:t},[2]}})})},e}();n.AntiCsrfToken=p;var h=function(){function e(){}return e.getTokenInfo=function(){return o(this,void 0,void 0,function(){var t,n;return i(this,function(r){switch(r.label){case 0:return(0,d.logDebugMessage)("FrontToken.getTokenInfo: called"),[4,F()];case 1:if(null!==(t=r.sent()))return[3,5];return[4,I(!1)];case 2:if("EXISTS"!==r.sent().status)return[3,4];return[4,new Promise(function(t){e.waiters.push(t)})];case 3:return r.sent(),[2,e.getTokenInfo()];case 4:return[2,void 0];case 5:return n=M(t),(0,d.logDebugMessage)("FrontToken.getTokenInfo: returning ate: "+n.ate),(0,d.logDebugMessage)("FrontToken.getTokenInfo: returning uid: "+n.uid),(0,d.logDebugMessage)("FrontToken.getTokenInfo: returning up: "+n.up),[2,n]}})})},e.removeToken=function(){return o(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return(0,d.logDebugMessage)("FrontToken.removeToken: called"),[4,L(void 0)];case 1:return t.sent(),[4,S("access","")];case 2:return t.sent(),[4,S("refresh","")];case 3:return t.sent(),[4,p.removeToken()];case 4:return t.sent(),e.waiters.forEach(function(e){return e(void 0)}),e.waiters=[],[2]}})})},e.setItem=function(t){return o(this,void 0,void 0,function(){return i(this,function(n){switch(n.label){case 0:return[4,O()];case 1:if(n.sent(),"remove"===t)return[2,e.removeToken()];return(0,d.logDebugMessage)("FrontToken.setItem: called"),[4,L(t)];case 2:return n.sent(),e.waiters.forEach(function(e){return e(void 0)}),e.waiters=[],[2]}})})},e.doesTokenExists=function(){return o(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return[4,D()];case 1:return[2,null!==e.sent()]}})})},e.waiters=[],e}();n.FrontToken=h;var g=function(){function t(){}return t.init=function(n,r){(0,d.logDebugMessage)("init: called"),(0,d.logDebugMessage)("init: Input apiBasePath: "+n.apiBasePath),(0,d.logDebugMessage)("init: Input apiDomain: "+n.apiDomain),(0,d.logDebugMessage)("init: Input autoAddCredentials: "+n.autoAddCredentials),(0,d.logDebugMessage)("init: Input sessionTokenBackendDomain: "+n.sessionTokenBackendDomain),(0,d.logDebugMessage)("init: Input isInIframe: "+n.isInIframe),(0,d.logDebugMessage)("init: Input sessionExpiredStatusCode: "+n.sessionExpiredStatusCode),(0,d.logDebugMessage)("init: Input sessionTokenFrontendDomain: "+n.sessionTokenFrontendDomain),(0,d.logDebugMessage)("init: Input tokenTransferMethod: "+n.tokenTransferMethod);var o=c.default.getReferenceOrThrow().windowHandler.getWindowUnsafe();t.env=void 0===o||void 0===o.fetch?e.g:o,t.refreshTokenUrl=n.apiDomain+n.apiBasePath+"/session/refresh",t.signOutUrl=n.apiDomain+n.apiBasePath+"/signout",t.rid="session",t.config=n,void 0===t.env.__supertokensOriginalFetch&&((0,d.logDebugMessage)("init: __supertokensOriginalFetch is undefined"),t.env.__supertokensOriginalFetch=t.env.fetch.bind(t.env),t.env.__supertokensSessionRecipe=r,t.env.fetch=t.env.__supertokensSessionRecipe.addFetchInterceptorsAndReturnModifiedFetch({originalFetch:t.env.__supertokensOriginalFetch,userContext:{}}),t.env.__supertokensSessionRecipe.addXMLHttpRequestInterceptor({userContext:{}})),t.recipeImpl=t.env.__supertokensSessionRecipe,t.initCalled=!0},t.initCalled=!1,t.doRequest=function(e,n,s){return o(void 0,void 0,void 0,function(){var o,u,l,f,h,g,v,m,b,w,k,S,T,x,P;return i(t,function(i){switch(i.label){case 0:if(!t.initCalled)throw Error("init function not called");(0,d.logDebugMessage)("doRequest: start of fetch interception"),o=!1;try{u=void 0,"string"==typeof s?u=s:"object"==typeof s&&("string"==typeof s.url?u=s.url:"string"==typeof s.href&&(u=s.href)),o=!t.recipeImpl.shouldDoInterceptionBasedOnUrl(u,t.config.apiDomain,t.config.sessionTokenBackendDomain)}catch(e){if("Please provide a valid domain name"===e.message)(0,d.logDebugMessage)("doRequest: Trying shouldDoInterceptionBasedOnUrl with location.origin"),o=!t.recipeImpl.shouldDoInterceptionBasedOnUrl(c.default.getReferenceOrThrow().windowHandler.location.getOrigin(),t.config.apiDomain,t.config.sessionTokenBackendDomain);else throw e}if((0,d.logDebugMessage)("doRequest: Value of doNotDoInterception: "+o),!o)return[3,2];return(0,d.logDebugMessage)("doRequest: Returning without interception"),[4,e(n)];case 1:return[2,i.sent()];case 2:if(!(l=new Headers(void 0!==n&&void 0!==n.headers?n.headers:s.headers)).has("Authorization"))return[3,5];return[4,R("access")];case 3:return f=i.sent(),[4,R("refresh")];case 4:h=i.sent(),void 0!==f&&void 0!==h&&l.get("Authorization")==="Bearer ".concat(f)&&((0,d.logDebugMessage)("doRequest: Removing Authorization from user provided headers because it c
1ontains our access token"),l.delete("Authorization")),i.label=5;case 5:(0,d.logDebugMessage)("doRequest: Interception started"),a.ProcessState.getInstance().addState(a.PROCESS_STATE.CALLING_INTERCEPTION_REQUEST),g=0,v=void 0,i.label=6;case 6:return[4,I(!0)];case 7:if(m=i.sent(),b=new Headers(l),w=r(r({},n),{headers:b}),"EXISTS"!==m.status)return[3,9];return[4,p.getToken(m.lastAccessTokenUpdate)];case 8:void 0!==(k=i.sent())&&((0,d.logDebugMessage)("doRequest: Adding anti-csrf token to request"),b.set("anti-csrf",k)),i.label=9;case 9:return t.config.autoAddCredentials&&((0,d.logDebugMessage)("doRequest: Adding credentials include"),void 0===w?w={credentials:"include"}:void 0===w.credentials&&(w=r(r({},w),{credentials:"include"}))),b.has("rid")?(0,d.logDebugMessage)("doRequest: rid header was already there in request"):((0,d.logDebugMessage)("doRequest: Adding rid header: anti-csrf"),b.set("rid","anti-csrf")),S=t.config.tokenTransferMethod,(0,d.logDebugMessage)("doRequest: Adding st-auth-mode header: "+S),b.set("st-auth-mode",S),[4,C(b)];case 10:return i.sent(),(0,d.logDebugMessage)("doRequest: Making user's http call"),[4,e(w)];case 11:return T=i.sent(),(0,d.logDebugMessage)("doRequest: User's http call ended"),[4,A(T)];case 12:if(i.sent(),U("EXISTS"===m.status,T.status,T.headers.get("front-token")),T.status!==t.config.sessionExpiredStatusCode)return[3,14];if((0,d.logDebugMessage)("doRequest: Status code is: "+T.status),g>=t.config.maxRetryAttemptsForSessionRefresh)throw(0,d.logDebugMessage)("doRequest: Maximum session refresh attempts reached. sessionRefreshAttempts: ".concat(g,", maxRetryAttemptsForSessionRefresh: ").concat(t.config.maxRetryAttemptsForSessionRefresh)),console.error(x="Received a 401 response from ".concat(s,". Attempted to refresh the session and retry the request with the updated session tokens ").concat(t.config.maxRetryAttemptsForSessionRefresh," times, but each attempt resulted in a 401 error. The maximum session refresh limit has been reached. Please investigate your API. To increase the session refresh attempts, update maxRetryAttemptsForSessionRefresh in the config.")),Error(x);return[4,y(m)];case 13:if(P=i.sent(),g++,(0,d.logDebugMessage)("doRequest: sessionRefreshAttempts: "+g),"RETRY"!==P.result){if((0,d.logDebugMessage)("doRequest: Not retrying original request"),void 0!==P.error)if(P.error instanceof Response)v=P.error;else throw P.error;else v=T;return[3,18]}return(0,d.logDebugMessage)("doRequest: Retrying original request"),[3,17];case 14:if(T.status!==t.config.invalidClaimStatusCode)return[3,16];return[4,_(T)];case 15:i.sent(),i.label=16;case 16:return[2,T];case 17:return[3,6];case 18:return[2,v]}})})},t.attemptRefreshingSession=function(){return o(void 0,void 0,void 0,function(){var e;return i(t,function(n){switch(n.label){case 0:if(!t.initCalled)throw Error("init function not called");return[4,I(!1)];case 1:return[4,y(n.sent())];case 2:if("API_ERROR"===(e=n.sent()).result)throw e.error;return[2,"RETRY"===e.result]}})})},t}();n.default=g;var v="st-last-access-token-update",m="sAntiCsrf",b="sFrontToken";function y(e){return o(this,void 0,void 0,function(){var t,n,r,o,a,u,c,f,v,m,b,y,w,_;return i(this,function(i){switch(i.label){case 0:return[4,l.default.getReferenceOrThrow().lockFactory()];case 1:t=i.sent(),i.label=2;case 2:return(0,d.logDebugMessage)("onUnauthorisedResponse: trying to acquire lock"),[4,t.acquireLock("REFRESH_TOKEN_USE",1e3)];case 3:if(!i.sent())return[3,21];(0,d.logDebugMessage)("onUnauthorisedResponse: lock acquired"),i.label=4;case 4:return i.trys.push([4,17,19,21]),[4,I(!1)];case 5:if("NOT_EXISTS"===(n=i.sent()).status)return(0,d.logDebugMessage)("onUnauthorisedResponse: Not refreshing because local session state is NOT_EXISTS"),g.config.onHandleEvent({action:"UNAUTHORISED",sessionExpiredOrRevoked:!1,userContext:{}}),[2,{result:"SESSION_EXPIRED"}];if(r="EXISTS"===n.status,o="EXISTS"===e.status,a=n.status!==e.status,u="lastAccessTokenUpdate"in n&&"lastAccessTokenUpdate"in e&&n.lastAccessTokenUpdate!==e.lastAccessTokenUpdate,a&&r)return(0,d.logDebugMessage)("onUnauthorisedResponse: Retrying early because session status has changed and postLockLSS.status is EXISTS"),[2,{result:"RETRY"}];if(r&&o&&u)return(0,d.logDebugMessage)("onUnauthorisedResponse: Retrying early because pre and post lastAccessTokenUpdate don't match"),[2,{result:"RETRY"}];if(c=new Headers,"EXISTS"!==e.status)return[3,7];return[4,p.getToken(e.lastAccessTokenUpdate)];case 6:void 0!==(f=i.sent())&&((0,d.logDebugMessage)("onUnauthorisedResponse: Adding anti-csrf token to refresh API call"),c.set("anti-csrf",f)),i.label=7;case 7:return(0,d.logDebugMessage)("onUnauthorisedResponse: Adding rid and fdi-versions to refresh call header"),c.set("rid",g.rid),c.set("fdi-version",s.supported_fdi.join(",")),v=g.config.tokenTransferMethod,(0,d.logDebugMessage)("onUnauthorisedResponse: Adding st-auth-mode header: "+v),c.set("st-auth-mode",v),[4,C(c,!0)];case 8:return i.sent(),(0,d.logDebugMessage)("onUnauthorisedResponse: Calling refresh pre API hook"),[4,g.config.preAPIHook({action:"REFRESH_SESSION",requestInit:{method:"post",credentials:"include",headers:c},url:g.refreshTokenUrl,userContext:{}})];case 9:return m=i.sent(),(0,d.logDebugMessage)("onUnauthorisedResponse: Making refresh call"),[4,g.env.__supertokensOriginalFetch(m.url,m.requestInit)];case 10:return b=i.sent(),(0,d.logDebugMessage)("onUnauthorisedResponse: Refresh call ended"),[4,A(b)];case 11:if(i.sent(),(0,d.logDebugMessage)("onUnauthorisedResponse: Refresh status code is: "+b.status),y=b.status===g.config.sessionExpiredStatusCode,null!==b.headers.get("front-token"))return[3,14];if(!y)return[3,13];return[4,h.setItem("remove")];case 12:return i.sent(),[3,14];case 13:if(200===b.status)throw console.error("The 'front-token' header is missing from a successful refresh-session response. The most likely causes are proxy settings (e.g.: 'front-token' missing from 'access-control-expose-headers' or a proxy stripping this header). Please investigate your API."),Error("The 'front-token' header is missing from a successful refresh-session response. The most likely causes are proxy settings (e.g.: 'front-token' missing from 'access-control-expose-headers' or a proxy stripping this header). Please investigate your API.");i.label=14;case 14:if(U("EXISTS"===e.status,b.status,y&&null===b.headers.get("front-token")?"remove":b.headers.get("front-token")),b.status>=300)throw b;return[4,g.config.postAPIHook({action:"REFRESH_SESSION",fetchResponse:b.clone(),requestInit:m.requestInit,url:m.url,userContext:{}})];case 15:return i.sent(),[4,I(!1)];case 16:if("NOT_EXISTS"===i.sent().status)return(0,d.logDebugMessage)("onUnauthorisedResponse: local session doesn't exist, so returning session expired"),[2,{result:"SESSION_EXPIRED"}];return g.config.onHandleEvent({action:"REFRESH_SESSION",userContext:{}}),(0,d.logDebugMessage)("onUnauthorisedResponse: Sending RETRY signal"),[2,{result:"RETRY"}];case 17:return w=i.sent(),[4,I(!1)];case 18:if("NOT_EXISTS"===i.sent().status)return(0,d.logDebugMessage)("onUnauthorisedResponse: local session doesn't exist, so returning session expired"),[2,{result:"SESSION_EXPIRED",error:w}];return(0,d.logDebugMessage)("onUnauthorisedResponse: sending API_ERROR"),[2,{result:"API_ERROR",error:w}];case 19:return[4,t.releaseLock("REFRESH_TOKEN_USE")];case 20:return i.sent(),(0,d.logDebugMessage)("onUnauthorisedResponse: Released lock"),[7];case 21:return[4,I(!1)];case 22:if("NOT_EXISTS"===(_=i.sent()).status)return(0,d.logDebugMessage)("onUnauthorisedResponse: lock acquired failed and local session doesn't exist, so sending SESSION_EXPIRED"),[2,{result:"SESSION_EXPIRED"}];if(_.status!==e.status||"EXISTS"===_.status&&"EXISTS"===e.status&&_.lastAccessTokenUpdate!==e.lastAccessTokenUpdate)return(0,d.logDebugMessage)("onUnauthorisedResponse: lock acquired failed and retrying early because pre and post lastAccessTokenUpdate don't match"),[2,{result:"RETRY"}];return[3,2];case 23:return[2]}})})}function w(){(0,d.logDebugMessage)("onTokenUpdate: firing ACCESS_TOKEN_PAYLOAD_UPDATED event"),g.config.onHandleEvent({action:"ACCESS_TOKEN_PAYLOAD_UPDATED",userContext:{}})}function _(e){return o(this,void 0,void 0,function(){var t;return i(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,g.recipeImpl.getInvalidClaimsFromResponse({response:e,userContext:{}})];case 1:return(t=n.sent())&&g.config.onHandleEvent({action:"API_INVALID_CLAIM",claimValidationErrors:t,userContext:{}}),[3,3];case 2:return n.sent(),[3,3];case 3:return[2]}})})}function I(e){return o(this,void 0,void 0,function(){var t,n,r,o;return i(this,function(i){switch(i.label){case 0:return(0,d.logDebugMessage)("getLocalSessionState: called"),[4,x(v)];case 1:return t=i.sent(),[4,h.doesTokenExists()];case 2:if(!(i.sent()&&void 0!==t))return[3,3];return(0,d.logDebugMessage)("getLocalSessionState: returning EXISTS since both frontToken and lastAccessTokenUpdate exists"),[2,{status:"EXISTS",lastAccessTokenUpdate:t}];case 3:if(!t)return[3,4];return(0,d.logDebugMessage)("getLocalSessionState: returning NOT_EXISTS since frontToken was cleared but lastAccessTokenUpdate exists"),[2,{status:"NOT_EXISTS"}];case 4:if(n={status:"MAY_EXIST"},!e)return[3,8];return(0,d.logDebugMessage)("getLocalSessionState: trying to refresh"),[4,y(n)];case 5:if("RETRY"!==(r=i.sent()).result)return(0,d.logDebugMessage)("getLocalSessionState: return NOT_EXISTS in case error from backend"+r.result),[2,{status:"NOT_EXISTS"}];return[4,x(v)];case 6:return o=i.sent(),[4,h.doesTokenExists()];case 7:if(!i.sent()||void 0===o)throw console.error("Failed to retrieve local session state from cookies after a successful session refresh. This indicates a configuration error or that the browser is preventing cookie writes."),Error("Failed to retrieve local session state from cookies after a successful session refresh. This indicates a configuration error or that the browser is preventing cookie writes.");return(0,d.logDebugMessage)("getLocalSessionState: returning EXISTS since both frontToken and lastAccessTokenUpdate exists post refresh"),[2,{status:"EXISTS",lastAccessTokenUpdate:o}];case 8:return(0,d.logDebugMessage)("getLocalSessionState: returning: "+n.status),[2,n]}})})}function k(e){switch(e){case"access":return"st-access-token";case"refresh":return"st-refresh-token"}}function S(e,t){var n=k(e);return""!==t?((0,d.logDebugMessage)("setToken: saved ".concat(e," token into cookies")),T(n,t,Date.now()+31536e5)):((0,d.logDebugMessage)("setToken: cleared ".concat(e," token from cookies")),T(n,t,0))}function T(e,t,n){var r="Fri, 31 Dec 9999 23:59:59 GMT";n!==Number.MAX_SAFE_INTEGER&&(r=new Date(n).toUTCString());var o=g.config.sessionTokenFrontendDomain;return"localhost"===o||o===c.default.getReferenceOrThrow().windowHandler.location.getHostName()?u.default.getReferenceOrThrow().cookieHandler.setCookie("".concat(e,"=").concat(t,";expires=").concat(r,";path=/;samesite=").concat(g.config.isInIframe?"none;secure":"lax")):u.default.getReferenceOrThrow().cookieHandler.setCookie("".concat(e,"=").concat(t,";expires=").concat(r,";domain=").concat(o,";path=/;samesite=").concat(g.config.isInIframe?"none;secure":"lax"))}function R(e){return o(this,void 0,void 0,function(){return i(this,function(t){return[2,x(k(e))]})})}function x(e){return o(this,void 0,void 0,function(){var t,n,r;return i(this,function(o){switch(o.label){case 0:return t="; ",[4,u.default.getReferenceOrThrow().cookieHandler.getCookie()];case 1:if((n=(t+o.sent()).split("; "+e+"=")).length>=2&&void 0!==(r=n.pop()))return[2,r.split(";").shift()];return[2,void 0]}})})}function C(e,t){return void 0===t&&(t=!1),o(this,void 0,void 0,function(){var n,r;return i(this,function(o){switch(o.label){case 0:return(0,d.logDebugMessage)("setTokenHeaders: adding existing tokens as header"),[4,R("access")];case 1:return n=o.sent(),[4,R("refresh")];case 2:return r=o.sent(),(t||void 0!==n)&&void 0!==r?e.has("Authorization")?(0,d.logDebugMessage)("setAuthorizationHeaderIfRequired: Authorization header defined by the user, not adding"):((0,d.logDebugMessage)("setAuthorizationHeaderIfRequired: added authorization header"),e.set("Authorization","Bearer ".concat(t?r:n))):(0,d.logDebugMessage)("setAuthorizationHeaderIfRequired: token for header based auth not found"),[2]}})})}function A(e){return o(this,void 0,void 0,function(){var t,r,o,a,s;return i(this,function(i){switch(i.label){case 0:if((0,d.logDebugMessage)("saveTokensFromHeaders: Saving updated tokens from the response headers"),null===(t=e.headers.get("st-refresh-token")))return[3,2];return(0,d.logDebugMessage)("saveTokensFromHeaders: saving new refresh token"),[4,S("refresh",t)];case 1:i.sent(),i.label=2;case 2:if(null===(r=e.headers.get("st-access-token")))return[3,4];return(0,d.logDebugMessage)("saveTokensFromHeaders: saving new access token"),[4,S("access",r)];case 3:i.sent(),i.label=4;case 4:if(null===(o=e.headers.get("front-token")))return[3,6];return(0,d.logDebugMessage)("saveTokensFromHeaders: Setting sFrontToken: "+o),[4,h.setItem(o)];case 5:i.sent(),(0,n.updateClockSkewUsingFrontToken)({frontToken:o,responseHeaders:e.headers}),i.label=6;case 6:if(null===(a=e.headers.get("anti-csrf")))return[3,9];return[4,I(!1)];case 7:if("EXISTS"!==(s=i.sent()).status)return[3,9];return(0,d.logDebugMessage)("saveTokensFromHeaders: Setting anti-csrf token"),[4,p.setItem(s.lastAccessTokenUpdate,a)];case 8:i.sent(),i.label=9;case 9:return[2]}})})}n.onUnauthorisedResponse=y,n.onTokenUpdate=w,n.onInvalidClaimResponse=_,n.getLocalSessionState=I,n.getStorageNameForToken=k,n.setToken=S,n.getTokenForHeaderAuth=R;var P=void 0;function O(){return o(this,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:return(0,d.logDebugMessage)("saveLastAccessTokenUpdate: called"),e=Date.now().toString(),(0,d.logDebugMessage)("saveLastAccessTokenUpdate: setting "+e),[4,T(v,e,Number.MAX_SAFE_INTEGER)];case 1:if(t.sent(),void 0!==P)return[3,3];return[4,x(v)];case 2:P=t.sent()===e,t.label=3;case 3:return!1===P&&console.warn("Saving to cookies was not successful, this indicates a configuration error or the browser preventing us from writing the cookies."),[4,T("sIRTFrontend","",0)];case 4:return t.sent(),[2]}})})}function E(e){return o(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:if((0,d.logDebugMessage)("setAntiCSRF: called: "+e),void 0===e)return[3,2];return[4,T(m,e,Number.MAX_SAFE_INTEGER)];case 1:return t.sent(),[3,4];case 2:return[4,T(m,"",0)];case 3:t.sent(),t.label=4;case 4:return[2]}})})}function D(){return o(this,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:return(0,d.logDebugMessage)("getFrontTokenFromCookie: called"),[4,x(b)];case 1:return[2,void 0===(e=t.sent())?null:e]}})})}function M(e){return JSON.parse(decodeURIComponent(escape(atob(e)))
1)}function F(){return o(this,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:return(0,d.logDebugMessage)("getFrontToken: called"),[4,I(!0)];case 1:if("EXISTS"!==t.sent().status)return(0,d.logDebugMessage)("getFrontToken: Returning because sIRTFrontend != EXISTS"),[2,null];return[4,D()];case 2:return e=t.sent(),(0,d.logDebugMessage)("getFrontToken: returning: "+e),[2,e]}})})}function L(e){return o(this,void 0,void 0,function(){var t,n,r;return i(this,function(o){switch(o.label){case 0:return(0,d.logDebugMessage)("setFrontToken: called"),[4,D()];case 1:if(null!==(t=o.sent())&&void 0!==e&&(n=M(t).up,r=M(e).up,JSON.stringify(n)!==JSON.stringify(r)&&w()),void 0!==e)return[3,3];return[4,T(b,"",0)];case 2:return o.sent(),[3,5];case 3:return[4,T(b,e,Number.MAX_SAFE_INTEGER)];case 4:o.sent(),o.label=5;case 5:return[2]}})})}function U(e,t,n){if(null==n)return void(0,d.logDebugMessage)("fireSessionUpdateEventsIfNecessary returning early because the front token was not updated");var r="remove"!==n;(0,d.logDebugMessage)("fireSessionUpdateEventsIfNecessary wasLoggedIn: ".concat(e," frontTokenExistsAfter: ").concat(r," status: ").concat(t)),e?r||(t===g.config.sessionExpiredStatusCode?((0,d.logDebugMessage)("onUnauthorisedResponse: firing UNAUTHORISED event"),g.config.onHandleEvent({action:"UNAUTHORISED",sessionExpiredOrRevoked:!0,userContext:{}})):((0,d.logDebugMessage)("onUnauthorisedResponse: firing SIGN_OUT event"),g.config.onHandleEvent({action:"SIGN_OUT",userContext:{}}))):r&&((0,d.logDebugMessage)("onUnauthorisedResponse: firing SESSION_CREATED event"),g.config.onHandleEvent({action:"SESSION_CREATED",userContext:{}}))}n.saveLastAccessTokenUpdate=O,n.setAntiCSRF=E,n.getFrontToken=F,n.setFrontToken=L,n.fireSessionUpdateEventsIfNecessary=U,n.updateClockSkewUsingFrontToken=function(e){var t=e.frontToken,n=e.responseHeaders;if((0,d.logDebugMessage)("updateClockSkewUsingFrontToken: frontToken: "+t),null==t||"remove"===t)return void(0,d.logDebugMessage)("updateClockSkewUsingFrontToken: the access token payload wasn't updated or is being removed, skipping clock skew update");var r=M(t),o=g.recipeImpl.calculateClockSkewInMillis({accessTokenPayload:r.up,responseHeaders:n});f.default.getReferenceOrThrow().dateProvider.setClientClockSkewInMillis(o),(0,d.logDebugMessage)("updateClockSkewUsingFrontToken: Client clock synchronized successfully")}},14820,(e,t,n)=>{"use strict";function r(e){return/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.isAnIpAddress=void 0,n.isAnIpAddress=r,n.default=function(e){var t=this;this.getAsStringDangerous=function(){return t.value},this.value=function e(t,n){void 0===n&&(n=!1),t=t.trim();try{if(!t.startsWith("http://")&&!t.startsWith("https://"))throw Error("converting to proper URL");var o=new URL(t);return t=n?o.hostname.startsWith("localhost")||r(o.hostname)?"http://"+o.host:"https://"+o.host:o.protocol+"//"+o.host}catch(e){}if(t.startsWith("/"))throw Error("Please provide a valid domain name");if(0===t.indexOf(".")&&(t=t.substr(1)),(-1!==t.indexOf(".")||t.startsWith("localhost"))&&!t.startsWith("http://")&&!t.startsWith("https://")){t="https://"+t;try{return new URL(t),e(t,!0)}catch(e){}}throw Error("Please provide a valid domain name")}(e)}},376942,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function e(t){var n=this;this.startsWith=function(e){return n.value.startsWith(e.value)},this.appendPath=function(t){return new e(n.value+t.value)},this.getAsStringDangerous=function(){return n.value},this.value=function e(t){t=t.trim();try{if(!t.startsWith("http://")&&!t.startsWith("https://"))throw Error("converting to proper URL");if(t=new URL(t).pathname,"/"===t.charAt(t.length-1))return t.substr(0,t.length-1);return t}catch(e){}if((function(e){if(-1===e.indexOf(".")||e.startsWith("/"))return!1;try{var t=new URL(e);return -1!==t.hostname.indexOf(".")}catch(e){}try{var t=new URL("http://"+e);return -1!==t.hostname.indexOf(".")}catch(e){}return!1}(t)||t.startsWith("localhost"))&&!t.startsWith("http://")&&!t.startsWith("https://"))return e(t="http://"+t);"/"!==t.charAt(0)&&(t="/"+t);try{return new URL("http://example.com"+t),e("http://example.com"+t)}catch(e){throw Error("Please provide a valid URL path")}}(t)}},619714,(e,t,n)=>{"use strict";var r,o=e.i(742271),i=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Prom
1ise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},a=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.ProcessState=n.PROCESS_STATE=void 0,(r=n.PROCESS_STATE||(n.PROCESS_STATE={}))[r.CALLING_INTERCEPTION_REQUEST=0]="CALLING_INTERCEPTION_REQUEST",r[r.CALLING_INTERCEPTION_RESPONSE=1]="CALLING_INTERCEPTION_RESPONSE",n.ProcessState=function(){function e(){var e=this;this.history=[],this.addState=function(t){try{void 0!==o.default&&void 0!==o.default.env&&"testing"===o.default.env.TEST_MODE&&e.history.push(t)}catch(e){}},this.getEventByLastEventByName=function(t){for(var n=e.history.length-1;n>=0;n--)if(e.history[n]==t)return e.history[n]},this.reset=function(){e.history=[]},this.waitForEvent=function(t,n){return void 0===n&&(n=7e3),i(e,void 0,void 0,function(){var e,r=this;return a(this,function(o){return e=Date.now(),[2,new Promise(function(o){!function i(){var a=r.getEventByLastEventByName(t);void 0===a?Date.now()-e>n?o(void 0):setTimeout(i,1e3):o(a)}()})]})})}}return e.getInstance=function(){return void 0==e.instance&&(e.instance=new e),e.instance},e}()},541233,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.supported_fdi=n.package_version=void 0,n.package_version="20.1.6",n.supported_fdi=["1.16","1.17","1.18","1.19","2.0","3.0","3.1","4.0","4.1"]},385034,(e,t,n)=>{"use strict";var r=e.e&&e.e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0});var a=e.r(299034),s=e.r(240287),u=e.r(541233),c=e.r(711122),l=e.r(825625),d=e.r(386577),f=e.r(524463),p=e.r(16500),h=e.r(554294),g="CLAIM_REFRESH_LOCK";n.default=function(e){return{addXMLHttpRequestInterceptor:function(e){(0,c.logDebugMessage)("addXMLHttpRequestInterceptorAndReturnModified: called"),(0,d.addInterceptorsToXMLHttpRequest)()},addFetchInterceptorsAndReturnModifiedFetch:function(e){return(0,c.logDebugMessage)("addFetchInterceptorsAndReturnModifiedFetch: called"),function(t,n){return o(this,void 0,void 0,function(){return i(this,function(o){switch(o.label){case 0:return[4,a.default.doRequest(function(n){return e.originalFetch("object"==typeof t&&"clone"in t?t.clone():t,r({},n))},n,t)];case 1:return[2,o.sent()]}})})}},addAxiosInterceptors:function(e){if((0,c.logDebugMessage)("addAxiosInterceptors: called"),XMLHttpRequest.__interceptedBySuperTokens){console.warn("Not adding axios interceptor since XMLHttpRequest is already added. This is just a warning."),console.warn("Our axios and XMLHttpRequest interceptors cannot be used at the same time."),console.warn("Since XMLHttpRequest is added automatically and supports axios by default, you can just remove addAxiosInterceptors from your co
1de."),console.warn("If you want to continue using our axios interceptor, you can override addXMLHttpRequestInterceptor with an empty function."),(0,c.logDebugMessage)("addAxiosInterceptors: not adding, because XHR interceptors are already in place");return}for(var t=e.axiosInstance.interceptors.request,n=0;n<t.handlers.length;n++)if(t.handlers[n].fulfilled===s.interceptorFunctionRequestFulfilled)return void(0,c.logDebugMessage)("addAxiosInterceptors: not adding because already added on this instance");e.axiosInstance.interceptors.request.use(s.interceptorFunctionRequestFulfilled,function(e){return o(this,void 0,void 0,function(){return i(this,function(t){throw e})})}),e.axiosInstance.interceptors.response.use((0,s.responseInterceptor)(e.axiosInstance),(0,s.responseErrorInterceptor)(e.axiosInstance))},getUserId:function(e){return o(this,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:return(0,c.logDebugMessage)("getUserId: called"),[4,a.FrontToken.getTokenInfo()];case 1:if(void 0===(e=t.sent()))throw Error("No session exists");return(0,c.logDebugMessage)("getUserId: returning: "+e.uid),[2,e.uid]}})})},getAccessTokenPayloadSecurely:function(e){return o(this,void 0,void 0,function(){var t;return i(this,function(n){switch(n.label){case 0:return(0,c.logDebugMessage)("getAccessTokenPayloadSecurely: called"),[4,a.FrontToken.getTokenInfo()];case 1:if(void 0===(t=n.sent()))throw Error("No session exists");if(!(t.ate<p.default.getReferenceOrThrow().dateProvider.now()))return[3,5];return(0,c.logDebugMessage)("getAccessTokenPayloadSecurely: access token expired. Refreshing session"),[4,a.default.attemptRefreshingSession()];case 2:if(!n.sent())return[3,4];return[4,this.getAccessTokenPayloadSecurely({userContext:e.userContext})];case 3:return[2,n.sent()];case 4:throw Error("Could not refresh session");case 5:return(0,c.logDebugMessage)("getAccessTokenPayloadSecurely: returning: "+JSON.stringify(t.up)),[2,t.up]}})})},doesSessionExist:function(e){return o(this,void 0,void 0,function(){var e,t;return i(this,function(n){switch(n.label){case 0:return(0,c.logDebugMessage)("doesSessionExist: called"),[4,a.FrontToken.getTokenInfo()];case 1:if(void 0===(e=n.sent()))return(0,c.logDebugMessage)("doesSessionExist: access token does not exist locally"),[2,!1];if(!(e.ate<p.default.getReferenceOrThrow().dateProvider.now()))return[3,4];return(0,c.logDebugMessage)("doesSessionExist: access token expired. Refreshing session"),[4,(0,a.getLocalSessionState)(!1)];case 2:return t=n.sent(),[4,(0,a.onUnauthorisedResponse)(t)];case 3:return[2,"RETRY"===n.sent().result];case 4:return[2,!0]}})})},signOut:function(t){return o(this,void 0,void 0,function(){var n,r,o,s;return i(this,function(i){switch(i.label){case 0:return(0,c.logDebugMessage)("signOut: called"),[4,this.doesSessionExist(t)];case 1:if(!i.sent())return(0,c.logDebugMessage)("signOut: exiting early because session does not exist"),(0,c.logDebugMessage)("signOut: firing SIGN_OUT event"),e.onHandleEvent({action:"SIGN_OUT",userContext:t.userContext}),[2];return(0,c.logDebugMessage)("signOut: Calling refresh pre API hook"),[4,e.preAPIHook({action:"SIGN_OUT",requestInit:{method:"post",headers:{"fdi-version":u.supported_fdi.join(","),rid:a.default.rid}},url:a.default.signOutUrl,userContext:t.userContext})];case 2:return n=i.sent(),(0,c.logDebugMessage)("signOut: Calling API"),[4,fetch(n.url,n.requestInit)];case 3:if(r=i.sent(),(0,c.logDebugMessage)("signOut: API ended"),(0,c.logDebugMessage)("signOut: API responded with status code: "+r.status),r.status===e.sessionExpiredStatusCode)return[2];if(r.status>=300)throw r;return[4,e.postAPIHook({action:"SIGN_OUT",requestInit:n.requestInit,url:n.url,fetchResponse:r.clone(),userContext:t.userContext})];case 4:return i.sent(),[4,r.clone().json()];case 5:if("GENERAL_ERROR"===(o=i.sent()).status)throw(0,c.logDebugMessage)("doRequest: Throwing general error"),s=void 0===o.message?"No Error Message Provided":o.message,new l.STGeneralError(s);return[2]}})})},getInvalidClaimsFromResponse:function(e){return o(this,void 0,void 0,function(){var t;return i(this,function(n){switch(n.label){case 0:if(!("body"in e.response))return[3,2];return[4,e.response.clone().json()];case 1:return t=n.sent(),[3,3];case 2:t="string"==typeof e.response.data?JSON.parse(e.response.data):e.response.data,n.label=3;case 3:return[2,t.claimValidationErrors]}})})},getGlobalClaimValidators:function(e){return e.claimValidatorsAddedByOtherRecipes},validateClaims:function(e){return o(this,void 0,void 0,function(){var t,n,r,o,a,s,u,l,d,f,p;return i(this,function(i){switch(i.label){case 0:n=0,i.label=1;case 1:if(!(++n<100))return[3,20];return[4,h.default.getReferenceOrThrow().lockFactory()];case 2:return r=i.sent(),(0,c.logDebugMessage)("validateClaims: trying to acquire claim refresh lock"),[4,r.acquireLock(g)];case 3:if(!i.sent())return[3,18];i.label=4;case 4:return i.trys.push([4,,15,17]),[4,this.getAccessTokenPayloadSecurely({userContext:e.userContext})];case 5:t=i.sent(),(0,c.logDebugMessage)("validateClaims: claim refresh lock acquired"),o=0,a=e.claimValidators,i.label=6;case 6:if(!(o<a.length))return[3,14];return[4,(s=a[o]).shouldRefresh(t,e.userContext)];case 7:if(!i.sent())return[3,13];i.label=8;case 8:return i.trys.push([8,10,,11]),[4,s.refresh(e.userContext)];case 9:return i.sent(),[3,11];case 10:return u=i.sent(),console.error("Encountered an error while refreshing validator ".concat(s.id),u),[3,11];case 11:return[4,this.getAccessTokenPayloadSecurely({userContext:e.userContext})];case 12:t=i.sent(),i.label=13;case 13:return o++,[3,6];case 14:return[3,17];case 15:return(0,c.logDebugMessage)("validateClaims: releasing claim refresh lock"),[4,r.releaseLock(g)];case 16:return i.sent(),[7];case 17:return[3,20];case 18:(0,c.logDebugMessage)("validateClaims: Retrying refresh lock ".concat(n,"/").concat(100)),i.label=19;case 19:return[3,1];case 20:if(100!==n)return[3,22];return(0,c.logDebugMessage)("validateClaims: ran out of retries while trying to acquire claim refresh lock"),[4,this.getAccessTokenPayloadSecurely({userContext:e.userContext})];case 21:t=i.sent(),i.label=22;case 22:l=[],d=0,f=e.claimValidators,i.label=23;case 23:if(!(d<f.length))return[3,26];return[4,(s=f[d]).validate(t,e.userContext)];case 24:(p=i.sent()).isValid||l.push({id:s.id,reason:p.reason}),i.label=25;case 25:return d++,[3,23];case 26:return[2,l]}})})},shouldDoInterceptionBasedOnUrl:function(e,t,n){if((0,c.logDebugMessage)("shouldDoInterceptionBasedOnUrl: toCheckUrl: "+e+" apiDomain: "+t+" sessionTokenBackendDomain: "+n),e.includes("superTokensDoNotDoInterception"))return!1;
1var r=new URL(e=(0,f.normaliseURLDomainOrThrowError)(e)).hostname,o=!1;if(""!==t&&(o=r===new URL(t=(0,f.normaliseURLDomainOrThrowError)(t)).hostname),void 0===n||o)return o;var i=(0,f.normaliseSessionScopeOrThrowError)(n);return(0,f.matchesDomainOrSubdomain)(r,i)},calculateClockSkewInMillis:function(e){var t=e.accessTokenPayload;(0,c.logDebugMessage)("calculateClockSkewInMillis: called");var n=null==t?void 0:t.iat;if(void 0===n||"number"!=typeof n)return(0,c.logDebugMessage)("calculateClockSkewInMillis: payload iat is undefined or not a number. This may happen due to an unsupported backend sdk. Returning 0"),0;var r=1e3*n-Date.now();return(0,c.logDebugMessage)("calculateClockSkewInMillis: returning "+r),r}}}},590925,(e,t,n)=>{"use strict";var r=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.defaultCookieHandlerImplementation=void 0;var i=e.r(983128);n.defaultCookieHandlerImplementation={getCookie:function(){return r(this,void 0,void 0,function(){return o(this,function(e){return[2,i.default.getReferenceOrThrow().windowHandler.getWindowUnsafe().document.cookie]})})},setCookie:function(e){return r(this,void 0,void 0,function(){return o(this,function(t){return i.default.getReferenceOrThrow().windowHandler.getWindowUnsafe().document.cookie=e,[2]})})}}},760124,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CookieHandlerReference=void 0;var r=e.r(590925),o=function(){function e(e){var t=function(e){return e};void 0!==e&&(t=e),this.cookieHandler=t(r.defaultCookieHandlerImplementation)}return e.init=function(t){void 0===e.instance&&(e.instance=new e(t))},e.getReferenceOrThrow=function(){if(void 0===e.instance)throw Error("SuperTokensCookieHandler must be initialized before calling this method.");return e.instance},e}();n.CookieHandlerReference=o,n.default=o},481068,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DateProvider=void 0;var r=e.r(983128);n.DateProvider=function(){function e(){this.clockSkewInMillis=0,this.thresholdInSeconds=7}return e.init=function(){if(void 0===e.instance){e.instance=new e;var t=r.default.getReferenceOrThrow().windowHandler.localStorage.getItemSync(e.CLOCK_SKEW_KEY),n=null!==t?parseInt(t,10):0;e.instance.setClientClockSkewInMillis(n)}},e.getReferenceOrThrow=function(){if(void 0===e.instance)throw Error("DateProvider must be initialized before calling this method.");return e.instance},e.prototype.getThresholdInSeconds=function(){return this.thresholdInSeconds},e.prototype.setThresholdInSeconds=function(e){this.thresholdInSeconds=e},e.prototype.setClientClockSkewInMillis=function(t){this.clockSkewInMillis=Math.abs(t)>=1e3*this.thresholdInSeconds?t:0,r.default.getReferenceOrThrow().windowHandler.localStorage.setItemSync(e.CLOCK_SKEW_KEY,String(t))},e.prototype.getClientClockSkewInMillis=function(){return this.clockSkewInMillis},e.prototype.now=function(){return Date.now()+this.getClientClockSkewInMillis()},e.CLOCK_SKEW_KEY="__st_clockSkewInMillis",e}()},16500,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DateProviderReference=void 0;var r=e.r(481068),o=function(){function e(e){void 0!==e?this.dateProvider=e():(r.DateProvider.init(),this.dateProvider=r.DateProvider.getReferenceOrThrow())}return e.init=function(t){void 0===e.instance&&(e.instance=new e(t))},e.getReferenceOrThrow=function(){if(void 0===e.instance)throw Error("SuperTokensDateProvider must be initialized before calling this method.");return e.instance},e}();n.DateProviderReference=o,n.default=o},763588,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getGlobalClaimValidators=void 0;var r=e.r(524463),o=e.r(299034),i=e.r(688339);n.getGlobalClaimValidators=function(e,t){var n=(0,r.getNormalisedUserContext)(t),a=i.default.getClaimValidatorsAddedByOtherRecipes(),s=o.default.recipeImpl.getGlobalClaimValidators({claimValidatorsAddedByOtherRecipes:a,userContext:n});return void 0!==e?e(s,n):s}},959125,(e,t,n)=>{"use strict";n.__esModule=!0;var r=e.r(763588);for(var o in r)n.hasOwnProperty(o)||(n[o]=r[o])},715057,(e,t,n)=>{"use strict";var r=e.i(742271),o=e.e&&e.e.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.getPublicConfig=n.getPublicPlugin=n.applyPlugins=n.normaliseUser=n.normaliseUserResponse=n.getGlobalClaimValidators=n.getHashFromLocation=n.getNormalisedUserContext=n.checkForSSRErrorAndAppendIfNeeded=n.getAllQueryParams=n.getQueryParams=n.isTest=n.normaliseInputAppInfoOrThrowError=n.appendQueryParamsToURL=void 0;var i=e.r(891098),a=e.r(280551),s=e.r(881654),u=e.r(478499),c=e.r(552231),l=e.r(959125);function d(e,t){if("loginMethods"in t)return t;var n=void 0!==t.email?[t.email]:[],r=void 0!==t.phoneNumber?[t.phoneNumber]:[],o=void 0!==t.thirdParty?[t.thirdParty]:[],i=void 0!==t.webauthn?t.webauthn:{credentialIds:[]};return{id:t.id,emails:n,phoneNumbers:r,thirdParty:o,webauthn:i,isPrimaryUser:!1,tenantIds:t.tenantIds,timeJoined:t.timeJoined,loginMethods:[{recipeId:e,recipeUserId:t.id,timeJoined:t.timeJoined,tenantIds:t.tenantIds,email:t.email,phoneNumber:t.email}]}}n.appendQueryParamsToURL=function(e,t){if(void 0===t)return e;try{var n=new URL(e);return Object.entries(t).forEach(function(e){var t=e[0],r=e[1];n.searchParams.set(t,r)}),n.href}catch(n){var r=e.startsWith("/")?"http:localhost":"http://localhost/",o=new URL("".concat(r).concat(e));return Object.entries(t).forEach(function(e){var t=e[0],n=e[1];o.searchParams.set(t,n)}),"".concat(o.pathname).concat(o.search)}},n.normaliseInputAppInfoOrThrowError=function(e){if(void 0===e)throw Error("Please provide the appInfo object when calling supertokens.init");if(void 0===e.apiDomain)throw Error("Please provide your apiDomain inside the appInfo object when calling supertokens.init");if(void 0===e.appName)throw Error("Please provide your appName inside the appInfo object when calling supertokens.init");var t,n,r=new u.default("");return void 0!==e.apiGatewayPath&&(r=new u.default(e.apiGatewayPath)),{appName:e.appName,a
1piDomain:new s.default(e.apiDomain),apiBasePath:r.appendPath((t=a.DEFAULT_API_BASE_PATH,new u.default(void 0!==(n=e.apiBasePath)?n:t)))}},n.isTest=function(){try{return"testing"===r.default.env.TEST_MODE}catch(e){return!1}},n.getQueryParams=function(e){var t=new URLSearchParams(i.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getSearch()).get(e);if(null!==t)return t},n.getAllQueryParams=function(){return new URLSearchParams(i.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getSearch())},n.checkForSSRErrorAndAppendIfNeeded=function(e){return"u"<typeof window&&(e+=a.SSR_ERROR),e},n.getNormalisedUserContext=function(e){return void 0===e?{}:e},n.getHashFromLocation=function(){return i.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getHash().substring(1)},n.getGlobalClaimValidators=function(e){var t=e.overrideGlobalClaimValidators,n=e.userContext;return(0,l.getGlobalClaimValidators)(t,n)},n.normaliseUserResponse=function(e,t){return"createdNewRecipeUser"in t?t:{createdNewRecipeUser:t.createdNewUser,user:d(e,t.user)}},n.normaliseUser=d,n.applyPlugins=function(e,t,n){for(var r,i=o({},null!=t?t:{}),a=[null==(r=i.override)?void 0:r.functions],s=0;s<n.length;s++){var u=n[s][e];u&&(i=o({},u.config?u.config(i):i),void 0!==u.functions&&a.push(u.functions))}return(a=a.reverse().filter(function(e){return void 0!==e})).length>0&&(i.override=o(o({},i.override),{functions:function(e,t){for(var n=0,r=a;n<r.length;n++){var o=r[n];t.override(o)}return e}})),i},n.getPublicPlugin=function(e){return{id:e.id,initialized:!e.init,version:e.version,exports:e.exports,c
1ompatibleWebJSSDKVersions:e.compatibleWebJSSDKVersions}},n.getPublicConfig=function(e){return Object.keys(e).reduce(function(t,n){var r;return c.nonPublicConfigProperties.includes(n)?t:o(o({},t),((r={})[n]=e[n],r))},{})}},524463,(e,t,n)=>{"use strict";var r=e.e&&e.e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.matchesDomainOrSubdomain=n.getNormalisedUserContext=n.validateAndNormaliseInputOrThrowError=n.normaliseSessionScopeOrThrowError=n.normaliseURLPathOrThrowError=n.normaliseURLDomainOrThrowError=void 0;var a=e.r(14820),s=e.r(376942),u=e.r(983128);function c(e){return new a.default(e).getAsStringDangerous()}function l(e){return new s.default(e).getAsStringDangerous()}function d(e){var t=function(e){(e=e.trim().toLowerCase()).startsWith(".")&&(e=e.substr(1)),e.startsWith("http://")||e.startsWith("https://")||(e="http://"+e);try{return e=new URL(e).hostname}catch(e){throw Error("Please provide a valid sessionScope")}}(e);return"localhost"===t||(0,a.isAnIpAddress)(t)?t:e.startsWith(".")?"."+t:t}n.normaliseURLDomainOrThrowError=c,n.normaliseURLPathOrThrowError=l,n.normaliseSessionScopeOrThrowError=d,n.validateAndNormaliseInputOrThrowError=function(e){var t=this,n=c(e.apiDomain),a=l("/auth");void 0!==e.apiBasePath&&(a=l(e.apiBasePath));var s=u.default.getReferenceOrThrow().windowHandler.location.getHostName(),f=d(void 0!==e&&void 0!==e.sessionTokenFrontendDomain?e.sessionTokenFrontendDomain:s),p=401;void 0!==e.sessionExpiredStatusCode&&(p=e.sessionExpiredStatusCode);var h=403;if(void 0!==e.invalidClaimStatusCode&&(h=e.invalidClaimStatusCode),p===h)throw Error("sessionExpiredStatusCode and invalidClaimStatusCode cannot be the same.");var g=!0;void 0!==e.autoAddCredentials&&(g=e.autoAddCredentials);var v=!1;void 0!==e.isInIframe&&(v=e.isInIframe);var m=void 0;void 0!==e.sessionTokenBackendDomain&&(m=d(e.sessionTokenBackendDomain));var b=10;if(void 0!==e.maxRetryAttemptsForSessionRefresh){if(e.maxRetryAttemptsForSessionRefresh<0)throw Error("maxRetryAttemptsForSessionRefresh must be greater than or equal to 0.");b=e.maxRetryAttemptsForSessionRefresh}var y=function(e){return o(t,void 0,void 0,function(){return i(this,function(t){return[2,{url:e.url,requestInit:e.requestInit}]})})};void 0!==e.preAPIHook&&(y=e.preAPIHook);var w=function(){return o(t,void 0,void 0,function(){return i(this,function(e){return[2]})})};void 0!==e.postAPIHook&&(w=e.postAPIHook);var _=function(){};void 0!==e.onHandleEvent&&(_=e.onHandleEvent);var I=r({functions:function(e){return e}},e.override);return{apiDomain:n,apiBasePath:a,sessionTokenFrontendDomain:f,sessionExpiredStatusCode:p,invalidClaimStatusCode:h,autoAddCredentials:g,isInIframe:v,tokenTransferMethod:void 0!==e.tokenTransferMethod?e.tokenTransferMethod:"cookie",sessionTokenBackendDomain:m,maxRetryAttemptsForSessionRefresh:b,preAPIHook:y,postAPIHook:w,onHandleEvent:_,override:I}},n.getNormalisedUserContext=function(e){return void 0===e?{}:e},n.matchesDomainOrSubdomain=function(e,t){for(var n=e.split("."),r=0;r<n.length;r++){var o=n.slice(r).join(".");if(o===t||".".concat(o)===t)return!0}return!1}},688339,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SessionClaimValidatorStore=void 0;var r=function(){function e(){}return e.claimValidatorsAddedByOtherRecipes=[],e.addClaimValidatorFromOtherRecipe=function(t){e.claimValidatorsAddedByOtherRecipes.push(t)},e.getClaimValidatorsAddedByOtherRecipes=function(){return e.claimValidatorsAddedByOtherRecipes},e}();n.SessionClaimValidatorStore=r,n.default=r},681383,(e,t,n)=>{"use strict";var r=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Prom
1ise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};function i(){if("u"<typeof window)throw Error("If you are using this package with server-side rendering, please make sure that you are checking if the window object is defined.");return window}Object.defineProperty(n,"__esModule",{value:!0}),n.defaultWindowHandlerImplementation=void 0,n.defaultWindowHandlerImplementation={history:{replaceState:function(e,t,n){return i().history.replaceState(e,t,n)},getState:function(){return i().history.state}},location:{getHref:function(){return i().location.href},setHref:function(e){i().location.href=e},getSearch:function(){return i().location.search},getHash:function(){return i().location.hash},getPathName:function(){return i().location.pathname},assign:function(e){i().location.assign(e)},getHostName:function(){return i().location.hostname},getHost:function(){return i().location.host},getOrigin:function(){return i().location.origin}},getDocument:function(){return i().document},getWindowUnsafe:function(){return i().window},localStorage:{key:function(e){return r(this,void 0,void 0,function(){return o(this,function(t){return[2,i().localStorage.key(e)]})})},clear:function(){return r(this,void 0,void 0,function(){return o(this,function(e){return[2,i().localStorage.clear()]})})},getItem:function(e){return r(this,void 0,void 0,function(){return o(this,function(t){return[2,i().localStorage.getItem(e)]})})},removeItem:function(e){return r(this,void 0,void 0,function(){return o(this,function(t){return[2,i().localStorage.removeItem(e)]})})},setItem:function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){return[2,i().localStorage.setItem(e,t)]})})},keySync:function(e){return i().localStorage.key(e)},clearSync:function(){return i().localStorage.clear()},getItemSync:function(e){return i().localStorage.getItem(e)},removeItemSync:function(e){return i().localStorage.removeItem(e)},setItemSync:function(e,t){return i().localStorage.setItem(e,t)}},sessionStorage:{key:function(e){return r(this,void 0,void 0,function(){return o(this,function(t){return[2,i().sessionStorage.key(e)]})})},clear:function(){return r(this,void 0,void 0,function(){return o(this,function(e){return[2,i().sessionStorage.clear()]})})},getItem:function(e){return r(this,void 0,void 0,function(){return o(this,function(t){return[2,i().sessionStorage.getItem(e)]})})},removeItem:function(e){return r(this,void 0,void 0,function(){return o(this,function(t){return[2,i().sessionStorage.removeItem(e)]})})},setItem:function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){return[2,i().sessionStorage.setItem(e,t)]})})},keySync:function(e){return i().sessionStorage.key(e)},clearSync:function(){return i().sessionStorage.clear()},getItemSync:function(e){return i().sessionStorage.getItem(e)},removeItemSync:function(e){return i().sessionStorage.removeItem(e)},setItemSync:function(e,t){return i().sessionStorage.setItem(e,t)}}}},983128,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WindowHandlerReference=void 0;var r=e.r(681383),o=function(){function e(e){var t=function(e){return e};void 0!==e&&(t=e),this.windowHandler=t(r.defaultWindowHandlerImplementation)}return e.init=function(t){void 0===e.instance&&(e.instance=new e(t))},e.getReferenceOrThrow=function(){if(void 0===e.instance)throw Error("SuperTokensWindowHandler must be initialized before calling this method.");return e.instance},e}();n.WindowHandlerReference=o,n.default=o},386577,(e,t,n)=>{"use strict";var r=e.e&&e.e.__awaiter||function(e,t,n,r){return new(n||(n=Prom
1ise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=e.e&&e.e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(n,"__esModule",{value:!0}),n.addInterceptorsToXMLHttpRequest=void 0;var i=e.r(299034),a=e.r(711122),s=e.r(983128),u=e.r(619714),c=["readystatechange","abort","error","load","loadend","loadstart","progress","timeout"];n.addInterceptorsToXMLHttpRequest=function(){var e=new Promise(function(e){return setTimeout(e,0)}),t=XMLHttpRequest;(0,a.logDebugMessage)("addInterceptorsToXMLHttpRequest called"),(XMLHttpRequest=function(){var n,l,d=new t,f=this,p=[],h=[],g={},v=new Map,m=e;function b(e){m=m.finally(function(){var t;return null==(t=e())?void 0:t.catch(function(e){var t=new ProgressEvent("error");t.error=e,void 0!==f.onerror&&null!==f.onerror&&f.onerror(t),k("error",t)})})}var y="",w=!1,_=void 0,I=0;function k(e,t){var n=v.get(e);(0,a.logDebugMessage)("XHRInterceptor dispatching ".concat(t.type," to ").concat(n?n.size:0," listeners")),n&&Array.from(n).forEach(function(e){return e.apply(f,[t])})}function S(e){return r(this,void 0,void 0,function(){var s,c,d,h,v;return o(this,function(m){switch(m.label){case 0:if(w)return(0,a.logDebugMessage)("XHRInterceptor.handleResponse: Returning without interception"),[2,!0];m.label=1;case 1:return m.trys.push([1,7,,11]),(0,a.logDebugMessage)("XHRInterceptor.handleResponse: Interception started"),u.ProcessState.getInstance().addState(u.PROCESS_STATE.CALLING_INTERCEPTION_RESPONSE),s=e.status,[4,function(e){return r(this,void 0,void 0,function(){var t,n,r,s,u;return o(this,function(o){switch(o.label){case 0:if((0,a.logDebugMessage)("saveTokensFromHeaders: Saving updated tokens from the response"),null===(t=e.get("st-refresh-token")))return[3,2];return(0,a.logDebugMessage)("saveTokensFromHeaders: saving new refresh token"),[4,(0,i.setToken)("refresh",t)];case 1:o.sent(),o.label=2;case 2:if(null===(n=e.get("st-access-token")))return[3,4];return(0,a.logDebugMessage)("saveTokensFromHeaders: saving new access token"),[4,(0,i.setToken)("access",n)];case 3:o.sent(),o.label=4;case 4:if(null===(r=e.get("front-token")))return[3,6];return(0,a.logDebugMessage)("saveTokensFromHeaders: Setting sFrontToken: "+r),[4,i.FrontToken.setItem(r)];case 5:o.sent(),(0,i.updateClockSkewUsingFrontToken)({frontToken:r,responseHeaders:e}),o.label=6;case 6:if(null===(s=e.get("anti-csrf")))return[3,9];return[4,(0,i.getLocalSessionState)(!1)];case 7:if("EXISTS"!==(u=o.sent()).status)return[3,9];return(0,a.logDebugMessage)("saveTokensFromHeaders: Setting anti-csrf token"),[4,i.AntiCsrfToken.setItem(u.lastAccessTokenUpdate,s)];case 8:o.sent(),o.label=9;case 9:return[2]}})})}(c=new Headers(e.getAllResponseHeaders().split("\r\n").map(function(e){var t=e.indexOf(": ");return -1===t?["",""]:[e.slice(0,t),e.slice(t+2)]}).filter(function(e){return 0!==e[0].length})))];case 2:if(m.sent(),(0,i.fireSessionUpdateEventsIfNecessary)("EXISTS"===_.status,s,c.get("front-token")),s!==i.default.config.sessionExpiredStatusCode)return[3,4];return(0,a.logDebugMessage)("responseInterceptor: Status code is: "+s),[4,function(){return r(this,void 0,void 0,function(){var e,n,r;return o(this,function(o){switch(o.label){case 0:if(void 0===_)throw Error("Should never come here..");if((0,a.logDebugMessage)("XHRInterceptor.handleRetryPostRefreshing: preRequestLSS "+_.status),I>=i.default.config.maxRetryAttemptsForSessionRefresh)throw(0,a.logDebugMessage)("XHRInterceptor.handleRetryPostRefreshing: Maximum session refresh attempts reached. sessionRefreshAttempts: ".concat(I,", maxRetryAttemptsForSessionRefresh: ").concat(i.default.config.maxRetryAttemptsForSessionRefresh)),g.status=0,g.statusText="",g.responseType="",console.error(e="Received a 401 response from ".concat(y,". Attempted to refresh the session and retry the request with the updated session tokens ").concat(i.default.config.maxRetryAttemptsForSessionRefresh," times, but each attempt resulted in a 401 error. The maximum session refresh limit has been reached. Please investigate your API. To increase the session refresh attempts, update maxRetryAttemptsForSessionRefresh in the config.")),Error(e);return[4,(0,i.onUnauthorisedResponse)(_)];case 1:if(n=o.sent(),I++,(0,a.logDebugMessage)("XHRInterceptor.handleRetryPostRefreshing: sessionRefreshAttempts: "+I),"RETRY"!==n.result){if((0,a.logDebugMessage)("XHRInterceptor.handleRetryPostRefreshing: Not retrying original request "+!!n.error),void 0!==n.error)throw n.error;return[2,!0]}return(0,a.logDebugMessage)("XHRInterceptor.handleRetryPostRefreshing: Retrying original request"),R(f,r=new t,!0),p.forEach(function(e){e(r)}),x(r,l),[2,!1]}})})}()];
1case 3:return[2,m.sent()];case 4:if(s!==i.default.config.invalidClaimStatusCode)return[3,6];return[4,(0,i.onInvalidClaimResponse)({data:e.responseText})];case 5:m.sent(),m.label=6;case 6:return[2,!0];case 7:if(d=m.sent(),(0,a.logDebugMessage)("XHRInterceptor.handleResponse: caught error"),void 0===d.status)return[3,9];return[4,function(e){return r(this,void 0,void 0,function(){var t,n,r,i,a;return o(this,function(o){switch(o.label){case 0:if(t=e.headers.get("content-type"),n="",r="text",null!==t)return[3,5];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,e.text()];case 2:return n=o.sent(),[3,4];case 3:return o.sent(),n="",[3,4];case 4:return[3,9];case 5:if(!t.includes("application/json"))return[3,7];return r="json",a=(i=JSON).stringify,[4,e.json()];case 6:return n=a.apply(i,[o.sent()]),[3,9];case 7:if(!t.includes("text/"))return[3,9];return[4,e.text()];case 8:n=o.sent(),o.label=9;case 9:return[2,{status:e.status,responseText:n,statusText:e.statusText,responseType:r,headers:e.headers}]}})})}(d)];case 8:if(g.status=(h=m.sent()).status,g.statusText=h.statusText,g.responseType=h.responseType,n=h.headers,"json"===h.responseType)try{g.response=JSON.parse(h.responseText)}catch(e){g.response=h.responseText}else g.response=h.responseText;return g.responseText=h.responseText,[3,10];case 9:(v=new ProgressEvent("error")).error=d,void 0!==f.onerror&&null!==f.onerror&&f.onerror(v),k("error",v),m.label=10;case 10:return[2,!0];case 11:return[2]}})})}f.onload=null,f.onreadystatechange=null,f.onloadend=null,f.addEventListener=function(e,t,n){var r=v.get(e);void 0===r&&(r=new Set,v.set(e,r)),r.add(t)},f.removeEventListener=function(e,t){var n=v.get(e);void 0===n&&(n=new Set,v.set(e,n)),n.delete(t)},f.open=function(e,t){(0,a.logDebugMessage)("XHRInterceptor.open called");var n=arguments;y=t;try{w="string"==typeof y&&!i.default.recipeImpl.shouldDoInterceptionBasedOnUrl(y,i.default.config.apiDomain,i.default.config.sessionTokenBackendDomain)||"string"!=typeof y&&!i.default.recipeImpl.shouldDoInterceptionBasedOnUrl(y.toString(),i.default.config.apiDomain,i.default.config.sessionTokenBackendDomain)}catch(e){if("Please provide a valid domain name"===e.message)(0,a.logDebugMessage)("XHRInterceptor.open: Trying shouldDoInterceptionBasedOnUrl with location.origin"),w=!i.default.recipeImpl.shouldDoInterceptionBasedOnUrl(s.default.getReferenceOrThrow().windowHandler.location.getOrigin(),i.default.config.apiDomain,i.default.config.sessionTokenBackendDomain);else throw e}b(function(){p.push(function(e){e.open.apply(e,n)}),d.open.apply(d,n)})},f.send=function(e){x(d,l=e)},f.setRequestHeader=function(e,t){var n=this;((0,a.logDebugMessage)("XHRInterceptor.setRequestHeader: Called with ".concat(e)),w)?b(function(){return d.setRequestHeader(e,t)}):"anti-csrf"!==e&&b(function(){return r(n,void 0,void 0,function(){var n,r;return o(this,function(o){switch(o.label){case 0:if("authorization"!==e.toLowerCase())return[3,3];return(0,a.logDebugMessage)("XHRInterceptor.setRequestHeader: checking if user provided auth header matches local token"),[4,(0,i.getTokenForHeaderAuth)("access")];case 1:return n=o.sent(),[4,(0,i.getTokenForHeaderAuth)("refresh")];case 2:if(r=o.sent(),void 0!==n&&void 0!==r&&t==="Bearer ".concat(n))return(0,a.logDebugMessage)("XHRInterceptor.setRequestHeader: skipping Authorization from user provided headers because it contains our access token"),[2];o.label=3;case 3:return p.push(function(n){n.setRequestHeader(e,t)}),h.push({name:e,value:t}),d.setRequestHeader(e,t),[2]}})})})};var T=void 0;function R(e,r,o){var i,s=["load","loadend","readystatechange"];(0,a.logDebugMessage)("XHRInterceptor.setUpXHR called");for(var u=function(e){(0,a.logDebugMessage)("XHRInterceptor added listener for event ".concat(e)),r.addEventListener(e,function(t){(0,a.logDebugMessage)("XHRInterceptor got event ".concat(e)),s.includes(e)||k(e,t)})},l=0;l<c.length;l++)u(c[l]);if(r.onload=function(t){void 0===i&&(i=S(r)),i.then(function(n){n&&(e.onload&&e.onload(t),k("load",t))})},r.onreadystatechange=function(n){r.readyState===t.DONE?(void 0===i&&(i=S(r)),i.then(function(t){t&&(e.onreadystatechange&&e.onreadystatechange(n),k("readystatechange",n))})):(e.onreadystatechange&&e.onreadystatechange(n),k("readystatechange",n))},r.onloadend=function(t){void 0===i&&(i=S(r)),i.then(function(n){n&&(e.onloadend&&e.onloadend(t),k("loadend",t))})},e.getAllResponseHeaders=function(){var e;
1return n?(e="",n.forEach(function(t,n){return e+="".concat(n,": ").concat(t,"\r\n")})):e=r.getAllResponseHeaders(),e+"x-supertokens-xhr-intercepted: true\r\n"},e.getResponseHeader=function(e){return"x-supertokens-xhr-intercepted"===e?"true":n?n.get(e):r.getResponseHeader(e)},void 0===T)for(var d in T=[],r)d in e||T.push(d);for(var f=function(t){"function"==typeof r[t]?Object.defineProperty(e,t,{configurable:!0,value:function(){var e=arguments;return o||p.push(function(n){n[t].apply(n,e)}),r[t].apply(r,e)}}):Object.defineProperty(e,t,{configurable:!0,get:function(){return void 0!==g[t]?g[t]:r[t]},set:function(e){o||p.push(function(n){n[t]=e}),(0,a.logDebugMessage)("XHRInterceptor.set[".concat(t,"] = ").concat(e)),r[t]=e}})},h=0,v=T;h<v.length;h++){var d=v[h];f(d)}}function x(e,t){var n=this;if((0,a.logDebugMessage)("XHRInterceptor.send: called"),(0,a.logDebugMessage)("XHRInterceptor.send: Value of doNotDoInterception: "+w),w){(0,a.logDebugMessage)("XHRInterceptor.send: Returning without interception"),b(function(){return e.send(t)});return}(0,a.logDebugMessage)("XHRInterceptor.send: Interception started"),u.ProcessState.getInstance().addState(u.PROCESS_STATE.CALLING_INTERCEPTION_REQUEST),b(function(){return r(n,void 0,void 0,function(){var n,s;return o(this,function(u){switch(u.label){case 0:return[4,(0,i.getLocalSessionState)(!0)];case 1:if("EXISTS"!==(_=u.sent()).status)return[3,3];return[4,i.AntiCsrfToken.getToken(_.lastAccessTokenUpdate)];case 2:void 0!==(n=u.sent())&&((0,a.logDebugMessage)("XHRInterceptor.send: Adding anti-csrf token to request"),e.setRequestHeader("anti-csrf",n)),u.label=3;case 3:return i.default.config.autoAddCredentials&&((0,a.logDebugMessage)("XHRInterceptor.send: Adding credentials include"),f.withCredentials=!0),h.some(function(e){return"rid"===e.name})?(0,a.logDebugMessage)("XHRInterceptor.send: rid header was already there in request"):((0,a.logDebugMessage)("XHRInterceptor.send: Adding rid header: anti-csrf"),e.setRequestHeader("rid","anti-csrf")),s=i.default.config.tokenTransferMethod,h.some(function(e){return"st-auth-mode"===e.name})?(0,a.logDebugMessage)("XHRInterceptor.send: st-auth-mode header was already there in request"):((0,a.logDebugMessage)("XHRInterceptor.send: Adding st-auth-mode header: "+s),e.setRequestHeader("st-auth-mode",s)),[4,function(e,t){return r(this,void 0,void 0,function(){var n,r;return o(this,function(o){switch(o.label){case 0:return(0,a.logDebugMessage)("setAuthorizationHeaderIfRequired: adding existing tokens as header"),[4,(0,i.getTokenForHeaderAuth)("access")];case 1:return n=o.sent(),[4,(0,i.getTokenForHeaderAuth)("refresh")];case 2:return r=o.sent(),void 0!==n&&void 0!==r?t.some(function(e){return"authorization"===e.name.toLowerCase()})?(0,a.logDebugMessage)("setAuthorizationHeaderIfRequired: Authorization header defined by the user, not adding"):void 0!==n&&((0,a.logDebugMessage)("setAuthorizationHeaderIfRequired: added authorization header"),e.setRequestHeader("Authorization","Bearer ".concat(n))):(0,a.logDebugMessage)("setAuthorizationHeaderIfRequired: token for header based auth not found"),[2]}})})}(e,h)];case 4:return u.sent(),(0,a.logDebugMessage)("XHRInterceptor.send: Making user's http call"),[2,e.send(t)]}})})})}R(f,d,!1)}).__interceptedBySuperTokens=!0,XMLHttpRequest.__original=t}},971758,(e,t,n)=>{"use strict";n.__esModule=!0;var r=e.r(760124);for(var o in r)n.hasOwnProperty(o)||(n[o]=r[o])},647029,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CookieHandlerReference=void 0;var r=e.r(971758);Object.defineProperty(n,"CookieHandlerReference",{enumerable:!0,get:function(){return r.CookieHandlerReference}})},59733,(e,t,n)=>{"use strict";n.__esModule=!0;var r=e.r(16500);for(var o in r)n.hasOwnProperty(o)||(n[o]=r[o])},90433,(e,t,n)=>{"use strict";n.__esModule=!0;let r=e.r(825625);var o=void 0!==r.default?r:{default:r,...r};for(var i in o)n.hasOwnProperty(i)||(n[i]=o[i])},654858,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=e.r(90433).STGeneralError},142377,(e,t,n)=>{"use strict";n.__esModule=!0;let r=e.r(688339);var o=void 0!==r.default?r:{default:r,...r};for(var i in o)n.hasOwnProperty(i)||(n[i]=o[i])},43347,(e,t,n)=>{"use strict";n.__esModule=!0;var r=e.r(983128);for(var o in r)n.hasOwnProperty(o)||(n[o]=r[o])}]); 2 3//# chunkId=30498d28-6d11-5e69-aa0f-51d1b53fc8c1
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.