Build 589089stable
Module 976860
2,661 characters · in no known chunkDependencies
Required by (192)
54721813830635110822132452839043203447245029264460668346731970926789038068381009877199207792111950359718799036103531119357123071123213125820131047138617146088149256154649163050174530187654191701194195206778216934221950224536232492241188254316256106262763267889270045270533274541277370280450280598285406303174308528308726309010310419312625320989332456333369338249345942352043353904361597361845365225369189371158372189376374376728378570381969384048401155404851407278413492419534422258425663436405449054449571450117463325467884468689480084480178482644482857483225485140491145494921496092498470507809509963524917529942530789530951539895540462544036549384559260564189575429578839579735580296581247587372589877590114595244599882603539603647608401610101612200617986627318631670639245639288649813650993655758670735672957683271699609701273706341710637711950715069730852741231744753746669747926748975768463770101782274783420783791784578806911807780811611812633815846826181826789827641828162830215837057839534846966869362883122885437887909901472928529950344954784961998963169967198970672977850979186979523979604980390983555995142995198
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";let i,r,a;n.d(t,{EL:()=>T,JK:()=>g,MX:()=>R,PR:()=>S,SB:()=>O,TX:()=>h,UC:()=>N,aX:()=>L,bG:()=>m,m:()=>C,pX:()=>f,sY:()=>D,uh:()=>p}),n(321073),n(323874),n(14289),n(35956);var s=n(830845),l=n(626584),o=n(625494),d=n(824865),c=n(652215);let u=new l.A("Routing/Utils"),_=[c.dSh.DEVELOPER_PORTAL];__OVERLAY__?i=(0,s.sC)():(i=(0,s.zR)()).block((e,t)=>{if("POP"===t&&!h())return!1});let E=!1,A=i.listen((e,t)=>{"REPLACE"!==t&&(E=!0,A())});function h(){if(o._.hasSubscribers(c.jej.MODAL_CLOSE)){let{doesTopModalAllowNavigation:e}=n(192308);if(!e())return!1}return n(712687).A.close(),!0}function I(e,t){return!!("string"==typeof e&&_.some(t=>e.startsWith(t)))&&(u.log(`${t} - route to external path ${e}`),window.dispatchEvent(new Event("beforeunload")),window.location[t](e),!0)}function f(e,t){if(I(e,"assign"))return;u.log(`transitionTo - Transitioning to ${e}`);let n=t?.source,s=t?.sourceLocationStack;if(null==t)i.push(e);else{let n=new URL(e,`https:${window.GLOBAL_ENV.WEBAPP_ENDPOINT}`);i.push({pathname:n.pathname,search:n.search,hash:n.hash,...t})}r=n,a=s}function p(e,t,n,i){u.log(`transitionToGuild - Transitioning to ${JSON.stringify({guildId:e,channelId:t,messageId:n})}`),f(c.BVt.CHANNEL(e,t,n),i)}function T(){return null!=r&&d.n.has(r)}function m(e,t,n){I(e,"replace")||(u.log(`Replacing route with ${e}`),"string"==typeof e?i.replace(e,t):i.replace(e),r=n)}function g(){return i}function S(){return r}function N(){return a}function C(e){return null==e&&(e=i.location.pathname??""),!e.startsWith(c.BVt.HANDOFF)}function O(e){if(null==e&&(e=i.location.pathname??""),e.startsWith(c.BVt.LOGIN))return c.S3d.LOGIN;if(e.startsWith(c.BVt.REGISTER))return c.S3d.REGISTER;if(e.startsWith(c.BVt.INVITE("")))return c.S3d.INVITE;if(e.startsWith(c.BVt.VERIFY))return c.S3d.VERIFY;if(e.startsWith(c.BVt.DISABLE_EMAIL_NOTIFICATIONS))return c.S3d.DISABLE_EMAIL_NOTIFICATIONS;else if(e.startsWith(c.BVt.DISABLE_SERVER_HIGHLIGHT_NOTIFICATIONS))return c.S3d.DISABLE_SERVER_HIGHLIGHT_NOTIFICATIONS;else if(e.startsWith(c.BVt.REJECT_IP))return c.S3d.REJECT_IP;else if(e.startsWith(c.BVt.REJECT_MFA))return c.S3d.REJECT_MFA;else if(e.startsWith(c.BVt.AUTHORIZE_IP))return c.S3d.AUTHORIZE_IP;else if(e.startsWith(c.BVt.AUTHORIZE_PAYMENT))return c.S3d.AUTHORIZE_PAYMENT;else if(e.startsWith(c.BVt.RESET))return c.S3d.RESET;else if(e.startsWith(c.BVt.REPORT))return c.S3d.REPORT;else if(e.startsWith(c.BVt.REPORT_SECOND_LOOK))return c.S3d.REPORT_SECOND_LOOK;else if(e.startsWith(c.BVt.ACCOUNT_REVERT("")))return c.S3d.ACCOUNT_REVERT;return e}function R(){return E}function L(){h()&&(r=null,i.goBack())}function D(){h()&&(r=null,i.goForward())}}