"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[577],{11577:function(e,t,n){n.d(t,{Z:function(){return tm}});var i=n(85893),o=n(67294),r=n(9473),a=n(78603),s=n(64720),l=n(6154),c=n(88926),d=n(43670),g=n(62645);function u(e){let{children:t}=e,n=(0,c.T)(),r=(0,c.C)(e=>e.settings.locale),a=o.useRef(void 0),[l,u]=o.useState(void 0);return(o.useEffect(()=>{if(g.ZP.log("SkellyIntlProvider(): Locale set to '".concat(r,"'")),"en"===r){n((0,d.i_)("en-US"));return}if("de"===r){n((0,d.i_)("de-DE"));return}if("ru"===r){n((0,d.i_)("ru-RU"));return}void 0!==r&&a.current!==r&&(a.current=r,m(r).then(e=>u(e)))},[r]),o.useEffect(()=>{l&&g.ZP.log("SkellyIntlProvider(): Messages loaded")},[l]),void 0===r||void 0===l)?null:(0,i.jsx)(s.Z,{locale:r,messages:l,children:t})}let m=async e=>new Promise((t,n)=>{let i="/i18n/".concat(e,".json");g.ZP.log("SkellyIntlProvider.fetchMessages(locale: ".concat(e,"): Fetching ").concat(i)),l.Z.get(i).then(e=>{t(e.data)}).catch(e=>{console.log(e),n(e)})});var f=n(68239),p=n(46008);let h=e=>({palette:{mode:e,background:{default:p.Kj[e].background,paper:p.Kj[e].background,contrastText:p.Kj[e].onBackground,outline:p.Kj[e].outline},surface:{default:p.Kj[e].surface,contrastText:p.Kj[e].onSurface},surfaceVariant:{default:p.Kj[e].surfaceVariant,contrastText:p.Kj[e].onSurfaceVariant,outline:p.Kj[e].outlineVariant},primary:{main:p.Kj[e].primary,contrastText:p.Kj[e].onPrimary},secondary:{main:p.Kj[e].secondary,contrastText:p.Kj[e].onSecondary}},typography:{fontFamily:'"DM Sans", "Roboto", "Helvetica", "Arial", sans-serif',fontSize:15,h1:{fontSize:"56px",fontWeight:700},h2:{fontSize:"48px",fontWeight:700},h3:{fontSize:"38px",fontWeight:700},h4:{fontSize:"32px",fontWeight:700},h5:{fontSize:"24px",fontWeight:700},h6:{fontSize:"14px",fontWeight:700},subtitle1:{fontSize:"15px",fontWeight:600},subtitle1Selected:{fontSize:"15px",fontWeight:600,padding:"0.3rem",borderRadius:"0.4rem"},body1:{fontSize:"14px",fontWeight:400},body2:{fontSize:"11px",fontWeight:400,opacity:.6},button:{fontSize:"14px",fontWeight:700,textTransform:"none"},link:{fontFamily:'"DM Sans", "Roboto", "Helvetica", "Arial", sans-serif',fontSize:14,fontWeight:400,textDecoration:"none",cursor:"pointer","&:hover":{textDecoration:"underline"}}},components:{MuiTableCell:{styleOverrides:{root:{opacity:1,padding:"1rem 2rem 1rem 0"}}}}});var v=n(22430),x=n(2178),y=n(31955);function Z(e){let t=(0,c.C)(e=>e.settings.mode),n=o.useMemo(()=>(0,f.Z)(h(t)),[t]);return o.useEffect(()=>{g.cM("SkellyThemeProvider(): mode = ".concat(t)),document.body.style.backgroundColor=(0,x.d)(t),y.Z.set("mode",t)},[t]),(0,i.jsx)(v.Z,{theme:n,children:e.children})}var j=n(53768),b=n(91881);function k(e){e&&(e.evict({id:"ROOT_QUERY",fieldName:"getMyFollowers",broadcast:!1}),e.evict({id:"ROOT_QUERY",fieldName:"getMyFollowees",broadcast:!1}),e.evict({id:"ROOT_QUERY",fieldName:"getMyFriendships",broadcast:!1}),e.evict({id:"ROOT_QUERY",fieldName:"getMyProfile",broadcast:!1}),e.evict({id:"ROOT_QUERY",fieldName:"getMySettings",broadcast:!1}),e.gc())}function w(e){e&&(e.evict({id:"ROOT_QUERY",fieldName:"getMyActivities",broadcast:!1}),e.gc())}function S(e){e&&(e.evict({id:"ROOT_QUERY",fieldName:"getMessages",broadcast:!1}),e.evict({id:"ROOT_QUERY",fieldName:"getMessagesSeen",broadcast:!1}),e.gc())}var C=n(10638),_=n(51191),I=n(38854),P=n(72198),R=n(48702),L=n(51142),A=n(30424),G=n(82729),O=n(31230);function T(){let e=(0,G._)(['\n #\n # IGDB\n #\n type IGBDGame {\n id: Int\n cover: IGDBCover\n first_release_date: Long\n involved_companies: [IGDBInvolvedCompany!]\n name: String\n platforms: [IGDBPlatform!]\n url: String\n }\n\n type IGDBCover {\n id: Int\n url: String\n }\n\n type IGDBInvolvedCompany {\n id: Int\n company: IGDBCompany\n developer: Boolean\n }\n\n type IGDBCompany {\n id: Int\n name: String\n websites: [IGDBWebsite!]\n }\n\n type IGDBWebsite {\n id: Int\n url: String\n }\n\n type IGDBPlatform {\n id: Int\n name: String\n }\n\n #\n # Overwolf game events\n #\n type OverwolfGameStatus {\n game_id: Int!\n # 0: Coming soon\n # 1: Good to go\n # 2: Some game events may be unavailable\n # 3: Game events are currently unavailable\n state: Int!\n disabled: Boolean!\n\n # Field only provided when requesting details\n published: Boolean\n features: [OverwolfGameFeature!]\n }\n\n type OverwolfGameFeature {\n name: String\n state: Int\n published: Boolean\n keys: [OverwolfGameKey!]\n }\n\n type OverwolfGameKey {\n name: String\n type: Int\n state: Int\n is_index: Boolean\n category: String\n sample_data: String\n published: Boolean\n }\n\n #\n # Websites\n #\n\n type WebsiteInfo {\n url: String\n title: String\n description: String\n image: String\n }\n\n #\n # Queries\n #\n\n extend type Query {\n # Input is array of game ids, e.g. ["2312", "4333"]\n getIGDBGames(input: [String!]!): [IGBDGame]!\n getIGDBGame(input: String!): IGBDGame!\n searchIGDBGames(input: String!): [IGBDGame]!\n\n getWebsiteInfo(input: String!): WebsiteInfo!\n getWebsiteInfos(input: [String!]!): [WebsiteInfo]!\n\n getOverwolfGameStatuses: [OverwolfGameStatus]!\n getOverwolfGameStatus(classId: String!): OverwolfGameStatus!\n }\n']);return T=function(){return e},e}let D=(0,O.Ps)(T());var E=n(69483),M=n.n(E);g.cM("ApolloConfig(): connectToDevTools: ",!1);let B=new A.xm(M());var W=n(32393);let N=new W.h({typePolicies:{MyProfile:{keyFields:[],fields:{accounts:{merge:(e,t)=>t},social_networks:{merge:(e,t)=>t},games:{merge:(e,t)=>t}}},Profile:{keyFields:["friend_id"]},Activity:{keyFields:!1},SocialNetwork:{keyFields:!1},TwitterAccount:{keyFields:!1},Friendships:{keyFields:[]},Account:{keyFields:!1},Websites:{keyFields:!1},FeedbackConsolidated:{keyFields:["game","account"]},TextFeedback:{keyFields:["game","account","feedback_id"]},Messages:{keyFields:["chat_id"],fields:{messages:{merge(e,t,n){let{variables:i}=n;if(!e||!e.length)return t;let o=[...t||[],...e||[]],r=o.filter((e,t)=>o.findIndex(t=>t.message_id===e.message_id)===t);return r.sort((e,t)=>t.message_id-e.message_id),r}},nextToken:{merge(e,t,n){let{variables:i}=n;return e&&(null==i?void 0:i.nextToken)!==e?e:t}},scannedCount:{merge:(e,t)=>null},startedAt:{merge:(e,t)=>null}}},Activities:{keyFields:[],fields:{activities:{merge(e,t){console.log("apolloCache.Activities.activities(): existing: ".concat(JSON.stringify((e||[]).map(e=>e.activity_id)))),console.log("apolloCache.Activities.activities(): incoming: ".concat(JSON.stringify((t||[]).map(e=>e.activity_id))));let n=[...t];for(let t of e||[])n.find(e=>e.activity_id===t.activity_id)||n.push(t);return n.sort((e,t)=>t.activity_id-e.activity_id),n}},nextToken:{merge:(e,t)=>(console.log("apolloCache.Activities.nextToken(): existing: ",e),console.log("apolloCache.Activities.nextToken(): incoming: ",t),"n/a"===t)?e:t},scannedCount:{merge:(e,t)=>(console.log("apolloCache.Activities.scannedCount(): existing: ",e),console.log("apolloCache.Activities.scannedCount(): incoming: ",t),(e||0)+(t||0))},startedAt:{merge:(e,t)=>(console.log("apolloCache.Activities.startedAt(): existing: ",e),console.log("apolloCache.Activities.startedAt(): incoming: ",t),-1===t)?e:e||t}}},IGDBCover:{keyFields:!1},IGDBInvolvedCompany:{keyFields:!1},IGDBCompany:{keyFields:!1},IGDBWebsite:{keyFields:!1},IGDBPlatform:{keyFields:!1},WebsiteInfo:{keyFields:["url"]}}});async function z(e,t,n){let{cache:i}=n;g.ZP.log("ApolloWrapper(): Local resolver getOverwolfGameStatuses called");let o=await l.Z.get("https://game-events-status.overwolf.com/gamestatus_prod.json"),r=o.data;return g.ZP.log("ApolloWrapper(): getOverwolfGameStatuses data: ".concat(JSON.stringify(r))),r}async function F(e,t,n){let{classId:i}=t,{cache:o}=n;g.ZP.log("ApolloWrapper(): Local resolver getOverwolfGameStatuses called (search: ".concat(i,")"));let r=await l.Z.get("https://game-events-status.overwolf.com/".concat(i,"_prod.json")),a=r.data;return g.ZP.log("ApolloWrapper(): getOverwolfGameStatuses data: ".concat(JSON.stringify(a))),a}var U=n(63200);async function Q(e){let t;console.log("fetchMetaData(url: ".concat(e,"): Called"));let n=fetch(e,{headers:{"User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"},method:"GET"}),i=await n,o=await i.text(),r={name:{},property:{},title:null};for(;t=K.exec(o);)Array.isArray(t)&&4===t.length&&(r[t[1]][t[2]]=t[3]);let a=J.exec(o);return Array.isArray(a)&&a.length>=1&&(r.title=a[1]),r}let K=//g,J=/(.*?)<\/title>/g;async function q(e,t){let{input:n}=t;return g.ZP.log("ApolloWrapper(): Local resolver getPreviewLink called (url: ".concat(n,")")),null}async function $(e,t){let{input:n}=t;if(g.ZP.log("ApolloWrapper(): Local resolver getPreviewLinks called (urls: ".concat(JSON.stringify(n),")")),!n)return null;let i=[];for(let e of n){let t={link:void 0};t.link=e;let n=await Q(e);i.push({url:e,title:n.title||n.property["og:title"]||n.name["twitter:title"]||null,description:n.property["og:description"]||n.name["twitter:description"]||null,image:n.property["og:image"]||n.name["twitter:image"]||null})}return i}var Y=n(51118);async function H(e){return await (0,Y.d)("arn:aws:lambda:us-east-1:063451354639:function:skelly_igdb_games_search",e)}async function V(e){return(g.ZP.log("igdb.getIGDBGames(".concat(JSON.stringify(e),"): Called")),0===e.length)?{success:!0,games:[]}:await (0,Y.d)("arn:aws:lambda:us-east-1:063451354639:function:skelly_igdb_games_get",e)}var X=n(11749);function ee(){let e=(0,G._)(["\n fragment MyGame on IGBDGame {\n id\n cover {\n id\n url\n }\n first_release_date\n involved_companies {\n id\n company {\n id\n name\n websites {\n id\n url\n }\n }\n developer\n }\n name\n platforms {\n id\n name\n }\n url\n }\n "]);return ee=function(){return e},e}async function et(e,t,n){let i,{input:o}=t,{cache:r}=n;if(g.ZP.log("ApolloWrapper.getIGDBGames(): Local resolver called (gameIds: ".concat(JSON.stringify(o),")")),!Array.isArray(o)||0===o.length)return null;try{i=await V(o)}catch(e){g.ZP.error("getIGDBGamesLambda failed: ",e)}if(!1===i.success||!i.games)return null;g.ZP.log("ApolloWrapper.getIGDBGames(): Games: ",i);let a=er(i.games);for(let e of a)r.writeQuery({query:X.wQ,data:{...e,id:"".concat(e.id),__typename:"Game"}});return a}let en={};async function ei(e,t,n){let i,{input:o}=t,{client:r}=n;if(g.ZP.log("ApolloWrapper(gameId: ".concat(o,"): Local resolver getIGDBGame called")),en[o])return new Promise((e,t)=>{en[o].push({resolve:e,reject:t})});en[o]=[];let a=r.readFragment({id:"IGDBGame:".concat(o),fragment:(0,O.Ps)(ee())});if(a)return a;try{i=await V([o])}catch(e){for(g.ZP.log("ApolloWrapper.getIGDBGame(): *** ERROR: ",e),console.log(e),console.log(JSON.stringify(e));en[o].length;)en[o].shift().reject(e);throw delete en[o],e}if(!1===i.success||!i.games||1!==i.games.length){for(;en[o].length;)en[o].shift().resolve(null);return delete en[o],null}let s=er(i.games)[0];for(;en[o].length;)en[o].shift().resolve(s);return delete en[o],s}async function eo(e,t,n){let{input:i}=t,{cache:o}=n;g.ZP.log("ApolloWrapper(): Local resolver searchIGDBGames called (search: ".concat(JSON.stringify(i),")"));let r=await H(i);if(!1===r.success||!r.games)return null;let a=er(r.games);return a}function er(e){return e.map(e=>{if(void 0===e.cover&&(e.cover=null),void 0===e.first_release_date&&(e.first_release_date=null),void 0===e.involved_companies)e.involved_companies=null;else for(let t of e.involved_companies)if(void 0===t.id&&(t.id=null),t.company){if(t.company.websites)for(let e of t.company.websites)void 0===e.id&&(e.id=null),void 0===e.url&&(e.url=null);else t.company.websites=null}else t.company=null;if(void 0===e.name&&(e.name=null),void 0===e.platforms)e.platforms=null;else for(let t of e.platforms)void 0===t.id&&(t.id=null),void 0===t.name&&(t.name=null);return void 0===e.url&&(e.url=null),{...e,__typename:"Game"}})}var ea=n(27526),es=n(26798);let el="us-east-1",ec="https://57oy2nj6xrbtxfrqkfjev3raoy.appsync-api.us-east-1.amazonaws.com/graphql";var ed=e=>{let{children:t}=e,n=(0,c.T)(),{createClient:r,client:a,stopClient:s}=function(){let{getAuthOptions:e}=function(){let{getIdToken:e,getCredentials:t}=o.useContext(es.e),n=(0,c.C)(e=>e.account.loginState),i=o.useCallback(async()=>{switch(n){case b.zZ.CreatingApolloClientPrivate:case b.zZ.LoggedIn:{let t=await e();return{type:"AMAZON_COGNITO_USER_POOLS",jwtToken:t}}case b.zZ.CreatingApolloClientPublic:case b.zZ.LoggedOut:{let e=await t();return{type:"AWS_IAM",credentials:e}}default:throw g.ZP.error("getAuthOptions(): Invalid login state: ".concat(n)),"getAuthOptions(): Invalid login state (".concat(n,")")}},[e,t,n]);return{getAuthOptions:i}}(),[t,n]=o.useState(void 0),i=o.useCallback(async()=>{g.ZP.log("createClient(): Called"),await (0,A.zE)({cache:N,storage:B});let t=new I.f({cache:N,typeDefs:D,connectToDevTools:!1,resolvers:{Query:{getIGDBGames:et,getIGDBGame:ei,searchIGDBGames:eo,getWebsiteInfo:q,getWebsiteInfos:$,getOverwolfGameStatuses:z,getOverwolfGameStatus:F}}}),i=await e(),o=new P.u({uri:ec}),r=(0,U.q)(n=>{let{graphQLErrors:a,networkError:s,operation:l,forward:c}=n;if(a){for(let n of a)if(g.ZP.error("createClient.errorLink.onError.graphQLErrors(): ".concat(JSON.stringify(n))),"UnauthorizedException"===n.errorType){g.ZP.log("createClient.errorLink.onError.graphQLErrors(): Refreshing authorisation token");let a=(0,_.createSubscriptionHandshakeLink)({url:ec,region:el,auth:i},o);a.setOnError(e=>{let{graphQLErrors:t,networkError:i,operation:o,forward:r}=e;if(t)for(let e of t)g.ZP.log("createClient.subscriptionHandshakeLink.setOnError(): graphQLError: ".concat(JSON.stringify(e)));i&&g.ZP.log("createClient.subscriptionHandshakeLink.setOnError(): networkError: ".concat(JSON.stringify(n)))}),e().then(e=>{let n=R.i.from([r,(0,C.createAuthLink)({url:ec,region:el,auth:e}),a]);return t.setLink(n),c(l)})}}s&&g.ZP.log("createClient.errorLink.onError.networkError(): Not processed here (".concat(JSON.stringify(s),")"))}),a=new L.W({attempts:(e,t,n)=>{if(g.ZP.log("client.retryLink.attempts(): count: ".concat(e,", operation: ").concat(JSON.stringify(null==t?void 0:t.operationName),", error: ").concat(JSON.stringify(n))),"messageSubscription"===t.operationName)return g.ZP.log("client.retryLink.attempts(): Not retrying 'messageSubscription'"),!1;let i=globalThis.skelly.reduxStore.getState().internetConnection.isOnline;if(!i)return g.ZP.log("client.retryLink.attempts(): Not retrying, there is no internet connection"),!1;let o=globalThis.skelly.reduxStore.getState().internetConnection.apolloError;return o?(g.ZP.log("client.retryLink.attempts(): Not retrying, there was previously an error (".concat(o,")")),!1):!(e>3)||(g.ZP.log("client.retryLink.attempts(): Giving up after 3 times"),globalThis.skelly.reduxStore.dispatch((0,ea.iC)("RetryLinkFailed")),!1)},delay:(e,t,n)=>(g.ZP.log("client.retryLink.delay(): count: ".concat(e,", operation: ").concat(t.operationName,", error: ").concat(JSON.stringify(n))),1===e?1e3:2===e?3e3:6e3)}),s=(0,_.createSubscriptionHandshakeLink)({url:ec,region:el,auth:i},o);s.setOnError(e=>{let{graphQLErrors:t,networkError:n,operation:i,forward:o}=e;if(t)for(let e of t)g.ZP.log("createClient.subscriptionHandshakeLink.setOnError.graphQLErrors(): ".concat(JSON.stringify(e)));n&&g.ZP.log("createClient.subscriptionHandshakeLink.networkError((): ".concat(JSON.stringify(n)))});let l=R.i.from([a,r,(0,C.createAuthLink)({url:ec,region:el,auth:i}),s]);return t.setLink(l),k(N),N&&(N.evict({id:"ROOT_QUERY",fieldName:"getProfiles",broadcast:!0}),N.evict({id:"ROOT_QUERY",fieldName:"getProfile",broadcast:!0}),N.gc()),N&&(N.evict({id:"ROOT_QUERY",fieldName:"getFeedbacks",broadcast:!0}),N.evict({id:"ROOT_QUERY",fieldName:"getTextFeedbacks",broadcast:!0}),N.gc()),N&&(N.evict({id:"ROOT_QUERY",fieldName:"getOverwolfGameStatuses",broadcast:!0}),N.gc()),S(N),w(N),g.ZP.log("createClient(): Initialization completed"),globalThis.skelly.apolloClient=t,n(t),t},[e]);return{createClient:i,client:t,stopClient:()=>{null==t||t.stop(),n(void 0)}}}(),l=(0,c.C)(e=>e.account.loginState),{removeFCMToken:d}={removeFCMToken:function(){}};return(o.useEffect(()=>(g.ZP.log("ApolloWrapper(): Mounted"),()=>{}),[]),o.useEffect(()=>{switch(g.ZP.log("ApolloWrapper(): loginState is ".concat(l)),l){case b.zZ.ClosingApolloClientPrivate:var e;g.ZP.log("ApolloWrapper(): Closing apollo client"),d(),k(a.cache),w(a.cache),S(a.cache),(e=a.cache)&&(e.evict({id:"ROOT_QUERY",fieldName:"getIGDBGames",broadcast:!1}),e.gc()),s(),n((0,b.ni)()),n((0,b.av)(b.zZ.LoggedOut));break;case b.zZ.CreatingApolloClientPrivate:g.ZP.log("ApolloWrapper(): Creating private apollo client"),r().then(()=>{g.ZP.log("ApolloWrapper(): Setting private apollo client")}).catch(e=>{g.ZP.error("ApolloWrapper(): Creating private client failed: ".concat(e)),console.error(e)});break;case b.zZ.CreatingApolloClientPublic:g.ZP.log("ApolloWrapper(): Creating public apollo client"),r().then(e=>{g.ZP.log("ApolloWrapper(): Setting public apollo client"),n((0,b.av)(b.zZ.LoggedOut))}).catch(e=>{g.ZP.error("ApolloWrapper(): Creating public client failed: ".concat(e)),console.error(e),n((0,b.av)(b.zZ.LoggedOut))});break;default:g.ZP.log("ApolloWrapper(): loginState ".concat(l," not processed"))}},[l]),o.useEffect(()=>{a&&(g.ZP.log("ApolloWrapper(): Client was set, migrating state (current state: ".concat(l,")")),l===b.zZ.CreatingApolloClientPrivate?n((0,b.av)(b.zZ.LoggedIn)):l===b.zZ.CreatingApolloClientPublic&&n((0,b.av)(b.zZ.LoggedOut)))},[a]),a)?(0,i.jsx)(j.e,{client:a,children:t}):t},eg=n(58936),eu=n(9008),em=n.n(eu);function ef(e){let{title:t,description:n,metaName:o,metaProperty:r,canonical:a}=e;return o=o||{},n&&(o.description=n),r=r||{},(0,i.jsxs)(em(),{children:[t?(0,i.jsx)("title",{children:t}):null,Object.entries(o).map(e=>{let[t,n]=e;return(0,i.jsx)("meta",{name:t,content:n},t)}),Object.entries(r).map(e=>{let[t,n]=e;return(0,i.jsx)("meta",{property:t,content:n},t)}),a?(0,i.jsx)("link",{rel:"canonical",href:a}):null]})}var ep=n(98396);function eh(e){let{children:t}=e,n=(0,c.C)(e=>e.settings.mode),i=(0,c.T)(),o=(0,ep.Z)("(prefers-color-scheme: dark)");if(void 0===n){let e=!0===o?"dark":"light";return g.ZP.log("Layout(): Setting mode to '".concat(e,"'")),i((0,d.PM)(e)),null}return t}var ev=n(2734),ex=n(44012),ey=n(93946),eZ=n(99078),ej=n(46646),eb=n(34386),ek=n(50146),ew=n(93390);function eS(e){let t=(0,c.T)(),n=(0,c.C)(e=>e.settings.mode),o=(0,c.C)(e=>e.account.username);return(0,i.jsx)("div",{style:e.style,children:(0,i.jsx)(eb.Z,{title:"light"===n?(0,i.jsx)(ex.Z,{id:"SwitchDark"}):(0,i.jsx)(ex.Z,{id:"SwitchLight"}),arrow:!0,children:"light"===n?(0,i.jsx)(ey.Z,{onClick:()=>{t((0,d.PM)("dark")),o&&(0,ew.c$)(ek.Gk.dark)},children:(0,i.jsx)(eZ.Z,{})}):(0,i.jsx)(ey.Z,{onClick:()=>{t((0,d.PM)("light")),o&&(0,ew.c$)(ek.Gk.light)},children:(0,i.jsx)(ej.Z,{})})})})}var eC=n(11163),e_=n(26447),eI=n(83321),eP=n(40044),eR=n(11703),eL=n(39485),eA=n(32701),eG=n(84818),eO=n(2684),eT=n(85216),eD=n(15398),eE=n(73079),eM=n(94229),eB=n(46396),eW=n(13540),eN=n(68378),ez=n(89349),eF=n(97555);let eU=[{value:"auth",icon:(0,i.jsx)(eL.Z,{}),label:(0,i.jsx)(ex.Z,{id:"Login"}),route:"/auth/".concat(eF.D.LogIn),loggedIn:!1,isActive:e=>e.startsWith("/auth")},{value:"gaming",icon:(0,i.jsx)(eG.Z,{}),iconActive:(0,i.jsx)(eA.Z,{}),label:(0,i.jsx)(ex.Z,{id:"Gaming"}),route:"/gaming",loggedIn:!0,isActive:e=>"/gaming"===e},{value:"network",icon:(0,i.jsx)(eT.Z,{}),iconActive:(0,i.jsx)(eO.Z,{}),label:(0,i.jsx)(ex.Z,{id:"Network"}),route:"/network",loggedIn:!0,isActive:e=>"/network"===e},{value:"profile",icon:(0,i.jsx)(eE.Z,{}),iconActive:(0,i.jsx)(eD.Z,{}),label:(0,i.jsx)(ex.Z,{id:"Profile"}),route:"/profile",loggedIn:!0,isActive:e=>"/profile"===e},{value:"developer",icon:(0,i.jsx)(ez.Z,{}),iconActive:(0,i.jsx)(eN.Z,{}),label:(0,i.jsx)(ex.Z,{id:"Developer"}),route:"/developer",loggedIn:!0,developer:!0,isActive:e=>"/developer"===e},{value:"settings",icon:(0,i.jsx)(eB.Z,{}),iconActive:(0,i.jsx)(eM.Z,{}),label:(0,i.jsx)(ex.Z,{id:"Settings"}),route:"/settings",loggedIn:!0,isActive:e=>"/settings"===e},{value:"logout",icon:(0,i.jsx)(eW.Z,{}),label:(0,i.jsx)(ex.Z,{id:"Logout"}),route:"/",shallRoute:()=>!1,loggedIn:!0,isActive:()=>!1}];function eQ(e){let t,{setDrawerOpen:n}=e;(0,r.I0)();let a=(0,eC.useRouter)(),s=(0,c.C)(e=>e.account.username),l=(0,c.C)(e=>e.account.isDeveloper);t=window.location.pathname;let d=eU.filter(e=>e.developer?l:void 0===e.loggedIn||e.loggedIn===(void 0!==s)),u=d.find(e=>e.isActive(t)),{logOut:m}=o.useContext(es.e);return(0,i.jsx)(eR.Z,{value:void 0!==u&&u.value,onChange:async(e,t)=>{g.ZP.log("TabsMenu(): onChange value ".concat(t));try{var n;let e=eU.find(e=>e.value===t);if("logout"===e.value)m();else if((null===(n=e.shallRoute)||void 0===n?void 0:n.call(e))===!1)g.ZP.log("TabsMenu(): Not routing page");else{let t=await a.push(e.route);g.ZP.log("TabsMenu(): Navigation result is '".concat(t,"'"))}}catch(e){g.ZP.log("TabsMenu(): Navigation failed"),console.error(e)}},"aria-label":"icon label tabs example",children:d.map(e=>(0,i.jsx)(eP.Z,{icon:e===u&&e.iconActive?e.iconActive:e.icon,label:e.label,value:e.value},e.value))})}var eK=n(326),eJ=n(77533),eq=n(15861);function e$(e){let{setDrawerOpen:t}=e,n=(0,c.C)(e=>e.account.username),r=(0,c.C)(e=>e.account.isDeveloper),a=eU.filter(e=>e.developer?r:void 0===e.loggedIn||e.loggedIn===(void 0!==n)),s=(0,eC.useRouter)(),l=(0,c.C)(e=>e.settings.mode),u=(0,c.T)(),{logOut:m}=o.useContext(es.e);return(0,i.jsxs)(e_.Z,{direction:"column",children:[a.map(e=>(0,i.jsx)(eI.Z,{onClick:async()=>{try{var n;if("logout"===e.value)m();else if((null===(n=e.shallRoute)||void 0===n?void 0:n.call(e))===!1)g.ZP.log("Header(): Not routing page");else{let t=await s.push(e.route);g.ZP.log("Header(): Navigation result is '".concat(t,"'"))}}catch(e){g.ZP.log("Header(): Navigation failed")}t(!1)},children:(0,i.jsxs)(e_.Z,{direction:"row",gap:"0.5rem",style:{marginRight:"auto"},children:[e.icon,(0,i.jsx)(eq.Z,{variant:"body1",children:e.label})]})},e.value)),(0,i.jsx)(eI.Z,{onClick:()=>{t(!1),u((0,d.PM)("light"===l?"dark":"light")),n&&(0,ew.c$)("light"===l?ek.Gk.dark:ek.Gk.light)},children:(0,i.jsx)(e_.Z,{direction:"row",gap:"0.5rem",style:{marginRight:"auto"},children:"light"===l?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eZ.Z,{}),(0,i.jsx)(eq.Z,{variant:"body1",children:(0,i.jsx)(ex.Z,{id:"DarkMode"})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ej.Z,{}),(0,i.jsx)(eq.Z,{variant:"body1",children:(0,i.jsx)(ex.Z,{id:"LightMode"})})]})})})]})}var eY=n(63475);function eH(e){let{withBorder:t}=e,n=(0,ep.Z)("(min-width:800px)"),r=(0,eC.useRouter)(),a=(0,ev.Z)(),[s,l]=o.useState(!1);return(0,i.jsx)("div",{style:{display:"flex",flexDirection:"row",width:"100%",borderStyle:!0===t?"none none solid none":void 0,borderWidth:"thin",borderColor:a.palette.background.outline},children:(0,i.jsxs)(e_.Z,{direction:"row",style:{width:"100%",maxWidth:1200,marginLeft:"auto",marginRight:"auto",paddingTop:"0.5rem",paddingBottom:"0.5rem",alignItems:"center",boxSizing:"border-box"},children:[(0,i.jsx)(eI.Z,{onClick:()=>{r.push("/")},style:{marginLeft:"0.5rem",marginRight:"auto"},children:(0,i.jsx)(eY.Z,{style:{height:"2rem",marginRight:"0.7rem"}})}),n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eQ,{setDrawerOpen:l}),(0,i.jsx)(eS,{style:{marginRight:"0.5rem",marginLeft:"auto"}})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eK.Z,{style:{marginRight:"0.5rem",marginLeft:"auto"},onClick:()=>{!1===s&&l(!0)}}),(0,i.jsx)(eJ.ZP,{anchor:"left",open:s,onClose:()=>{!0===s&&l(!1)},style:{userSelect:"none"},children:(0,i.jsx)(e$,{setDrawerOpen:l})})]})]})})}var eV=n(67720),eX=n(57709),e0=n(23599),e1=n(94054),e6=n(18360);let e5=[{name:"Deutsch",flag:"/img/languages/flagGermany.webp",locale:"de-DE"},{name:"English",flag:"/img/languages/flagUS.png",locale:"en-US"},{name:"Espa\xf1ol",flag:"/img/languages/flagSpain.gif",locale:"es-ES"},{name:"Fran\xe7ais",flag:"/img/languages/flagFrance.gif",locale:"fr-FR"},{name:"Italiano",flag:"/img/languages/flagItaly.gif",locale:"it-IT"},{name:"日本語",flag:"/img/languages/flagJapan.gif",locale:"ja-JP"},{name:"한국어",flag:"/img/languages/flagKorea.gif",locale:"ko-KR"},{name:"Portugu\xeas do Brasil",flag:"/img/languages/flagBrazil.gif",locale:"pt-BR"},{name:"русский",flag:"/img/languages/flagRU.gif",locale:"ru-RU"},{name:"Svenska",flag:"/img/languages/flagSweden.gif",locale:"sv-SE"},{name:"Українська",flag:"/img/languages/flagUkraine.gif",locale:"uk-UA"},{name:"中文",flag:"/img/languages/flagChina.gif",locale:"zh-CN"}];function e2(){let e=(0,c.C)(e=>e.account.username),t=(0,c.C)(e=>e.settings.locale),n=(0,c.T)();return(0,i.jsx)(e1.Z,{sx:{width:"calc(100vw - 2rem)",maxWidth:"14rem"},children:(0,i.jsx)(e6.Z,{value:e5.findIndex(e=>e.locale===t),onChange:t=>{let i=t.target.value,o=e5[i].locale;n((0,d.i_)(o)),e&&(0,ew.gK)({language:o})},color:"primary",input:(0,i.jsx)(eX.Z,{}),children:e5.map((e,t)=>(0,i.jsx)(e0.Z,{value:t,children:(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[(0,i.jsx)("img",{src:e.flag,style:{width:"2rem"}}),(0,i.jsx)(eq.Z,{variant:"body1",style:{marginLeft:"1rem"},children:e.name})]})},e.locale))})})}var e8=n(25084),e3=n(18808);function e4(){return(0,i.jsxs)(e_.Z,{direction:"row",gap:"0.2rem",children:[(0,i.jsx)(ey.Z,{type:"button",sx:{p:"10px"},"aria-label":"search",onClick:()=>{window.open("https://discord.com/invite/TfCRZrQh2K","_blank")},children:(0,i.jsx)(e3.Z,{})}),(0,i.jsx)(ey.Z,{type:"button",sx:{p:"10px"},"aria-label":"search",onClick:()=>{window.open("https://twitter.com/SkellyApp","_blank")},children:(0,i.jsx)(e8.Z,{})})]})}var e9=n(66939);function e7(){let e=(0,eC.useRouter)();return(0,i.jsxs)(e_.Z,{direction:"column",children:[(0,i.jsx)(eq.Z,{variant:"h6",children:(0,i.jsx)(ex.Z,{id:"Product"})}),(0,i.jsx)(e9.Z,{messageId:"Pricing",onClick:()=>{e.push("/pricing")}}),(0,i.jsx)(e9.Z,{messageId:"Integration",onClick:()=>{e.push("/integration")}}),(0,i.jsx)(e9.Z,{messageId:"Support",onClick:()=>{e.push("/support")}})]})}function te(){let e=(0,eC.useRouter)();return(0,i.jsxs)(e_.Z,{direction:"column",children:[(0,i.jsx)(eq.Z,{variant:"h6",children:(0,i.jsx)(ex.Z,{id:"Policies"})}),(0,i.jsx)(e9.Z,{messageId:"Terms",onClick:()=>{e.push("/terms")}}),(0,i.jsx)(e9.Z,{messageId:"Privacy",onClick:()=>{e.push("/privacy")}})]})}function tt(){let e=(0,eC.useRouter)();return(0,i.jsxs)(e_.Z,{direction:"column",children:[(0,i.jsx)(eq.Z,{variant:"h6",children:(0,i.jsx)(ex.Z,{id:"Company"})}),(0,i.jsx)(e9.Z,{messageId:"About",onClick:()=>{e.push("/about")}})]})}function tn(){return(0,i.jsxs)(e_.Z,{direction:"column",children:[(0,i.jsx)(eq.Z,{variant:"h6",children:(0,i.jsx)(ex.Z,{id:"Download"})}),(0,i.jsx)(e9.Z,{messageId:"Windows",reactIntl:!1,onClick:()=>{window.open("https://www.overwolf.com/app/Skelly","_blank")}}),(0,i.jsx)(e9.Z,{messageId:"Android",reactIntl:!1,onClick:()=>{window.open("https://play.google.com/store/apps/details?id=gg.skelly","_blank")}}),(0,i.jsx)(e9.Z,{messageId:"iOS",reactIntl:!1,onClick:()=>{window.open("https://apps.apple.com/app/skelly-gg/id6443595946 ","_blank")}})]})}function ti(){let e=(0,ev.Z)();return(0,i.jsx)("div",{style:{width:"100%",marginTop:"auto",backgroundColor:e.palette.surfaceVariant.default,color:e.palette.surfaceVariant.contrastText,zIndex:100},children:(0,i.jsxs)(e_.Z,{direction:"column",gap:"1rem",style:{maxWidth:1200,marginLeft:"auto",marginRight:"auto",padding:"1rem"},children:[(0,i.jsxs)(e_.Z,{direction:"row",gap:"1rem",style:{flexWrap:"wrap",boxSizing:"border-box"},children:[(0,i.jsxs)(e_.Z,{direction:"column",gap:"0.5rem",style:{marginRight:"auto"},children:[(0,i.jsx)(eq.Z,{variant:"h6",children:(0,i.jsx)(ex.Z,{id:"Language"})}),(0,i.jsx)(e2,{})]}),(0,i.jsxs)(e_.Z,{direction:"row",gap:"3rem",style:{flexWrap:"wrap"},children:[(0,i.jsx)(tn,{}),(0,i.jsx)(e7,{}),(0,i.jsx)(tt,{}),(0,i.jsx)(te,{})]})]}),(0,i.jsx)(eV.Z,{}),(0,i.jsxs)(e_.Z,{direction:"row",flexWrap:"wrap",justifyContent:"space-between",alignItems:"center",style:{marginTop:"-0.9rem"},children:[(0,i.jsxs)(eq.Z,{variant:"body1",children:["\xa9 ",new Date().getFullYear()," Skelly."," ",(0,i.jsx)(ex.Z,{id:"AllRightsReserved"})]}),(0,i.jsx)(e4,{})]})]})})}var to=n(32017);class tr extends o.Component{static getDerivedStateFromError(e){return g.cM("ErrorBoundry.getDerivedStateFromError(): Called (error: ".concat(e,")")),{error:e}}componentDidCatch(e,t){g.cM("ErrorBoundry.componentDidCatch(): Called (error: ".concat(e,", errorInfo: ").concat(t,")")),console.log("Potential length issues: "),console.log(t),console.log(e),(0,to.f)("event","skelly_error",{skelly_event_window:window.location.pathname.split("/")[2],skelly_event_label:t,skelly_event_source:e})}render(){return this.state.error?(g.cM("ErrorBoundry.render(): this.state.error: ".concat(this.state.error)),(0,i.jsx)(ta,{error:this.state.error,onClose:()=>{this.setState({error:void 0})}})):this.props.children}constructor(e){super(e),this.state={error:void 0}}}let ta=e=>{let{error:t,onClose:n}=e,o=(0,ev.Z)();return(0,i.jsx)("div",{style:{flexGrow:1,backgroundColor:o.palette.background.default},children:(0,i.jsxs)(e_.Z,{direction:"column",style:{padding:"1rem",paddingTop:"3rem",maxWidth:400,marginRight:"auto",marginLeft:"auto",alignItems:"center"},gap:"1rem",children:[(0,i.jsx)(eq.Z,{variant:"subtitle1",children:"SOMETHING WENT WRONG"}),(0,i.jsx)(eq.Z,{variant:"body1",children:"We are very sorry for the inconvenience."}),(0,i.jsxs)(eq.Z,{variant:"body1",style:{wordBreak:"break-word"},children:["(",t.toString(),")"]}),(0,i.jsx)(eI.Z,{color:"primary",variant:"contained",onClick:()=>{n()},style:{marginTop:"1rem"},children:"Go back"})]})})};var ts=n(12401),tl=n(4624);function tc(){(0,tl.L)({query:ew.Cn,onSubscribed:()=>{e()},onNext:t=>{g.ZP.log("SettingsManager.onNext(): Data received: ",t),e()},onError:e=>{g.ZP.error("SettingsManager.onError(): ".concat(JSON.stringify(e)))}});let e=()=>{let e=globalThis.skelly.apolloClient;null==e||e.query({query:ew._c,fetchPolicy:"network-only"}).then(e=>{let t=null==e?void 0:e.data.getMySettings;g.ZP.log("SettingsManager(): Fetched settings: ".concat(JSON.stringify(t)));let n=globalThis.skelly.reduxStore.dispatch,i=globalThis.skelly.reduxStore.getState(),o=i.settings.mode,r=i.settings.locale;if(!t){g.ZP.log("SettingsManager(): Returning as settings was undefined");return}let a="overwolf"===ts.N?"desktop_mode":"web"===ts.N?"web_mode":"mobile_mode",s=null==t?void 0:t[a];g.ZP.log("SettingsManager(): mode: ".concat(o,", serverMode: ").concat(s)),s&&s!==o&&(g.ZP.log("SettingsManager(): Updating mode"),n((0,d.PM)(s)));let l=null==t?void 0:t.language;g.ZP.log("SettingsManager(): locale: ".concat(r,", serverLanguage: ").concat(l)),l&&l!==r&&(g.ZP.log("SettingsManager(): Updating language"),n((0,d.i_)(l)))}).catch(e=>{g.ZP.error("SettingsManager(): Could not fetch settings (".concat(JSON.stringify(e),")"))})};return null}var td=n(86859);function tg(e){let{children:t}=e,n=(0,c.C)(e=>e.account.loginState);switch(n){case b.zZ.Initializing:return(0,i.jsx)(td.Z,{size:"8rem",messageId:"InitializingApp..."});case b.zZ.CreatingApolloClientPrivate:return(0,i.jsx)(td.Z,{size:"8rem",messageId:"LoggingIn..."});case b.zZ.LoggedIn:return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(tc,{}),t]});case b.zZ.ClosingApolloClientPrivate:return(0,i.jsx)(td.Z,{size:"8rem",messageId:"LoggingOut..."});case b.zZ.CreatingApolloClientPublic:return(0,i.jsx)(td.Z,{size:"8rem"});case b.zZ.LoggedOut:return t;default:return(0,i.jsx)(td.Z,{size:"8rem",messageId:"Internal Error"})}}function tu(e){let{withHeaderBorder:t,context:n,floater:r,children:a}=e,s=(0,ev.Z)(),l=(0,c.C)(e=>e.account.friendId);o.useEffect(()=>(l?g.ZP.log("Content(): Mounted (user is logged in)"):g.ZP.log("Content(): Mounted (User is not logged in)"),()=>g.ZP.log("Content(): Unmounted")),[]);let d=(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginLeft:"auto",marginRight:"auto",width:"100vw",height:"100vh",position:"absolute",top:0,left:0,userSelect:"none",color:s.palette.background.contrastText},children:[(0,i.jsx)(eH,{withBorder:t}),(0,i.jsx)("div",{style:{position:"relative",width:"100%",flexGrow:1,overflowY:"hidden"},children:(0,i.jsxs)("div",{style:{width:"100%",height:"100%",overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column"},children:[(0,i.jsx)(tr,{children:(0,i.jsx)(tg,{children:n?(0,i.jsxs)(n,{children:[a,void 0===r?null:r]}):(0,i.jsxs)(i.Fragment,{children:[a,void 0===r?null:r]})})}),(0,i.jsx)(ti,{})]})})]});return d}function tm(e){let{title:t,description:n,metaName:o,metaProperty:s,canonical:l,withHeaderBorder:c,context:d,floater:g,apolloRequired:m=!0,children:f}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ef,{title:t,description:n,metaName:o,metaProperty:s,canonical:l}),(0,i.jsx)(r.zt,{store:globalThis.skelly.reduxStore,children:(0,i.jsxs)(a.r,{loading:null,persistor:globalThis.skelly.persistor,children:[(0,i.jsx)(tf,{}),(0,i.jsx)(eh,{children:(0,i.jsx)(u,{children:(0,i.jsx)(Z,{children:(0,i.jsx)(eg.Z,{children:(0,i.jsx)(es.Z,{children:(0,i.jsx)(ed,{children:(0,i.jsx)(tu,{withHeaderBorder:c,context:d,floater:g,children:f})})})})})})})]})})]})}let tf=()=>{let e=(0,c.T)();return o.useEffect(()=>()=>{g.ZP.log("PageTransition(): Unmounting, resetting login state"),e((0,b.av)(b.zZ.Initializing))},[]),null}},66939:function(e,t,n){n.d(t,{Z:function(){return a}});var i=n(85893);n(67294);var o=n(15861),r=n(44012);function a(e){let{messageId:t,onClick:n,reactIntl:a=!0}=e;return(0,i.jsx)(o.Z,{variant:"body1",onClick:n,sx:{cursor:"pointer","&:hover":{textDecoration:"underline"}},children:a?(0,i.jsx)(r.Z,{id:t}):t})}},39390:function(e,t,n){n.d(t,{Z:function(){return s}});var i=n(85893);n(67294);var o=n(44012),r=n(15861),a=n(96682);function s(e){let t=(0,a.Z)();return(0,i.jsx)("span",{style:{...e.style},onClick:t=>{t.stopPropagation(),e.onClick&&e.onClick()},children:(0,i.jsx)(r.Z,{variant:"link",component:"span",style:{color:t.palette.primary.main},children:e.messageId?(0,i.jsx)(o.Z,{id:e.messageId}):e.message})})}},58936:function(e,t,n){n.d(t,{J:function(){return g},Z:function(){return u}});var i=n(85893),o=n(67294),r=n(86896),a=n(2734),s=n(58703),l=n(66242),c=n(15861),d=n(62645);let g=o.createContext(void 0);function u(e){let{children:t}=e,n=(0,a.Z)(),u=(0,r.Z)(),[m,f]=o.useState([]),[p,h]=o.useState(void 0);return o.useEffect(()=>(d.ZP.log("SkellySnackBarProvider(): Mounted"),()=>d.ZP.log("SkellySnackBarProvider(): Unmounting")),[]),o.useEffect(()=>{if(void 0===p&&m.length>0){let e=m[0];h(e),f(t=>t.filter(t=>t!==e))}},[m,p]),(0,i.jsxs)(g.Provider,{value:{addSnackbar:(e,t)=>{void 0===t||(e=!0===t?u.formatMessage({id:e}):u.formatMessage({id:e},t)),f(t=>[...t,e])}},children:[t,void 0===p?null:(0,i.jsx)(s.Z,{open:!!p,autoHideDuration:6e3,onClose:()=>{h(void 0)},children:(0,i.jsx)(l.Z,{style:{padding:"1rem",backgroundColor:n.palette.surface.default,color:n.palette.surface.contrastText},children:(0,i.jsx)(c.Z,{variant:"body1",children:p})})})]})}},18808:function(e,t,n){var i=n(85893);n(67294);var o=n(53219);t.Z=function(e){return(0,i.jsx)(o.Z,{...e,viewBox:"-5 -5 137.14 106.36",children:(0,i.jsx)("g",{id:"图层_2","data-name":"图层 2",children:(0,i.jsx)("g",{id:"Discord_Logos","data-name":"Discord Logos",children:(0,i.jsx)("g",{id:"Discord_Logo_-_Large_-_White","data-name":"Discord Logo - Large - White",children:(0,i.jsx)("path",{d:"M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z"})})})})})}},63475:function(e,t,n){n.d(t,{Z:function(){return r}});var i=n(85893);n(67294);var o=n(88926);function r(e){let{style:t}=e,n=(0,o.C)(e=>e.settings.mode);return(0,i.jsx)("img",{src:"/img/icons/skelly_face_logo_".concat(n,"_1.svg"),style:t})}},86859:function(e,t,n){n.d(t,{Z:function(){return l}});var i=n(85893);n(67294);var o=n(44012),r=n(26447),a=n(98456),s=n(15861);function l(e){let{size:t="4rem",messageId:n}=e;return(0,i.jsx)("div",{style:{minWidth:"15em",minHeight:"10rem",display:"flex",flexGrow:1},children:(0,i.jsxs)(r.Z,{style:{margin:"auto"},gap:"2rem",children:[(0,i.jsx)(a.Z,{size:t}),n?(0,i.jsx)(s.Z,{variant:"body1",style:{marginLeft:"auto",marginRight:"auto"},children:(0,i.jsx)(o.Z,{id:n})}):null]})})}},97555:function(e,t,n){n.d(t,{D:function(){return o},Z:function(){return F}});var i,o,r=n(85893),a=n(67294),s=n(15861),l=n(83321),c=n(39390),d=n(19559),g=n(98905),u=n(94823),m=n(66208),f=n(44012),p=n(34386);function h(e){return(0,r.jsx)(p.Z,{title:void 0===e.username||(0,m.K)(e.username)?(0,m.m)(e.password)?"":(0,r.jsx)(f.Z,{id:"PasswordDescription"}):(0,r.jsx)(f.Z,{id:"ProvideValidEMail"}),placement:"right",arrow:!0,children:(0,r.jsx)("span",{style:{maxWidth:"16rem",width:"100%",marginLeft:"auto",marginRight:"auto",marginTop:"0.5rem",marginBottom:"0.5rem"},children:e.children})})}var v=n(63475),x=n(26798),y=n(62645),Z=n(32017);function j(e){let[t,n]=a.useState(void 0),{logIn:i}=a.useContext(x.e),[p,j]=a.useState(!1),[b,k]=a.useState(""),[w,S]=a.useState(""),C=p||void 0!==t||!(0,m.K)(b)||!(0,m.m)(w),_=async()=>{y.ZP.log("LogIn.logIn_(): Called (window.location.search: ".concat(window.location.search,")")),j(!0),i(b,w).then(()=>{e.loggedIn()}).catch(e=>{y.ZP.log("LogIn.logIn_(): Login failed ".concat(e)),n({type:"error",text:e,reactIntl:!0})}).finally(()=>{j(!1)})},I=()=>{void 0!==t&&n(void 0)};return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(v.Z,{style:{width:"8rem",marginLeft:"auto",marginRight:"auto",marginTop:"2rem",marginBottom:"1rem"}}),(0,r.jsx)(s.Z,{variant:"h5",style:{marginBottom:"1rem",marginLeft:"auto",marginRight:"auto"},children:(0,r.jsx)(f.Z,{id:"WelcomeSkelly"})}),(0,r.jsx)(d.Z,{messageId:"EMail",setValue:e=>{I(),k(e)},sx:{marginBottom:"0.5rem"},disabled:p}),(0,r.jsx)(g.Z,{setPassword:e=>{I(),S(e)},onEnter:()=>{C||((0,Z.f)("event","skelly_log_in"),_())},disabled:p,autoComplete:"old-password",style:{marginTop:"0.5rem"}}),(0,r.jsx)(c.Z,{messageId:"ForgotPasswordQuestion",onClick:()=>{e.setDisplay(o.ForgotPassword)},style:{marginLeft:"auto",marginRight:"auto",marginTop:"1rem",marginBottom:"0.5rem"},disabled:p}),(0,r.jsx)(h,{username:b,password:w,children:(0,r.jsx)(l.Z,{variant:"contained",onClick:_,color:"secondary",style:{maxWidth:"16rem",width:"100%",marginLeft:"auto",marginRight:"auto"},disabled:C,children:(0,r.jsx)(f.Z,{id:"LogIn"})})}),(0,r.jsx)(c.Z,{onClick:()=>{e.setDisplay(o.SignUp)},messageId:"NeedAccountQuestion",style:{marginLeft:"auto",marginRight:"auto",marginTop:"0.5rem"}}),(0,r.jsx)(c.Z,{messageId:"ResendLinkQuestion",onClick:()=>{e.setDisplay(o.ResendLink)},style:{marginLeft:"auto",marginRight:"auto",marginTop:"1rem"}}),(0,r.jsx)(u.Z,{message:t,style:{marginTop:"1rem"}})]})})}var b=n(85071),k=n(43113),w=n(88926),S=n(66252),C=n(50319),_=n(82729),I=n(31230);function P(){let e=(0,_._)(["\n mutation MyMutation($sub: String!) {\n registerSignUp(sub: $sub)\n }\n"]);return P=function(){return e},e}function R(){let e=(0,_._)(["\n subscription MySubscription {\n confirmSignUp\n }\n"]);return R=function(){return e},e}let L=(0,I.Ps)(P()),A=(0,I.Ps)(R()),G=a.createContext(void 0);function O(e){let{children:t}=e,n=(0,S.x)(),[i,{loading:o}]=(0,C.D)(L),[s,l]=a.useState(void 0),[c,d]=a.useState(void 0),g=a.useRef(void 0);return a.useEffect(()=>()=>{g.current&&(y.cM("ConfirmationLink(): Unsubscribing from Subscription"),g.current.unsubscribe(),g.current=void 0)},[]),(0,r.jsx)(G.Provider,{value:{registerSub:async e=>{y.cM("ConfirmationLink(): Registering sub ".concat(e)),await i({variables:{sub:e}}),y.cM("ConfirmationLink(): Subscribing to sub updates");let t=n.subscribe({query:A}),o=t.subscribe({next(e){var t;(null===(t=e.data)||void 0===t?void 0:t.confirmSignUp)&&s!==e.data.confirmSignUp&&l(e.data.confirmSignUp)},error(e){y.cM("ConfirmationLink(): Subscription to sub updates failed.",e),d(e)}});g.current=o},registeringSub:o,linkConfirmation:s},children:t})}var T=n(96687);function D(e){let t=(0,w.C)(e=>e.settings.locale),{logIn:n}=a.useContext(x.e),[i,p]=a.useState(""),[j,S]=a.useState(""),[C,_]=a.useState(!1),I=a.useRef(void 0),P=a.useRef(void 0),R=a.useRef(void 0),[L,A]=a.useState(void 0),O=()=>{void 0!==L&&A(void 0)},{registerSub:D,registeringSub:E,linkConfirmation:M}=a.useContext(G);return a.useEffect(()=>{y.ZP.log("SingUp(): linkConfirmation received (".concat(M,")")),void 0!==M&&M===I.current&&(console.log("SkellyAuth.signUp(): Sign up link was confirmed, processing with login"),n(P.current,R.current).then(()=>{p(""),S(""),A(void 0),_(!1),I.current=void 0,P.current=void 0,R.current=void 0,e.loggedIn()}).catch(e=>{y.ZP.log("SignUp(): Log-in after sign-up failed ".concat(e)),(0,Z.f)("event","skelly_error",{skelly_event_action:"SignUp.tsx",skelly_event_pathname:window.location.pathname,skelly_event_source:"skelly-utilities/redux/account/functions.logIn",skelly_event_label:"string"==typeof e?e:e.toString()})}))},[M]),(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(v.Z,{style:{width:"8rem",marginLeft:"auto",marginRight:"auto",marginTop:"2rem",marginBottom:"1rem"}}),(0,r.jsx)(s.Z,{variant:"h5",style:{marginBottom:"1rem",marginLeft:"auto",marginRight:"auto"},children:(0,r.jsx)(f.Z,{id:"CreateAccount"})}),(0,r.jsx)(d.Z,{messageId:"EMail",setValue:e=>{O(),p(e)},sx:{marginBottom:"0.5rem"}}),(0,r.jsx)(g.Z,{setPassword:e=>{O(),S(e)},autoComplete:"new-password",style:{marginTop:"0.5rem"}}),(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"row",width:"15rem",marginLeft:"auto",marginRight:"auto",marginTop:"1rem",marginBottom:"0.5rem",position:"relative"},children:[(0,r.jsx)(b.Z,{checked:C,onClick:()=>{_(!C)},style:{position:"absolute",top:"-0.70rem",left:"-1.25rem"}}),(0,r.jsx)(s.Z,{variant:"body1",component:"div",style:{marginLeft:"1.3rem"},children:(0,r.jsx)(f.Z,{id:"TermsAndPrivacyAgreement",values:{TermsLink:e=>(0,r.jsx)(c.Z,{message:e,onClick:()=>{(0,T.n)("https://skelly.gg/terms")}}),PrivacyLink:e=>(0,r.jsx)(c.Z,{message:e,onClick:()=>{(0,T.n)("https://skelly.gg/privacy")}})}})})]}),(0,r.jsx)(h,{username:i,password:j,children:(0,r.jsx)(l.Z,{onClick:async()=>{if(!E){(0,Z.f)("event","skelly_sign_up");try{let e=await (0,k.y1)(i,j,t);console.log("SignUp(): SignUp was successful (userSub: ".concat(e,")")),A({type:"info",text:"CreateAccontSuccess",reactIntl:!0}),await D(e),I.current=e,P.current=i,R.current=j}catch(e){console.warn("SignUp(): Registration of 'sub' with Skelly server failed",e),A({type:"error",text:e,reactIntl:!0})}}},disabled:!(0,m.K)(i)||!(0,m.m)(j)||E||void 0!==L||!1===C,variant:"contained",color:"secondary",style:{width:"100%"},children:(0,r.jsx)(f.Z,{id:"CreateAccountMinor"})})}),(0,r.jsx)(c.Z,{messageId:"HaveAccountQuestion",onClick:()=>{e.setDisplay(o.LogIn)},style:{marginLeft:"auto",marginRight:"auto",marginTop:"0.5rem"}}),(0,r.jsx)(u.Z,{message:L,style:{marginTop:"1rem"}})]})})}let E=!1,M=!1;function B(e){let[t,n]=a.useState(void 0),[i,p]=a.useState(""),[Z,j]=a.useState(""),[b,w]=a.useState(""),[S,C]=a.useState(""),[_,I]=a.useState(!1),[P,R]=a.useState(!1),{logIn:L}=a.useContext(x.e),A=()=>{void 0!==t&&n(void 0)},G=()=>{!0!==E&&(E=!0,j(i),R(!0),(0,k.gF)(i).then(()=>{n({type:"info",text:"VerificationCodeSent",reactIntl:!0})}).catch(e=>{n({type:"error",text:e,reactIntl:!0})}).finally(()=>{E=!1,R(!1)}))},O=()=>{!0!==M&&(M=!0,R(!0),!0!==_&&I(!0),(0,k.c0)(i,S,b).then(()=>{y.ZP.log("ForgotPassword.resetPassword_(): Reset was successful"),n({type:"info",text:"Password was successfully reset."}),L(i,b).then(()=>{y.ZP.log("ForgotPassword.resetPassword_(): Automated login was successful")}).finally(()=>{R(!1)})}).catch(e=>{y.ZP.log("ForgotPassword.resetPassword_(): Reset failed"),n({type:"info",text:e}),R(!1)}).finally(()=>{M=!1}))};return(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(v.Z,{style:{width:"8rem",marginLeft:"auto",marginRight:"auto",marginTop:"2rem",marginBottom:"1rem"}}),(0,r.jsx)(s.Z,{variant:"h5",style:{marginBottom:"1rem",marginLeft:"auto",marginRight:"auto"},children:(0,r.jsx)(f.Z,{id:"ForgotPassword"})}),(0,r.jsx)(d.Z,{messageId:"EMail",setValue:e=>{A(),j(""),p(e)},onEnter:()=>{G()},disabled:P}),(0,r.jsx)(l.Z,{variant:"contained",disabled:!(0,m.K)(i)||i===Z||P,onClick:G,color:"secondary",style:{maxWidth:"16rem",width:"100%",marginLeft:"auto",marginRight:"auto",marginBottom:"0.5rem"},children:(0,r.jsx)(f.Z,{id:"RequestVerificationCode"})}),(0,r.jsx)(d.Z,{messageId:"VerificationCode",setValue:e=>{!0===_&&I(!1),A(),C(e)},disabled:P,sx:{marginBottom:"0.5rem"}}),(0,r.jsx)(g.Z,{messageId:"NewPassword",setPassword:e=>{!0===_&&I(!1),A(),w(e)},onEnter:O,disabled:P}),(0,r.jsx)(h,{password:b,children:(0,r.jsx)(l.Z,{disabled:""===S||!(0,m.m)(b)||_||P,variant:"contained",onClick:O,color:"secondary",style:{maxWidth:"16rem",width:"100%",marginLeft:"auto",marginRight:"auto"},children:(0,r.jsx)(f.Z,{id:"ResetPassword"})})}),(0,r.jsx)(c.Z,{messageId:"RememberPasswordQuestion",onClick:()=>{e.setDisplay(o.LogIn)},style:{marginLeft:"auto",marginRight:"auto",marginTop:"0.5rem"},disabled:P}),(0,r.jsx)(u.Z,{message:t,style:{marginTop:"0.5rem"}})]})}let W=!1;function N(e){let[t,n]=a.useState(void 0),[i,g]=a.useState(""),p=!(0,m.K)(i)||void 0!==t,h=()=>{p||!0===W||(W=!0,(0,k.S5)(i).then(()=>{n({type:"info",text:"ResendLinkInfo",reactIntl:!0})}).catch(e=>{n({type:"error",text:void 0!==e.message?e.message:e,reactIntl:!0})}).finally(()=>{W=!1}))};return(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(v.Z,{style:{width:"8rem",marginLeft:"auto",marginRight:"auto",marginTop:"2rem",marginBottom:"1rem"}}),(0,r.jsx)(s.Z,{variant:"h5",style:{marginBottom:"1rem",marginLeft:"auto",marginRight:"auto"},children:(0,r.jsx)(f.Z,{id:"ResendLink"})}),(0,r.jsx)(d.Z,{messageId:"EMail",setValue:e=>{void 0!==t&&n(void 0),g(e)},onEnter:()=>{h()}}),(0,r.jsx)(l.Z,{variant:"contained",disabled:p,onClick:h,color:"secondary",style:{maxWidth:"16rem",width:"100%",marginLeft:"auto",marginRight:"auto",marginTop:"0.5rem",marginBottom:"0.5rem"},children:(0,r.jsx)(f.Z,{id:"RequestLink"})}),(0,r.jsx)(c.Z,{messageId:"ConfirmedLinkQuestion",onClick:()=>{e.setDisplay(o.LogIn)},style:{marginLeft:"auto",marginRight:"auto",marginTop:"0.5rem"}}),(0,r.jsx)(u.Z,{message:t,style:{marginTop:"0.5rem"}})]})}var z=n(90629);function F(e){let{initialDisplay:t,onDisplayChange:n,loggedIn:i}=e,[s,l]=a.useState(void 0===t?o.LogIn:t);return a.useEffect(()=>{n&&n(s)},[s]),(0,r.jsx)(z.Z,{style:{width:"22rem",marginLeft:"auto",marginRight:"auto",padding:"1rem",marginTop:"1rem",marginBottom:"1rem",paddingBottom:"3rem",height:"fit-content"},children:s===o.SignUp?(0,r.jsx)(O,{children:(0,r.jsx)(D,{setDisplay:l,loggedIn:i})}):s===o.ResendLink?(0,r.jsx)(O,{children:(0,r.jsx)(N,{setDisplay:l})}):s===o.LogIn?(0,r.jsx)(j,{setDisplay:l,loggedIn:i}):(0,r.jsx)(B,{setDisplay:l})})}(i=o||(o={})).SignUp="account",i.ResendLink="resend",i.LogIn="login",i.ForgotPassword="password"},98905:function(e,t,n){n.d(t,{Z:function(){return m}});var i=n(85893),o=n(67294),r=n(93946),a=n(57709),s=n(33841),l=n(87109),c=n(94054),d=n(22961),g=n(72450),u=n(44012);function m(e){let[t,n]=o.useState(!1),m=(0,i.jsx)(u.Z,{id:void 0===e.messageId?"Password":e.messageId});return(0,i.jsxs)(c.Z,{sx:{maxWidth:"16rem",width:"100%",marginLeft:"auto",marginRight:"auto",...e.style},variant:"outlined",children:[(0,i.jsx)(s.Z,{children:m}),(0,i.jsx)(a.Z,{autoComplete:e.autoComplete,type:!0===t?"text":"password",inputRef:e.passwodRef,label:m,onChange:t=>{e.setPassword&&e.setPassword(t.target.value)},onKeyDown:t=>{e.onEnter&&"Enter"===t.key&&e.onEnter()},endAdornment:(0,i.jsx)(l.Z,{position:"end",children:(0,i.jsx)(r.Z,{"aria-label":"toggle password visibility",onClick:()=>{n(!t)},onMouseDown:e=>{e.preventDefault()},edge:"end",children:!0===t?(0,i.jsx)(g.Z,{}):(0,i.jsx)(d.Z,{})})}),disabled:e.disabled})]})}},94823:function(e,t,n){n.d(t,{Z:function(){return s}});var i=n(85893);n(67294);var o=n(46901),r=n(44012),a=n(15861);function s(e){let{message:t,style:n}=e;return void 0!==t?(0,i.jsx)("div",{style:n,children:(0,i.jsx)(o.Z,{variant:"filled",severity:t.type||"success",style:{maxWidth:"16rem",marginLeft:"auto",marginRight:"auto",boxSizing:"border-box"},children:(0,i.jsx)(a.Z,{variant:"body1",children:!0===t.reactIntl?(0,i.jsx)(r.Z,{id:t.text}):t.text})})}):null}},19559:function(e,t,n){n.d(t,{Z:function(){return l}});var i=n(85893);n(67294);var o=n(57709),r=n(94054),a=n(33841),s=n(44012);function l(e){let t=void 0===e.messageId?"EMail":e.messageId;return(0,i.jsxs)(r.Z,{sx:{m:1,maxWidth:"16rem",width:"100%",marginLeft:"auto",marginRight:"auto",...e.sx},children:[(0,i.jsx)(a.Z,{variant:"outlined",children:(0,i.jsx)(s.Z,{id:t})}),(0,i.jsx)(o.Z,{label:(0,i.jsx)(s.Z,{id:t}),onChange:t=>{e.setValue(t.target.value)},onKeyDown:t=>{e.onEnter&&"Enter"===t.key&&e.onEnter()},disabled:e.disabled,autoComplete:e.autoComplete})]})}},96687:function(e,t,n){n.d(t,{n:function(){return i}});function i(e,t){window.open(e,t||"_blank")}},11749:function(e,t,n){n.d(t,{kA:function(){return d},m7:function(){return l},wQ:function(){return c}});var i=n(82729),o=n(31230);function r(){let e=(0,i._)(["\n query getIGDBGames($gameIds: [String!]!) {\n getIGDBGames(input: $gameIds) @client {\n id\n cover {\n id\n url\n }\n first_release_date\n involved_companies {\n id\n company {\n id\n name\n websites {\n id\n url\n }\n }\n developer\n }\n name\n platforms {\n id\n name\n }\n url\n }\n }\n"]);return r=function(){return e},e}function a(){let e=(0,i._)(["\n query getIGDBGame($gameId: String!) {\n getIGDBGame(input: $gameId) @client {\n id\n cover {\n id\n url\n }\n first_release_date\n involved_companies {\n id\n company {\n id\n name\n websites {\n id\n url\n }\n }\n developer\n }\n name\n platforms {\n id\n name\n }\n url\n }\n }\n"]);return a=function(){return e},e}function s(){let e=(0,i._)(["\n query searchIGDBGames($search: String!) {\n searchIGDBGames(input: $search) @client {\n id\n cover\n name\n first_release_date\n involved_companies {\n company {\n name\n websites\n }\n developer\n }\n }\n }\n"]);return s=function(){return e},e}let l=(0,o.Ps)(r()),c=(0,o.Ps)(a()),d=(0,o.Ps)(s())},93390:function(e,t,n){n.d(t,{Cn:function(){return v},U_:function(){return f},VP:function(){return m},_c:function(){return h},c$:function(){return g},gK:function(){return u}});var i=n(82729),o=n(31230),r=n(50146),a=n(12401),s=n(62645);function l(){let e=(0,i._)(["\n mutation updateMySettings($settingsInput: SettingsInput!) {\n updateMySettings(settings: $settingsInput) {\n friend_id\n language\n mobile_mode\n web_mode\n desktop_mode\n desktop_incoming_invitations\n desktop_accepted_invitations\n desktop_incoming_messages\n desktop_automationGames\n desktop_automationAccounts\n webhooks {\n dota2\n label\n secret\n url\n }\n version\n }\n }\n"]);return l=function(){return e},e}function c(){let e=(0,i._)(["\n query getMySettings {\n getMySettings {\n language\n mobile_mode\n web_mode\n desktop_mode\n desktop_incoming_invitations\n desktop_accepted_invitations\n desktop_incoming_messages\n desktop_automationGames\n desktop_automationAccounts\n webhooks {\n label\n url\n secret\n dota2\n }\n version\n }\n }\n"]);return c=function(){return e},e}function d(){let e=(0,i._)(["\n subscription subscribeMySettings {\n settings {\n language\n mobile_mode\n web_mode\n desktop_mode\n desktop_incoming_invitations\n desktop_accepted_invitations\n desktop_incoming_messages\n desktop_automationGames\n desktop_automationAccounts\n webhooks {\n label\n url\n secret\n dota2\n }\n version\n }\n }\n"]);return d=function(){return e},e}async function g(e){return u({["".concat("overwolf"===a.N?"desktop_mode":"web"===a.N?"web_mode":"mobile_mode")]:e})}async function u(e){let t=globalThis.skelly.apolloClient;if(t)try{m(t,e)}catch(e){s.ZP.error("updateSettingsBestEffort(): ",e)}}async function m(e,t){e.mutate({mutation:p,variables:{settingsInput:t},update:(e,n)=>{let{data:i}=n;e.updateQuery({query:h},e=>{let n=(null==e?void 0:e.getMySettings)||r.Rw;return{getMySettings:{...n,...t}}})}})}async function f(e,t){var n,i;s.ZP.log("addWebhook(".concat(JSON.stringify(t),"): Called"));let o=await e.query({query:h,fetchPolicy:"cache-only"}),r=(null===(i=o.data)||void 0===i?void 0:null===(n=i.getMySettings)||void 0===n?void 0:n.webhooks)||[],a=r.map(e=>({label:e.label,url:e.url,secret:e.secret,dota2:e.dota2}));a.push(t),await m(e,a)}let p=(0,o.Ps)(l()),h=(0,o.Ps)(c()),v=(0,o.Ps)(d())},50146:function(e,t,n){var i,o,r,a;n.d(t,{Gk:function(){return i},Rw:function(){return s}}),(r=i||(i={})).dark="dark",r.light="light",(a=o||(o={})).en="en",a.de="de",a.ru="ru";let s={language:null,desktop_mode:null,desktop_incoming_invitations:null,desktop_accepted_invitations:null,desktop_incoming_messages:null,desktop_automationGames:null,desktop_automationAccounts:null,mobile_mode:null,web_mode:null,webhooks:null,version:null}},4624:function(e,t,n){n.d(t,{L:function(){return l}});var i=n(67294),o=n(66252),r=n(88926),a=n(36765),s=n(62645);function l(e){let{query:t,onSubscribed:n,onNext:l,onComplete:c,onError:d,isActive:g=!0}=e,u=(0,o.x)(),m=i.useRef((0,a.rY)(t)),[f,p]=i.useState(!1),h=(0,r.C)(e=>e.internetConnection.isOnline),v=i.useRef(void 0);return i.useEffect(()=>{if(s.ZP.log("useResilientSubscription(".concat(m.current,"): State update (subscribed: ").concat(f,", isOnline: ").concat(h,", isActive=").concat(g,")")),!1!==g&&!0!==f&&(v.current&&(v.current.unsubscribe(),v.current=void 0),!1!==h)){s.ZP.log("useResilientSubscription(".concat(m.current,"): Subscribing"));try{let e=u.subscribe({query:t,variables:{onSubscribed:" "}});v.current=e.subscribe(l,e=>{p(!1),d&&d(e)},c),p(!0)}catch(e){s.ZP.error("useResilientSubscription(".concat(m.current,"): Error thrown (").concat(JSON.stringify(e),")"))}}},[f,h,g]),i.useEffect(()=>{!0===f&&(s.ZP.log("useResilientSubscription(".concat(m.current,"): Subscription is active now")),n&&n())},[f]),i.useEffect(()=>{!1===g&&(v.current&&(v.current.unsubscribe(),v.current=void 0),p(!1))},[g]),i.useEffect(()=>()=>{v.current&&(v.current.unsubscribe(),v.current=void 0)},[]),{subscribed:f}}},88926:function(e,t,n){n.d(t,{C:function(){return r},T:function(){return o}});var i=n(9473);let o=i.I0,r=i.v9},26798:function(e,t,n){n.d(t,{e:function(){return c},Z:function(){return d}});var i=n(85893),o=n(67294),r=n(91881),a=n(88926),s=n(62645),l=n(43113);let c=o.createContext(void 0);function d(e){let{children:t}=e,n=(0,a.T)(),d=(0,a.C)(e=>e.account.loginState),g=(0,a.C)(e=>e.account.username),u=!!g;return o.useEffect(()=>(s.ZP.log("CognitoManager(): Mounted"),()=>s.ZP.log("CognitoManager(): Unmounting")),[]),o.useEffect(()=>{s.ZP.log("CognitoManager(): loginState is ".concat(d)),d===r.zZ.Initializing&&(u?n((0,r.av)(r.zZ.CreatingApolloClientPrivate)):function(){let e=window.location.pathname,t=e.startsWith("/auth");return s.ZP.log("pageRequiresPublicClient(): Called (path: ".concat(e,", pageRequiresPublicClient: ").concat(t,")")),t}()?n((0,r.av)(r.zZ.CreatingApolloClientPublic)):n((0,r.av)(r.zZ.LoggedOut)))},[d]),(0,i.jsx)(c.Provider,{value:{signUp:l.y1,resendConfirmationCode:l.S5,logIn:l.Ib,getIdToken:l.lI,getAccessToken:l.hP,getCredentials:l.UR,changePassword:l.Cp,forgotPassword:l.gF,resetPassword:l.c0,deleteUser:l.h8,logOut:l.ni},children:t})}},66208:function(e,t,n){n.d(t,{K:function(){return i},m:function(){return o}});let i=e=>/^.+@.+$/.test(e),o=e=>{let t=e.length>=8,n="a-zA-Z0-9\\^\\$\\*\\.\\[\\]\\{\\}\\(\\)\\?\"!@#%&/\\\\,><':;\\|_~`=\\+-\\s",i=new RegExp("^[".concat(n,"]*[0-9][").concat(n,"]*$")).test(e),o=new RegExp("^[".concat(n,"]*[A-Z][").concat(n,"]*$")).test(e),r=new RegExp("^[".concat(n,"]*[a-z][").concat(n,"]*$")).test(e);return t&&i&&o&&r}}}]);