add more js

This commit is contained in:
murdle 2025-12-08 19:46:42 +02:00
parent ca48467048
commit 4d1936634e
9 changed files with 341 additions and 0 deletions

View File

@ -0,0 +1,2 @@
(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push([[66671],{66671:(p,e,a)=>{p.exports=a.p+"e11a98be13e5ec1554b9f26f00c19fba.woff2"}}]);
//# sourceMappingURL=12229a0fe8aec68d443e.js.map

View File

@ -0,0 +1,7 @@
(()=>{"use strict";function r(r,t){(null==t||t>r.length)&&(t=r.length);for(var n=0,e=new Array(t);n<t;n++)e[n]=r[n];return e}function t(t,n){return function(r){if(Array.isArray(r))return r}(t)||function(r,t){var n=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var e,a,i=[],o=!0,u=!1;try{for(n=n.call(r);!(o=(e=n.next()).done);o=!0){i.push(e.value);if(t&&i.length===t)break}}catch(r){u=!0;a=r}finally{try{o||null==n.return||n.return()}finally{if(u)throw a}}return i}}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return r(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return r(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
var n=/^#[0-9a-f]{3,8}$/i,e=/^((?:rgb|hsl)a?)\s*\(([^)]*)\)/i,a=function(){function r(t,n,e,a){!function(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);this.red=t;this.green=n;this.blue=e;this.alpha=a}var a=r.prototype;a.toHexString=function(){var r=Math.round(this.red).toString(16),t=Math.round(this.green).toString(16),n=Math.round(this.blue).toString(16);return"#"+(this.red>15.5?r:"0"+r)+(this.green>15.5?t:"0"+t)+(this.blue>15.5?n:"0"+n)};a.toHSL=function(){return function(r){var t=r.red,n=r.green,e=r.blue,a=r.alpha,i=t/255,o=n/255,u=e/255,l=Math.max(i,o,u),s=Math.min(i,o,u),f=l-s,h=(l+s)/2,c=f>0?f/(1-Math.abs(2*h-1)):0;if(0===f)return{hue:0,saturation:c,lightness:h,alpha:a};var p=0;switch(l){case i:p=(o-u)/f%6;break;case o:p=(u-i)/f+2;break;case u:p=(o-u)/f+4}return{hue:60*p,saturation:c,lightness:h,alpha:a}}({red:this.red,green:this.green,blue:this.blue,alpha:this.alpha})};a.getRelativeLuminance=function(){
var r=this.red/255,t=this.green/255,n=this.blue/255;return.2126*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))};r.parseString=function(r){return null!=r.match(e)?this.parseColorFnString(r):null!=r.match(n)?this.parseHexString(r):void 0};r.parseRgbString=function(t){return"transparent"===t?new r(0,0,0,0):this.parseColorFnString(t)};r.parseHexString=function(e){if(null!=e.match(n)&&![6,8].includes(e.length)){if((e=e.replace("#","")).length<6){var a=t(e,4),i=a[0],o=a[1],u=a[2],l=a[3];e=i+i+o+o+u+u;null!=l&&(e+=l+l)}var s=e.match(/.{1,2}/g);if(null!=s)return new r(parseInt(s[0],16),parseInt(s[1],16),parseInt(s[2],16),null!=s[3]?parseInt(s[3],16)/255:1)}};r.parseColorFnString=function(n){var a,i=t(null!==(a=n.match(e))&&void 0!==a?a:[],3),o=i[1],u=i[2];if(null!=o&&null!=u){var l=u.split(/\s*[,/\s]\s*/).map((function(r){return r.replace(",","").trim()})).filter((function(r){
return""!==r})).map((function(r,t){return function(r,t,n){if(/%$/.test(t))return 3===n?parseFloat(t)/100:255*parseFloat(t)/100;if("h"===r[n]){if(/turn$/.test(t))return 360*parseFloat(t);if(/rad$/.test(t))return 57.3*parseFloat(t)}return parseFloat(t)}(o,r,t)}));if("hsl"===o.substr(0,3)){var s=function(r){var t=r.hue,n=r.saturation,e=r.lightness,a=r.alpha;n/=255;e/=255;var i=(1-Math.abs(2*e-1))*n,o=i*(1-Math.abs(t/60%2-1)),u=e-i/2,l=(t<60?[i,o,0]:t<120?[o,i,0]:t<180?[0,i,o]:t<240?[0,o,i]:t<300?[o,0,i]:[i,0,o]).map((function(r){return Math.round(255*(r+u))}));return{red:l[0],green:l[1],blue:l[2],alpha:a}}({hue:l[0],saturation:l[1],lightness:l[2],alpha:l[3]});return new r(s.red,s.green,s.blue,s.alpha)}return new r(l[0],l[1],l[2],"number"==typeof l[3]?l[3]:1)}};return r}();function i(r,t){(null==t||t>r.length)&&(t=r.length);for(var n=0,e=new Array(t);n<t;n++)e[n]=r[n];return e}function o(r){return function(r){if(Array.isArray(r))return i(r)}(r)||function(r){
if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,t){if(!r)return;if("string"==typeof r)return i(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);"Object"===n&&r.constructor&&(n=r.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(r,t)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(r,t,n){return 4*(t*n+r)}function l(r,t,n,e,a){var i=e-r,o=a-t;return Math.pow(i,2)+Math.pow(o,2)<=Math.pow(n,2)}function s(r,t,n,e){for(var a=function(r,t){return{x:r/4%t,y:Math.floor(r/4/t)}}(t,n),i=a.x,o=a.y,s=e+i;s>=i;s--)for(var f=e+o;f>=o;f--)if(l(i,o,e,s,f)){var h=i-(s-i),c=o-(f-o);r.add(u(s,f,n));r.add(u(s,c,n));r.add(u(h,f,n));r.add(u(h,c,n))}return r}function f(r,t,n){
return o(s(new Set,r,n,1)).some((function(r){return t[r+3]<=15}))}self.addEventListener("message",(function(r){var t=r.data,n=t.imageData,e=t.scaledBorderSize,i=t.color,o=t.id,u=function(r,t,n){var e=a.parseString(n),i=new Uint8ClampedArray(r.data.length),o=new Set;if(null==e)throw new Error("Invalid color");for(var u=0;u<r.data.length;u+=4)if(!(r.data[u+3]<=15)&&f(u,r.data,r.width)){o.add(u);o=s(o,u,r.width,t)}o.forEach((function(r){return function(r,t,n){r[t]=n.red;r[t+1]=n.green;r[t+2]=n.blue;r[t+3]=255}(i,r,e)}));return i}(n,e,i);self.postMessage({border:u,id:o})}))})();
//# sourceMappingURL=3cdf1e508a5821a0cdad.worker.js.map

View File

@ -0,0 +1,5 @@
(()=>{"use strict";var t=function(){function t(n){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t);this.size=n;this.head=0;this.samples=new Array(n).fill(0)}var n=t.prototype;n.addSample=function(t){this.head=(this.head+1)%this.size;this.samples[this.head]=t};n.mean=function(){var t=0,n=1/this.size,e=!0,r=!1,o=void 0;try{for(var i,u=this.samples[Symbol.iterator]();!(e=(i=u.next()).done);e=!0){t+=i.value*n}}catch(t){r=!0;o=t}finally{try{e||null==u.return||u.return()}finally{if(r)throw o}}return t};return t}();function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(t){return!1}}function e(t,r,o){e=n()?Reflect.construct:function(t,n,e){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(t,r));e&&i(o,e.prototype);return o}
;return e.apply(null,arguments)}function r(t){r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)};return r(t)}function o(t,n){return!n||"object"!==c(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function i(t,n){i=Object.setPrototypeOf||function(t,n){t.__proto__=n;return t};return i(t,n)}var u,c=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function a(t){var n="function"==typeof Map?new Map:void 0;a=function(t){if(null===t||!(o=t,-1!==Function.toString.call(o).indexOf("[native code]")))return t;var o;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,u)}function u(){return e(t,arguments,r(this).constructor)}u.prototype=Object.create(t.prototype,{constructor:{value:u,enumerable:!1,
writable:!0,configurable:!0}});return i(u,t)};return a(t)}function f(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function(){var e,i=r(t);if(n){var u=r(this).constructor;e=Reflect.construct(i,arguments,u)}else e=i.apply(this,arguments);return o(this,e)}}!function(t){t[t.NONE=0]="NONE";t[t.VOICE=1]="VOICE";t[t.SOUNDSHARE=2]="SOUNDSHARE";t[t.PRIORITY=4]="PRIORITY"}(u||(u={}));if("undefined"!=typeof AudioWorkletProcessor){var s=function(n){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}});n&&i(t,n)}(r,n);var e=f(r);function r(){!function(t,n){
if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r);var n;(n=e.call(this)).running=!0;n.lastSpeaking=u.NONE;n.dBFSHistogram=new t(20);n.port.onmessage=function(t){"close"===t.data&&(n.running=!1)};return n}r.prototype.process=function(t,n,e){var r=t[0],o=u.NONE;if(r.length>0&&r[0].length>0){for(var i=r[0].length,c=0,a=0;a<r.length;++a)for(var f=r[a],s=0;s<f.length;++s)c+=f[s]*f[s];c=20*Math.log10(Math.sqrt(c/(i*r.length)))+Math.sqrt(2);this.dBFSHistogram.addSample(c>-100?c:-100);o=this.dBFSHistogram.mean()>-80?u.VOICE:u.NONE}if(this.lastSpeaking!==o){this.port.postMessage(o);this.lastSpeaking=o}return this.running};return r}(a(AudioWorkletProcessor));registerProcessor("level-processor",s)}})();
//# sourceMappingURL=3d0c138fed5f94750ddc.worklet.js.map

View File

@ -0,0 +1,16 @@
(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push([[1653],{703655:(t,e,r)=>{var o=r(332792);function n(t){this.mode=o.MODE_8BIT_BYTE;this.data=t}n.prototype={getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++)t.put(this.data.charCodeAt(e),8)}};t.exports=n},827321:t=>{function e(){this.buffer=new Array;this.length=0}e.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0);t&&(this.buffer[e]|=128>>>this.length%8);this.length++}};t.exports=e},249381:t=>{t.exports={L:1,M:0,Q:3,H:2}},632832:(t,e,r)=>{var o=r(611518);function n(t,e){if(null==t.length)throw new Error(t.length+"/"+e);for(var r=0;r<t.length&&0==t[r];)r++;this.num=new Array(t.length-r+e)
;for(var o=0;o<t.length-r;o++)this.num[o]=t[o+r]}n.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var i=0;i<t.getLength();i++)e[r+i]^=o.gexp(o.glog(this.get(r))+o.glog(t.get(i)));return new n(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=o.glog(this.get(0))-o.glog(t.get(0)),r=new Array(this.getLength()),i=0;i<this.getLength();i++)r[i]=this.get(i);for(i=0;i<t.getLength();i++)r[i]^=o.gexp(o.glog(t.get(i))+e);return new n(r,0).mod(t)}};t.exports=n},114450:(t,e,r)=>{var o=r(703655),n=r(917611),i=r(827321),a=r(493160),u=r(632832);function s(t,e){this.typeNumber=t;this.errorCorrectLevel=e;this.modules=null;this.moduleCount=0;this.dataCache=null;this.dataList=[]}var l=s.prototype;l.addData=function(t){var e=new o(t);this.dataList.push(e);this.dataCache=null};l.isDark=function(t,e){
if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]};l.getModuleCount=function(){return this.moduleCount};l.make=function(){if(this.typeNumber<1){var t=1;for(t=1;t<40;t++){for(var e=n.getRSBlocks(t,this.errorCorrectLevel),r=new i,o=0,u=0;u<e.length;u++)o+=e[u].dataCount;for(u=0;u<this.dataList.length;u++){var s=this.dataList[u];r.put(s.mode,4);r.put(s.getLength(),a.getLengthInBits(s.mode,t));s.write(r)}if(r.getLengthInBits()<=8*o)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())};l.makeImpl=function(t,e){this.moduleCount=4*this.typeNumber+17;this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var o=0;o<this.moduleCount;o++)this.modules[r][o]=null}this.setupPositionProbePattern(0,0);this.setupPositionProbePattern(this.moduleCount-7,0);this.setupPositionProbePattern(0,this.moduleCount-7);this.setupPositionAdjustPattern();this.setupTimingPattern()
;this.setupTypeInfo(t,e);this.typeNumber>=7&&this.setupTypeNumber(t);null==this.dataCache&&(this.dataCache=s.createData(this.typeNumber,this.errorCorrectLevel,this.dataList));this.mapData(this.dataCache,e)};l.setupPositionProbePattern=function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var o=-1;o<=7;o++)e+o<=-1||this.moduleCount<=e+o||(this.modules[t+r][e+o]=0<=r&&r<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=o&&o<=4)};l.getBestMaskPattern=function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var o=a.getLostPoint(this);if(0==r||t>o){t=o;e=r}}return e};l.createMovieClip=function(t,e,r){var o=t.createEmptyMovieClip(e,r);this.make();for(var n=0;n<this.modules.length;n++)for(var i=1*n,a=0;a<this.modules[n].length;a++){var u=1*a;if(this.modules[n][a]){o.beginFill(0,100);o.moveTo(u,i);o.lineTo(u+1,i);o.lineTo(u+1,i+1);o.lineTo(u,i+1);o.endFill()}}return o};l.setupTimingPattern=function(){
for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)};l.setupPositionAdjustPattern=function(){for(var t=a.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var r=0;r<t.length;r++){var o=t[e],n=t[r];if(null==this.modules[o][n])for(var i=-2;i<=2;i++)for(var u=-2;u<=2;u++)this.modules[o+i][n+u]=-2==i||2==i||-2==u||2==u||0==i&&0==u}};l.setupTypeNumber=function(t){for(var e=a.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var o=!t&&1==(e>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=o}for(r=0;r<18;r++){o=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=o}};l.setupTypeInfo=function(t,e){for(var r=this.errorCorrectLevel<<3|e,o=a.getBCHTypeInfo(r),n=0;n<15;n++){var i=!t&&1==(o>>n&1);n<6?this.modules[n][8]=i:n<8?this.modules[n+1][8]=i:this.modules[this.moduleCount-15+n][8]=i}for(n=0;n<15;n++){i=!t&&1==(o>>n&1)
;n<8?this.modules[8][this.moduleCount-n-1]=i:n<9?this.modules[8][15-n-1+1]=i:this.modules[8][15-n-1]=i}this.modules[this.moduleCount-8][8]=!t};l.mapData=function(t,e){for(var r=-1,o=this.moduleCount-1,n=7,i=0,u=this.moduleCount-1;u>0;u-=2){6==u&&u--;for(;;){for(var s=0;s<2;s++)if(null==this.modules[o][u-s]){var l=!1;i<t.length&&(l=1==(t[i]>>>n&1));a.getMask(e,o,u-s)&&(l=!l);this.modules[o][u-s]=l;if(-1==--n){i++;n=7}}if((o+=r)<0||this.moduleCount<=o){o-=r;r=-r;break}}}};s.PAD0=236;s.PAD1=17;s.createData=function(t,e,r){for(var o=n.getRSBlocks(t,e),u=new i,l=0;l<r.length;l++){var f=r[l];u.put(f.mode,4);u.put(f.getLength(),a.getLengthInBits(f.mode,t));f.write(u)}var h=0;for(l=0;l<o.length;l++)h+=o[l].dataCount;if(u.getLengthInBits()>8*h)throw new Error("code length overflow. ("+u.getLengthInBits()+">"+8*h+")");u.getLengthInBits()+4<=8*h&&u.put(0,4);for(;u.getLengthInBits()%8!=0;)u.putBit(!1);for(;!(u.getLengthInBits()>=8*h);){u.put(s.PAD0,8);if(u.getLengthInBits()>=8*h)break
;u.put(s.PAD1,8)}return s.createBytes(u,o)};s.createBytes=function(t,e){for(var r=0,o=0,n=0,i=new Array(e.length),s=new Array(e.length),l=0;l<e.length;l++){var f=e[l].dataCount,h=e[l].totalCount-f;o=Math.max(o,f);n=Math.max(n,h);i[l]=new Array(f);for(var g=0;g<i[l].length;g++)i[l][g]=255&t.buffer[g+r];r+=f;var d=a.getErrorCorrectPolynomial(h),c=new u(i[l],d.getLength()-1).mod(d);s[l]=new Array(d.getLength()-1);for(g=0;g<s[l].length;g++){var p=g+c.getLength()-s[l].length;s[l][g]=p>=0?c.get(p):0}}var m=0;for(g=0;g<e.length;g++)m+=e[g].totalCount;var v=new Array(m),C=0;for(g=0;g<o;g++)for(l=0;l<e.length;l++)g<i[l].length&&(v[C++]=i[l][g]);for(g=0;g<n;g++)for(l=0;l<e.length;l++)g<s[l].length&&(v[C++]=s[l][g]);return v};t.exports=s},917611:(t,e,r)=>{var o=r(249381);function n(t,e){this.totalCount=t;this.dataCount=e}
n.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]]
;n.getRSBlocks=function(t,e){var r=n.getRsBlockTable(t,e);if(null==r)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var o=r.length/3,i=new Array,a=0;a<o;a++)for(var u=r[3*a+0],s=r[3*a+1],l=r[3*a+2],f=0;f<u;f++)i.push(new n(s,l));return i};n.getRsBlockTable=function(t,e){switch(e){case o.L:return n.RS_BLOCK_TABLE[4*(t-1)+0];case o.M:return n.RS_BLOCK_TABLE[4*(t-1)+1];case o.Q:return n.RS_BLOCK_TABLE[4*(t-1)+2];case o.H:return n.RS_BLOCK_TABLE[4*(t-1)+3];default:return}};t.exports=n},611518:t=>{for(var e={glog:function(t){if(t<1)throw new Error("glog("+t+")");return e.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},r=0;r<8;r++)e.EXP_TABLE[r]=1<<r;for(r=8;r<256;r++)e.EXP_TABLE[r]=e.EXP_TABLE[r-4]^e.EXP_TABLE[r-5]^e.EXP_TABLE[r-6]^e.EXP_TABLE[r-8];for(r=0;r<255;r++)e.LOG_TABLE[e.EXP_TABLE[r]]=r;t.exports=e},332792:t=>{t.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,
MODE_8BIT_BYTE:4,MODE_KANJI:8}},493160:(t,e,r)=>{var o=r(332792),n=r(632832),i=r(611518),a=0,u=1,s=2,l=3,f=4,h=5,g=6,d=7,c={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;c.getBCHDigit(e)-c.getBCHDigit(c.G15)>=0;)e^=c.G15<<c.getBCHDigit(e)-c.getBCHDigit(c.G15);return(t<<10|e)^c.G15_MASK},getBCHTypeNumber:function(t){
for(var e=t<<12;c.getBCHDigit(e)-c.getBCHDigit(c.G18)>=0;)e^=c.G18<<c.getBCHDigit(e)-c.getBCHDigit(c.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;){e++;t>>>=1}return e},getPatternPosition:function(t){return c.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case a:return(e+r)%2==0;case u:return e%2==0;case s:return r%3==0;case l:return(e+r)%3==0;case f:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case h:return e*r%2+e*r%3==0;case g:return(e*r%2+e*r%3)%2==0;case d:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new n([1],0),r=0;r<t;r++)e=e.multiply(new n([1,i.gexp(r)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case o.MODE_NUMBER:return 10;case o.MODE_ALPHA_NUM:return 9;case o.MODE_8BIT_BYTE:case o.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case o.MODE_NUMBER:return 12;case o.MODE_ALPHA_NUM:return 11;case o.MODE_8BIT_BYTE:
return 16;case o.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case o.MODE_NUMBER:return 14;case o.MODE_ALPHA_NUM:return 13;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,o=0;o<e;o++)for(var n=0;n<e;n++){for(var i=0,a=t.isDark(o,n),u=-1;u<=1;u++)if(!(o+u<0||e<=o+u))for(var s=-1;s<=1;s++)n+s<0||e<=n+s||0==u&&0==s||a==t.isDark(o+u,n+s)&&i++;i>5&&(r+=3+i-5)}for(o=0;o<e-1;o++)for(n=0;n<e-1;n++){var l=0;t.isDark(o,n)&&l++;t.isDark(o+1,n)&&l++;t.isDark(o,n+1)&&l++;t.isDark(o+1,n+1)&&l++;0!=l&&4!=l||(r+=3)}for(o=0;o<e;o++)for(n=0;n<e-6;n++)t.isDark(o,n)&&!t.isDark(o,n+1)&&t.isDark(o,n+2)&&t.isDark(o,n+3)&&t.isDark(o,n+4)&&!t.isDark(o,n+5)&&t.isDark(o,n+6)&&(r+=40);for(n=0;n<e;n++)for(o=0;o<e-6;o++)t.isDark(o,n)&&!t.isDark(o+1,n)&&t.isDark(o+2,n)&&t.isDark(o+3,n)&&t.isDark(o+4,n)&&!t.isDark(o+5,n)&&t.isDark(o+6,n)&&(r+=40)
;var f=0;for(n=0;n<e;n++)for(o=0;o<e;o++)t.isDark(o,n)&&f++;return r+=10*(Math.abs(100*f/e/e-50)/5)}};t.exports=c},888632:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},n=u(r(45697)),i=r(667294),a=u(i);function u(t){return t&&t.__esModule?t:{default:t}}var s={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},l={title:void 0,xmlns:"http://www.w3.org/2000/svg"},f=(0,i.forwardRef)((function(t,e){var r=t.bgColor,n=t.bgD,i=t.fgD,u=t.fgColor,s=t.size,l=t.title,f=t.viewBoxSize,h=function(t,e){var r={}
;for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}(t,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize"]);return a.default.createElement("svg",o({},h,{height:s,ref:e,viewBox:"0 0 "+f+" "+f,width:s}),l?a.default.createElement("title",null,l):null,a.default.createElement("path",{d:n,fill:r}),a.default.createElement("path",{d:i,fill:u}))}));f.displayName="QRCodeSvg";f.propTypes=s;f.defaultProps=l;e.default=f},101653:(t,e,r)=>{"use strict";({value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},n=f(r(114450)),i=f(r(249381)),a=f(r(45697)),u=r(667294),s=f(u),l=f(r(888632));function f(t){return t&&t.__esModule?t:{default:t}}var h={bgColor:a.default.oneOfType([a.default.object,a.default.string]),fgColor:a.default.oneOfType([a.default.object,a.default.string]),level:a.default.string,size:a.default.number,
value:a.default.string.isRequired},g=(0,u.forwardRef)((function(t,e){var r=t.bgColor,a=t.fgColor,u=t.level,f=t.size,h=t.value,g=function(t,e){var r={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}(t,["bgColor","fgColor","level","size","value"]),d=new n.default(-1,i.default[u]);d.addData(h);d.make();var c=d.modules;return s.default.createElement(l.default,o({},g,{bgColor:r,bgD:c.map((function(t,e){return t.map((function(t,r){return t?"":"M "+r+" "+e+" l 1 0 0 1 -1 0 Z"})).join(" ")})).join(" "),fgColor:a,fgD:c.map((function(t,e){return t.map((function(t,r){return t?"M "+r+" "+e+" l 1 0 0 1 -1 0 Z":""})).join(" ")})).join(" "),ref:e,size:f,viewBoxSize:c.length}))}));g.displayName="QRCode";g.propTypes=h;g.defaultProps={bgColor:"#FFFFFF",fgColor:"#000000",level:"L",size:256};e.Z=g}}]);
//# sourceMappingURL=63b6a59ca196281ec3dc.js.map

View File

@ -0,0 +1,2 @@
(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push([[38845],{138845:(p,a,b)=>{p.exports=b.p+"29b743aca44653b0ef7d2a01c5189bab.woff2"}}]);
//# sourceMappingURL=9e2273041e0d402b5480.js.map

View File

@ -0,0 +1,2 @@
(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push([[2999],{802999:(p,r,c)=>{p.exports=function(){return new Worker(c.p+"84f5bda14b25c65f8d7c.worker.js")}}}]);
//# sourceMappingURL=a178925e38d01d943da9.js.map

View File

@ -0,0 +1,2 @@
(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push([[81964],{181964:(p,r,e)=>{p.exports=function(){return new Worker(e.p+"3cdf1e508a5821a0cdad.worker.js")}}}]);
//# sourceMappingURL=ac5a2ca155ef07ea4050.js.map

View File

@ -0,0 +1,284 @@
(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push([[46208],{637849:(e,t,n)=>{e.exports=n.p+"62fc691d2860dbf7dea5582aba20f051.svg"},837307:(e,t,n)=>{e.exports=n.p+"0ee88820de68e9856408ac765a57198d.svg"},697694:(e,t,n)=>{e.exports=n.p+"87f8416faec0691b96525d0bb3027809.svg"},709989:(e,t,n)=>{e.exports=n.p+"e878f2c37767692b3936e707df01c1a4.svg"},955568:(e,t,n)=>{e.exports=n.p+"bf852fd03dee12cf7ba1392884138f27.svg"},230978:(e,t,n)=>{e.exports=n.p+"21c1c5faf97abcc71bf3bde30e57bf14.svg"},182765:(e,t,n)=>{e.exports=n.p+"092b071c3b3141a58787415450c27857.png"},100539:(e,t,n)=>{e.exports=n.p+"17192d3fe939ecf404e8cdd64b340469.svg"},639915:(e,t,n)=>{e.exports=n.p+"1a06a76c7ea3e0facf0d6635e10c5898.svg"},143613:(e,t,n)=>{e.exports=n.p+"ab4f6c12a1ced9de8b5d279056f21334.svg"},424286:(e,t,n)=>{e.exports=n.p+"0e9718017ef813c08a592b0bbd8496dc.png"},819361:(e,t,n)=>{e.exports=n.p+"14271875289ea86971326d281f681a64.svg"},882253:(e,t,n)=>{e.exports=n.p+"0eeb095cd923afdf420687347dc673ff.svg"
},661807:(e,t,n)=>{e.exports=n.p+"71911dd31666b4c410a9c8cd8af361bc.svg"},149374:(e,t,n)=>{e.exports=n.p+"b4c362308f7e586b97c5155337ad2ea5.svg"},841860:(e,t,n)=>{e.exports=n.p+"9ea38b117bb11b03761dc3351f048bfa.svg"},123555:(e,t,n)=>{e.exports=n.p+"5a1a231bd56982c69c29ccc058d4b627.svg"},614040:(e,t,n)=>{e.exports=n.p+"0d893da2d50673a2eed63138225eb111.svg"},525106:(e,t,n)=>{e.exports=n.p+"771880976d58ad9ca6aee94bb06089b4.png"},100553:(e,t,n)=>{e.exports=n.p+"1e020fbfcf47d6368053524411553d1f.svg"},568534:(e,t,n)=>{e.exports=n.p+"80f97fbf531019c97bcc2661b8d41036.svg"},106952:(e,t,n)=>{e.exports=n.p+"3020e9aa04f0b2277dc30309e18ef310.svg"},952587:(e,t,n)=>{e.exports=n.p+"987cc6d375f9396c95619acafe8fcfd5.svg"},340563:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(999357),o=n(165695),i=n(744564),a=n(801809),s=n(2590);function c(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}function u(e){return function(){var t=this,n=arguments
;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){c(i,r,o,a,s,"next",e)}function s(e){c(i,r,o,a,s,"throw",e)}a(void 0)}))}}var l=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}
if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};const f={signup:function(e,t){return a.Z.post({url:s.ANM.HUB_WAITLIST_SIGNUP,body:{email:e,school:t},trackedActionData:{event:r.a9.HUB_WAITLIST_SIGNUP,properties:function(e){var t,n=!1,r=null==e||null===(t=e.body)||void 0===t?void 0:t.email_domain;if(null!=r){n=-1!==r.split(".").indexOf("edu")}return(0,o.iG)({is_edu_email:n})}}})},sendVerificationEmail:function(e,t,n){return u((function(){return l(this,(function(i){switch(i.label){case 0:return[4,a.Z.post({url:s.ANM.HUB_EMAIL_VERIFY_SEND,body:{email:e,guild_id:n,allow_multiple_guilds:t,use_verification_code:!0},trackedActionData:{event:r.a9.HUB_EMAIL_VERIFY_SEND,properties:function(e){var t,n=null==e||null===(t=e.body)||void 0===t?void 0:t.has_matching_guild;return(0,o.iG)({has_matching_guild:n})}}})];case 1:
return[2,i.sent().body]}}))}))()},verify:function(e){return u((function(){var t,n,o,c;return l(this,(function(u){switch(u.label){case 0:if(null==e)return[3,4];u.label=1;case 1:u.trys.push([1,3,,4]);return[4,a.Z.post({url:s.ANM.HUB_EMAIL_VERIFY,body:{token:e},trackedActionData:{event:r.a9.HUB_EMAIL_VERIFY}})];case 2:n=u.sent();o=null===(t=n.body.guild)||void 0===t?void 0:t.id;i.Z.dispatch({type:"HUB_VERIFY_EMAIL_SUCCESS",guildId:o});return[3,4];case 3:c=u.sent();i.Z.dispatch({type:"HUB_VERIFY_EMAIL_FAILURE",errors:c.body});return[3,4];case 4:return[2]}}))}))()},verifyCode:function(e,t,n){return u((function(){var o,c,u,f;return l(this,(function(l){switch(l.label){case 0:if(null==e)return[3,4];l.label=1;case 1:l.trys.push([1,3,,4]);return[4,a.Z.post({url:s.ANM.HUB_EMAIL_VERIFY_CODE,body:{code:e,guild_id:t,email:n},trackedActionData:{event:r.a9.HUB_EMAIL_VERIFY}})];case 2:c=l.sent();u=null===(o=c.body.guild)||void 0===o?void 0:o.id;i.Z.dispatch({type:"HUB_VERIFY_EMAIL_SUCCESS",guildId:u})
;return[2,c.body];case 3:f=l.sent();i.Z.dispatch({type:"HUB_VERIFY_EMAIL_FAILURE",errors:f.body});throw f;case 4:return[2]}}))}))()}}},314620:(e,t,n)=>{"use strict";n.d(t,{b8:()=>f,GR:()=>p,ul:()=>_});var r=n(281110),o=n(744564),i=n(200892),a=n(534681),s=n(2590);function c(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){c(i,r,o,a,s,"next",e)}function s(e){c(i,r,o,a,s,"throw",e)}a(void 0)}))}}var l=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),
0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function f(){return d.apply(this,arguments)}function d(){return(d=u((function(){var e,t;return l(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,(0,a.Kb)({url:s.ANM.LIBRARY,oldFormErrors:!0},!1)];case 1:e=n.sent();o.Z.dispatch({type:"LIBRARY_FETCH_SUCCESS",libraryApplications:e.body});return[3,3];case 2:t=n.sent()
;o.Z.dispatch({type:"LIBRARY_FETCH_FAIL",error:t});return[3,3];case 3:return[2]}}))}))).apply(this,arguments)}function p(e){return h.apply(this,arguments)}function h(){return(h=u((function(e){var t,n,a;return l(this,(function(c){switch(c.label){case 0:return null==(t=e.primarySkuId)?[2]:[4,r.Z.get({url:s.ANM.APPLICATION_BRANCH_LIST(e.id),oldFormErrors:!0}).then((function(e){return e.body}))];case 1:n=c.sent();a=n.map((function(n){return i.Z.createForTestMode({id:e.id,skuId:t,branch:n})}));o.Z.dispatch({type:"LIBRARY_APPLICATIONS_TEST_MODE_ENABLED",libraryApplications:a});return[2]}}))}))).apply(this,arguments)}function _(e,t,n){o.Z.dispatch({type:"LIBRARY_APPLICATION_ACTIVE_LAUNCH_OPTION_UPDATE",applicationId:e,branchId:t,launchOptionId:n})}},480281:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(785893),o=n(667294),i=n(101653),a=n(841303),s=n.n(a);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t,n){
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function l(e){l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return l(e)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_(e,t)}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){u(e,t,n[t])}))}return e}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t)
;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function h(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e,t){_=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return _(e,t)}var E=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}
var m=n(182765),g=function(e){f(n,e);var t=y(n);function n(){c(this,n);return t.apply(this,arguments)}n.prototype.render=function(){var e=this.props,t=e.className,n=e.text,o=p(e,["className","text"]);return(0,r.jsx)("div",{style:{padding:8,borderRadius:4,width:o.size,height:o.size,backgroundColor:o.bgColor},className:t,children:(0,r.jsx)(i.Z,d({value:n,level:"M"},o))})};return n}(o.PureComponent);g.defaultProps={size:128,bgColor:"#ffffff",fgColor:"#000000"};(function(e){f(n,e);var t=y(n);function n(){c(this,n);return t.apply(this,arguments)}n.prototype.render=function(){return(0,r.jsxs)("div",{className:s().qrCodeContainer,children:[(0,r.jsx)(g,d({},this.props)),(0,r.jsx)("div",{className:s().qrCodeOverlay,children:(0,r.jsx)("img",{src:m,alt:""})})]})};return n}(o.PureComponent)).defaultProps={size:144,bgColor:"#ffffff",fgColor:"#000000"};const v=g},988376:(e,t,n)=>{"use strict";n.r(t);n.d(t,{default:()=>_i})
;var r=n(785893),o=n(667294),i=n(517563),a=n(999357),s=n(289283),c=n(202351),u=n(744564),l=n(84441),f=n(563726),d=n(224813),p=n(281110),h=n(561177),_=n(110108),E=n(705429),y=n(652591),m=n(301928),g=n(2590);function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e){b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return b(e)}function O(e,t){return!t||"object"!==N(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function I(e,t){I=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return I(e,t)}var N=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{
Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}function A(e,t){y.default.track(g.rMx.BROWSER_HANDOFF_SUCCEEDED,{authenticated:e,handoff_source:t})}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&I(e,t)}(n,e);var t=T(n);function n(){v(this,n);var e;(e=t.apply(this,arguments)).handleEnd=function(t){var n=t.handoffToken,r=t.fingerprint,o=E.Z.key;if(null!=o&&E.Z.isHandoffAvailable())e.handleHandoff({handoffKey:o,handoffToken:n,fingerprint:r,handoffSource:void 0});else{l.Z.setFingerprint(null);(0,h.by)()}};return e}var r=n.prototype;r._initialize=function(){
u.Z.subscribe("BROWSER_HANDOFF_END",this.handleEnd);u.Z.subscribe("BROWSER_HANDOFF_FROM_APP",this.handleHandoff)};r._terminate=function(){u.Z.unsubscribe("BROWSER_HANDOFF_END",this.handleEnd);u.Z.unsubscribe("BROWSER_HANDOFF_FROM_APP",this.handleHandoff)};r.handleHandoff=function(e){var t=e.handoffKey,n=e.handoffToken,r=e.fingerprint,o=e.handoffSource;if(null!=n)p.Z.post({url:g.ANM.HANDOFF_EXCHANGE,body:{key:t,handoff_token:n}}).then((function(e){var t=e.body;(0,h.Vb)(t.user);l.Z.loginToken(t.token,!1);A(!0,o)}),(function(e){null!=r&&A(!1,o);l.Z.setFingerprint(r);(0,h.lx)();if(o===_.F.ROLE_SUBSCRIPTION){var t;y.default.track(g.rMx.MOBILE_WEB_HANDOFF_FAILURE,{reason:null!==(t=e.message)&&void 0!==t?t:e.text,handoff_source:o})}}));else if(null!=r){l.Z.setFingerprint(r);A(!1,o);(0,h.lx)()}else{l.Z.setFingerprint(r);(0,h.by)()}};r.__getLocalVars=function(){return{}};return n}(m.Z);const C=new S;var x=n(113512);function R(e){u.Z.dispatch({type:"AUTH_INVITE_UPDATE",invite:e})}
var j=n(686874),P=n(848285),L=n(536038),M=n(558820),Z=n(645106),D=n(473708),w=n(518280),U=n.n(w);function G(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e){k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return k(e)}function B(e,t){return!t||"object"!==H(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function F(e,t){F=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return F(e,t)}var H=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){
var n,r=k(e);if(t){var o=k(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return B(this,n)}}c.ZP.initialize();var K=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&F(e,t)}(o,e);var t=V(o);function o(){G(this,o);var e;(e=t.apply(this,arguments)).state={busy:!0,success:!1,guild:null};return e}var a=o.prototype;a.componentDidMount=function(){var e=this,t=(0,Z.Z)(this.props.location),n=(0,i.parse)(this.props.location.search);p.Z.post({url:g.ANM.DISABLE_SERVER_HIGHLIGHT_NOTIFICATIONS,body:{token:t,pixel_uuid:n.hash,guild_id:n.guild_id},oldFormErrors:!0}).then((function(t){var n=t.body.guild,r=new P.Z(n);e.setState({success:!0,busy:!1,guild:r})}),(function(){return e.setState({success:!1,busy:!1})}));(0,j.e)("disable_server_highlight_notifications")};a.renderBusy=function(){
return(0,r.jsx)(M.ZP,{children:(0,r.jsx)(M.Hh,{})})};a.renderSuccess=function(){var e=this.props,t=e.defaultRoute,n=e.transitionTo,o=this.state.guild;return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.SERVER_HIGHLIGHT_UNSUBSCRIBE_HEADER}),(0,r.jsx)(M.DK,{children:D.Z.Messages.SERVER_HIGHLIGHT_UNSUBSCRIBE_BODY.format({guildName:o.name})}),(0,r.jsx)(M.zx,{className:U().marginTop40,onClick:function(){return n(t)},children:D.Z.Messages.CONTINUE_TO_WEBAPP}),(0,r.jsx)(M.zx,{className:U().marginTop8,color:M.zx.Colors.LINK,look:M.zx.Looks.LINK,onClick:function(){n(g.Z5c.USER_GUILD_NOTIFICATION_SETTINGS(o.id))},children:D.Z.Messages.SERVER_HIGHLIGHT_MANAGE_SETTINGS})]})};a.renderError=function(){var e=this.props,t=e.defaultRoute,o=e.transitionTo;return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{src:n(709989),className:U().marginBottom20}),(0,r.jsx)(M.Dx,{className:U().marginBottom8,
children:D.Z.Messages.AUTH_DISABLE_EMAIL_NOTIFICATIONS_FAILURE_HEADER}),(0,r.jsx)(M.DK,{children:D.Z.Messages.AUTH_DISABLE_EMAIL_NOTIFICATIONS_FAILURE_BODY}),(0,r.jsx)(M.zx,{className:U().marginTop40,onClick:function(){return o(t)},children:D.Z.Messages.CONTINUE_TO_WEBAPP})]})};a.render=function(){var e=this.state,t=e.busy,n=e.success;return t?this.renderBusy():n?this.renderSuccess():this.renderError()};return o}(o.PureComponent);K.defaultProps={transitionTo:function(e){return n.g.location.assign(e)}};const z=c.ZP.connectStores([L.Z],(function(){return{defaultRoute:L.Z.defaultRoute}}))(K);var Y=n(294184),W=n.n(Y),q=n(426797),X=n(53540),Q=n(560837),J=n(78501),$=n(83623),ee=n(58118),te=n(913957),ne=n.n(te);function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oe(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}function ie(e){return function(){var t=this,n=arguments
;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){oe(i,r,o,a,s,"next",e)}function s(e){oe(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return re(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return re(e,t)}(e,t)||function(){
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var se=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){
a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};const ce=function(){var e,t=ae(o.useState(""),2),i=t[0],a=t[1],s=ae(o.useState(""),2),u=s[0],l=s[1],f=ae(o.useState(!1),2),d=f[0],p=f[1],h=ae(o.useState(!1),2),_=h[0],E=h[1],y=ae(o.useState(null),2),m=y[0],g=y[1],v=ae(o.useState(null),2),b=v[0],O=v[1],I=(0,c.e7)([Q.Z],(function(){return Q.Z.getCountryCode()})),N=I.code.split(" ")[0],T=(e=ie((function(){var e;return se(this,(function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,q.Z.resendCode(i)];case 1:t.sent();return[3,3];case 2:e=t.sent();O(e.body.message);return[3,3];case 3:return[2]}}))})),function(){return e.apply(this,arguments)}),A=function(){var e=ie((function(){var e,t;return se(this,(function(n){switch(n.label){case 0:p(!0);n.label=1;case 1:n.trys.push([1,3,4,5])
;return[4,q.Z.verifyPhone(N+i,u)];case 2:e=n.sent().token;g(null);O(null);E(!0);q.Z.validatePhoneForSupport(e);return[3,5];case 3:if((t=n.sent()).body.message){g(null);O(t.body.message)}else{g(t.body.phone);O(t.body.code)}return[3,5];case 4:p(!1);return[7];case 5:return[2]}}))}));return function(){return e.apply(this,arguments)}}(),S=(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{src:n(882253)}),(0,r.jsxs)(M.Dx,{className:W()(U().marginTop20,ne().flex,ne().justifyCenter,ne().alignCenter),children:[D.Z.Messages.MEMBER_VERIFICATION_PHONE_VERIFIED,(0,r.jsx)($.Z,{className:U().marginLeft8})]})]});return _?S:(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{children:D.Z.Messages.ENTER_CODE}),(0,r.jsx)(M.DK,{className:U().marginTop8,children:D.Z.Messages.VERIFY_PHONE_FOR_SUPPORT}),(0,r.jsxs)(M.gO,{className:U().marginTop20,children:[(0,r.jsx)(J.Z,{label:D.Z.Messages.FORM_LABEL_PHONE_NUMBER,alpha2:I.alpha2,countryCode:N,value:i,autoComplete:"off",spellCheck:"false",onChange:a,forceMode:X.Nz.PHONE,
error:m}),(0,r.jsx)(M.II,{className:U().marginTop20,label:D.Z.Messages.CONFIRMATION_CODE,value:u,onChange:l,maxLength:ee.z,error:b}),(0,r.jsx)(M.zx,{size:M.zx.Sizes.SMALL,look:M.zx.Looks.LINK,onClick:T,children:D.Z.Messages.RESEND_CODE}),(0,r.jsx)(M.zx,{className:U().marginTop20,onClick:A,submitting:d,children:D.Z.Messages.DONE})]})]})};var ue=n(158434),le=n(145739),fe=n(340563),de=n(784426);function pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function he(e){he=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return he(e)}function _e(e,t){return!t||"object"!==ye(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ee(e,t){Ee=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ee(e,t)}var ye=function(e){
return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function me(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=he(e);if(t){var o=he(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _e(this,n)}}var ge=!1,ve=null,be=null;var Oe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Ee(e,t)}(n,e);var t=me(n);function n(){pe(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getState=function(){return{verifySuccess:ge,verifyErrors:ve,redirectGuildId:be}};r.__getLocalVars=function(){return{
verifySuccess:ge,verifyErrors:ve,redirectGuildId:be}};return n}(c.ZP.Store);Oe.displayName="HubEmailVerificationStore";const Ie=new Oe(u.Z,{HUB_VERIFY_EMAIL_SUCCESS:function(e){var t=e.guildId;ge=!0;ve=null;be=t},HUB_VERIFY_EMAIL_FAILURE:function(e){var t=e.errors;ge=!1;ve=t}});var Ne=n(441143),Te=n.n(Ne),Ae=n(131795),Se=n.n(Ae),Ce=n(125333),xe=n(58964),Re=n(97245),je=n(736818),Pe=n(877815);function Le(e){var t=function(e){var t,n=null===(t=Se().os)||void 0===t?void 0:t.family;if("Android"===n||"iOS"===n){var r=je.default.getFingerprint(),o=(0,xe.WS)();Te()(null!=e,"generateAppPath: guildId cannot be null");return(0,xe.ZP)((0,Ce.z0)(e),{utmSource:"verify_hub_email",fingerprint:r,attemptId:o})}return"discord://"}(e),n=(0,xe.zS)(t);null!=n&&y.default.track(g.rMx.DEEP_LINK_CLICKED,{fingerprint:(0,Re.K)(n.fingerprint),attempt_id:n.attemptId,source:n.utmSource});Pe.Z.launch(t,(function(e){e||(0,de.dL)(L.Z.fallbackRoute)}))}var Me=n(539889),Ze=n.n(Me);function De(e,t){
(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function we(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return De(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return De(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}c.ZP.initialize()
;var Ue=n(641453),Ge=n(248088),ke=n(707961),Be=n(336194),Fe=n(107364),He=n(746850),Ve=n.n(He);function Ke(e){var t=e.text,o=e.buttonCta,i=e.onClick;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(M.Ee,{src:n(819361)}),(0,r.jsx)(M.Dx,{className:W()(U().marginTop20,U().marginBottom8,ne().flexCenter),children:D.Z.Messages.DISCORD_DESC_SHORT}),(0,r.jsx)(M.DK,{className:U().marginBottom40,children:D.Z.Messages.DISCORD_DESC_LONG}),(0,r.jsxs)(ke.Zbd,{className:Ve().card,type:ke.Zbd.Types.CUSTOM,children:[(0,r.jsx)("img",{alt:"",className:Ve().cardAccentLeft,src:n(637849)}),(0,r.jsx)("img",{alt:"",className:Ve().cardAccentRight,src:n(837307)}),(0,r.jsxs)(Fe.Z,{className:Ve().cardContents,direction:Fe.Z.Direction.VERTICAL,align:Fe.Z.Align.STRETCH,grow:0,children:[(0,r.jsx)(ke.xvT,{tag:"strong",className:Ve().buttonTitle,variant:"text-md/normal",style:{color:Be.Z.unsafe_rawColors.PRIMARY_300.css},children:t}),(0,r.jsx)(M.zx,{className:Ve().button,onClick:i,children:o})]})]})]})}function ze(e){
var t=e.text,n=e.buttonCta,o=e.theme,i=void 0===o?g.BRd.DARK:o,a=e.onClick;return(0,r.jsx)(M.ZP,{theme:i,children:(0,r.jsx)(Ke,{text:t,buttonCta:n,onClick:a})})}var Ye=n(730381),We=n.n(Ye),qe=n(260561),Xe=(0,qe.B)({kind:"user",id:"2021-03_expiration_notice_mobile_web",label:"Show expiration notice on mobile web invite",defaultConfig:{showExpirationNotice:!1},treatments:[{id:1,label:"Show expiration notice",config:{showExpirationNotice:!0}}]}),Qe=((0,qe.B)({kind:"user",id:"2021-03_expiration_notice_ios",label:"Show expiration notice on ios invite",defaultConfig:{showExpirationNotice:!1},treatments:[{id:1,label:"Show expiration notice",config:{showExpirationNotice:!0}}]}),(0,qe.B)({kind:"user",id:"2021-03_expiration_notice_ios_embed",label:"Show expiration notice on ios invite embed",defaultConfig:{showExpirationNotice:!1},treatments:[{id:1,label:"Show expiration notice",config:{showExpirationNotice:!0}}]}),n(457997)),Je=n(567403);const $e=function(e){
var t=null==e?void 0:e.expires_at,n=!function(e){switch(null==e?void 0:e.state){case g.r2o.EXPIRED:case g.r2o.BANNED:case g.r2o.ERROR:case g.r2o.RESOLVING:return!1;default:return!0}}(e);return(0,c.e7)([Je.Z],(function(){var t;return null!=Je.Z.getGuild(null==e||null===(t=e.guild)||void 0===t?void 0:t.id)}))||n||null==t?null:t};var et=n(777883),tt=n.n(et),nt=function(e){var t=e.expiredAt,n=e.className;Xe.trackExposure({});if(!Xe.useExperiment({}).showExpirationNotice)return null;var o=We()(t).fromNow(!0);return(0,r.jsx)("div",{className:W()(tt().container,n),children:(0,r.jsxs)("div",{className:tt().expirationContainer,children:[(0,r.jsx)(Qe.Z,{color:Be.Z.unsafe_rawColors.WHITE_500.css,width:14,height:14,className:tt().clock}),(0,r.jsx)(ke.xvT,{variant:"text-sm/normal",color:"header-primary",children:D.Z.Messages.INVITE_EXPIRATION_NOTICE.format({duration:o})})]})})};const rt=function(e){var t=e.invite,n=e.className,o=$e(t);return null==o?null:(0,r.jsx)(nt,{expiredAt:o,className:n})}
;var ot=n(757753),it=n(125173),at=n(775173),st=n(72580),ct=n(641277),ut=n(206986),lt=n(98265),ft=n(749565),dt=n(718634),pt=n(75025),ht=n(114505),_t=n.n(ht),Et=function(e){var t,n,r={onlineCount:null!==(t=e.approximate_presence_count)&&void 0!==t?t:0,memberCount:null!==(n=e.approximate_member_count)&&void 0!==n?n:0};return 0===r.memberCount&&0===r.memberCount?null:r},yt=function(e){return e.target_type===dt.Iq.STREAM&&null!=e.target_user},mt=function(e){var t;return(null===(t=e.channel)||void 0===t?void 0:t.type)===g.d4z.GROUP_DM},gt=function(e){return null==e.channel&&null==e.guild&&null!=e.inviter},vt=function(e){return e.state===g.r2o.ACCEPTED},bt=function(e){return null!=e.guild_scheduled_event},Ot=function(e){return!bt(e)&&(!!gt(e)||null!=e.inviter&&!vt(e)&&!function(e){var t,n=Et(e);return(null!==(t=null==n?void 0:n.memberCount)&&void 0!==t?t:0)>100}(e))},It=function(e){var t=e.guild,n=e.user,o=e.application;return null!=o?(0,r.jsx)(ct.Z,{className:_t().appIcon,game:o,
size:_t().appIconSize}):null!=n?(0,r.jsx)(M.qE,{src:n.getAvatarURL(void 0,100),size:ke.EFr.DEPRECATED_SIZE_100,className:_t().avatar}):null!=t?(0,r.jsx)(M.Vj,{guild:t,size:M.Vj.Sizes.LARGER,className:_t().guildIcon,animate:!0}):null};function Nt(e){var t,n=e.invite,o=e.textClassName,i=e.className,a=Et(n);return null==a||Ot(n)||(null==n||null===(t=n.guild)||void 0===t?void 0:t.id)===pt.fQ?null:(0,r.jsx)(M.EJ,{className:W()(_t().activityCount,i),online:a.onlineCount,total:a.memberCount,textClassName:o,flat:!0})}function Tt(e){var t=e.invite,n=e.showBigUserIcon,i=o.useMemo((function(){return n?null:yt(t)&&null!=t.target_user?at.ZP.getUserAvatarURL(t.target_user):Ot(t)&&null!=t.inviter?at.ZP.getUserAvatarURL(t.inviter):null}),[t,n]),a=D.Z.Messages.INSTANT_INVITE_YOU_HAVE_BEEN_INVITED_TO_JOIN;if(mt(t)){var s,c
;a=null!=(null===(s=t.channel)||void 0===s?void 0:s.name)&&null!=(null===(c=t.inviter)||void 0===c?void 0:c.username)?D.Z.Messages.INSTANT_INVITE_YOU_HAVE_BEEN_INVITED_TO_JOIN_GROUP_DM_BY_USER.format({username:t.inviter.username}):D.Z.Messages.INSTANT_INVITE_YOU_HAVE_BEEN_INVITED_TO_JOIN_GROUP_DM}else yt(t)&&null!=t.target_user?a=D.Z.Messages.AUTH_MESSAGE_INVITED_TO_STREAM.format({username:t.target_user.username}):vt(t)?a=D.Z.Messages.INSTANT_INVITE_YOU_ARE_ALREADY_A_MEMBER_OF:Ot(t)&&null!=t.inviter&&(a=D.Z.Messages.INSTANT_INVITE_YOU_HAVE_BEEN_INVITED_TO_JOIN_BY_USER.format({username:t.inviter.username}));return(0,r.jsxs)("div",{className:_t().inviteJoinContainer,children:[null!=i&&(0,r.jsx)("div",{className:_t().inviterIconWrapper,children:(0,r.jsx)(M.qE,{src:i,size:ke.EFr.SIZE_24})}),(0,r.jsx)(M.DK,{className:_t().inviteJoinSubTitle,children:a})]})}function At(e){var t,n,o,i=e.user,a=e.guild,s=e.channel,c=e.application,u=e.showBigUserIcon;if(null!=a){u&&null==c&&(t=(0,r.jsx)(M.Vj,{
guild:a,size:M.Vj.Sizes.SMALL}));n=a.name;if(null!=c){n=c.name;o=(0,r.jsxs)("div",{className:_t().inviteJoinContainer,children:[(0,r.jsx)(M.DK,{className:_t().appIn,children:D.Z.Messages.EMBEDDED_ACTIVITIES_INVITE_IN}),(0,r.jsxs)("div",{className:_t().guildContainer,children:[(0,r.jsx)(M.Vj,{guild:a,size:M.Vj.Sizes.SMALL}),(0,r.jsx)(lt.Z,{className:_t().appGuildName,color:lt.Z.Colors.CUSTOM,tag:"span",size:lt.Z.Sizes.SIZE_24,children:a.name})]})]})}}else if(null!=s){if(null==i)throw new Error("no inviter in group DM invite");var l=i.username;if(null!=s.name&&""!==s.name){n=s.name;null!=s.icon&&(t=(0,r.jsx)(M.MC,{channel:s,size:ke.EFr.SIZE_32}))}else n=l}else if(null!=i){var f=i.username;n=D.Z.Messages.INSTANT_INVITE_YOU_HAVE_BEEN_INVITED_TO_CHAT.format({username:f});o=(0,r.jsx)(M.DK,{className:_t().directInviteSubTitle,children:D.Z.Messages.INSTANT_INVITE_DIRECT_FRIEND_DESCRIPTION.format({username:ft.ZP.getUserTag(i)})})}return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(M.Dx,{
className:_t().title,children:[null!=a?(0,r.jsx)(ut.Z,{guild:a,className:_t().guildBadge,tooltipPosition:"left"}):null,t,n]}),o]})}var St=n(451936),Ct=n(382060),xt=n(722406),Rt=n(269300),jt=n(220109),Pt=n(621634),Lt=n(124251),Mt=n(248304),Zt=n.n(Mt);function Dt(e){var t,n=e.guildScheduledEvent,o=e.channel,i=e.onAcceptInvite,a=e.isSubmitting,s=(0,Rt.xt)(n),c=(0,Rt.Z2)(n);return(0,r.jsxs)("div",{className:Zt().guildEventCard,children:[(0,r.jsx)(jt.ZP,{userCount:n.user_count,startTime:n.scheduled_start_time,name:n.name,description:null!==(t=n.description)&&void 0!==t?t:void 0,isActive:s,isEnded:c,headerVariant:"heading-md/medium",descriptionClassName:Zt().channelDescription,guildId:n.guild_id,eventType:n.entity_type}),null!=o&&(0,r.jsx)("div",{className:Zt().channelInfo,children:(0,r.jsx)(Pt.Z,{guildScheduledEvent:n,channel:o})}),(0,r.jsx)(ke.zxk,{className:Zt().acceptButton,color:ke.zxk.Colors.GREEN,onClick:i,submitting:a,children:D.Z.Messages.GUILD_PROFILE_JOIN_SERVER_BUTTON})]})}
function wt(e){var t,n=e.invite,o=null!=n.guild?new P.Z(n.guild):null;if(null==o)return null;var i=null!==(t=o.description)&&void 0!==t?t:"";return(0,r.jsxs)("div",{className:Zt().guildInfoCard,children:[(0,r.jsx)(ke.X6q,{className:Zt().presentedBy,variant:"text-sm/medium",children:D.Z.Messages.STAGE_INVITE_GUILD_HEADER}),(0,r.jsxs)("div",{className:Zt().guildContainer,children:[(0,r.jsx)(Lt.Z,{guild:o,active:!0,size:Lt.Z.Sizes.MEDIUM}),(0,r.jsxs)("div",{className:Zt().guildDetailsContanier,children:[(0,r.jsxs)(ke.xvT,{className:Zt().guildName,color:"header-primary",variant:"text-sm/medium",tag:"span",children:[o.name,(0,r.jsx)(ut.Z,{guild:o,className:Zt().guildBadge,tooltipPosition:"left"})]}),(0,r.jsx)(Nt,{invite:n,textClassName:Zt().guildInfoMemberCountText,className:Zt().guildInfoMemberCount})]})]}),i.length>0&&(0,r.jsx)("details",{className:Zt().guildDescriptionContainer,children:(0,r.jsx)(ke.xvT,{color:"header-secondary",variant:"text-sm/normal",children:i})})]})}function Ut(e){
var t=e.invite,n=e.channel,o=e.isSubmitting,i=e.onAcceptInvite,a=t.guild_scheduled_event;return null!=a?(0,r.jsx)(Dt,{guildScheduledEvent:a,channel:n,isSubmitting:o,onAcceptInvite:i}):null}var Gt=n(611072),kt=n.n(Gt);function Bt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Bt(e,t,n[t])}))}return e}function Ht(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})))
;n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Vt(e){var t=e.invite,n=e.onAcceptInvite,o=e.disableUser,i=void 0!==o&&o;if(null==t)return null;var a=null!=t.guild?new P.Z(t.guild):null,s=null!=t.channel?(0,Ct.jD)(t.channel):null,c=null!=t.target_application?new St.Z(t.target_application):null,u=i||null==t.inviter?null:new xt.Z(t.inviter),l=!(null!=t.approximate_member_count&&t.approximate_member_count>100||null!=a&&a.hasFeature(g.oNc.COMMUNITY))&&null!=u&&mt(t),f=function(e){switch(e.state){case g.r2o.ACCEPTING:case g.r2o.APP_OPENING:return!0;default:return!1}}(t),d={invite:t,user:u,guild:a,channel:s,application:c};return bt(t)?(0,r.jsx)(Ut,{invite:t,channel:s,isSubmitting:f,onAcceptInvite:n}):(0,r.jsxs)("div",{className:kt().container,children:[(0,r.jsx)(It,{application:c,guild:a,user:l||gt(t)?u:null}),gt(t)?null:(0,r.jsx)(Tt,Ht(Ft({},d),{showBigUserIcon:l})),(0,r.jsx)(At,Ht(Ft({},d),{
showBigUserIcon:l})),(0,r.jsx)(Nt,Ft({},d)),(0,r.jsx)(ke.zxk,{onClick:n,submitting:f,className:kt().acceptButton,children:D.Z.Messages.INSTANT_INVITE_ACCEPT})]})}var Kt=n(553073),zt=n.n(Kt);function Yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Wt(e,t,n[t])}))}return e}function Xt(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e)
;t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Qt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}
}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Yt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var $t;function en(){return(0,r.jsx)("div",{className:zt().centerFlex,children:(0,r.jsx)(ke.$jN,{})})}!function(e){e[e.LOADING=0]="LOADING";e[e.DETAILS=1]="DETAILS";e[e.ERROR=2]="ERROR"}($t||($t={}));var tn=function(e){var t=null==(null==e?void 0:e.state)&&null==(null==e?void 0:e.channel);if(null==e||null==e.state||t)return $t.LOADING;var n=e.state;switch(n){case g.r2o.RESOLVED:case g.r2o.ACCEPTED:case g.r2o.APP_NOT_OPENED:case g.r2o.APP_OPENED:case g.r2o.ACCEPTING:case g.r2o.APP_OPENING:return $t.DETAILS
;case g.r2o.EXPIRED:case g.r2o.BANNED:case g.r2o.ERROR:return $t.ERROR;case g.r2o.RESOLVING:return $t.LOADING;default:(0,st.vE)(n)}};function nn(e){var t=e.invite,n=e.onAcceptInvite;return(null==t?void 0:t.state)===g.r2o.BANNED?(0,r.jsx)(Ke,{text:D.Z.Messages.AUTH_BANNED_INVITE_BODY,buttonCta:D.Z.Messages.INVITE_INVALID_CTA,onClick:n}):(0,r.jsx)(Ke,{text:D.Z.Messages.INVITE_INVALID_ERROR,buttonCta:D.Z.Messages.INVITE_INVALID_CTA,onClick:n})}function rn(e){var t=e.children,n=e.cardChildren,i=e.startAnimHeightPx,a=e.innerStyle,s=Qt(e,["children","cardChildren","startAnimHeightPx","innerStyle"]).invite,c=Jt(o.useState(tn(s)),2),u=c[0],l=c[1],f=o.useRef(null),d=(0,it.Z)(f,!0,[u]),p=(0,Ge.useSpring)({height:null!=(null==d?void 0:d.height)&&0!==(null==d?void 0:d.height)?"".concat(d.height,"px"):"".concat(i,"px"),config:Ge.config.stiff});o.useEffect((function(){var e=tn(s);e!==u&&l(e)}),[s,u]);return(0,r.jsxs)(Ge.animated.div,{className:zt().inviteCard,style:p,children:[(0,
r.jsx)(Ge.animated.div,{className:zt().inviteChildContainer,style:p,children:(0,r.jsx)("section",{ref:f,className:null==a?void 0:a(u),children:t(u)})}),n]})}function on(e){var t=e.invite;if(null==t||!bt(t))return null;return(0,r.jsx)(rn,Xt(qt({startAnimHeightPx:0,innerStyle:function(){return zt().guildInfoInner},cardChildren:(0,r.jsx)(rt,{invite:t,className:zt().expirationNotice})},e),{children:function(e){return function(e){return null==t?null:e===$t.DETAILS?(0,r.jsx)(wt,{invite:t}):null}(e)}}))}function an(e){var t,n=e.invite,o=null!=n&&bt(n),i=(Wt(t={},$t.DETAILS,zt().inviteCardInner),Wt(t,$t.ERROR,zt().inviteCardInnerError),Wt(t,$t.LOADING,zt().inviteCardInnerLoading),t);return(0,r.jsx)(rn,Xt(qt({startAnimHeightPx:200,innerStyle:function(e){return i[e]},cardChildren:o?null:(0,r.jsx)(rt,{invite:n,className:zt().expirationNotice})},e),{children:function(t){return function(t){if(null==n)return(0,r.jsx)(en,{});switch(t){case $t.DETAILS:return(0,r.jsx)(Vt,Xt(qt({},e),{invite:n}))
;case $t.ERROR:return(0,r.jsx)(nn,Xt(qt({},e),{invite:n}));default:return(0,r.jsx)(en,{})}}(t)}}))}function sn(e){var t=e.invite,n=e.onAcceptInvite,o=(null!=t?t:{}).guild,i={};if(null!=(null==o?void 0:o.splash)){var a=at.ZP.getGuildSplashURL({id:o.id,splash:o.splash});if(null!=a){i.backgroundImage="url(".concat(a,")");i.backgroundSize="cover"}}return(0,r.jsxs)(M.ZP,{theme:g.BRd.DARK,className:zt().splashBackground,style:i,contentClassName:zt().centerAuthBoxContent,children:[(0,r.jsx)(an,Xt(qt({},e),{onAcceptInvite:n})),(0,r.jsx)(on,qt({},e))]})}var cn=n(821229),un=n(70321),ln=n(3564),fn=n(130585),dn=n(790690);const pn=function(){return Date.now()-dn.mb};var hn=n(872691),_n=n(928975),En=n(734589);function yn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mn(e){mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return mn(e)}function gn(e,t){
return!t||"object"!==bn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vn(e,t){vn=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return vn(e,t)}var bn=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function On(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=mn(e);if(t){var o=mn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return gn(this,n)}}c.ZP.initialize();var In=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{
constructor:{value:e,writable:!0,configurable:!0}});t&&vn(e,t)}(o,e);var t=On(o);function o(){yn(this,o);return t.apply(this,arguments)}var i=o.prototype;i.componentDidMount=function(){var e=(0,Z.Z)(this.props.location);null!=e&&l.Z.authorizeIPAddress(e);(0,j.e)("authorize_ip")};i.renderLoginButton=function(){if("Android"===Se().os.family||"iOS"===Se().os.family)return null;var e=this.props.transitionTo;return(0,r.jsx)(M.zx,{onClick:function(){return e(g.Z5c.LOGIN)},children:D.Z.Messages._LOGIN})};i.renderFailed=function(){return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)("img",{alt:"",src:n(955568),className:U().marginBottom20}),(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.AUTHORIZATION_EXPIRED}),(0,r.jsx)(M.DK,{className:U().marginBottom40,children:D.Z.Messages._AUTH_EXPIRED_SUGGESTION}),this.renderLoginButton()]})};i.renderSucceeded=function(){return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)("img",{alt:"",src:n(230978),className:U().marginBottom20}),(0,r.jsx)(M.Dx,{
className:U().marginBottom8,children:D.Z.Messages.IP_AUTHORIZATION_SUCCEEDED}),(0,r.jsx)(M.DK,{className:U().marginBottom40,children:D.Z.Messages._AUTH_IP_AUTH_SUCCEEDED_SUGGESTION}),this.renderLoginButton()]})};i.renderDefault=function(){return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Hh,{}),(0,r.jsx)(M.Dx,{children:D.Z.Messages.AUTHORIZING})]})};i.render=function(){var e=this.props,t=e.verifyFailed,n=e.verifySucceeded;return t?this.renderFailed():n?this.renderSucceeded():this.renderDefault()};return o}(o.PureComponent);In.defaultProps={transitionTo:function(e){return n.g.location.assign(e)}};const Nn=c.ZP.connectStores([je.default],(function(){return{verifyFailed:je.default.didVerifyFail(),verifySucceeded:je.default.didVerifySucceed()}}))(In);const Tn=function(e){var t=e.location,i=(0,c.cj)([je.default],(function(){return{verifyFailed:je.default.didVerifyFail(),verifySucceeded:je.default.didVerifySucceed()}})),a=i.verifyFailed,s=i.verifySucceeded;o.useEffect((function(){var e=(0,Z.Z)(t)
;null!=e&&l.Z.authorizePayment(e);(0,j.e)("authorize_payment")}),[t]);return a?(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)("img",{alt:"",src:n(639915),className:U().marginBottom20}),(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.PAYMENT_AUTHORIZATION_EXPIRED}),(0,r.jsx)(M.DK,{className:U().marginBottom40,children:D.Z.Messages.PAYMENT_AUTH_EXPIRED_SUGGESTION})]}):s?(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)("img",{alt:"",src:n(143613),className:U().marginBottom20}),(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.PAYMENT_AUTHORIZATION_SUCCEEDED}),(0,r.jsx)(M.DK,{className:U().marginBottom40,children:D.Z.Messages.PAYMENT_AUTH_SUCCEEDED_SUGGESTION})]}):(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Hh,{}),(0,r.jsx)(M.Dx,{children:D.Z.Messages.PAYMENT_AUTHORIZING})]})};var An=n(412961),Sn=n(384482),Cn=n(926543);function xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rn(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value
}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}function jn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return xn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Pn,Ln=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}
}([i,s])}}};!function(e){e[e.INITIAL=0]="INITIAL";e[e.RPC_CONNECTED=1]="RPC_CONNECTED";e[e.APP_OPENING=2]="APP_OPENING";e[e.APP_OPENED=3]="APP_OPENED"}(Pn||(Pn={}));const Mn=function(e){var t=e.match,n=e.location,i=e.attemptDeepLink,a=jn(o.useState(Pn.INITIAL),2),s=a[0],c=a[1];o.useEffect((function(){Sn.default.once("connected",(function(){c(Pn.RPC_CONNECTED)}));Sn.default.once("disconnected",(function(){(0,de.uL)((0,Cn.M)())}));Sn.default.connect()}),[]);o.useEffect((function(){if(s===Pn.INITIAL){var e=setTimeout((function(){return(0,de.uL)((0,Cn.M)())}),3e3);return function(){return clearTimeout(e)}}}),[s]);var u,l,f=o.useCallback((l=(u=function(e,t){var n;return Ln(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);c(Pn.APP_OPENING);return[4,i(e,t)];case 1:r.sent();c(Pn.APP_OPENED);return[3,3];case 2:n=r.sent();console.error("Error opening deeplink",n);return[3,3];case 3:return[2]}}))},function(){var e=this,t=arguments;return new Promise((function(n,r){var o=u.apply(e,t)
;function i(e){Rn(o,n,r,i,a,"next",e)}function a(e){Rn(o,n,r,i,a,"throw",e)}i(void 0)}))}),function(e,t){return l.apply(this,arguments)}),[i]);if((0,de.DB)())return null;switch(s){case Pn.RPC_CONNECTED:return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.DEEPLINK_BROWSER_TITLE}),(0,r.jsx)(M.DK,{children:D.Z.Messages.DEEPLINK_BROWSER_PROMPT}),(0,r.jsx)(M.zx,{className:U().marginTop40,onClick:function(){return f(t,n)},children:D.Z.Messages.OPEN_IN_APP}),(0,r.jsx)(M.zx,{className:W()(U().marginTop8,U().marginCenterHorz),color:M.zx.Colors.LINK,look:M.zx.Looks.LINK,onClick:function(){return(0,de.uL)((0,Cn.M)())},children:D.Z.Messages.CONTINUE_IN_BROWSER})]});case Pn.INITIAL:case Pn.APP_OPENING:return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{children:D.Z.Messages.APP_OPENING}),(0,r.jsx)(M.Hh,{})]});case Pn.APP_OPENED:return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.APP_OPENED_TITLE}),(0,
r.jsx)(M.DK,{children:D.Z.Messages.DEEPLINK_BROWSER_APP_OPENED})]})}};function Zn(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}var Dn=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}
if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};const wn=function(e){var t,n,o=e.match,i=e.location,a=(n=(t=function(e,t){return Dn(this,(function(n){switch(n.label){case 0:return[4,(0,An.s)(g.jEp.CHANNEL,{guildId:e.params.guildId,channelId:e.params.channelId,messageId:e.params.messageId,search:t.search})];case 1:n.sent();return[2]}}))},function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){Zn(i,r,o,a,s,"next",e)}function s(e){Zn(i,r,o,a,s,"throw",e)}a(void 0)}))}),function(e,t){return n.apply(this,arguments)});return(0,r.jsx)(Mn,{match:o,location:i,attemptDeepLink:a})};var Un=n(42261);function Gn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kn(e){
kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return kn(e)}function Bn(e,t){return!t||"object"!==Hn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fn(e,t){Fn=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Fn(e,t)}var Hn=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Vn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=kn(e);if(t){var o=kn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bn(this,n)}}c.ZP.initialize();var Kn=function(e){!function(e,t){
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Fn(e,t)}(o,e);var t=Vn(o);function o(){Gn(this,o);var e;(e=t.apply(this,arguments)).state={busy:!0,success:!1,user:null,category:null};return e}var a=o.prototype;a.componentDidMount=function(){var e=this,t=(0,Z.Z)(this.props.location),n=(0,i.parse)(this.props.location.search);p.Z.post({url:g.ANM.DISABLE_EMAIL_NOTIFICATIONS,body:{token:t,pixel_uuid:n.hash,category:n.category,email_type:n.email_type},oldFormErrors:!0}).then((function(t){var r=t.body.user,o=new xt.Z(r);e.setState({success:!0,busy:!1,user:o,category:n.category})}),(function(){return e.setState({success:!1,busy:!1})}));(0,j.e)("disable_email_notifications")};a.renderBusy=function(){return(0,r.jsx)(M.ZP,{children:(0,r.jsx)(M.Hh,{})})};a.renderCategorySuccess=function(e,t){
var n=this.props,o=n.defaultRoute,i=n.transitionTo,a=D.Z.Messages.EMAIL_CATEGORY_UNSUBSCRIBE_EMAIL_BODY.format({category:t});return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.EMAIL_CATEGORY_UNSUBSCRIBE_HEADER}),(0,r.jsx)(M.DK,{children:a}),(0,r.jsx)(M.zx,{className:U().marginTop20,onClick:function(){return i(o)},children:D.Z.Messages.CONTINUE_TO_WEBAPP}),(0,r.jsx)(M.zx,{className:U().marginTop8,color:M.zx.Colors.LINK,look:M.zx.Looks.LINK,onClick:function(){return i(g.Z5c.SETTINGS("notifications",Un.vG))},children:D.Z.Messages.EMAIL_CATEGORY_MANAGE_SETTING_LABEL})]})};a.renderSuccess=function(){var e=this.props,t=e.defaultRoute,n=e.transitionTo,o=this.state,i=o.user,a=o.category;if(null!=a){var s=Un.Od.find((function(e){return e.category===a}));if(null!=s)return this.renderCategorySuccess(a,s.label())}return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.qE,{src:null==i?void 0:i.getAvatarURL(void 0,100),size:ke.EFr.DEPRECATED_SIZE_100,
className:U().marginBottom20}),(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.AUTH_DISABLE_EMAIL_NOTIFICATIONS_SUCCESS_HEADER}),(0,r.jsx)(M.DK,{children:D.Z.Messages.AUTH_DISABLE_EMAIL_NOTIFICATIONS_SUCCESS_BODY}),(0,r.jsx)(M.zx,{className:U().marginTop40,onClick:function(){return n(t)},children:D.Z.Messages.CONTINUE_TO_WEBAPP})]})};a.renderError=function(){var e=this.props,t=e.defaultRoute,o=e.transitionTo;return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{src:n(709989),className:U().marginBottom20}),(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.AUTH_DISABLE_EMAIL_NOTIFICATIONS_FAILURE_HEADER}),(0,r.jsx)(M.DK,{children:D.Z.Messages.AUTH_DISABLE_EMAIL_NOTIFICATIONS_FAILURE_BODY}),(0,r.jsx)(M.zx,{className:U().marginTop40,onClick:function(){return o(t)},children:D.Z.Messages.CONTINUE_TO_WEBAPP})]})};a.render=function(){var e=this.state,t=e.busy,n=e.success;return t?this.renderBusy():n?this.renderSuccess():this.renderError()};return o
}(o.PureComponent);Kn.defaultProps={transitionTo:function(e){return n.g.location.assign(e)}};const zn=c.ZP.connectStores([L.Z],(function(){return{defaultRoute:L.Z.defaultRoute}}))(Kn);var Yn=n(314620),Wn=n(285991);function qn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xn(e){Xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Xn(e)}function Qn(e,t){return!t||"object"!==$n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jn(e,t){Jn=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Jn(e,t)}var $n=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function er(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{
Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Xn(e);if(t){var o=Xn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Qn(this,n)}}var tr={};var nr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Jn(e,t)}(n,e);var t=er(n);function n(){qn(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getState=function(e){return tr[e]};r.__getLocalVars=function(){return{states:tr}};return n}(c.ZP.Store);nr.displayName="CodedLinkNativeAppStateStore";const rr=new nr(u.Z,{NATIVE_APP_MODAL_OPENING:function(e){var t=e.code;tr[t]=g.kEZ.OPENING},NATIVE_APP_MODAL_OPENED:function(e){var t=e.code;tr[t]=g.kEZ.OPEN},NATIVE_APP_MODAL_OPEN_FAILED:function(e){var t=e.code;tr[t]=g.kEZ.OPEN_FAIL}})
;var or=n(761814),ir=n(746974),ar=n(644144),sr=n(348592),cr=n(178232),ur=n(812280),lr=n(994653);function fr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dr(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}function pr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){dr(i,r,o,a,s,"next",e)}function s(e){dr(i,r,o,a,s,"throw",e)}a(void 0)}))}}function hr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1;r.configurable=!0;"value"in r&&(r.writable=!0);Object.defineProperty(e,r.key,r)}}function Er(e){Er=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Er(e)}function yr(e,t){
return!t||"object"!==gr(t)&&"function"!=typeof t?fr(e):t}function mr(e,t){mr=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return mr(e,t)}var gr=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function vr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Er(e);if(t){var o=Er(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return yr(this,n)}}var br,Or=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){return function(i){
if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};c.ZP.initialize();!function(e){e.REGISTER="register";e.LOGIN="login"}(br||(br={}));var Ir=function(e){!function(e,t){
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&mr(e,t)}(o,e);var t=vr(o);function o(){hr(this,o);var e;(e=t.apply(this,arguments)).state={error:null,continueOnWeb:!1,currentUser:null,sentVerification:!1,fetchingUser:!1};e.refreshUser=function(){e.setState({fetchingUser:!0});Wn.k({withAnalyticsToken:!0}).then((function(t){return e.setState({currentUser:t,fetchingUser:!1})})).catch((function(){return e.setState({fetchingUser:!1})}))};e.handleLogout=function(){var t=e.props.match.params.giftCode;l.Z.logout(g.Z5c.GIFT_CODE_LOGIN(t))};e.handleResendVerification=function(){l.Z.verifyResend();e.setState({sentVerification:!0})};var n=fr(e);e.handleAccept=pr((function(){var e,t,r,o;return Or(this,(function(i){switch(i.label){case 0:e=n.props,t=e.transitionTo;if(null==e.giftCode)throw new Error("Trying to accept gift before resolve")
;r=n.getCode();i.label=1;case 1:i.trys.push([1,3,,4]);n.setState({error:null});return[4,f.Z.redeemGiftCode(r)];case 2:i.sent();t(g.Z5c.APP);return[3,4];case 3:o=i.sent();n.setState({error:o});return[3,4];case 4:return[2]}}))}));e.resolveGiftCode=function(){var t=e.props.transitionTo,n=e.getCode();f.Z.resolveGiftCode(n,!0,!0).then((function(e){null!=e&&null!=e.giftCode.promotion&&t(g.Z5c.BILLING_PROMOTION_REDEMPTION(n))}))};return e}var i=o.prototype;i.componentDidMount=function(){var e=this.props,t=e.authenticated,n=e.isResolved;t&&this.handleAuthenticated();n||this.resolveGiftCode();(0,j.e)("gift_code")};i.componentDidUpdate=function(e){var t=this,n=this.props,r=n.authenticated;n.isResolved||u.Z.wait((function(){t.resolveGiftCode()}));r&&!e.authenticated&&this.handleAuthenticated();!r&&e.authenticated&&this.setState({currentUser:null})};i.handleAuthenticated=function(){var e=this.state.currentUser;Yn.b8();null==e&&this.refreshUser()};i.getCode=function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return e.match.params.giftCode};i.getMode=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return e.login?br.LOGIN:br.REGISTER};i.getErrorMessage=function(e){var t=this.props.libraryApplication,n=this.state.error,r=null!=n?n.code:null;return r===g.evJ.INVALID_GIFT_SELF_REDEMPTION?D.Z.Messages.GIFT_CONFIRMATION_BODY_SELF_GIFT_NO_PAYMENT:null!=t||r===g.evJ.INVALID_GIFT_REDEMPTION_OWNED?D.Z.Messages.GIFT_CODE_AUTH_HELP_TEXT_OWNED.format({libraryLink:g.Z5c.APPLICATION_LIBRARY}):e.isClaimed||r===g.evJ.INVALID_GIFT_REDEMPTION_EXHAUSTED?D.Z.Messages.GIFT_CODE_AUTH_HELP_TEXT_CLAIMED:r===g.evJ.INVALID_GIFT_REDEMPTION_FRAUD_REJECTED?D.Z.Messages.GIFT_CODE_SMITE_REJECT_HELP_TEXT:void 0};i.renderSpinner=function(e){return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{children:e}),(0,r.jsx)(M.Hh,{})]})};i.renderExpiredInvite=function(){var e=this.props,t=e.defaultRoute,o=e.transitionTo;return(0,
r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{src:n(211086),className:U().marginBottom8}),(0,r.jsx)(M.Dx,{className:W()(U().marginTop8,U().marginBottom8),children:D.Z.Messages.GIFT_CODE_AUTH_INVALID_TITLE}),(0,r.jsx)(M.DK,{children:D.Z.Messages.GIFT_CODE_AUTH_INVALID_BODY}),(0,r.jsx)(M.zx,{className:W()(U().marginTop40,U().marginBottom8),onClick:function(){return o(t)},children:D.Z.Messages.CONTINUE_TO_WEBAPP}),(0,r.jsx)(M.zx,{onClick:function(){return window.open(sr.Z.getArticleURL(g.BhN.GIFTING),"_blank")},look:M.zx.Looks.LINK,color:M.zx.Colors.LINK,children:D.Z.Messages.GIFT_CODE_AUTH_INVALID_TIP})]})};i.renderAppOpened=function(){var e=this;return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.APP_OPENED_TITLE}),(0,r.jsx)(M.DK,{children:D.Z.Messages.APP_OPENED_BODY}),(0,r.jsx)(M.zx,{className:U().marginTop40,onClick:function(){return e.setState({continueOnWeb:!0})},children:D.Z.Messages.GIFT_CODE_AUTH_CONTINUE_IN_BROWSER})]})}
;i.renderVerification=function(e){var t=this.state.sentVerification;return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{src:n(100539),className:U().marginBottom8}),(0,r.jsx)(M.Dx,{children:D.Z.Messages.GIFT_CODE_AUTH_VERIFICATION_TITLE.format({username:e.username})}),(0,r.jsx)(M.DK,{className:U().marginTop20,children:D.Z.Messages.GIFT_CODE_AUTH_HELP_TEXT_VERIFICATION_REQUIRED}),(0,r.jsx)(M.zx,{disabled:t,className:U().marginTop40,onClick:this.handleResendVerification,children:t?D.Z.Messages.GIFT_CODE_AUTH_VERIFICATION_SENT:D.Z.Messages.RESEND_VERIFICATION_EMAIL}),(0,r.jsx)(M.zx,{look:M.zx.Looks.LINK,color:M.zx.Colors.LINK,onClick:this.refreshUser,className:U().marginTop8,children:D.Z.Messages.GIFT_CODE_AUTH_CHECK_VERIFICATION_AGAIN})]})};i.renderAuthenticated=function(e,t){var n=this.getErrorMessage(e),o=null!=n;return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(cr.Z,{giftCode:e}),(0,r.jsx)(M.zx,{disabled:o,className:U().marginTop40,onClick:this.handleAccept,
children:D.Z.Messages.GIFT_CODE_AUTH_ACCEPT}),null!=n?(0,r.jsx)(M.DK,{className:U().marginTop20,children:n}):(0,r.jsx)(M.i_,{className:U().marginTop20,children:D.Z.Messages.GIFT_CODE_AUTH_LOGGED_IN_AS.format({userTag:ft.ZP.getUserTag(t),onLogoutClick:this.handleLogout})})]})};i.render=function(){var e=this.props,t=e.nativeAppState,n=e.sku,o=e.authenticated,i=e.giftCode,a=e.isResolved,s=e.isAccepting,c=e.transitionTo,u=e.location,l=this.state,f=l.fetchingUser,d=l.continueOnWeb;if(t===g.kEZ.OPEN&&!d)return this.renderAppOpened();if(t===g.kEZ.OPENING)return this.renderSpinner(D.Z.Messages.APP_OPENING);if(s)return this.renderSpinner(D.Z.Messages.GIFT_CODE_AUTH_ACCEPTING);if(null==i)return a?this.renderExpiredInvite():this.renderSpinner(D.Z.Messages.GIFT_CODE_AUTH_RESOLVING);if(a){if(o){var p=this.state.currentUser;return f||null==p?this.renderSpinner(D.Z.Messages.GIFT_CODE_AUTH_FETCHING_USER):this.requiresVerification&&null!=p?this.renderVerification(p):this.renderAuthenticated(i,p)}
return this.getMode()===br.LOGIN?(0,r.jsx)(ur.Z,{giftCodeSKU:n,giftCode:i,transitionTo:c,location:u}):(0,r.jsx)(lr.Z,{giftCodeSKU:n,giftCode:i,transitionTo:c,location:u})}return null};!function(e,t,n){t&&_r(e.prototype,t);n&&_r(e,n)}(o,[{key:"requiresVerification",get:function(){var e=this.state.currentUser;return null!=e&&!e.verified}}]);return o}(o.PureComponent);const Nr=c.ZP.connectStores([un.Z,or.Z,je.default,ir.Z,L.Z,rr],(function(e){var t=e.match.params.giftCode,n=un.Z.get(t),r=null!=n?ir.Z.get(n.skuId):null;return{giftCode:n,sku:r,libraryApplication:null!=r&&null!=n?ar.z2(n,r,or.Z):null,authenticated:je.default.isAuthenticated(),defaultRoute:L.Z.defaultRoute,isResolved:un.Z.getIsResolved(t),isAccepting:un.Z.getIsAccepting(t),libraryApplicationsFetched:or.Z.fetched,nativeAppState:rr.getState(t)}}))(Ir);var Tr=n(985518),Ar=n(281437),Sr=n(256273),Cr=n(226613),xr=n(415879),Rr=n(247246),jr=n(335150),Pr=n(239527),Lr=n(571680),Mr=n(598363),Zr=n(520574),Dr=n.n(Zr);function wr(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ur(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Gr(e){Gr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Gr(e)}function kr(e,t){return!t||"object"!==Fr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Br(e,t){Br=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Br(e,t)}var Fr=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Hr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}()
;return function(){var n,r=Gr(e);if(t){var o=Gr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return kr(this,n)}}c.ZP.initialize();var Vr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Br(e,t)}(o,e);var t=Hr(o);function o(){wr(this,o);var e;(e=t.apply(this,arguments)).handleContinue=function(){var t=e.props,n=t.defaultRoute;(0,t.transitionTo)(n)};return e}var i=o.prototype;i.componentDidMount=function(){(0,j.e)("guildTemplate");Mr.KO||Pe.Z.launch("discord://"+g.Z5c.GUILD_TEMPLATE(this.props.code),(function(){}))};i.componentDidUpdate=function(e){this.props.code!==e.code&&le.Z.resolveGuildTemplate(this.props.code)};i.renderButton=function(e,t){return Mr.KO?(0,r.jsx)(M.zx,{className:U().marginTop40,onClick:t,children:e}):(0,r.jsx)(M.v6,{className:U().marginTop40})}
;i.renderSpinner=function(e){return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{children:e}),(0,r.jsx)(M.Hh,{})]})};i.renderInvalidGuildTemplate=function(){return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{src:n(211086),className:U().marginBottom8}),(0,r.jsx)(M.Dx,{className:W()(U().marginTop8,U().marginBottom8),children:D.Z.Messages.GUILD_TEMPLATE_INVALID_TITLE}),(0,r.jsx)(M.DK,{children:D.Z.Messages.GUILD_TEMPLATE_INVALID_SUBTITLE}),this.renderButton(D.Z.Messages.CONTINUE_TO_WEBAPP,this.handleContinue)]})};i.renderAppOpened=function(){return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.APP_OPENED_TITLE}),(0,r.jsx)(M.DK,{children:D.Z.Messages.APP_OPENED_BODY}),this.renderButton(D.Z.Messages.CONTINUE_TO_WEBAPP,this.handleContinue)]})};i.renderAuthenticatedOrDownload=function(){var e=this.props.guildTemplate;Te()(null!=e,"guild template must not be null");return e.state===jr.Rj.RESOLVING?(0,r.jsx)(M.ZP,{className:Dr().authBox,children:(0,
r.jsx)(Sr.Z,{guildTemplate:e})}):(0,r.jsx)(Kr,{guildTemplate:e})};i.renderContinue=function(){return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{children:D.Z.Messages.APP_NOT_OPENED}),this.renderButton(D.Z.Messages.CONTINUE_TO_WEBAPP,this.handleContinue)]})};i.render=function(){var e=this.props,t=e.guildTemplate,n=e.nativeAppState,o=e.authenticated,i=e.transitionTo,a=e.location;if(null==t)return this.renderSpinner(D.Z.Messages.LOADING);if(n===g.kEZ.OPEN)return this.renderAppOpened();if(n===g.kEZ.OPENING)return this.renderSpinner(D.Z.Messages.APP_OPENING);switch(t.state){case jr.Rj.RESOLVING:return this.renderSpinner(D.Z.Messages.APP_OPENING);case jr.Rj.RESOLVED:return o||!Mr.KO?this.renderAuthenticatedOrDownload():this.props.login?(0,r.jsx)(ur.Z,{guildTemplate:t,transitionTo:i,location:a}):(0,r.jsx)(lr.Z,{guildTemplate:t,transitionTo:i,location:a,onRegister:function(){(0,Cr.c)(Pr.M5.ORGANIC_REGISTERED_GUILD_TEMPLATE);xr.Z.flowStart(Lr.MK.ORGANIC_GUILD_TEMPLATES,Lr.EW.NUF_STARTED)}})
;case jr.Rj.EXPIRED:return this.renderInvalidGuildTemplate();default:return null}};return o}(o.PureComponent);function Kr(e){var t=e.guildTemplate,n=(0,Tr.Z)(t,!1),o=n.form,i=n.handleSubmit;xr.Z.flowStep(Lr.MK.ORGANIC_GUILD_TEMPLATES,Lr.X2.GUILD_CREATE);var a=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(M.Dx,{className:Dr().header,children:D.Z.Messages.GUILD_TEMPLATE_SETUP_DISCORD}),o,(0,r.jsx)(M.zx,{className:Dr().createButton,onClick:i,children:D.Z.Messages.GUILD_TEMPLATE_CREATE_DISCORD})]});return(0,r.jsx)(Rr.Z,{className:Dr().authBox,children:function(){return[(0,r.jsx)(Ar.Z,{guildTemplate:t},"template"),(0,r.jsx)("div",{className:Dr().formContainer,children:a},"contents")]}})}c.ZP.initialize();function zr(e,t,n){e.preventDefault();y.default.track(g.rMx.GUILD_TEMPLATE_APP_OPENED,{guild_template_code:t,guild_template_name:n.name,guild_template_description:n.description,guild_template_guild_id:n.sourceGuildId});var r=je.default.getFingerprint(),o=null!=r?r:je.default.getId()
;le.Z.openMobileApp(n.state===jr.Rj.RESOLVED?t:void 0,o)}function Yr(e){var t=e.code,n=(0,c.e7)([ue.Z],(function(){return ue.Z.getGuildTemplate(t)}));o.useEffect((function(){(0,j.e)("guild_template_mobile")}),[]);return null==n||n.state===jr.Rj.RESOLVING?(0,r.jsx)(M.ZP,{children:(0,r.jsx)(ke.$jN,{})}):n.state===jr.Rj.RESOLVED?(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(Sr.Z,{guildTemplate:n,tall:!0}),(0,r.jsx)(M.zx,{onClick:function(e){return zr(e,t,n)},className:U().marginTop20,children:D.Z.Messages.GUILD_TEMPLATE_OPEN})]}):(0,r.jsx)(ze,{text:D.Z.Messages.GUILD_TEMPLATE_MOBILE_INVALID_ERROR,buttonCta:D.Z.Messages.GUILD_TEMPLATE_MOBILE_INVALID_CTA,onClick:function(e){return zr(e,t,n)}})}var Wr=n(973889),qr=n(553484),Xr=n(14515),Qr=n(607739),Jr=n(308921),$r=n(308739),eo=n(199790);function to(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}function no(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){
var i=e.apply(t,n);function a(e){to(i,r,o,a,s,"next",e)}function s(e){to(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ro(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oo(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function io(e){io=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return io(e)}function ao(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){oo(e,t,n[t])}))}return e}function so(e,t){return!t||"object"!==uo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function co(e,t){
co=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return co(e,t)}var uo=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function lo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=io(e);if(t){var o=io(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return so(this,n)}}var fo=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,
r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};c.ZP.initialize();var po="Accept Invite Page",ho="register",_o="login";function Eo(){return(Eo=no((function(e){var t;return fo(this,(function(n){switch(n.label){case 0:return[4,d.Z.resolveInvite(e,po)];case 1:if(null==(t=n.sent().invite))return[2];R(t);return[2]}}))
}))).apply(this,arguments)}var yo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&co(e,t)}(o,e);var t=lo(o);function o(){ro(this,o);var e;(e=t.apply(this,arguments)).state={error:null};e.getAcceptInviteContext=function(t){return d.Z.getInviteContext(t,e.props.invite)};e.handleContinue=function(t){var n=e.props,r=n.invite,o=n.transitionTo;if(null!=r.channel||null!=(null==t?void 0:t.channel)){var i;null!=(null===(i=r.guild)||void 0===i?void 0:i.id)?o(g.Z5c.APP_WITH_INVITE_AND_GUILD_ONBOARDING(r.code)):d.Z.transitionToInvite(null!=t?t:r,o)}};e.handleAccept=function(){e.setState({error:null});var t=e.getInviteKey();d.Z.acceptInvite({inviteKey:t,context:e.getAcceptInviteContext(po),skipOnboarding:!0,callback:function(e){R(e);null!=e.channel&&d.Z.openApp(t,e.channel.id)}}).catch((function(t){
if(t instanceof Wr.Z){var n=(0,Jr.O)(t.code);e.setState({error:{code:t.code,message:n}})}else e.setState({error:{code:t.code,message:D.Z.Messages.INVITE_MODAL_ERROR_DEFAULT}})}))};e.handleDefaultTransition=function(){var t=e.props,n=t.defaultRoute;(0,t.transitionTo)(n)};e.renderButton=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.handleDefaultTransition,o=e.props.invite,i=null!=o.stage_instance||null!=o.guild_scheduled_event;return Mr.KO?(0,r.jsx)(M.zx,{className:i?U().marginTop20:U().marginTop40,onClick:n,color:i?M.zx.Colors.GREEN:M.zx.Colors.BRAND,children:t}):(0,r.jsx)(M.v6,{className:U().marginTop40})};return e}var i=o.prototype;i.componentDidMount=function(){var e=this.props,t=e.isUnderage,n=e.login;y.default.track(g.rMx.INVITE_VIEWED,{},{flush:!0});(0,j.e)("invite");if(!Mr.KO){var r=this.getInviteKey();Pe.Z.launch("discord://"+g.Z5c.INVITE(r),(function(){}))}if(!n&&t){var o=this.getInviteKey(),i=(0,Ue.fU)(o).baseCode;(0,de.dL)(g.Z5c.INVITE_LOGIN(i))}}
;i.componentDidUpdate=function(e){var t=this.props,n=t.invite,r=t.nativeAppState,o=t.authenticated,i=t.transitionTo,a=this.getInviteKey();if(a!==this.getInviteKey(e))!function(e){Eo.apply(this,arguments)}(a);else if(n.state===g.r2o.APP_NOT_OPENED)this.handleContinue();else if(this.getMode()===_o&&o!==e.authenticated&&o){var s=je.default.getFingerprint();if(null!=s){var c=(0,Re.s)(s);this.track(g.rMx.INVITE_LOGIN_SUCCESSFUL,!0,{prev_user_id:c})}d.Z.acceptInvite({inviteKey:a,context:this.getAcceptInviteContext(po),skipOnboarding:!0,callback:this.handleContinue})}r!==e.nativeAppState&&r===g.kEZ.OPEN&&this.track(g.rMx.INVITE_APP_INVOKED,!1);if(this.getMode()===ho&&o&&!e.authenticated){if(null!=n.channel){(0,Cr.c)(Pr.M5.INVITE_UNCLAIMED);null!=n.guild?i(g.Z5c.APP_WITH_INVITE_AND_GUILD_ONBOARDING(n.code)):d.Z.transitionToInvite(n,i)}}};i.getInviteKey=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return e.inviteKey};i.getMode=function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return eo.a?ho:e.login?_o:ho};i.track=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.props.invite,o=this.getInviteKey(),i=(0,Ue.jX)(o),a=t?{guild_id:null!=r.guild?r.guild.id:null,channel_id:null!=r.channel?r.channel.id:null,inviter_id:null!=r.inviter?r.inviter.id:null,invite_code:i}:{invite_code:i};y.default.track(e,ao({},a,n))};i.renderSpinner=function(e){return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{children:e}),(0,r.jsx)(M.Hh,{})]})};i.renderInvalidInvite=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{src:n(211086),className:U().marginBottom8}),(0,r.jsx)(M.Dx,{className:W()(U().marginTop8,U().marginBottom8),children:D.Z.Messages.AUTH_INVALID_INVITE_TITLE}),(0,r.jsx)(M.DK,{children:e?D.Z.Messages.AUTH_BANNED_INVITE_BODY:D.Z.Messages.AUTH_INVALID_INVITE_BODY
}),this.renderButton(D.Z.Messages.CONTINUE_TO_WEBAPP),(0,r.jsx)(M.zx,{onClick:function(){return window.open(sr.Z.getArticleURL(g.BhN.INVALID_INVITES),"_blank")},look:M.zx.Looks.LINK,color:M.zx.Colors.LINK,className:U().marginTop8,children:D.Z.Messages.AUTH_INVALID_INVITE_TIP})]})};i.renderErrorInvite=function(){var e,t;return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)($r.Z,{invite:this.props.invite,error:null===(e=this.state.error)||void 0===e?void 0:e.message}),(null===(t=this.state.error)||void 0===t?void 0:t.code)===g.evJ.INVALID_CANNOT_FRIEND_SELF?this.renderButton(D.Z.Messages.CONTINUE_TO_WEBAPP):this.renderButton(D.Z.Messages.INSTANT_INVITE_ACCEPT,this.handleAccept)]})};i.renderExpiredInvite=function(){return this.renderInvalidInvite(!1)};i.renderBannedInvite=function(){return this.renderInvalidInvite(!0)};i.renderAppOpened=function(){var e=this;return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.APP_OPENED_TITLE}),(0,r.jsx)(M.DK,{
children:D.Z.Messages.APP_OPENED_BODY}),this.renderButton(D.Z.Messages.CONTINUE_TO_WEBAPP,(function(){return e.handleContinue()}))]})};i.renderAuthenticatedHeader=function(){var e=this.props.invite;return null!=e.stage_instance&&null!=e.guild?(0,r.jsx)(Qr.Z,{stageInstance:e.stage_instance,guild:e.guild}):null!=e.guild_scheduled_event?(0,r.jsx)(Xr.r,{channel:e.channel,guildScheduledEvent:e.guild_scheduled_event}):(0,r.jsx)($r.Z,{invite:e})};i.renderAuthenicatedFooter=function(){var e=this.props.invite;return null==e.stage_instance&&null==e.guild_scheduled_event||null==e.guild?null:(0,r.jsx)(M.ZP,{className:U().marginTop20,children:(0,r.jsx)(Qr.y,{guild:e.guild,onlineCount:e.approximate_presence_count})})};i.renderAuthenticatedOrDownload=function(){var e=null!=this.props.invite.stage_instance?D.Z.Messages.INSTANT_INVITE_ACCEPT_STAGE:D.Z.Messages.INSTANT_INVITE_ACCEPT;return(0,r.jsxs)("div",{children:[(0,r.jsxs)(M.ZP,{
children:[this.renderAuthenticatedHeader(),this.renderButton(e,this.handleAccept)]}),this.renderAuthenicatedFooter()]})};i.renderContinue=function(){return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{children:D.Z.Messages.APP_NOT_OPENED}),this.renderButton(D.Z.Messages.CONTINUE_TO_WEBAPP)]})};i.render=function(){var e=this,t=this.props,n=t.invite,o=t.nativeAppState,i=t.authenticated,a=t.transitionTo,s=t.location;if(o===g.kEZ.OPEN)return this.renderAppOpened();switch(n.state){case g.r2o.APP_OPENED:return this.renderAppOpened();case g.r2o.APP_NOT_OPENED:return this.renderContinue();case g.r2o.RESOLVING:return eo.a?this.renderSpinner(D.Z.Messages.DEFAULT_INPUT_PLACEHOLDER):this.renderSpinner(D.Z.Messages.APP_OPENING);case g.r2o.APP_OPENING:return this.renderSpinner(D.Z.Messages.APP_OPENING);case g.r2o.RESOLVED:return i||!Mr.KO?this.renderAuthenticatedOrDownload():this.getMode()===_o?(0,r.jsx)(ur.Z,{invite:n,transitionTo:a,location:s}):(0,r.jsx)(lr.Z,{invite:n,onLoginStart:function(){
return e.track(g.rMx.INVITE_LOGIN,!0)},location:s,transitionTo:a});case g.r2o.ACCEPTING:return this.renderSpinner(D.Z.Messages.INSTANT_INVITE_ACCEPTING);case g.r2o.EXPIRED:return this.renderExpiredInvite();case g.r2o.BANNED:return this.renderBannedInvite();case g.r2o.ERROR:return this.renderErrorInvite();case g.r2o.ACCEPTED:default:return null}};return o}(o.PureComponent);const mo=c.ZP.connectStores([ot.Z,L.Z,je.default,rr,qr.Z],(function(e){var t,n=e.inviteKey;return{invite:null!==(t=ot.Z.getInvite(n))&&void 0!==t?t:{},nativeAppState:rr.getState(n),authenticated:je.default.isAuthenticated(),defaultRoute:L.Z.defaultRoute,isUnderage:qr.Z.isUnderageAnonymous()}}))(yo);var go=n(793436);function vo(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}var bo=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};const Oo=function(e){var t,n,o=e.match,i=e.location,a=(n=(t=function(e,t){
return bo(this,(function(n){switch(n.label){case 0:return[4,(0,An.s)(g.jEp.PICK_GUILD_SETTINGS,{section:e.params.section,subsection:e.params.subsection,search:t.search})];case 1:n.sent();return[2]}}))},function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){vo(i,r,o,a,s,"next",e)}function s(e){vo(i,r,o,a,s,"throw",e)}a(void 0)}))}),function(e,t){return n.apply(this,arguments)});return(0,r.jsx)(Mn,{match:o,location:i,attemptDeepLink:a})};var Io=n(144936),No=n(845882),To=n(528180),Ao=n(565050),So=n(488462),Co=n(807572),xo=n.n(Co);function Ro(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jo(e){jo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return jo(e)}function Po(e,t){return!t||"object"!==Mo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}
function Lo(e,t){Lo=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Lo(e,t)}var Mo=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Zo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=jo(e);if(t){var o=jo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Po(this,n)}}c.ZP.initialize();var Do=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Lo(e,t)}(o,e);var t=Zo(o);function o(){Ro(this,o);var e;(e=t.apply(this,arguments)).handleVerify=function(){
var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=(0,Z.Z)(e.props.location);null!=n&&l.Z.verify(n,t)};e.handleLogin=function(){(0,e.props.transitionTo)(g.Z5c.LOGIN)};e.handleOpenApp=function(){var t=e.props.verifyingUserId;y.default.track(g.rMx.VERIFY_ACCOUNT_APP_OPENED,{verifying_user_id:t});(0,No.Z)("verify_email")};return e}var i=o.prototype;i.componentDidMount=function(){this.handleVerify();(0,j.e)("verify_email")};i.renderVerifyCaptcha=function(){var e=this.props.verifyErrors;return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{src:n(143613),className:W()(xo().image,U().marginBottom20)}),(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.VERIFICATION_VERIFYING}),(0,r.jsx)(M.DK,{className:U().marginBottom40,children:D.Z.Messages.VERIFICATION_BODY_ALT}),(0,r.jsx)("div",{className:ne().flexCenter,children:(0,r.jsx)(To.Z,{captchaService:(0,Ao.B)(e.captcha_service),sitekey:e.captcha_sitekey,className:xo().recaptcha,theme:So.BR.DARK,
onVerify:this.handleVerify})})]})};i.renderVerifyFailed=function(){return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{src:n(639915),className:W()(xo().image,U().marginBottom20)}),(0,r.jsx)(M.Dx,{className:U().marginBottom8,children:D.Z.Messages.VERFICATION_EXPIRED}),(0,r.jsx)(M.DK,{className:U().marginBottom40,children:D.Z.Messages._AUTH_VERFICATION_EXPIRED_SUGGESTION}),(0,r.jsx)(M.zx,{onClick:this.handleLogin,children:D.Z.Messages._LOGIN})]})};i.renderVerifySucceeded=function(){return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{src:n(143613),className:W()(xo().image,U().marginBottom20)}),(0,r.jsx)(M.Dx,{className:U().marginBottom40,children:D.Z.Messages.VERIFICATION_VERIFIED}),(0,r.jsx)(M.zx,{onClick:this.handleOpenApp,children:D.Z.Messages.VERIFICATION_OPEN_DISCORD})]})};i.renderVerifying=function(){return(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{src:n(100539),className:W()(xo().image,U().marginBottom20)}),(0,r.jsx)(M.Dx,{className:U().marginBottom8,
children:D.Z.Messages.VERIFICATION_VERIFYING}),(0,r.jsx)(M.DK,{className:U().marginBottom40,children:D.Z.Messages.ACTION_MAY_TAKE_A_MOMENT}),(0,r.jsx)(M.zx,{submitting:!0,color:M.zx.Colors.PRIMARY})]})};i.render=function(){var e=this.props,t=e.verifyErrors,n=e.verifyFailed,r=e.verifySucceeded;return null!=t&&null!=t.captcha_key&&""!==t.captcha_key?this.renderVerifyCaptcha():n?this.renderVerifyFailed():r?this.renderVerifySucceeded():this.renderVerifying()};return o}(o.PureComponent);Do.defaultProps={transitionTo:function(e){return n.g.location.assign(e)}};const wo=c.ZP.connectStores([je.default],(function(){return{verifyFailed:je.default.didVerifyFail(),verifyErrors:je.default.getVerifyErrors(),verifySucceeded:je.default.didVerifySucceed(),fingerprint:je.default.getFingerprint(),verifyingUserId:je.default.getVerifyingUserId()}}))(Do);n(88415);function Uo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Go(e,t,n,r,o,i,a){try{
var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}function ko(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bo(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Fo(e){Fo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Fo(e)}function Ho(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Bo(e,t,n[t])}))}return e}function Vo(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e)
;t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Ko(e,t){return!t||"object"!==Wo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zo(e,t){zo=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return zo(e,t)}function Yo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Uo(e,t)
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Uo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Wo=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function qo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Fo(e);if(t){var o=Fo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ko(this,n)}}var Xo=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{
value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};c.ZP.initialize();var Qo=(0,_n.Z)(ur.Z),Jo=(0,_n.Z)(go.Z),$o=(0,_n.Z)(mo),ei=(0,_n.Z)((function(e){var t={guildTemplate:(0,c.e7)([ue.Z],(function(){return ue.Z.getGuildTemplate(e.code)})),nativeAppState:(0,c.e7)([rr],(function(){return rr.getState(e.code)})),authenticated:(0,c.e7)([je.default],(function(){return je.default.isAuthenticated()})),defaultRoute:(0,c.e7)([L.Z],(function(){return L.Z.defaultRoute}))};return(0,r.jsx)(Vr,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ur(e,t,n[t])}))}return e}({},e,t))})),ti=(0,_n.Z)(Nr),ni=(0,_n.Z)((function(e){var t=e.inviteKey,n=e.transitionTo,i=(0,c.e7)([ot.Z],(function(){return ot.Z.getInvite(t)}));o.useEffect((function(){
y.default.track(g.rMx.INVITE_VIEWED,{},{flush:!0});(0,j.e)("invite_mobile")}),[]);return(0,r.jsx)(sn,{invite:i,onAcceptInvite:function(e){!function(e,t,n){var r,o,i;e.preventDefault();y.default.track(g.rMx.INVITE_APP_OPENED,{invite_code:(0,Ue.jX)(t),guild_id:null==n||null===(r=n.guild)||void 0===r?void 0:r.id,channel_id:null==n||null===(o=n.channel)||void 0===o?void 0:o.id,inviter_id:null==n||null===(i=n.inviter)||void 0===i?void 0:i.id});var a=null!=n&&n.state!==g.r2o.EXPIRED&&n.state!==g.r2o.BANNED?t:void 0,s=je.default.getFingerprint(),c=null!=s?s:je.default.getId();d.Z.openApp(a,void 0,c)}(e,t,i)},transitionTo:n})})),ri=(0,_n.Z)(lr.Z),oi=(0,_n.Z)(Nn),ii=(0,_n.Z)(Tn),ai=(0,_n.Z)(wo),si=(0,_n.Z)(ce),ci=(0,_n.Z)(Io.Z),ui=(0,_n.Z)(zn),li=(0,_n.Z)(z),fi=(0,_n.Z)((function(e){var t=e.location,i=we(o.useState(!1),2),a=i[0],s=i[1],u=(0,c.e7)([Ie],(function(){return Ie.getState()})),l=u.verifySuccess,f=u.verifyErrors,d=u.redirectGuildId;o.useEffect((function(){var e=(0,Z.Z)(t)
;fe.Z.verify(e);(0,j.e)("verify_hub_email")}),[t]);var p=function(){Le(d);s(!0)};return a?(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Dx,{className:Ze().title,children:D.Z.Messages.APP_OPENED_TITLE}),(0,r.jsx)(M.DK,{className:Ze().subtitle,children:D.Z.Messages.APP_OPENED_BODY}),(0,r.jsx)(M.zx,{className:Ze().spacedButton,onClick:function(){return(0,de.uL)(g.Z5c.CHANNEL(d))},children:D.Z.Messages.CONTINUE_TO_WEBAPP})]}):l?(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{className:Ze().image,src:n(143613)}),(0,r.jsx)(M.Dx,{className:Ze().title,children:D.Z.Messages.VERIFICATION_VERIFIED}),(0,r.jsx)(M.zx,{onClick:p,children:D.Z.Messages.VERIFICATION_OPEN_DISCORD})]}):null!=f?(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{className:Ze().image,src:n(639915)}),(0,r.jsx)(M.Dx,{className:Ze().title,children:D.Z.Messages.VERFICATION_EXPIRED}),(0,r.jsx)(M.DK,{className:Ze().subtitle,children:D.Z.Messages._AUTH_VERFICATION_EXPIRED_SUGGESTION}),(0,r.jsx)(M.zx,{onClick:p,
children:D.Z.Messages.VERIFICATION_OPEN_DISCORD})]}):(0,r.jsxs)(M.ZP,{children:[(0,r.jsx)(M.Ee,{className:Ze().image,src:n(100539)}),(0,r.jsx)(M.Dx,{className:Ze().title,children:D.Z.Messages.VERIFICATION_VERIFYING}),(0,r.jsx)(M.DK,{className:Ze().subtitle,children:D.Z.Messages.ACTION_MAY_TAKE_A_MOMENT}),(0,r.jsx)(M.zx,{submitting:!0,color:M.zx.Colors.PRIMARY})]})})),di=(0,_n.Z)(wn),pi=(0,_n.Z)(Oo),hi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&zo(e,t)}(n,e);var t=qo(n);function n(){ko(this,n);var e;(e=t.apply(this,arguments)).state={splash:null,redirectTo:null,backgroundId:null};return e}var o=n.prototype;o.componentDidMount=function(){var e=this.props,t=e.inviteKey,n=e.hasLoadedExperiments,r=e.isAuthenticated;if(null!=t){!n&&r&&l.Z.getExperiments(!0);y.default.track(g.rMx.INVITE_OPENED,{
invite_code:(0,Ue.jX)(t),load_time:pn()},{flush:!0})}(n||eo.a)&&this.resolveInvite();this.resolveGiftCode();this.resolveGuildTemplate();C.initialize()};o.componentDidUpdate=function(e){var t,n;e.hasLoadedExperiments||!this.props.hasLoadedExperiments||eo.a||this.resolveInvite();(null===(t=e.invite)||void 0===t?void 0:t.state)!==(null===(n=this.props.invite)||void 0===n?void 0:n.state)&&this.maybeFetchApplicationSplash()};o.componentWillUnmount=function(){C.terminate()};o.maybeFetchApplicationSplash=function(){var e=this,t=this.props.invite;if((null==t?void 0:t.state)===g.r2o.RESOLVED){var n=t.target_application;null!=n&&(0,ln.GR)(n.id,["embedded_splash"]).then((function(t){var n=Yo(t,1)[0];return e.setState({backgroundId:n})}))}};o.resolveInvite=function(){var e=this.props.inviteKey;if(null!=e){var t,n,r=(n=(t=function(){var t;return Xo(this,(function(n){switch(n.label){case 0:return[4,d.Z.resolveInvite(e,g.Usc.INVITE)];case 1:null!=(t=n.sent().invite)&&R(t);return[2]}}))},function(){
var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){Go(i,r,o,a,s,"next",e)}function s(e){Go(i,r,o,a,s,"throw",e)}a(void 0)}))}),function(){return n.apply(this,arguments)});r();d.Z.openNativeAppModal(e)}};o.resolveGuildTemplate=function(){var e=this.props.guildTemplateCode;if(null!=e){y.default.track(g.rMx.GUILD_TEMPLATE_OPENED,{guild_template_code:e,load_time:pn()},{flush:!0});le.Z.resolveGuildTemplate(e);le.Z.openNativeAppModal(e)}};o.resolveGiftCode=function(){var e=this.props.giftCode;null!=e&&f.Z.resolveGiftCode(e,!0,!0).then((function(t){null!=t&&null==t.giftCode.promotion&&u.Z.wait((function(){return f.Z.openNativeGiftCodeModal(e)}))}))};o.render=function(){var e=this.state,t=e.splash,n=e.redirectTo,o=this.props.inviteKey;return(0,r.jsxs)(En.Z,{splash:t,children:[(0,r.jsx)(x.Z,{path:g.Z5c.LOGIN_HANDOFF,render:function(e){return(0,r.jsx)(Jo,Vo(Ho({},e),{redirectTo:n}))}}),(0,r.jsx)(x.Z,{impressionName:a.zs.USER_LOGIN,path:g.Z5c.LOGIN,
render:function(e){return(0,r.jsx)(Qo,Vo(Ho({},e),{redirectTo:n}))}}),(0,r.jsx)(x.Z,{impressionName:a.zs.USER_REGISTRATION,path:g.Z5c.REGISTER,render:function(e){return eo.a?(0,r.jsx)($o,Vo(Ho({},e),{redirectTo:n,inviteKey:o})):(0,r.jsx)(ri,Vo(Ho({},e),{redirectTo:n}))}}),(0,r.jsx)(x.Z,{path:g.Z5c.GIFT_CODE_LOGIN(":giftCode"),render:function(e){return(0,r.jsx)(ti,Ho({login:!0},e))}}),(0,r.jsx)(x.Z,{path:g.Z5c.GIFT_CODE(":giftCode"),render:function(e){return(0,r.jsx)(ti,Ho({},e))}}),(0,r.jsx)(x.Z,{path:[g.Z5c.INVITE_LOGIN(":inviteCode"),g.Z5c.INVITE(":inviteCode")],render:function(e){var t=e.match,n=t.params.inviteCode,o=t.path,i=e.location,a=e.transitionTo,c=(0,Ue.mb)(n,i.search);return s.tq||s.Em?(0,r.jsx)(ni,{inviteKey:c,transitionTo:a},c):(0,r.jsx)($o,{inviteKey:c,location:i,transitionTo:a,login:o===g.Z5c.INVITE_LOGIN(":inviteCode")})}}),(0,r.jsx)(x.Z,{path:[g.Z5c.GUILD_TEMPLATE_LOGIN(":guildTemplateCode"),g.Z5c.GUILD_TEMPLATE(":guildTemplateCode")],render:function(e){
var t=e.match,n=t.params.guildTemplateCode,o=t.path,i=e.location,a=e.transitionTo;return s.tq||s.Em?(0,r.jsx)(Yr,{code:n},n):(0,r.jsx)(ei,{code:n,location:i,transitionTo:a,login:o===g.Z5c.GUILD_TEMPLATE_LOGIN(":guildTemplateCode")})}}),(0,r.jsx)(x.Z,{path:g.Z5c.VERIFY,render:function(e){return(0,r.jsx)(ai,Ho({},e))}}),(0,r.jsx)(x.Z,{path:g.Z5c.VERIFY_HUB_EMAIL,render:function(e){return(0,r.jsx)(fi,Ho({},e))}}),(0,r.jsx)(x.Z,{path:g.Z5c.VERIFY_REQUEST,render:function(e){return(0,r.jsx)(si,Ho({},e))}}),(0,r.jsx)(x.Z,{path:g.Z5c.DISABLE_EMAIL_NOTIFICATIONS,render:function(e){return(0,r.jsx)(ui,Ho({},e))}}),(0,r.jsx)(x.Z,{path:g.Z5c.DISABLE_SERVER_HIGHLIGHT_NOTIFICATIONS,render:function(e){return(0,r.jsx)(li,Ho({},e))}}),(0,r.jsx)(x.Z,{path:g.Z5c.AUTHORIZE_IP,render:function(e){return(0,r.jsx)(oi,Ho({},e))}}),(0,r.jsx)(x.Z,{path:g.Z5c.AUTHORIZE_PAYMENT,render:function(e){return(0,r.jsx)(ii,Ho({},e))}}),(0,r.jsx)(x.Z,{path:g.Z5c.RESET,render:function(e){return(0,r.jsx)(ci,Ho({},e))}}),(0,
r.jsx)(x.Z,{path:g.Z5c.PICK_GUILD_SETTINGS(":section?",":subsection?"),render:function(e){return(0,r.jsx)(pi,Ho({},e))}}),(0,r.jsx)(x.Z,{path:g.Z5c.CHANNEL(":guildId",":channelId?",":messageId?"),render:function(e){return(0,r.jsx)(di,Ho({},e))}})]})};n.getDerivedStateFromProps=function(e,t){var n,r=e.invite,o=e.location,a=t.backgroundId,s=null!==(n=(0,i.parse)(o.search).redirect_to)&&void 0!==n?n:null;null!=s&&""!==s&&(0,hn.B)(s)&&!s.startsWith(g.Z5c.ME)||(s=null);var c=null;if(null==r)c=(0,fn.gK)(s);else if((null==r?void 0:r.state)===g.r2o.RESOLVED){var u=r.guild,l=r.target_application;null!=l?null!=a&&(c=(0,ln.xF)(l.id,a,1024)):null!=u&&"string"==typeof u.splash&&(c=at.ZP.getGuildSplashURL({id:u.id,splash:u.splash}))}return{redirectTo:s,splash:c}};return n}(o.PureComponent);const _i=c.ZP.connectStores([je.default,ot.Z,un.Z,cn.Z,ue.Z],(function(e){var t,n,r,o=e.match,i=e.location,a=null==o||null===(t=o.params)||void 0===t?void 0:t.inviteCode,s=eo.a?eo.Y:void 0,c=null!=a?(0,
Ue.mb)(a,i.search):s,u=null==o||null===(n=o.params)||void 0===n?void 0:n.giftCode,l=null==o||null===(r=o.params)||void 0===r?void 0:r.guildTemplateCode;return{inviteKey:c,isAuthenticated:je.default.isAuthenticated(),giftCode:u,guildTemplateCode:l,gift:null!=u?un.Z.get(u):null,invite:null!=c?ot.Z.getInvite(c):null,guildTemplate:null!=l?ue.Z.getGuildTemplate(l):null,hasLoadedExperiments:cn.Z.hasLoadedExperiments}}))(hi)},928975:(e,t,n)=>{"use strict";n.d(t,{Z:()=>S});var r=n(785893),o=n(667294),i=n(23279),a=n.n(i),s=n(853158),c=n(289283),u=n(859853),l=n(421281),f=n(95070),d=n.n(f),p=n(399143),h=n.n(p);function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function y(e){y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return y(e)}function m(e){
for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){E(e,t,n[t])}))}return e}function g(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e,t){v=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return v(e,t)}var b=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){
var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var I=(0,l.Mg)(h().responsiveWidthMobile),N=0,T=1,A={friction:10,tension:130};const S=function(e){return function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&v(e,t)}(o,t);var n=O(o);function o(){_(this,o);var e;(e=n.apply(this,arguments)).anim=new s.Z.Value(N);e.state={shouldAnimate:!c.tq};e.handleResize=function(){var t=window.innerWidth>I;!e.state.shouldAnimate&&t&&e.anim.setValue(T);e.setState({shouldAnimate:t})};e.handleResizeDebounced=a()(e.handleResize,60);return e}var i=o.prototype;i.componentDidMount=function(){if(!c.tq){window.addEventListener("resize",this.handleResizeDebounced);this.handleResize()}};i.componentWillUnmount=function(){clearTimeout(this.timeout)
;window.removeEventListener("resize",this.handleResizeDebounced)};i.componentWillAppear=function(e){this.state.shouldAnimate?this.animateTo(T,e):e()};i.componentWillEnter=function(e){var t=this;if(this.state.shouldAnimate){clearTimeout(this.timeout);this.timeout=setTimeout((function(){return t.animateTo(T,e)}),40)}else e()};i.componentWillLeave=function(e){this.state.shouldAnimate?this.animateTo(N,e):e()};i.animateTo=function(e,t){s.Z.spring(this.anim,m({toValue:e},A)).start(t)};i.getAnimatedStyle=function(e){return this.state.shouldAnimate?{opacity:this.anim,transform:e?void 0:[{scale:this.anim.interpolate({inputRange:[0,1],outputRange:[1.05,1]})},{translateY:this.anim.interpolate({inputRange:[0,1],outputRange:["-70px","0px"]})},{translateZ:0}]}:null};i.render=function(){var t=this;return(0,r.jsx)("div",{className:d().wrapper,children:(0,r.jsx)(u.S.Consumer,{children:function(n){var o=n.reducedMotion;return(0,r.jsx)(s.Z.div,{style:t.getAnimatedStyle(o.enabled),children:(0,
r.jsx)(e,m({},t.props))})}})})};return o}(o.Component)}},734589:(e,t,n)=>{"use strict";n.d(t,{Z:()=>G});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),s=n(289283),c=n(707961),u=n(751615),l=n(443660);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function p(e){p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return p(e)}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){d(e,t,n[t])}))}return e}function _(e,t){t=null!=t?t:{}
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function E(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function y(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}
function m(e,t){m=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return m(e,t)}var g=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&m(e,t)}(n,e);var t=v(n);function n(){f(this,n);return t.apply(this,arguments)}n.prototype.render=function(){
var e=this.props,t=e.children,n=e.location,i=e.history,a=e.staticContext,s=(e.match,E(e,["children","location","history","staticContext","match"])),c=null,f=null;o.Children.forEach(t,(function(e){if(null==c&&o.isValidElement(e)){var t=e.props,r=t.component,s=t.render,l=E(t,["component","render"]),d=l.path||l.from;if(null==(c=null!=d?(0,u.LX)(n.pathname,_(h({},l),{path:d})):null))return;l=_(h({},l),{key:d,location:n,match:c,history:i,staticContext:a});null!=r?f=o.createElement(r,l):null!=s&&(f=s(l))}}));return(0,r.jsx)(l.Z,_(h({},s),{children:f}))};return n}(o.Component);const O=(0,u.EN)(b);var I=n(784426),N=n(515510),T=n(630346),A=n(421281),S=n(465704),C=n(2590),x=n(567477),R=n.n(x);function j(e){j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return j(e)}function P(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
;return e}(e):t}function L(e,t){L=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return L(e,t)}var M=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=j(e);if(t){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}var D=(0,
A.Mg)(R().responsiveWidthMobile),w=[C.Z5c.LOGIN,C.Z5c.LOGIN_HANDOFF,C.Z5c.REGISTER,C.Z5c.INVITE(""),C.Z5c.GIFT_CODE(""),C.Z5c.GUILD_TEMPLATE_LOGIN(""),C.Z5c.GUILD_TEMPLATE(""),C.Z5c.DISABLE_EMAIL_NOTIFICATIONS,C.Z5c.DISABLE_SERVER_HIGHLIGHT_NOTIFICATIONS,C.Z5c.BILLING_PREMIUM_SUBSCRIBE,C.Z5c.BILLING_PAYMENT_SOURCES_CREATE,C.Z5c.BILLING_PAYMENTS,C.Z5c.BILLING_PREMIUM_SWITCH_PLAN,C.Z5c.BILLING_GUILD_SUBSCRIPTIONS_PURCHASE,C.Z5c.VERIFY,C.Z5c.VERIFY_HUB_EMAIL,C.Z5c.AUTHORIZE_IP,C.Z5c.AUTHORIZE_PAYMENT,C.Z5c.RESET,C.Z5c.HANDOFF];function U(e){return w.some((function(t){return e.startsWith(t)}))}const G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&L(e,t)}(n,e);var t=Z(n);function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r
;(r=t.call(this,e)).handleResize=function(){r.setState({isMobileWidth:window.innerWidth<=D})};r.state={isMobileWidth:window.innerWidth<=D};return r}var i=n.prototype;i.componentDidMount=function(){window.addEventListener("resize",this.handleResize)};i.componentWillUnmount=function(){window.removeEventListener("resize",this.handleResize)};i.mobileTransitionTo=function(e,t){if(U(e))(0,I.uL)(e,t);else{var n=null!=t&&null!=t.search?t.search:null;window.location=null==n?e:"".concat(e,"?").concat(n)}};i.mobileReplaceWith=function(e){U(e)?(0,I.dL)(e):window.location=e};i.renderDefault=function(){var e=this.props.splash,t=(0,r.jsx)(O,{component:o.Fragment,children:o.Children.map(this.props.children,(function(e){return o.cloneElement(e,{transitionTo:I.uL,replaceWith:I.dL})}))});return(0,r.jsx)("div",{className:R().characterBackground,children:(0,r.jsx)(c.y5t,{forceLevel:1,children:null!=e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(N.Z,{show:!0,className:a()(R().logo)}),(0,r.jsx)(T.h,{splash:e,
children:t})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S.Z,{className:R().artwork,preserveAspectRatio:"xMinYMin slice"}),t]})})})};i.renderMobile=function(){var e=this;return(0,r.jsx)(O,{component:o.Fragment,children:o.Children.map(this.props.children,(function(t){return o.cloneElement(t,{transitionTo:e.mobileTransitionTo,replaceWith:e.mobileReplaceWith})}))})};i.render=function(){var e=this.state.isMobileWidth,t=navigator.userAgent.includes("GameLauncher");return e||s.tq||s.Em||t?this.renderMobile():this.renderDefault()};return n}(o.Component)},178232:(e,t,n)=>{"use strict";n.d(t,{Z:()=>T});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),s=n(202351),c=n(707961),u=n(770050),l=n(959207),f=n(473903),d=n(551778),p=n(746974),h=n(641277),_=n(558820),E=n(530562),y=n(203600),m=n(473708),g=n(581641),v=n.n(g),b=n(913957),O=n.n(b),I=n(518280),N=n.n(I);const T=s.ZP.connectStores([p.Z,l.Z,d.Z,f.default],(function(e){var t=e.giftCode,n=p.Z.get(t.skuId),r=t.subscriptionPlanId;return{sku:n,
subscriptionPlan:null!=r?(0,E.oE)(r):null,application:l.Z.getGame(n.applicationId),gifter:f.default.getUser(t.userId)}}))((function(e){var t=e.error,n=e.giftCode,i=e.gifter,s=e.sku,l=e.application,f=e.subscriptionPlan,d=null==i?m.Z.Messages.GIFT_CODE_AUTH_GIFTED:m.Z.Messages.GIFT_CODE_AUTH_GIFTED_BY.format({username:i.username}),p=s.name;null!=f&&(p=(f.interval===y.rV.MONTH?m.Z.Messages.GIFT_CODE_AUTH_GIFTED_SUBSCRIPTION_MONTHLY:m.Z.Messages.GIFT_CODE_AUTH_GIFTED_SUBSCRIPTION_YEARLY).format({skuName:s.name,intervalCount:f.intervalCount}));return(0,r.jsxs)(o.Fragment,{children:[null!=n.giftStyle?(0,r.jsx)(u.Z,{giftStyle:n.giftStyle,className:v().seasonalIcon}):(0,r.jsx)(_.qE,{src:null!=i?i.getAvatarURL(void 0,100):null,size:c.EFr.DEPRECATED_SIZE_100,className:N().marginBottom20}),null!=t?(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(_.DK,{children:m.Z.Messages.INVITE_MODAL_ERROR_TITLE}),(0,r.jsx)(_.Dx,{children:t})]}):(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(_.DK,{children:d}),(0,
r.jsxs)(_.Dx,{className:a()(N().marginTop8,O().flexCenter),children:[(0,r.jsx)(h.Z,{size:h.Z.Sizes.MEDIUM,className:v().applicationIcon,game:l,skuId:s.id}),p]})]})]})}))},812280:(e,t,n)=>{"use strict";n.d(t,{q:()=>xt,Z:()=>Pt});var r=n(785893),o=n(667294),i=n(970112),a=n(294184),s=n.n(a),c=n(517563),u=n(289283),l=n(202351),f=n(707961),d=n(744564),p=n(84441),h=n(561177),_=n(110108),E=n(153081),y=n(94340),m=n(281437),g=n(97245),v=n(281110),b=n(630631),O=n(20978),I=n(736818),N=n(652591),T=n(468811),A=n.n(T),S=n(2590);function C(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}function x(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){C(i,r,o,a,s,"next",e)}function s(e){C(i,r,o,a,s,"throw",e)}a(void 0)}))}}var R=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function j(){return(j=x((function(e){var t,n,r;return R(this,(function(o){
switch(o.label){case 0:return[4,v.Z.post({url:S.ANM.HANDOFF,body:{key:e},oldFormErrors:!0,retries:1})];case 1:t=o.sent(),n=t.body;if(null!=(r=n.handoff_token))return[2,r];throw new Error("Missing handoff token!")}}))}))).apply(this,arguments)}const P={generateNonce:function(){return A().v4()},createHandoffToken:function(e){return j.apply(this,arguments)}};var L=n(262329),M=n.n(L);function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1)
;"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var w,U="mweb_handoff_nonce",G="mweb_handoff_nonce_expiration";!function(e){e.NONCE_MISSING="nonce_missing";e.NONCE_EXPIRED="nonce_expired";e.NULL_HANDOFF_TOKEN="deep_link_failed";e.HANDOFF_EXCHANGE="handoff_exchange"}(w||(w={}));var k=new Set([w.NONCE_MISSING,w.NONCE_EXPIRED,w.HANDOFF_EXCHANGE]),B=new Set([w.NULL_HANDOFF_TOKEN]),F=function(){b.Z.remove(U);b.Z.remove(G)};const H=function(){var e=(0,l.e7)([I.default],(function(){return I.default.getFingerprint()})),t=(0,c.parse)(window.location.search),n=t.fingerprint,i=t.handoff_token,a=Array.isArray(n)?n.length>1?n[0]:null:n,s=null!=a?a:null!==e?e:void 0
;o.useEffect((function(){null!==a&&e!==a&&d.Z.dispatch({type:"FINGERPRINT",fingerprint:a})}),[a,e]);var u=D(o.useState(null),2),h=u[0],_=u[1],E=o.useCallback((function(e){_(e);N.default.track(S.rMx.MOBILE_WEB_HANDOFF_FAILURE,{reason:e,fingerprint:(0,g.K)(s)},{fingerprint:s})}),[_,s]),y=b.Z.get(U);"null"===i&&null===h&&E(w.NULL_HANDOFF_TOKEN);null!=i&&"null"!==i&&null==y&&null===h&&E(w.NONCE_MISSING);o.useEffect((function(){if(null!=y){var e=b.Z.get(G);if(null==e||Date.now()>=e){E(w.NONCE_EXPIRED);F()}}}),[y,E]);o.useEffect((function(){if(null!=i&&"null"!==i&&null!=y){if(null!=h)return;v.Z.post({url:S.ANM.HANDOFF_EXCHANGE,body:{key:y,handoff_token:i}}).then((function(e){return p.Z.loginToken(e.body.token,!1)})).then((function(){N.default.track(S.rMx.LOGIN_SUCCESSFUL,{source:S.uRl.MOBILE_WEB_HANDOFF,is_new_user:!1,fingerprint:(0,g.K)(s)});var e=new URL(window.location.href),t=new URLSearchParams(e.search);t.delete("handoff_token");t.delete("fingerprint");e.search=t.toString()
;window.history.pushState(null,"",e)})).catch((function(){E(w.HANDOFF_EXCHANGE)})).finally((function(){F()}))}}),[i,y,h,s,E]);if(null==s)return null;var m=null==h?(0,r.jsxs)(r.Fragment,{children:[O.MOBILE_WEB_HANDOFF_EXPLANATION_TEXT_LINE_1,(0,r.jsx)("br",{}),O.MOBILE_WEB_HANDOFF_EXPLANATION_TEXT_LINE_2]}):B.has(h)?O.MOBILE_WEB_HANDOFF_ERROR_NO_TRY_AGAIN:k.has(h)?O.MOBILE_WEB_HANDOFF_ERROR_TRY_AGAIN:void 0;return null!=h&&B.has(h)?(0,r.jsx)("div",{className:M().errorContainer,children:(0,r.jsx)(f.xvT,{color:"interactive-normal",variant:"text-sm/semibold",children:m})}):(0,r.jsxs)("div",{className:M().container,children:[(0,r.jsx)(f.xvT,{variant:"text-sm/semibold",children:m}),(0,r.jsx)(f.zxk,{look:f.zxk.Looks.INVERTED,color:f.zxk.Colors.BRAND_NEW,onClick:function(){var e=P.generateNonce();b.Z.set(U,e);b.Z.set(G,Date.now()+6e4);var t=new URL(S.x0X),n=new URLSearchParams(window.location.search);n.delete("fingerprint");n.delete("handoff_token");var r=new URLSearchParams
;r.set("redirect",encodeURIComponent(window.location.pathname+n.toString()));r.set("key",e);r.set("fingerprint",s);t.search=r.toString();N.default.track(S.rMx.DEEP_LINK_CLICKED,{fingerprint:(0,g.K)(s),source:"mobile_web_handoff",destination:S.x0X},{fingerprint:s,flush:!0});window.location.href=t.toString()},children:(0,r.jsx)(f.xvT,{className:M().buttonText,variant:"text-sm/semibold",children:O.MOBILE_WEB_HANDOFF_BUTTON_TEXT})})]})};var V=n(873553),K=n(999357),z=n(674748),Y=n(558820),W=n(349979),q=n(473708),X=n(657513),Q=n.n(X);function J(e){var t=e.onDismiss;(0,z.Z)({type:K.nv.MODAL,name:K.zs.MULTI_ACCOUNT_SWITCH_LANDING});return(0,r.jsxs)(Y.ZP,{className:Q().chooseAccountAuthBox,children:[(0,r.jsx)(Y.Dx,{children:q.Z.Messages.SWITCH_ACCOUNTS_CHOOSE_ACCOUNT}),(0,r.jsx)(f.xvT,{className:Q().chooseAccountHelpText,variant:"text-md/normal",color:"header-secondary",children:q.Z.Messages.SWITCH_ACCOUNTS_CHOOSE_ACCOUNT_HELPER}),(0,r.jsx)(W.Z,{
actionText:q.Z.Messages.SWITCH_ACCOUNTS_ACTION_LOG_IN,onAction:function(e){e===W.W.LOGIN_REQUIRED&&t()}}),(0,r.jsx)("div",{className:Q().actions,children:(0,r.jsx)(f.zxk,{className:Q().chooseAccountButton,look:f.zxk.Looks.LINK,color:f.zxk.Colors.PRIMARY,onClick:t,size:f.zxk.Sizes.MEDIUM,children:(0,r.jsx)(f.xvT,{variant:"text-sm/normal",children:q.Z.Messages.SWITCH_ACCOUNTS_ADD_AN_ACCOUNT_BUTTON})})})]})}var $=n(426797),ee=n(560837),te=n(78501),ne=n(686874),re=n(705429),oe=n(536038),ie=n(107364),ae=n(249697),se=n(565050),ce=n(930948),ue=n(120415),le=n(250287),fe=n(178232),de=n(308739),pe=n(575494),he=n(480281),_e=n(385028);function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){
i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function me(){return"undefined"==typeof document||"visible"===document.visibilityState}var ge=n(571690),ve=n(296602),be=n(441143),Oe=n.n(be),Ie=n(722406);function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Te(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)
}function Ae(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Te(i,r,o,a,s,"next",e)}function s(e){Te(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||xe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ce(e){return function(e){if(Array.isArray(e))return Ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xe(e)||function(){
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xe(e,t){if(e){if("string"==typeof e)return Ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(e,t):void 0}}var Re=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++
;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function je(e){return Pe.apply(this,arguments)}function Pe(){return(Pe=Ae((function(e){var t,n;return Re(this,(function(r){switch(r.label){case 0:Oe()(null!=e.publicKey,"public key cannot be null");return[4,window.crypto.subtle.exportKey("spki",e.publicKey)];case 1:n=r.sent();return[2,btoa((t=String).fromCharCode.apply(t,Ce(new Uint8Array(n))))]}}))}))).apply(this,arguments)}function Le(e){return Me.apply(this,arguments)}function Me(){return(Me=Ae((function(e){
return Re(this,(function(t){switch(t.label){case 0:Oe()(null!=e.publicKey,"public key cannot be null");return[4,window.crypto.subtle.exportKey("spki",e.publicKey)];case 1:return[2,we(t.sent())]}}))}))).apply(this,arguments)}function Ze(e){var t;return btoa((t=String).fromCharCode.apply(t,Ce(new Uint8Array(e)))).replace(/\//g,"_").replace(/\+/g,"-").replace(/={1,2}$/,"")}function De(e){return Uint8Array.from(atob(e),(function(e){return e.charCodeAt(0)}))}function we(e){return Ue.apply(this,arguments)}function Ue(){return(Ue=Ae((function(e){return Re(this,(function(t){switch(t.label){case 0:return[4,window.crypto.subtle.digest({name:"SHA-256"},e)];case 1:return[2,Ze(t.sent())]}}))}))).apply(this,arguments)}function Ge(e,t){Oe()(null!=e.privateKey,"private key cannot be null");return window.crypto.subtle.decrypt({name:"RSA-OAEP",hash:"SHA-256"},e.privateKey,t)}function ke(e,t){return Be.apply(this,arguments)}function Be(){return(Be=Ae((function(e,t){var n,r;return Re(this,(function(o){
switch(o.label){case 0:n=new TextDecoder;return[4,Ge(e,De(t))];case 1:r=o.sent();return[2,n.decode(r)]}}))}))).apply(this,arguments)}function Fe(e,t){return He.apply(this,arguments)}function He(){return(He=Ae((function(e,t){return Re(this,(function(n){switch(n.label){case 0:return[4,Ge(e,De(t))];case 1:return[2,Ze(n.sent())]}}))}))).apply(this,arguments)}function Ve(e,t){return Ke.apply(this,arguments)}function Ke(){return(Ke=Ae((function(e,t){var n,r,o,i,a,s,c;return Re(this,(function(u){switch(u.label){case 0:return[4,ke(e,t)];case 1:t=u.sent();n=/^(\d+):(\d{4}):([a-zA-Z0-9_]+):(.*)$/;if(null==(r=t.match(n)))throw new Error("Invalid encoded user record.");o=Se(r,5),i=o[1],a=o[2],s=o[3],c=o[4];return[2,new Ie.Z({id:i,discriminator:a,avatar:"0"===s?null:s,username:c})]}}))}))).apply(this,arguments)}var ze=n(488462),Ye=n(854257),We=n.n(Ye),qe=n(518280),Xe=n.n(qe);function Qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
function Je(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}function $e(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Je(i,r,o,a,s,"next",e)}function s(e){Je(i,r,o,a,s,"throw",e)}a(void 0)}))}}function et(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n)
;if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tt,nt,rt=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,
o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};!function(e){e[e.INITIALIZING=0]="INITIALIZING";e[e.PENDING_REMOTE_INIT=1]="PENDING_REMOTE_INIT";e[e.PENDING_FINISH=2]="PENDING_FINISH";e[e.PENDING_TICKET=3]="PENDING_TICKET";e[e.PENDING_LOGIN=4]="PENDING_LOGIN";e[e.FINISH=5]="FINISH"}(tt||(tt={}));!function(e){e[e.QR_CODE=0]="QR_CODE";e[e.CONFIRM=1]="CONFIRM"}(nt||(nt={}));var ot=n(182765),it=new ve.Z("LoginQRSocket");function at(e){var t=et(o.useState(0),2),n=t[0],r=t[1],i=et(o.useState(!1),2),a=i[0],s=i[1],c=et(o.useState({step:tt.INITIALIZING}),2),u=c[0],l=c[1],f=et(o.useState(null),2),d=f[0],p=f[1],h=function(){var e=ye((0,
o.useState)(me()),2),t=e[0],n=e[1];(0,o.useEffect)((function(){var e=function(){n(me())};window.addEventListener("visibilitychange",e);return function(){window.removeEventListener("visibilitychange",e)}}),[n]);return t}(),_=o.useMemo((function(){return new pe.Z(1500,3e4)}),[]),E=o.useRef();E.current=o.useCallback((function(){l({step:tt.INITIALIZING});if(h)r((function(e){return e+1}));else{it.info("document is not visible, will defer reconnection when document becomes visible.");s(!0)}}),[h]);var y=o.useCallback((function(){!function(e){var t=e.current;if(void 0===t)throw new Error("tried to unwrap an undefined value.");return t}(E)()}),[E]),m=o.useCallback((function(){it.error("Could not complete QR code login, trying to restart with a new QR code.");l({step:tt.INITIALIZING});_.pending||_.fail(y)}),[y,_]);o.useEffect((function(){if(h&&a&&u.step===tt.INITIALIZING){it.info("reconnecting, now that document is visible");s(!1);r((function(e){return e+1}))}}),[u,h,a,s])
;o.useEffect((function(){var t=function(){if(null!=s)return s;throw new Error("No key pair set")},n=Date.now(),r="wss:".concat(window.GLOBAL_ENV.REMOTE_AUTH_ENDPOINT,"/?v=2"),o=new WebSocket(r);it.info("[0ms] connecting to ".concat(r));var i,a=function(e){return it.info("[".concat("".concat(Date.now()-n,"ms"),"] ").concat(e))},s=null,c=null,u=null,f=null,d=!0,h=function(){if(d){d=!1;o.send(JSON.stringify({op:"heartbeat"}))}else{a("heartbeat timeout, reconnecting.");o.close();m()}};o.onmessage=(i=$e((function(n){var r,i,s,c,p,E,g,v,b,O,I,N,T;return rt(this,(function(A){switch(A.label){case 0:r=n.data;switch((i=JSON.parse(r)).op){case"nonce_proof":return[3,1];case"pending_remote_init":return[3,3];case"pending_login":return[3,5];case"pending_ticket":return[3,6];case"pending_finish":return[3,8];case"finish":return[3,10];case"cancel":return[3,12];case"hello":return[3,13];case"heartbeat_ack":return[3,14]}return[3,15];case 1:s=i.encrypted_nonce;return[4,Fe(t(),s)];case 2:c=A.sent()
;a("computed nonce proof");o.send(JSON.stringify({op:"nonce_proof",nonce:c}));return[2];case 3:_.succeed();ce.S.dispatch(S.CkL.WAVE_EMPHASIZE);return[4,Le(t())];case 4:if((p=A.sent())!==i.fingerprint)throw new Error("bad fingerprint ".concat(p," !== ").concat(i.fingerprint));a("handshake complete awaiting remote auth.");l({step:tt.PENDING_REMOTE_INIT,fingerprint:p});return[2];case 5:null==(E=i.ticket)&&m();l({step:tt.PENDING_LOGIN,ticket:E});return[2];case 6:ce.S.dispatch(S.CkL.WAVE_EMPHASIZE);a("remote auth handshake started, awaiting ticket/cancel.");g=i.encrypted_user_payload;return[4,Ve(t(),g)];case 7:v=A.sent();l({step:tt.PENDING_TICKET,user:v});return[2];case 8:ce.S.dispatch(S.CkL.WAVE_EMPHASIZE);a("remote auth handshake started, awaiting finish/cancel.");b=i.encrypted_user_payload;return[4,Ve(t(),b)];case 9:O=A.sent();l({step:tt.PENDING_FINISH,user:O});return[2];case 10:ce.S.dispatch(S.CkL.WAVE_EMPHASIZE);a("remote auth handshake finished.");I=i.encrypted_token;l({step:tt.FINISH
});return[4,ke(t(),I)];case 11:N=A.sent();e(N);return[2];case 12:a("remote auth handshake cancelled.");y();return[2];case 13:a("got hello, auth timeout=".concat(i.timeout_ms,"ms"));T=i.heartbeat_interval;f=setTimeout((function(){f=null;h();u=setInterval(h,T)}),Math.floor(T*Math.random()));return[2];case 14:d=!0;A.label=15;case 15:return[2]}}))})),function(e){return i.apply(this,arguments)});o.onopen=$e((function(){var e;return rt(this,(function(t){switch(t.label){case 0:return[4,window.crypto.subtle.generateKey({name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!0,["decrypt"])];case 1:return[4,je(s=t.sent())];case 2:c=t.sent();return[4,Le(s)];case 3:e=t.sent();a("connected, handshaking with fingerprint: ".concat(e));o.send(JSON.stringify({op:"init",encoded_public_key:c}));p(s);return[2]}}))}));o.onclose=function(e){a("disconnected, code: ".concat(e.code," ").concat(e.reason));m()};o.onerror=function(e){
a("disconnected, error: ".concat(JSON.stringify(e)));m()};return function(){a("cleaning up");o.onopen=function(){return null};o.onmessage=function(){return null};o.onclose=function(){return null};o.onerror=function(){return null};o.close(1e3);_.cancel();null!=f&&clearTimeout(f);null!=u&&clearInterval(u)}}),[y,e,n,_,m]);return{state:u,rsaKeyPair:d,cancel:y,handleFailure:m}}function st(e){var t=e.text,n=void 0===t?"":t,i=ot,a=et(o.useState(!1),2),s=a[0],c=a[1];o.useEffect((function(){var e=new Image;e.src=i;e.onload=function(){return c(!0)};e.onerror=function(){return c(!0)}}),[i]);o.useEffect((function(){s&&f.uvj.announce(q.Z.Messages.LOGIN_WITH_QR_LOADING_FINISHED_LABEL)}),[s]);return(0,r.jsx)("div",{className:We().qrCodeContainer,children:""!==n&&s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(he.Z,{className:We().qrCode,size:160,text:n}),(0,r.jsx)("div",{className:We().qrCodeOverlay,children:(0,r.jsx)("img",{src:i,alt:""})})]}):(0,r.jsx)("div",{className:We().qrCodeOverlay,
"aria-label":q.Z.Messages.LOGIN_WITH_QR_LOADING_LABEL,"aria-busy":!0,children:(0,r.jsx)(f.$jN,{className:We().qrCode,type:f.$jN.Type.WANDERING_CUBES,"aria-hidden":!0})})})}var ct=function(e){var t=e.className,n=e.children;return(0,r.jsx)(f.xvT,{variant:"text-md/normal",color:"text-danger",className:t,children:n})};function ut(e){var t=e.state,n=e.cancel,o=e.errorMessage;switch(t.step){case tt.INITIALIZING:case tt.PENDING_REMOTE_INIT:return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(st,{text:t.step===tt.PENDING_REMOTE_INIT?"https://discord.com/ra/".concat(t.fingerprint):""}),(0,r.jsx)(Y.Dx,{className:Xe().marginBottom8,children:q.Z.Messages.LOGIN_WITH_QR}),null!=o?(0,r.jsx)(ct,{children:o}):(0,r.jsx)(Y.DK,{children:q.Z.Messages.LOGIN_WITH_QR_DESCRIPTION.format()})]});case tt.PENDING_TICKET:case tt.PENDING_FINISH:var i=t.user;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_e.Z,{className:We().qrAvatar,user:i,size:f.EFr.SIZE_120,isMobile:!0,status:ze.Sk.ONLINE}),(0,r.jsx)(Y.Dx,{
className:Xe().marginBottom8,children:q.Z.Messages.CONFIRM_QR_CHECK_YOUR_PHONE}),(0,r.jsx)(Y.DK,{children:q.Z.Messages.LOGIN_AS.format({username:"".concat(i.username,"#").concat(i.discriminator)})}),(0,r.jsx)(f.zxk,{look:f.zxk.Looks.BLANK,color:f.zxk.Colors.LINK,size:f.zxk.Sizes.MIN,onClick:n,className:We().startOverButton,children:q.Z.Messages.QR_CODE_LOGIN_START_OVER})]});case tt.PENDING_LOGIN:case tt.FINISH:return(0,r.jsx)(f.$jN,{type:f.$jN.Type.WANDERING_CUBES})}}function lt(e){var t=e.authTokenCallback,i=at(t),a=i.state,s=i.rsaKeyPair,c=i.cancel,u=i.handleFailure,l=et(o.useState({}),2),d=l[0],p=l[1],h=function(e){switch(e){case tt.INITIALIZING:case tt.PENDING_REMOTE_INIT:return nt.QR_CODE;case tt.PENDING_TICKET:case tt.PENDING_FINISH:case tt.PENDING_LOGIN:case tt.FINISH:return nt.CONFIRM}}(a.step),_=et(o.useState(null),2),E=_[0],y=_[1];a.step===tt.INITIALIZING&&Object.keys(d).length>0&&p({});o.useEffect((function(){a.step===tt.PENDING_LOGIN&&null!=a.ticket&&v.Z.post({
url:S.ANM.REMOTE_AUTH_LOGIN,body:{ticket:a.ticket,captcha_key:null==d?void 0:d.captcha_key,captcha_rqtoken:null==d?void 0:d.captcha_rqtoken},oldFormErrors:!0}).then((e=$e((function(e){var n;return rt(this,(function(r){switch(r.label){case 0:if(null==s)return[3,5];r.label=1;case 1:r.trys.push([1,3,,4]);return[4,ke(s,e.body.encrypted_token)];case 2:n=r.sent();t(n);return[3,4];case 3:r.sent();u();return[3,4];case 4:return[3,6];case 5:u();r.label=6;case 6:return[2]}}))})),function(t){return e.apply(this,arguments)})).catch((function(e){var t;if(null!=(null===(t=e.body)||void 0===t?void 0:t.captcha_key)){if(Array.isArray(e.body.captcha_key)&&e.body.captcha_key.includes("invalid-response")){y(q.Z.Messages.LOGIN_WITH_QR_ERROR_SUBTITLE);u();return}n.e(72519).then(n.bind(n,972519)).then((function(t){t.default.showCaptchaAsync((0,ge.z)(e.body)).then((function(e){p(e)})).catch((function(e){return u()}))}))}else u()}));var e}),[a,d,t,s,u]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{
className:We().verticalSeparator}),(0,r.jsx)(f.qBt,{fillParent:!0,className:We().qrLogin,step:h,steps:[nt.QR_CODE,nt.CONFIRM],children:(0,r.jsx)("div",{className:We().qrLoginInner,children:(0,r.jsx)(ut,{state:a,cancel:c,errorMessage:E})})})]})}var ft=n(247246),dt=n(271778),pt=n.n(dt);function ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Et(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}function yt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Et(i,r,o,a,s,"next",e)}function s(e){Et(i,r,o,a,s,"throw",e)}a(void 0)}))}}function mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1;r.configurable=!0;"value"in r&&(r.writable=!0);Object.defineProperty(e,r.key,r)}}
function gt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function vt(e){vt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return vt(e)}function bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){gt(e,t,n[t])}))}return e}function Ot(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function It(e,t){return!t||"object"!==At(t)&&"function"!=typeof t?_t(e):t}function Nt(e,t){Nt=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Nt(e,t)}function Tt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ht(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ht(e,t)}(e,t)||function(){
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var At=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function St(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=vt(e);if(t){var o=vt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return It(this,n)}}var Ct=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){return function(i){
if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function xt(){return(0,r.jsx)(Y.ZP,{children:(0,r.jsx)(f.$jN,{})})}function Rt(e){var t=e.authBoxClassName,a=e.loginStatus,s=e.handleReset,c=Tt(o.useState(!1),2),u=c[0],l=c[1];return(0,r.jsxs)(Y.ZP,{className:t,
children:[(0,r.jsx)("img",{alt:"",src:n(148267),className:Xe().marginBottom20}),(0,r.jsx)(Y.Dx,{className:Xe().marginBottom8,children:q.Z.Messages.TWO_FA}),(0,r.jsx)(Y.DK,{children:q.Z.Messages.TWO_FA_WEBAUTHN_BODY}),(0,r.jsxs)(Y.gO,{className:Xe().marginTop40,children:[(0,r.jsx)(Y.zx,{submitting:u||a===S.u34.LOGGING_IN_MFA_WEBAUTHN,onClick:function(){l(!0);var e=I.default.getWebAuthnChallenge();null!=e?i.U2(JSON.parse(e)).then((function(e){l(!1);p.Z.loginMFA({code:JSON.stringify(e),ticket:I.default.getMFATicket(),isWebAuthn:!0});ce.S.dispatch(S.CkL.WAVE_EMPHASIZE)})).catch((function(e){l(!1);d.Z.dispatch({type:"LOGIN_MFA_FAILURE",message:e.message})})):d.Z.dispatch({type:"LOGIN_MFA_WEBAUTHN_TO_TOTP"})},children:q.Z.Messages.TWO_FA_WEBAUTHN_ACTION}),(0,r.jsx)(Y.zx,{look:Y.zx.Looks.OUTLINED,className:Xe().marginTop8,disabled:a===S.u34.LOGGING_IN_MFA_WEBAUTHN,onClick:function(){d.Z.dispatch({type:"LOGIN_MFA_WEBAUTHN_TO_TOTP"})},children:q.Z.Messages.TWO_FA_WEBAUTHN_SWITCH_TOTP}),(0,
r.jsx)(Y.zx,{look:Y.zx.Looks.LINK,color:Y.zx.Colors.LINK,className:Xe().marginTop8,onClick:s,children:q.Z.Messages.TWO_FA_LOGIN_FOOTER})]})]})}var jt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Nt(e,t)}(o,e);var t=St(o);function o(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n,i,a=_t(n=t.call(this,e));n.handleAuthToken=(i=yt((function(e){return Ct(this,(function(t){switch(t.label){case 0:return[4,p.Z.loginToken(e,!1)];case 1:t.sent();N.default.track(S.rMx.LOGIN_SUCCESSFUL,{source:S.uRl.QR_CODE,login_source:a.loginSource,gift_code_sku_id:a.giftCodeSKUId,is_new_user:!1});return[2]}}))})),function(e){return i.apply(this,arguments)});n.setLoginRef=function(e){n.loginRef=e};n.setPasswordRef=function(e){n.passwordRef=e}
;n.setCodeRef=function(e){n.codeRef=e};n.getFullLogin=function(){var e=n.state;return e.loginPrefix+e.login};n.renderError=function(e){var t=n.props.errors;if(n.hasError(e)){var r=t[e];return Array.isArray(r)?r[0]:r}return null};n.handleLogin=function(e){var t=n.state,r=t.password,o=t.captchaKey,i=t.undelete;null!=e&&e.preventDefault();n.setState({captchaCallback:n.handleLogin,captchaKey:null});p.Z.login({login:n.getFullLogin(),password:r,undelete:i,captchaKey:o,source:n.loginSource,giftCodeSKUId:n.giftCodeSKUId,invite:n.props.invite});ce.S.dispatch(S.CkL.WAVE_EMPHASIZE)};var s=_t(n);n.handleIPAuthorize=function(){var e=yt((function(e){var t,n,r,o,i,a,c;return Ct(this,(function(u){switch(u.label){case 0:t=s.state,n=t.password,r=t.captchaKey,o=t.undelete;s.setState({phoneVerifyError:null,captchaKey:null});i=s.getFullLogin();u.label=1;case 1:u.trys.push([1,4,,5]);return[4,$.Z.verifyPhone(i,e,!1)];case 2:a=u.sent().token;return[4,p.Z.authorizeIPAddress(a)];case 3:u.sent();p.Z.login({
login:i,password:n,undelete:o,captchaKey:r,source:s.loginSource,giftCodeSKUId:s.giftCodeSKUId});ce.S.dispatch(S.CkL.WAVE_EMPHASIZE);return[3,5];case 4:null!=(c=u.sent()).body&&null!=c.body.message&&s.setState({phoneVerifyError:c.body.message});return[3,5];case 5:return[2]}}))}));return function(t){return e.apply(this,arguments)}}();var l=_t(n);n.handlePasswordReset=function(){var e=yt((function(e){var t,n,r;return Ct(this,(function(o){switch(o.label){case 0:t=l.props.transitionTo;l.setState({phoneVerifyError:null});o.label=1;case 1:o.trys.push([1,3,,4]);return[4,$.Z.verifyPhone(l.getFullLogin(),e,!1)];case 2:n=o.sent().token;t(S.Z5c.RESET,{search:(0,c.stringify)({token:n,from_login:"true"})});return[3,4];case 3:null!=(r=o.sent()).body&&null!=r.body.message&&l.setState({phoneVerifyError:r.body.message});return[3,4];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}();n.handleTokenSubmit=function(e){var t=n.state.code,r=n.props.mfaTicket
;null!=e&&e.preventDefault();p.Z.loginMFA({code:t.replace(/ /g,""),ticket:r,source:n.loginSource,giftCodeSKUId:n.giftCodeSKUId});ce.S.dispatch(S.CkL.WAVE_EMPHASIZE)};n.handleSMSTokenSubmit=function(e){var t=n.state.smsCode,r=n.props.mfaTicket;null!=e&&e.preventDefault();p.Z.loginSMS({code:t.replace(/ /g,""),ticket:r});ce.S.dispatch(S.CkL.WAVE_EMPHASIZE)};n.handleToggleSMSLogin=function(e){var t=n.props.mfaTicket;null!=e&&e.preventDefault();p.Z.requestSMSToken(t);ce.S.dispatch(S.CkL.WAVE_EMPHASIZE)};var d=_t(n);n.handleForgotPassword=function(){var e=yt((function(e){var t,n;return Ct(this,(function(o){switch(o.label){case 0:null!=e&&e.preventDefault();null!=d.loginRef&&d.loginRef.focus();t=d.getFullLogin();n=d.state.captchaKey;d.setState({captchaCallback:d.handleForgotPassword,captchaKey:null});o.label=1;case 1:o.trys.push([1,3,,4]);ce.S.dispatch(S.CkL.WAVE_EMPHASIZE);return[4,p.Z.forgotPassword(t,n)];case 2:o.sent();(0,f.h7j)((function(e){return(0,r.jsx)(f.sm4,Ot(bt({
header:q.Z.Messages.EMAIL_VERIFICATION_INSTRUCTIONS_HEADER,confirmText:q.Z.Messages.OKAY,confirmButtonColor:Y.zx.Colors.BRAND,className:u.tq?pt().mobile:""},e),{children:(0,r.jsx)(f.xvT,{variant:"text-md/normal",children:q.Z.Messages.EMAIL_VERIFICATION_INSTRUCTIONS_BODY.format({email:t})})}))}));return[3,4];case 3:o.sent();return[3,4];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}();n.handleResendCode=function(){$.Z.resendCode(n.getFullLogin())};n.handleReset=function(e){null!=e&&e.preventDefault();p.Z.loginReset();n.setState({password:"",loginPrefix:"",login:"",code:"",smsCode:"",captchaKey:null,undelete:!1,checkingHandoff:!1,redirecting:!1})};n.handleCancelAccountDeletion=function(){n.setState({undelete:!0},n.handleLogin)};n.handleCaptchaVerify=function(e){var t=n.state.captchaCallback;n.setState({captchaKey:e},t)};n.handleGotoRegister=function(){
var e,t=n.state.login,r=n.props,o=r.invite,i=r.giftCode,a=r.guildTemplate,s=r.location,u=r.transitionTo,l=r.redirectTo,f=null!=s?(0,c.parse)(s.search):{};""!==t&&(f.email=t);if(null!=o){f.mode="register";e=S.Z5c.INVITE(o.code)}else if(null!=i){f.mode="register";e=S.Z5c.GIFT_CODE(i.code)}else if(null!=a)e=S.Z5c.GUILD_TEMPLATE(a.code);else if(null!=l){e=S.Z5c.REGISTER;f.redirect_to=l}else e=S.Z5c.REGISTER;p.Z.loginReset();u(e,{search:(0,c.stringify)(f)});ce.S.dispatch(S.CkL.WAVE_EMPHASIZE)};var h,_,E=null!=e.location?(0,c.parse)(e.location.search):{};n.state={redirecting:e.authenticated,checkingHandoff:e.handoffAvailable,loginPrefix:"",login:null!==(_=null!==(h=E.email)&&void 0!==h?h:E.login)&&void 0!==_?_:"",password:"",code:"",smsCode:"",captchaKey:null,captchaCallback:n.handleLogin,undelete:!1,phoneVerifyError:null,dismissedChooseAccount:!1};return n}var i=o.prototype;i.componentDidMount=function(){
var e=this.props,t=e.handoffAvailable,n=e.authenticated,r=e.giftCodeSKU,o=e.invite,i=e.location;t&&!n?(0,h.is)():n&&this.loginOrSSO(n,i,!0);N.default.track(S.rMx.LOGIN_VIEWED,bt({location:null!=o?"Invite Login Page":"Non-Invite Login Page",login_source:this.loginSource,authenticated:n},null!=r?(0,y.Z)(r,!1,!1):{}),{flush:!0});p.Z.getLocationMetadata();(0,ne.e)("login")};i.componentDidUpdate=function(e){var t=this.props,n=t.authenticated,r=t.location,o=this.state.checkingHandoff;!n||e.authenticated||o||this.loginOrSSO(n,r);if(e.errors!==this.props.errors)if(this.hasError("password")){var i;null===(i=this.passwordRef)||void 0===i||i.focus()}else if(this.hasError("email")||this.hasError("login")){var a;null===(a=this.loginRef)||void 0===a||a.focus()}else if(this.hasError("code")){var s;null===(s=this.codeRef)||void 0===s||s.focus()}};i.loginOrSSO=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this;if(e&&null!=t){this.setState({redirecting:!0})
;n?p.Z.verifySSOToken().then((function(){return r.transitionSSO(t)})):this.transitionSSO(t)}};i.transitionSSO=function(e){var t=this.props,n=t.transitionTo,r=t.redirectTo,o=t.replaceWith,i=null!=e?(0,c.parse)(e.search):{};delete i.redirect_to;if(null!=r)null!=o?o(r):n(r);else if(null==i.service)n(S.Z5c.APP);else{var a=window.location.protocol+window.GLOBAL_ENV.API_ENDPOINT+S.ANM.SSO,s=Ot(bt({},i),{token:I.default.getToken()});window.location="".concat(a,"?").concat((0,c.stringify)(s))}};i.hasError=function(e){return null!=this.props.errors[e]};i.renderHandOffAvailable=function(){var e=this.props.authBoxClassName;return(0,r.jsxs)(Y.ZP,{className:e,children:[(0,r.jsx)(Y.Hh,{}),(0,r.jsx)(Y.Dx,{className:Xe().marginBottom8,children:q.Z.Messages.BROWSER_HANDOFF_DETECTING_TITLE}),(0,r.jsx)(Y.DK,{children:q.Z.Messages.AUTH_BROWSER_HANDOFF_DETECTING_DESCRIPTION})]})};i.renderHandOffContinue=function(){var e=this.props,t=e.user,n=e.transitionTo,o=e.authBoxClassName;return null==t?null:(0,
r.jsxs)(Y.ZP,{className:o,children:[(0,r.jsx)(Y.qE,{src:t.getAvatarURL(void 0,100),size:f.EFr.DEPRECATED_SIZE_100,className:Xe().marginBottom20}),(0,r.jsx)(Y.Dx,{className:Xe().marginBottom8,children:q.Z.Messages.BROWSER_HANDOFF_SUCCESS_TITLE.format({name:t.toString()})}),(0,r.jsx)(Y.DK,{className:Xe().marginBottom40,children:q.Z.Messages._BROWSER_HANDOFF_SUCCESS_BODY}),(0,r.jsxs)(Y.gO,{children:[(0,r.jsx)(Y.zx,{onClick:function(){return n(S.Z5c.APP)},className:Xe().marginBottom8,children:q.Z.Messages.BROWSER_HANDOFF_SUCCESS_ACTION.format({name:t.toString()})}),(0,r.jsx)(Y.zx,{look:Y.zx.Looks.LINK,color:Y.zx.Colors.LINK,onClick:this.handleReset,children:q.Z.Messages.BROWSER_HANDOFF_SUCCESS_CANCEL})]})]})};i.renderDisabledAccount=function(){
var e=this.props.authBoxClassName,t=this.props.loginStatus===S.u34.ACCOUNT_DISABLED,n=t?q.Z.Messages.ACCOUNT_DISABLED_TITLE:q.Z.Messages.ACCOUNT_SCHEDULED_FOR_DELETION_TITLE,o=t?q.Z.Messages.ACCOUNT_DISABLED_DESCRIPTION:q.Z.Messages.ACCOUNT_SCHEDULED_FOR_DELETION_DESCRIPTION;return(0,r.jsx)(Y.ZP,{tag:"form",onSubmit:this.handleReset,className:e,children:(0,r.jsxs)(f.y5t,{component:(0,r.jsx)(Y.Dx,{className:Xe().marginBottom8,children:n}),children:[(0,r.jsx)(Y.DK,{className:Xe().marginBottom20,children:o}),(0,r.jsxs)(Y.gO,{children:[(0,r.jsx)(Y.zx,{color:Y.zx.Colors.BRAND,type:"submit",children:q.Z.Messages._RETURN_TO_LOGIN}),(0,r.jsx)("div",{className:s()(Xe().marginTop8,pt().needAccount),children:q.Z.Messages.ACCOUNT_SCHEDULED_FOR_DELETION_CANCEL.format({onClick:this.handleCancelAccountDeletion})})]})]})})};i.renderResolving=function(){var e=this,t=this.props,n=t.authBoxClassName,o=t.country;return(0,r.jsxs)(Y.ZP,{className:n,children:[(0,r.jsx)(de.R,{}),(0,r.jsxs)(Y.gO,{
className:Xe().marginTop20,children:[(0,r.jsx)(te.Z,{className:Xe().marginBottom20,alpha2:o.alpha2,countryCode:o.code.split(" ")[0],label:q.Z.Messages.FORM_LABEL_EMAIL_OR_PHONE_NUMBER,onChange:function(t,n){return e.setState({login:t,loginPrefix:n})},setRef:this.setLoginRef,autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",spellCheck:"false",value:this.state.login,autoFocus:!0,required:!0}),(0,r.jsx)(Y.II,{className:Xe().marginBottom20,label:q.Z.Messages.FORM_LABEL_PASSWORD,onChange:function(t){return e.setState({password:t})},type:"password",setRef:this.setPasswordRef,autoComplete:"off",spellCheck:"false",value:this.state.password,required:!0}),(0,r.jsx)(Y.zx,{className:Xe().marginBottom8,type:"submit",disabled:!0,children:q.Z.Messages._LOGIN}),(0,r.jsx)(Y.zx,{disabled:!0,look:Y.zx.Looks.LINK,color:Y.zx.Colors.LINK,children:q.Z.Messages.FORGOT_PASSWORD}),(0,r.jsx)(Y.zx,{disabled:!0,className:Xe().marginTop4,look:Y.zx.Looks.LINK,color:Y.zx.Colors.LINK,
children:q.Z.Messages.NEED_ACCOUNT})]})]})};i.renderDefaultForm=function(e){var t,n,o=this,i=this.props,a=i.invite,c=i.giftCode,u=i.loginStatus,l=i.country,d=i.showMobileWebHandoff,p=i.disableAutofocusOnDefaultForm,h=!this.hasError("email")&&this.hasError("password"),_=null!=(null==a?void 0:a.stage_instance);t=null==a||_?null!=c?(0,r.jsx)(fe.Z,{giftCode:c}):(0,r.jsxs)("div",{className:pt().header,children:[(0,r.jsx)(Y.Dx,{className:Xe().marginBottom8,children:q.Z.Messages.LOGIN_TITLE},"title"),!1===(0,ue.eL)()?(0,r.jsx)(Y.DK,{children:q.Z.Messages.AUTH_LOGIN_BODY},"subtitle"):null]}):(0,r.jsx)(de.Z,{invite:a});return(0,r.jsxs)(ie.Z,{direction:ie.Z.Direction.HORIZONTAL,align:ie.Z.Align.CENTER,children:[(0,r.jsxs)("div",{className:pt().mainLoginContainer,children:[this.canShowChooseAccount&&this.state.dismissedChooseAccount&&(0,r.jsx)(Y.zx,{onClick:function(){o.setState((function(e){return Ot(bt({},e),{dismissedChooseAccount:!1})}))},look:Y.zx.Looks.LINK,color:Y.zx.Colors.PRIMARY,
className:pt().goBackButton,children:(0,r.jsxs)("div",{className:pt().content,children:[(0,r.jsx)(ae.Z,{width:16,height:16,className:pt().caret}),(0,r.jsx)(f.xvT,{variant:"text-md/normal",children:q.Z.Messages.AGE_GATE_GO_BACK})]})}),t,(0,r.jsx)(f.y5t,{children:(0,r.jsxs)(Y.gO,{className:Xe().marginTop20,children:[(0,r.jsx)(te.Z,{alpha2:l.alpha2,countryCode:l.code.split(" ")[0],className:Xe().marginBottom20,label:q.Z.Messages.FORM_LABEL_EMAIL_OR_PHONE_NUMBER,error:null!==(n=this.renderError("login"))&&void 0!==n?n:this.renderError("email"),onChange:function(e,t){return o.setState({login:e,loginPrefix:t})},setRef:this.setLoginRef,autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",spellCheck:"false",value:this.state.login,autoFocus:!h&&!d&&!p,required:!0}),(0,r.jsx)(Y.II,{label:q.Z.Messages.FORM_LABEL_PASSWORD,error:this.renderError("password"),onChange:function(e){return o.setState({password:e})},name:"password",type:"password",setRef:this.setPasswordRef,autoComplete:"off",
spellCheck:"false",autoFocus:h&&!d&&!p,value:this.state.password,required:!0}),(0,r.jsx)(Y.zx,{onClick:this.handleForgotPassword,look:Y.zx.Looks.LINK,color:Y.zx.Colors.LINK,className:s()(Xe().marginBottom20,Xe().marginTop4),children:q.Z.Messages.FORGOT_PASSWORD}),(0,r.jsx)(Y.zx,{type:"submit",submitting:u===S.u34.LOGGING_IN,color:_?Y.zx.Colors.GREEN:Y.zx.Colors.BRAND,className:Xe().marginBottom8,children:_?q.Z.Messages._LOGIN_STAGE:q.Z.Messages._LOGIN}),(0,r.jsxs)("div",{className:Xe().marginTop4,children:[(0,r.jsx)("span",{className:pt().needAccount,children:q.Z.Messages.NEED_ACCOUNT}),(0,r.jsx)(Y.zx,{onClick:this.handleGotoRegister,look:Y.zx.Looks.LINK,color:Y.zx.Colors.LINK,className:pt().smallRegisterLink,children:q.Z.Messages.REGISTER})]})]})})]}),(0,r.jsx)(f.y5t,{children:e?(0,r.jsx)(lt,{authTokenCallback:this.handleAuthToken}):null})]},"form-wrapper")};i.renderDefault=function(){var e=this.props,t=e.authBoxClassName,n=e.showMobileWebHandoff;return(0,r.jsxs)("div",{
className:pt().pageContainer,children:[(0,r.jsx)(Y.ZP,{onSubmit:this.handleLogin,tag:"form",className:t,expanded:!0,children:this.renderDefaultForm(!0)}),n&&(0,r.jsx)(H,{})]})};i.renderGuildTemplate=function(e){var t=this;return(0,r.jsx)(ft.Z,{onSubmit:this.handleLogin,tag:"form",className:s()(this.props.authBoxClassName,pt().horizontalAuthBox),children:function(){return[(0,r.jsx)(m.Z,{guildTemplate:e},"template"),t.renderDefaultForm(!1)]}})};i.renderMFA=function(){var e=this,t=this.props,o=t.loginStatus,i=t.mfaSMS,a=t.authBoxClassName;return(0,r.jsxs)(Y.ZP,{onSubmit:this.handleTokenSubmit,tag:"form",className:a,children:[(0,r.jsx)("img",{alt:"",src:n(148267),className:Xe().marginBottom20}),(0,r.jsx)(Y.Dx,{className:Xe().marginBottom8,children:q.Z.Messages.TWO_FA}),(0,r.jsx)(Y.DK,{children:q.Z.Messages.TWO_FA_ENTER_TOKEN_BODY}),(0,r.jsxs)(Y.gO,{className:Xe().marginTop40,children:[(0,r.jsx)(Y.II,{className:Xe().marginBottom20,error:this.renderError("code"),setRef:this.setCodeRef,
onChange:function(t){return e.setState({code:t})},autoComplete:"one-time-code",placeholder:q.Z.Messages.TWO_FA_AUTH_CODE,spellCheck:"false",maxLength:10,autoFocus:!0,label:q.Z.Messages.TWO_FA_ENTER_TOKEN_LABEL,value:this.state.code,required:!0},"totpCode"),(0,r.jsx)(Y.zx,{type:"submit",submitting:o===S.u34.LOGGING_IN_MFA,children:q.Z.Messages._LOGIN}),i?(0,r.jsx)(Y.zx,{onClick:this.handleToggleSMSLogin,submitting:o===S.u34.LOGGING_IN_MFA_SMS,className:Xe().marginTop8,look:Y.zx.Looks.LINK,color:Y.zx.Colors.LINK,children:q.Z.Messages.MFA_SMS_RECEIVE_CODE}):null,(0,r.jsx)(Y.zx,{look:Y.zx.Looks.LINK,color:Y.zx.Colors.LINK,className:Xe().marginTop4,onClick:this.handleReset,children:q.Z.Messages._TWO_FA_LOGIN_FOOTER})]})]})};i.renderMFASMS=function(){var e=this,t=this.props,o=t.loginStatus,i=t.maskedPhone,a=t.authBoxClassName,s=o===S.u34.LOGGING_IN_MFA_SMS||""===i;return(0,r.jsxs)(Y.ZP,{onSubmit:this.handleSMSTokenSubmit,tag:"form",className:a,children:[(0,r.jsx)("img",{alt:"",src:n(148267),
className:Xe().marginBottom20}),(0,r.jsx)(Y.Dx,{className:Xe().marginBottom8,children:q.Z.Messages.TWO_FA}),(0,r.jsx)(Y.DK,{className:Xe().marginBottom8,children:s?q.Z.Messages.TWO_FA_ENTER_SMS_TOKEN_SENDING:q.Z.Messages.TWO_FA_ENTER_SMS_TOKEN_SENT.format({phoneNumber:i})}),(0,r.jsxs)(Y.gO,{className:Xe().marginTop40,children:[(0,r.jsx)(Y.II,{className:Xe().marginBottom20,error:this.renderError("code"),setRef:this.setCodeRef,onChange:function(t){return e.setState({smsCode:t})},autoComplete:"off",placeholder:q.Z.Messages.TWO_FA_AUTH_CODE,spellCheck:"false",maxLength:10,autoFocus:!0,label:q.Z.Messages.TWO_FA_ENTER_SMS_TOKEN_LABEL,value:this.state.smsCode,required:!0},"smsCode"),(0,r.jsx)(Y.zx,{type:"submit",submitting:s,color:s?Y.zx.Colors.TRANSPARENT:Y.zx.Colors.BRAND,children:q.Z.Messages._LOGIN}),s?null:(0,r.jsx)(Y.zx,{onClick:this.handleToggleSMSLogin,className:Xe().marginTop8,look:Y.zx.Looks.LINK,color:Y.zx.Colors.LINK,children:q.Z.Messages.MFA_SMS_RESEND}),(0,r.jsx)(Y.zx,{
look:Y.zx.Looks.LINK,color:Y.zx.Colors.LINK,className:Xe().marginTop4,onClick:this.handleReset,children:q.Z.Messages._TWO_FA_LOGIN_FOOTER})]})]})};i.renderMFAWebAuthn=function(){var e=this.props,t=e.authBoxClassName,n=e.loginStatus;return(0,r.jsx)(Rt,{authBoxClassName:t,loginStatus:n,handleReset:this.handleReset})};i.renderIPAuthorization=function(){var e=this.props.authBoxClassName,t=this.state.phoneVerifyError;return(0,r.jsx)(Y.ZP,{tag:"form",className:e,children:(0,r.jsx)(E.Z,{title:q.Z.Messages.PHONE_IP_AUTHORIZATION_TITLE,subtitle:q.Z.Messages.PHONE_IP_AUTHORIZATION_SUBTITLE_RESEND.format({onResendClick:this.handleResendCode}),error:t,onSubmit:this.handleIPAuthorize,onCancel:p.Z.loginReset})})};i.renderPasswordRecovery=function(){var e=this.props.authBoxClassName,t=this.state.phoneVerifyError;return(0,r.jsx)(Y.ZP,{tag:"form",className:e,children:(0,r.jsx)(E.Z,{title:q.Z.Messages.PASSWORD_RECOVERY_VERIFY_PHONE_TITLE,
subtitle:q.Z.Messages.PASSWORD_RECOVERY_VERIFY_PHONE_SUBTITLE_RESEND.format({onResendClick:this.handleResendCode}),error:t,onSubmit:this.handlePasswordReset,onCancel:p.Z.loginReset})})};i.renderChooseAccount=function(){var e=this;return(0,r.jsx)(J,{onDismiss:function(){e.setState((function(e){return Ot(bt({},e),{dismissedChooseAccount:!0})}))}})};i.render=function(){var e=this.props,t=e.authenticated,n=e.invite,o=e.guildTemplate,i=e.loginStatus,a=e.handoffAvailable,s=e.authBoxClassName,c=e.errors,u=this.state,l=u.checkingHandoff;if(u.redirecting||l)return(0,r.jsx)(xt,{});if(this.hasError("captcha_key"))return(0,r.jsx)(le.Z,{authBoxClassName:s,onVerify:this.handleCaptchaVerify,title:q.Z.Messages.LOGIN_TITLE,sitekey:c.captcha_sitekey,captchaService:(0,se.B)(c.captcha_service)});if(a)return this.renderHandOffAvailable();if(t&&l)return this.renderHandOffContinue();switch(i){case S.u34.LOGGING_IN_MFA_SMS:case S.u34.MFA_SMS_STEP:return this.renderMFASMS();case S.u34.LOGGING_IN_MFA:
case S.u34.MFA_STEP:return this.renderMFA();case S.u34.MFA_WEBAUTHN_STEP:case S.u34.LOGGING_IN_MFA_WEBAUTHN:return this.renderMFAWebAuthn();case S.u34.ACCOUNT_SCHEDULED_FOR_DELETION:case S.u34.ACCOUNT_DISABLED:return this.renderDisabledAccount();case S.u34.PHONE_IP_AUTHORIZATION:return this.renderIPAuthorization();case S.u34.PASSWORD_RECOVERY_PHONE_VERIFICATION:return this.renderPasswordRecovery();case S.u34.LOGGING_IN:case S.u34.NONE:default:return null!=n&&n.state===S.r2o.RESOLVING?this.renderResolving():null!=o?o.state===S.r2o.RESOLVING?this.renderResolving():this.renderGuildTemplate(o):this.canShowChooseAccount&&!this.state.dismissedChooseAccount?this.renderChooseAccount():this.renderDefault()}};o.getDerivedStateFromProps=function(e){var t=e.handoffAvailable,n=e.authenticated;return t||n?null:{checkingHandoff:!1}};!function(e,t,n){t&&mt(e.prototype,t);n&&mt(e,n)}(o,[{key:"loginSource",get:function(){
var e=this.props,t=e.giftCode,n=e.guildTemplate,r=e.invite,o=e.loginSource,i=e.redirectTo;if(null!=o)return o;if(null!=t)return"gift";if(null!=n)return"guild_template";if(null!=r){if(null!=r.guild)return"guild_invite";if(null!=r.channel)return"dm_invite";if(null!=r.inviter)return"friend_invite"}return null!=i?(0,_.L)(i):null}},{key:"giftCodeSKUId",get:function(){var e=this.props.giftCode;return null!=e?e.skuId:null}},{key:"canShowChooseAccount",get:function(){return this.props.hasLoggedInAccounts}}]);return o}(o.PureComponent);jt.defaultProps={transitionTo:function(e){return n.g.location.assign(e)}};const Pt=function(e){var t=(0,l.cj)([re.Z,oe.Z,I.default,V.Z,ee.Z],(function(){return{authenticated:I.default.isAuthenticated(),handoffAvailable:re.Z.isHandoffAvailable(),user:re.Z.user,loginStatus:I.default.getLoginStatus(),mfaTicket:I.default.getMFATicket(),mfaSMS:I.default.getMFASMS(),maskedPhone:I.default.getMaskedPhone(),errors:I.default.getErrors(),defaultRoute:oe.Z.defaultRoute,
country:ee.Z.getCountryCode(),hasLoggedInAccounts:V.Z.getHasLoggedInAccounts()}}));return(0,r.jsx)(jt,bt({},e,t))}},793436:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(785893),o=n(667294),i=n(517563),a=n(751615),s=n(202351),c=n(84441),u=n(561177),l=n(110108),f=n(784426),d=n(736818),p=n(812280),h=n(2590),_=n(897196);function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function m(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))
;return e}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e){var t=function(e){var t=e.handoffKey,n=e.handoffToken,r=e.handoffSource;(0,u.Yz)({handoffKey:t,
handoffToken:n,handoffSource:r});A(!1)},n=o.useCallback((function(t){if(function(e){var t,n=(0,a.LX)(e,{path:h.Z5c.CHANNEL(":guildId",":channelId")});return(null==n||null===(t=n.params)||void 0===t?void 0:t.channelId)===_.oC.ROLE_SUBSCRIPTIONS}(t))f.dL(t);else{var n;(null!==(n=e.transitionTo)&&void 0!==n?n:f.uL)(t)}}),[e.transitionTo]),E=(0,s.cj)([d.default],(function(){return{isAuthenticated:d.default.isAuthenticated(),loginStatus:d.default.getLoginStatus()}})),v=E.isAuthenticated,b=E.loginStatus,O=e.location,I=e.redirectTo,N=g(o.useState(v),2),T=N[0],A=N[1];o.useEffect((function(){if(null!=O){var e=(0,i.parse)(O.search),n=e.handoff_key,r=e.handoff_token;if(null!=n&&null!=r){var o=null!=I?(0,l.L)(I):void 0;T?c.Z.logout(null).finally((function(){t({handoffKey:n,handoffToken:r,handoffSource:o})})):t({handoffKey:n,handoffToken:r,handoffSource:o})}}}),[]);return T||b===h.u34.LOGGING_IN?(0,r.jsx)(p.q,{}):(0,r.jsx)(p.Z,m(function(e){for(var t=1;t<arguments.length;t++){
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){y(e,t,n[t])}))}return e}({},e),{transitionTo:n}))}},247246:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(558820),s=n(611109),c=n.n(s);function u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function l(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))
}));return e}function f(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function d(e){var t=e.children,n=e.className,o=f(e,["children","className"]),s=t();return(0,r.jsx)(a.ZP,l(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){u(e,t,n[t])}))}return e}({},o),{className:i()(n,c().container),contentClassName:c().content,children:s.map((function(e,t){return(0,r.jsx)("div",{className:c().column,style:{
flexBasis:"".concat(100/s.length,"%")},children:e},t)}))}))}},994653:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ge});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),s=n(517563),c=n(999357),u=n(202351),l=n(513328),f=n(707961),d=n(84441),p=n(553484),h=n(784426),_=n(558820),E=n(348592),y=n(2590),m=n(473708),g=n(565462),v=n.n(g),b=function(){return(0,h.uL)(y.Z5c.LOGIN)};const O=function(e){var t=e.authBoxClassName,o=e.underageMessage;return(0,r.jsxs)(_.ZP,{className:t,children:[(0,r.jsx)("img",{alt:"",src:n(697694),className:v().img}),(0,r.jsx)(_.Dx,{className:v().title,children:m.Z.Messages.AGE_GATE_UNDERAGE_HEADER}),(0,r.jsx)(_.DK,{className:v().subtitle,children:m.Z.Messages.AGE_GATE_UNDERAGE_BODY.format({underageMessage:null!=o?o:m.Z.Messages.AGE_GATE_UNDERAGE_BODY_DEFAULT_REG_MESSAGE,helpURL:E.Z.getArticleURL(y.BhN.AGE_GATE)})}),(0,r.jsx)(f.zxk,{fullWidth:!0,onClick:b,children:m.Z.Messages.AGE_GATE_UNDERAGE_BACK_TO_LOGIN})]})};var I=n(852465),N=n(674748),T=n(527005);const A=(0,
n(260561).B)({kind:"user",id:"2022-04_registration_copy_updates",label:"Registration Copy Updates",defaultConfig:{enableNewCopy:!1,hasCopyAboveButton:!1,hasProminentCopy:!1},treatments:[{id:1,label:"Continue / Copy Above Button / High Prominence Copy",config:{enableNewCopy:!0,hasCopyAboveButton:!0,hasProminentCopy:!0}},{id:2,label:"Continue / Copy Below Button / High Prominence Copy",config:{enableNewCopy:!0,hasCopyAboveButton:!1,hasProminentCopy:!0}},{id:3,label:"Continue / Copy Above Button / Normal Prominence Copy",config:{enableNewCopy:!0,hasCopyAboveButton:!0,hasProminentCopy:!1}}]});var S=n(730381),C=n.n(S),x=n(744564),R=n(539381),j=n(520322),P=n(736818),L=n(652591),M=n(801809),Z=n(799663);function D(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function w(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function U(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function G(e){var t=e.invite,n=void 0===t?null:t,r=e.giftCodeSKUId,o=void 0===r?null:r,i=e.captchaKey,a=void 0===i?null:i;return k(w(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){D(e,t,n[t])}))}return e}({},U(e,["invite","giftCodeSKUId","captchaKey"])),{invite:n,giftCodeSKUId:o,captchaKey:a}))}function k(e){var t=e.email,n=e.phoneToken,r=e.username,o=e.consent,i=e.password,a=e.guildTemplateCode,s=e.birthday,u=e.invite,l=void 0===u?null:u,f=e.giftCodeSKUId,d=void 0===f?null:f,p=e.captchaKey,h=void 0===p?null:p,_=e.multiStep,E=void 0!==_&&_,m=e.promoEmailConsent,g=void 0===m?null:m;x.Z.dispatch({type:"REGISTER",birthday:E?s:null});if(null!=s){(0,Z.Z)(s,y.jXE.REGISTER);!function(e){var t=C()().diff(e,"years");if(!(t<13)){var n;n=t>=13&&t<=17?"13-17":t>=18&&t<=22?"18-22":"23+";L.default.track(y.rMx.USER_AGE_SUBMITTED,{age_bucket:n})}}(s)}return M.Z.post({url:y.ANM.REGISTER,body:{fingerprint:P.default.getFingerprint(),email:t,username:r,password:i,invite:l,consent:o,
phone_token:n,date_of_birth:null==s?void 0:s.format("YYYY-MM-DD"),gift_code_sku_id:d,guild_template_code:a,captcha_key:h,promotional_email_opt_in:null==g?void 0:g.checked},trackedActionData:{event:c.a9.USER_REGISTER,properties:{invite_code:l,promotional_email_opt_in:null==g?void 0:g.checked,promotional_email_pre_checked:null==g?void 0:g.preChecked}}}).then((function(e){x.Z.dispatch({type:"REGISTER_SUCCESS",token:e.body.token})}),(function(e){var t=new R.Z(e);x.Z.dispatch({type:"REGISTER_FAILURE",error:t});null!=t.getFieldErrors("date_of_birth")&&j.wE();throw e}))}var B=n(107364),F=n(347148),H=n.n(F),V=n(518280),K=n.n(V);function z(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Y(e){var t=e.value,n=e.onChange,o=e.subText,i=e.muted,s=e.marginTopStyle;return(0,r.jsx)(B.Z,{className:null!=s?s:K().marginTop20,align:B.Z.Align.CENTER,children:(0,r.jsx)(f.XZJ,{value:t,type:f.XZJ.Types.INVERTED,onChange:function(e,t){
return n(t)},className:H().checkbox,children:(0,r.jsx)(_.i_,{className:a()(z({},H().subText,!i)),children:o})})})}var W=n(14515);function q(){var e=(0,T.MD)(),t=e.required,n=e.checked;return t?(0,r.jsx)(Y,{value:n,subText:m.Z.Messages.PROMOTIONAL_EMAIL_OPT_IN_CONSENT,onChange:T.ZJ,marginTopStyle:K().marginTop8,muted:!0}):null}var X=n(607739),Q=n(310126);function J(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}function $(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){J(i,r,o,a,s,"next",e)}function s(e){J(i,r,o,a,s,"throw",e)}a(void 0)}))}}var ee=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){return function(i){
if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function te(e){return ne.apply(this,arguments)}function ne(){return(ne=$((function(e){return ee(this,(function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,Q.default.getSetting("USERNAME_PREFIX","")]
;case 1:return[2,t.sent()+e];case 2:t.sent();return[3,3];case 3:return[2,e]}}))}))).apply(this,arguments)}var re,oe,ie=n(94340),ae=n(281437),se=n(873553),ce=n(226613),ue=n(560837),le=n(686874),fe=n(31914),de=n(536038),pe=n(249697),he=n(930948),_e=n(250287),Ee=n(178232),ye=n(308739),me=n(247246);!function(e){e.VIEWED="viewed";e.SUBMITTED="submitted";e.RESEND_CODE="resend_code";e.INPUT_ERROR="input_error";e.RESPONSE_ERROR="response_error";e.SUCCESS="success"}(re||(re={}));!function(e){e.IDENTITY="identity";e.ACCOUNT_INFORMATION="account_information";e.FULL="full";e.AGE_GATE="age_gate";e.CAPTCHA="captcha";e.INVITE="invite";e.SMS_VERIFY="sms_verify"}(oe||(oe={}));var ge=n(199790),ve=n(239527),be=n(717764),Oe=n.n(be);function Ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ne(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}function Te(e,t){for(var n=0;n<t.length;n++){
var r=t[n];r.enumerable=r.enumerable||!1;r.configurable=!0;"value"in r&&(r.writable=!0);Object.defineProperty(e,r.key,r)}}function Ae(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Se(e){Se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Se(e)}function Ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ae(e,t,n[t])}))}return e}function xe(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Re(e,t){return!t||"object"!==Le(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function je(e,t){je=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return je(e,t)}function Pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1)
;"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ie(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Le=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Me(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Se(e);if(t){var o=Se(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Re(this,n)}}var Ze=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};u.ZP.initialize()
;var De=/\.$/,we=function(e){return Array.isArray(e)?e.map((function(e){return e.replace(De,"")})).join(". ").trim():e},Ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&je(e,t)}(n,e);var t=Me(n);function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r;(r=t.call(this,e)).dateOfBirthRef=o.createRef();r._retryTimer=new l.V7;r.handleCaptchaVerify=function(e){return r.setState({captchaKey:e},(function(){r.handleRegister()}))};r.handleGotoLogin=function(e){var t=r.state.email,n=r.props,o=n.giftCode,i=n.guildTemplate,a=n.invite,c=n.location,u=n.onLoginStart,l=n.redirectTo,f=n.transitionTo;if(n.isMobileWebInviteRegistration)null==u||u(e);else{var p,h=null!=c?(0,s.parse)(c.search):{}
;if(null!=a)p=y.Z5c.INVITE_LOGIN(a.code);else if(null!=o)p=y.Z5c.GIFT_CODE_LOGIN(o.code);else if(null!=i)p=y.Z5c.GUILD_TEMPLATE_LOGIN(i.code);else if(null!=l){p=y.Z5c.LOGIN;h.redirect_to=l}else{p=y.Z5c.LOGIN;""!==t&&(h={email:t})}d.Z.loginReset();f(p,{search:(0,s.stringify)(h)});null==u||u(e);he.S.dispatch(y.CkL.WAVE_EMPHASIZE)}};r.handleSubmit=function(e){null==e||e.preventDefault();var t=r.state.parsedDateOfBirth,n=r.props,o=n.invite;null!==n.consentRequired&&(null==o&&null==t||r.handleRegister())};r.handleBirthdayChange=function(e){r.setState({parsedDateOfBirth:e})};var i,a=null!=e.location?(0,s.parse)(e.location.search):{};r.state={email:null!==(i=a.email)&&void 0!==i?i:"",username:"",password:"",parsedDateOfBirth:null,captchaKey:null,consent:!e.consentRequired,consentRequiredProp:e.consentRequired,isRateLimited:!1};return r}var i=n.prototype;i.hasConsent=function(){var e=this.props.consentRequired,t=this.state.consent;return null!=e&&t};i.componentDidMount=function(){
this.redirectIfAuthenticated();A.trackExposure({});var e=this.props,t=e.giftCodeSKU,n=e.invite;L.default.track(y.rMx.REGISTER_VIEWED,Ce({location:null!=n?"Invite Register Page":"Non-Invite Register Page",registration_source:this.registrationSource},null!=t?(0,ie.Z)(t,!1,!1):{}),{flush:!0});null==this.props.consentRequired&&d.Z.getLocationMetadata();(0,le.e)("register")};i.componentWillUnmount=function(){this._retryTimer.stop()};i.componentDidUpdate=function(e,t){var n=this,r=this.props,o=r.apiErrors,i=r.authenticated,a=r.isUnderage,s=r.invite,c=r.onChangeStep,u=this.state.parsedDateOfBirth
;if(e.apiErrors!==o||t.parsedDateOfBirth!==u)if(this.hasError("email")||this.hasError("phone"))null!=this.emailRef&&this.emailRef.focus();else if(this.hasError("username"))null!=this.usernameRef&&this.usernameRef.focus();else if(this.hasError("password"))null!=this.passwordRef&&this.passwordRef.focus();else if(null==this.state.parsedDateOfBirth)null!=this.dateOfBirthRef.current&&this.dateOfBirthRef.current.focus();else if(this.hasError("retry_after")&&"number"==typeof this.props.apiErrors.retry_after){this.setState({isRateLimited:!0});this._retryTimer.start(1e3*this.props.apiErrors.retry_after,(function(){n.setState({isRateLimited:!1})}))}if(i&&!e.authenticated){(0,ce.c)(ve.M5.ORGANIC_REGISTERED);this.redirectIfAuthenticated()}var l=oe.FULL;a||this.hasError("date_of_birth")?l=oe.AGE_GATE:this.hasError("captcha_key")?l=oe.CAPTCHA:null==s||null==s.guild&&null==s.channel||(l=oe.INVITE);c(l)};i.redirectIfAuthenticated=function(){
var e=this.props,t=e.authenticated,n=e.transitionTo,r=e.redirectTo;t&&n(null!=r?r:de.Z.defaultRoute)};i.handleRegister=function(){var e,t=this;return(e=function(){var e,n,r,o,i,a,s,c,u,l,f,d,p,h,_,E,m,g;return Ze(this,(function(v){switch(v.label){case 0:e=t.state,n=e.email,r=e.username,o=e.password,i=e.captchaKey,a=e.consent,s=e.parsedDateOfBirth;c=t.props,u=c.invite,l=c.guildTemplate,f=c.giftCode,d=c.onRegister,p=c.isMobileWebInviteRegistration;h=null!=u?u.code:null;_=null!=f?f.skuId:null;E=T.MD.getState();return ge.a?[4,te(r)]:[3,2];case 1:g=v.sent();return[3,3];case 2:g=r;v.label=3;case 3:m=g;he.S.dispatch(y.CkL.WAVE_EMPHASIZE);v.label=4;case 4:v.trys.push([4,9,,10]);return p||null==u?[3,6]:[4,G({username:m,consent:a,invite:h,giftCodeSKUId:_,captchaKey:i})];case 5:v.sent();return[3,8];case 6:return[4,k({email:n,username:m,consent:a,password:o,invite:h,guildTemplateCode:null==l?void 0:l.code,giftCodeSKUId:_,captchaKey:i,birthday:s,promoEmailConsent:E.required?E:null})];case 7:
v.sent();v.label=8;case 8:null==d||d();return[3,10];case 9:v.sent();return[3,10];case 10:return[2]}}))},function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ne(i,r,o,a,s,"next",e)}function s(e){Ne(i,r,o,a,s,"throw",e)}a(void 0)}))})()};i.hasError=function(e){return null!=this.props.apiErrors[e]};i.renderConsentComponents=function(){var e=this,t=this.state.consent,n=this.props,o=n.consentRequired,i=n.registrationCopyExperimentConfig,a=i.enableNewCopy,s=i.hasProminentCopy,c=null,u=null;o?u=(0,r.jsx)(Y,{value:t,onChange:function(t){return e.setState({consent:t})},subText:m.Z.Messages.TERMS_PRIVACY_OPT_IN.format({termsURL:y.EYA.TERMS,privacyURL:y.EYA.PRIVACY})}):c=(0,r.jsx)(_.i_,{isProminent:!!s,className:K().marginTop20,children:a?m.Z.Messages.TERMS_PRIVACY_ON_REGISTER.format({buttonText:m.Z.Messages.CONTINUE,termsURL:y.EYA.TERMS,privacyURL:y.EYA.PRIVACY}):m.Z.Messages.TERMS_PRIVACY.format({termsURL:y.EYA.TERMS,privacyURL:y.EYA.PRIVACY})})
;return{subText:c,consentText:u}};i.renderInviteResolving=function(){var e=this,t=this.props.authBoxClassName;return(0,r.jsxs)(_.ZP,{className:t,children:[(0,r.jsx)(ye.R,{}),(0,r.jsxs)(_.gO,{className:K().marginTop40,children:[(0,r.jsx)(f.vwX,{children:m.Z.Messages.FORM_LABEL_USERNAME}),(0,r.jsx)(f.ua7,{text:m.Z.Messages.AUTH_USERNAME_TOOLTIP,position:"right",color:f.ua7.Colors.BRAND,children:function(t){var n=t.onMouseEnter,o=t.onMouseLeave;return(0,r.jsx)(_.II,{autoFocus:!0,className:K().marginBottom8,name:"username",value:e.state.username,placeholder:m.Z.Messages.FORM_PLACEHOLDER_USERNAME,onChange:function(t){return e.setState({username:t})},onMouseEnter:n,onMouseLeave:o})}}),(0,r.jsx)(_.zx,{className:K().marginTop20,disabled:!0,children:m.Z.Messages.CONTINUE}),ge.a?null:(0,r.jsx)(_.zx,{look:_.zx.Looks.LINK,color:_.zx.Colors.LINK,disabled:!0,className:K().marginTop8,children:m.Z.Messages.ALREADY_HAVE_ACCOUNT}),(0,r.jsx)(_.i_,{disabled:!0,className:K().marginTop20,
children:m.Z.Messages.TERMS_PRIVACY.format({termsURL:y.EYA.TERMS,privacyURL:y.EYA.PRIVACY})})]})]})};i.renderInviteHeader=function(){var e=this.props.invite;return null!=(null==e?void 0:e.stage_instance)&&null!=e.guild?(0,r.jsx)(X.Z,{stageInstance:e.stage_instance,guild:e.guild}):null!=(null==e?void 0:e.guild_scheduled_event)?(0,r.jsx)(W.r,{channel:e.channel,guildScheduledEvent:e.guild_scheduled_event}):(0,r.jsx)(ye.Z,{invite:e})};i.renderInviteButton=function(){var e=this,t=this.props,n=t.invite,o=t.registering,i=t.consentRequired,a=this.state.consent,s=_.zx.Colors.BRAND,c=m.Z.Messages.CONTINUE;if(null!=(null==n?void 0:n.stage_instance)){s=_.zx.Colors.GREEN;c=m.Z.Messages.INSTANT_INVITE_ACCEPT_STAGE}return(0,r.jsx)(f.ua7,{text:!a&&i?m.Z.Messages.TERMS_PRIVACY_OPT_IN_TOOLTIP:null,children:function(t){return(0,r.jsx)("div",xe(Ce({className:K().marginTop20},t),{children:(0,r.jsx)(_.zx,{type:"submit",submitting:o,disabled:!e.hasConsent(),color:s,children:c})}))}})}
;i.renderInvite=function(){var e=this,t=this.props,n=t.invite,o=t.authBoxClassName,i=t.apiErrors.username,a=this.renderConsentComponents(),s=a.subText,c=a.consentText,u=null!=(null==n?void 0:n.stage_instance)||null!=(null==n?void 0:n.guild_scheduled_event);return(0,r.jsxs)("div",{children:[(0,r.jsxs)(_.ZP,{onSubmit:this.handleSubmit,tag:"form",className:o,children:[this.renderInviteHeader(),u?(0,r.jsx)("div",{className:Oe().divider}):null,(0,r.jsxs)(_.gO,{className:u?void 0:K().marginTop40,children:[(0,r.jsx)(f.vwX,{error:we(i),children:m.Z.Messages.FORM_LABEL_USERNAME}),(0,r.jsx)(f.ua7,{text:m.Z.Messages.AUTH_USERNAME_TOOLTIP,position:"right",color:f.ua7.Colors.BRAND,children:function(t){var n=t.onMouseEnter,o=t.onMouseLeave;return(0,r.jsx)(_.II,{autoFocus:!0,className:K().marginBottom8,name:"username",value:e.state.username,placeholder:m.Z.Messages.FORM_PLACEHOLDER_USERNAME,onChange:function(t){return e.setState({username:t})},error:null!=i?"":null,onMouseEnter:n,onMouseLeave:o})}
}),c,this.renderInviteButton(),ge.a?null:(0,r.jsx)(_.zx,{look:_.zx.Looks.LINK,color:_.zx.Colors.LINK,onClick:this.handleGotoLogin,className:K().marginTop8,children:m.Z.Messages.ALREADY_HAVE_ACCOUNT}),s]})]}),null!=n&&u?(0,r.jsx)(_.ZP,{className:K().marginTop20,children:(0,r.jsx)(X.y,{guild:n.guild,onlineCount:n.approximate_presence_count})}):null]})};i.renderErrorMessage=function(){var e=this.props.apiErrors.message;return"string"!=typeof e?null:(0,r.jsx)(_.i_,{className:a()(K().marginTop20,Oe().errorMessage),children:e})};i.renderFull=function(e,t){
var n=this,i=this.state,s=i.email,c=i.username,u=i.password,l=i.consent,d=i.parsedDateOfBirth,p=this.props,h=p.registering,E=p.consentRequired,y=p.isMobileWebInviteRegistration,g=p.authBoxClassName,v=p.apiErrors,b=void 0===v?{}:v,O=b.email,N=b.username,T=b.password,A=b.date_of_birth,S=p.hasLoggedInAccounts,C=p.registrationCopyExperimentConfig.hasCopyAboveButton,x=this.renderConsentComponents(),R=x.subText,j=x.consentText,P=this.renderErrorMessage(),L=(0,r.jsx)(f.ua7,{text:!l&&E?m.Z.Messages.TERMS_PRIVACY_OPT_IN_TOOLTIP:null,children:function(e){return(0,r.jsx)("div",xe(Ce({className:K().marginTop20},e),{children:(0,r.jsx)(_.zx,{type:"submit",submitting:h,disabled:!n.hasConsent()||n.state.isRateLimited,children:m.Z.Messages.CONTINUE})}))}}),M=null!=e?(0,r.jsx)(o.Fragment,{children:e()},"custom-header"):(0,r.jsx)(_.Dx,{children:m.Z.Messages.REGISTER_TITLE},"title"),Z=(0,r.jsxs)(_.gO,{className:K().marginTop20,children:[(0,r.jsx)(_.II,{autoFocus:!0,className:K().marginBottom20,
label:m.Z.Messages.FORM_LABEL_EMAIL,name:"email",value:s,onChange:function(e){return n.setState({email:e})},error:we(O),type:"email",setRef:function(e){n.emailRef=e}}),(0,r.jsx)(_.II,{label:m.Z.Messages.FORM_LABEL_USERNAME,className:K().marginBottom20,name:"username",value:c,onChange:function(e){return n.setState({username:e})},error:we(N),setRef:function(e){n.usernameRef=e}}),(0,r.jsx)(_.II,{label:m.Z.Messages.FORM_LABEL_PASSWORD,name:"password",value:u,onChange:function(e){return n.setState({password:e})},error:we(T),type:"password",setRef:function(e){n.passwordRef=e}}),(0,r.jsx)(I.Z,{label:m.Z.Messages.AGE_GATE_YOUR_BIRTHDAY,wrapperClassName:K().marginTop20,name:"date_of_birth",onChange:this.handleBirthdayChange,ref:this.dateOfBirthRef,error:we(A),value:d}),j,C&&R,(0,r.jsx)(q,{}),L,P,ge.a?null:(0,r.jsx)(_.zx,{look:y?_.zx.Looks.FILLED:_.zx.Looks.LINK,color:y?_.zx.Colors.PRIMARY:_.zx.Colors.LINK,onClick:this.handleGotoLogin,className:K().marginTop8,
children:m.Z.Messages.ALREADY_HAVE_ACCOUNT}),!C&&R]});return t?(0,r.jsx)(me.Z,{onSubmit:this.handleSubmit,tag:"form",className:a()(g,Oe().horizontalAuthBox),children:function(){return[M,(0,r.jsxs)("div",{className:Oe().flex,children:[(0,r.jsx)(_.Dx,{className:Oe().createAccountTemplateHeader,children:m.Z.Messages.REGISTER_TITLE}),Z]},"register-title")]}}):(0,r.jsxs)(_.ZP,{onSubmit:this.handleSubmit,tag:"form",className:g,children:[S&&!y?(0,r.jsx)(_.zx,{onClick:this.handleGotoLogin,look:_.zx.Looks.LINK,color:_.zx.Colors.PRIMARY,className:Oe().goBackButton,children:(0,r.jsxs)("div",{className:Oe().content,children:[(0,r.jsx)(pe.Z,{width:16,height:16,className:Oe().caret}),(0,r.jsx)(f.xvT,{variant:"text-md/normal",children:m.Z.Messages.AGE_GATE_GO_BACK})]})}):null,M,Z]})};i.render=function(){var e=this.props,t=e.authBoxClassName,n=e.isUnderage,o=e.apiErrors,i=o.captcha_service,a=o.captcha_sitekey,s=e.isMobileWebInviteRegistration;if(n||this.hasError("date_of_birth"))return(0,r.jsx)(O,{})
;if(this.hasError("captcha_key")&&"string"==typeof i)return(0,r.jsx)(_e.Z,{authBoxClassName:t,onVerify:this.handleCaptchaVerify,title:m.Z.Messages.REGISTER_TITLE,captchaService:i,sitekey:a});var c=this.props,u=c.invite,l=c.giftCode,f=c.guildTemplate,d=null!=u&&null==u.guild&&null==u.channel&&null!=u.inviter;return null==u||d||s?null!=f?this.renderFull((function(){return(0,r.jsx)(ae.Z,{guildTemplate:f})}),!0):null!=l?this.renderFull((function(){return(0,r.jsx)(Ee.Z,{giftCode:l})})):null!=u&&d&&u.state===y.r2o.RESOLVED&&!s?this.renderFull((function(){return(0,r.jsx)(ye.Z,{invite:u,isRegister:!0})})):this.renderFull():u.state===y.r2o.RESOLVING?this.renderInviteResolving():this.renderInvite()};n.getDerivedStateFromProps=function(e,t){var n=e.consentRequired;return null==t.consentRequiredProp&&null!=n?{consent:!n,consentRequiredProp:n}:{consentRequiredProp:n}};!function(e,t,n){t&&Te(e.prototype,t);n&&Te(e,n)}(n,[{key:"registrationSource",get:function(){
var e=this.props,t=e.giftCode,n=e.guildTemplate,r=e.invite;if(null!=t)return"gift";if(null!=n)return"guild_template";if(null!=r){if(null!=r.guild)return"guild_invite";if(null!=r.channel)return"dm_invite";if(null!=r.inviter)return"friend_invite"}return null}}]);return n}(o.PureComponent);Ue.defaultProps={giftCodeResolved:!1,transitionTo:function(e){return n.g.location.assign(e)}};function Ge(e){var t=(0,u.cj)([fe.Z,P.default,p.Z,ue.Z,se.Z],(function(){return{consentRequired:fe.Z.getAuthenticationConsentRequired(),registering:P.default.getRegisterStatus()===y.$ib.REGISTERING,apiErrors:P.default.getErrors(),authenticated:P.default.isAuthenticated(),isUnderage:p.Z.isUnderageAnonymous(),country:ue.Z.getCountryCode(),hasLoggedInAccounts:se.Z.getHasLoggedInAccounts()}})),n=Pe(o.useState(oe.FULL),2),i=n[0],a=n[1];(0,N.Z)({type:c.nv.VIEW,name:c.zs.USER_REGISTRATION,properties:{impression_group:c.AG.USER_REGISTRATION_FLOW,step:i}},{},[i]);return(0,r.jsx)(Ue,Ce({onChangeStep:function(e){
return a(e)},registrationCopyExperimentConfig:A.getCurrentConfig({})},e,t))}},530847:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(707961)),i=n(694755),a=n(473708),s=n(203181),c=n.n(s);function u(e){var t=e.icon,n=e.onChange;return(0,r.jsx)(o.tEY,{within:!0,children:(0,r.jsxs)("div",{className:c().iconContainer,children:[null!=t?(0,r.jsx)("img",{alt:"Your icon",className:c().filledIcon,src:t}):(0,r.jsxs)("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",
d:"M54.8694 2.85498C53.8065 2.4291 52.721 2.04752 51.6153 1.71253L51.3254 2.66957L51.0354 3.62661C51.9783 3.91227 52.9057 4.23362 53.8161 4.58911C54.1311 3.98753 54.4832 3.40847 54.8694 2.85498ZM75.4109 26.1839C76.0125 25.8689 76.5915 25.5168 77.145 25.1306C77.5709 26.1935 77.9525 27.279 78.2875 28.3847L77.3304 28.6746L76.3734 28.9646C76.0877 28.0217 75.7664 27.0943 75.4109 26.1839ZM78.8148 43.8253L79.8102 43.9222C79.9357 42.6318 80 41.3234 80 40C80 38.6766 79.9357 37.3682 79.8102 36.0778L78.8148 36.1747L77.8195 36.2715C77.9389 37.4977 78 38.7414 78 40C78 41.2586 77.9389 42.5023 77.8195 43.7285L78.8148 43.8253ZM43.8253 1.18515L43.9222 0.189853C42.6318 0.0642679 41.3234 0 40 0C38.6766 0 37.3682 0.064268 36.0778 0.189853L36.1747 1.18515L36.2715 2.18045C37.4977 2.06112 38.7414 2 40 2C41.2586 2 42.5023 2.06112 43.7285 2.18045L43.8253 1.18515ZM28.6746 2.66957L28.3847 1.71253C25.8549 2.47897 23.4312 3.48925 21.1408 4.71604L21.6129 5.59756L22.0851 6.47907C24.2606 5.3138 26.5624 4.35439 28.9646 3.62661L28.6746 2.66957ZM15.2587 9.85105L14.6239 9.0784C12.5996 10.7416 10.7416 12.5996 9.0784 14.6239L9.85105 15.2587L10.6237 15.8935C12.2042 13.9699 13.9699 12.2042 15.8935 10.6237L15.2587 9.85105ZM5.59756 21.6129L4.71604 21.1408C3.48925 23.4312 2.47897 25.8549 1.71253 28.3847L2.66957 28.6746L3.62661 28.9646C4.35439 26.5624 5.3138 24.2607 6.47907 22.0851L5.59756 21.6129ZM0 40C0 38.6766 0.0642679 37.3682 0.189853 36.0778L1.18515 36.1747L2.18045 36.2715C2.06112 37.4977 2 38.7414 2 40C2 41.2586 2.06112 42.5023 2.18045 43.7285L1.18515 43.8253L0.189853 43.9222C0.064268 42.6318 0 41.3234 0 40ZM2.66957 51.3254L1.71253 51.6153C2.47897 54.1451 3.48926 56.5688 4.71604 58.8592L5.59756 58.3871L6.47907 57.9149C5.3138 55.7394 4.35439 53.4376 3.62661 51.0354L2.66957 51.3254ZM9.85105 64.7413L9.0784 65.3761C10.7416 67.4004 12.5996 69.2584 14.6239 70.9216L15.2587 70.1489L15.8935 69.3763C13.9699 67.7958 12.2042 66.0301 10.6237 64.1065L9.85105 64.7413ZM21.6129 74.4024L21.1408 75.284C23.4312 76.5107 25.8549 77.521 28.3847 78.2875L28.6746 77.3304L28.9646 76.3734C26.5624 75.6456 24.2607 74.6862 22.0851 73.5209L21.6129 74.4024ZM36.1747 78.8148L36.0778 79.8102C37.3682 79.9357 38.6766 80 40 80C41.3234 80 42.6318 79.9357 43.9222 79.8102L43.8253 78.8148L43.7285 77.8195C42.5023 77.9389 41.2586 78 40 78C38.7414 78 37.4977 77.9389 36.2715 77.8195L36.1747 78.8148ZM51.3254 77.3304L51.6153 78.2875C54.1451 77.521 56.5688 76.5107 58.8592 75.284L58.3871 74.4024L57.9149 73.5209C55.7394 74.6862 53.4376 75.6456 51.0354 76.3734L51.3254 77.3304ZM64.7413 70.1489L65.3761 70.9216C67.4004 69.2584 69.2584 67.4004 70.9216 65.3761L70.1489 64.7413L69.3763 64.1065C67.7958 66.0301 66.0301 67.7958 64.1065 69.3763L64.7413 70.1489ZM74.4024 58.3871L75.284 58.8592C76.5107 56.5688 77.521 54.1451 78.2875 51.6153L77.3304 51.3254L76.3734 51.0354C75.6456 53.4375 74.6862 55.7393 73.5209 57.9149L74.4024 58.3871Z",
fill:"currentColor"}),(0,r.jsx)("circle",{cx:"68",cy:"12",r:"12",fill:"#5865f2"}),(0,r.jsx)("path",{d:"M73.3332 11.4075H68.5924V6.66675H67.4072V11.4075H62.6665V12.5927H67.4072V17.3334H68.5924V12.5927H73.3332V11.4075Z",fill:"white"}),(0,r.jsx)("path",{d:"M40 29C37.794 29 36 30.794 36 33C36 35.207 37.794 37 40 37C42.206 37 44 35.207 44 33C44 30.795 42.206 29 40 29Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M48 26.001H46.07C45.402 26.001 44.777 25.667 44.406 25.111L43.594 23.891C43.223 23.335 42.598 23 41.93 23H38.07C37.402 23 36.777 23.335 36.406 23.89L35.594 25.11C35.223 25.667 34.598 26 33.93 26H32C30.895 26 30 26.896 30 28V39C30 40.104 30.895 41 32 41H48C49.104 41 50 40.104 50 39V28C50 26.897 49.104 26.001 48 26.001ZM40 39C36.691 39 34 36.309 34 33C34 29.692 36.691 27 40 27C43.309 27 46 29.692 46 33C46 36.31 43.309 39 40 39Z",fill:"currentColor"}),(0,r.jsx)("path",{
d:"M24.6097 52.712V47.72H22.5457V52.736C22.5457 53.792 22.0777 54.404 21.1417 54.404C20.2177 54.404 19.7377 53.78 19.7377 52.712V47.72H17.6737V52.724C17.6737 55.04 19.0897 56.132 21.1177 56.132C23.1217 56.132 24.6097 55.016 24.6097 52.712ZM26.0314 56H28.0834V53.252H28.6114C30.6154 53.252 31.9474 52.292 31.9474 50.42C31.9474 48.62 30.7114 47.72 28.6954 47.72H26.0314V56ZM29.9554 50.456C29.9554 51.308 29.4514 51.704 28.5394 51.704H28.0594V49.268H28.5754C29.4874 49.268 29.9554 49.664 29.9554 50.456ZM37.8292 56L37.5532 54.224H35.0092V47.72H32.9572V56H37.8292ZM45.9558 51.848C45.9558 49.292 44.4078 47.564 42.0078 47.564C39.6078 47.564 38.0478 49.304 38.0478 51.872C38.0478 54.428 39.6078 56.156 41.9838 56.156C44.3958 56.156 45.9558 54.404 45.9558 51.848ZM43.8918 51.86C43.8918 53.504 43.1958 54.548 41.9958 54.548C40.8078 54.548 40.0998 53.504 40.0998 51.86C40.0998 50.216 40.8078 49.172 41.9958 49.172C43.1958 49.172 43.8918 50.216 43.8918 51.86ZM52.2916 56.084L54.3676 55.748L51.4876 47.684H49.2316L46.2556 56H48.2716L48.8236 54.284H51.6916L52.2916 56.084ZM50.2516 49.796L51.1756 52.676H49.3156L50.2516 49.796ZM62.5174 51.848C62.5174 49.388 61.0174 47.72 58.1374 47.72H55.2814V56H58.1854C60.9814 56 62.5174 54.308 62.5174 51.848ZM60.4534 51.86C60.4534 53.636 59.5414 54.404 58.0774 54.404H57.3334V49.316H58.0774C59.4814 49.316 60.4534 50.12 60.4534 51.86Z",
fill:"currentColor"})]}),(0,r.jsx)(i.ZP,{onChange:n,multiple:!1,tabIndex:0,"aria-label":a.Z.Messages.GUILD_CREATE_UPLOAD_ICON_BUTTON_TEXT})]})})}},520322:(e,t,n)=>{"use strict";n.d(t,{Av:()=>s,wE:()=>c,hp:()=>u});var r=n(281110),o=n(744564),i=n(799663),a=n(2590);function s(e,t){(0,i.Z)(e,t);return r.Z.patch({url:a.ANM.ME,body:{date_of_birth:e.format("YYYY-MM-DD")},oldFormErrors:!0}).then((function(e){var t=e.body;o.Z.dispatch({type:"CURRENT_USER_UPDATE",user:t})}))}function c(){o.Z.dispatch({type:"AGE_GATE_PREVENT_UNDERAGE_REGISTRATION"})}function u(){o.Z.dispatch({type:"AGE_GATE_LOGOUT_UNDERAGE_NEW_USER"})}},553484:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(676489),o=n(202351),i=n(744564),a=n(120415),s=n(561210);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e){u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return u(e)}function l(e,t){
return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e,t){f=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return f(e,t)}var d=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var h=!1,_=null,E="underage";var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{
constructor:{value:e,writable:!0,configurable:!0}});t&&f(e,t)}(n,e);var t=p(n);function n(){c(this,n);return t.apply(this,arguments)}var o=n.prototype;o.isUnderageAnonymous=function(){if(!a.FB){return null!=r.parse(document.cookie).underage}return null!=_&&_+s.k0>Date.now()};o.__getLocalVars=function(){return{isUnderageAnonymous:h,failedRegisterAtTimestamp:_,UNDERAGE_SESSION_COOKIE:E}};return n}(o.ZP.Store);y.displayName="AgeGateStore";const m=new y(i.Z,{AGE_GATE_PREVENT_UNDERAGE_REGISTRATION:function(){h=!0;_=Date.now();document.cookie="".concat(E,"=1;path=/")},LOGIN_SUCCESS:function(){h=!1;_=null;document.cookie="".concat(E,"=1;path=/;max-age=0")}})},852465:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),s=n(730381),c=n.n(s),u=n(707961),l=n(737797),f=n(473708),d=n(645522),p=n.n(d);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _(e,t){return function(e){
if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var E=c()().localeData().months(),y=Array.from(Array(31).keys()).map((function(e){return{value:e+1,label:"".concat(e+1)}
})),m=Array.from(Array(12).keys()).map((function(e){return{value:e+1,label:E[e]}}));var g=/[a-zA-Z0-9]/;function v(e){var t=e.options,n=e.selectOption,i=e.children,a=_(o.useState(""),2),s=a[0],c=a[1];o.useEffect((function(){if(""!==s){var e=setTimeout((function(){return c("")}),1e3);return function(){return clearTimeout(e)}}}),[s,c]);var u=o.useCallback((function(e){if(g.test(e.key)){var r="".concat(s).concat(e.key.toLowerCase()),o=t.find((function(e){return e.label.toLowerCase().startsWith(r)}));null!=o&&n(o.value);c(r)}}),[n,c,s,t]);return(0,r.jsx)("div",{onKeyDown:u,children:i})}function b(){var e=c()().localeData().longDateFormat("L"),t=e.indexOf("D"),n=e.indexOf("M"),r=e.indexOf("Y");if(-1===t||-1===n||-1===r){t=0;n=1;r=2}return[{index:t,type:"day"},{index:n,type:"month"},{index:r,type:"year"}].sort((function(e,t){return e.index<t.index?-1:1}))}const O=o.forwardRef((function(e,t){var n=function(e){switch(U[e].type){case"day":k.push({key:"day",input:(0,r.jsx)(v,{options:y,
selectOption:N,children:(0,r.jsx)(l.Z,{ref:Z,className:p().inputDay,"aria-label":f.Z.Messages.AGE_GATE_DOB_DAY,menuPlacement:l.Z.MenuPlacements.TOP,placeholder:(0,r.jsx)("span",{"aria-hidden":!0,children:f.Z.Messages.AGE_GATE_DOB_DAY}),options:y,value:I,onChange:function(t){var n=t.value;N(n);M(e+1)},maxMenuHeight:215})})});break;case"month":k.push({key:"month",input:(0,r.jsx)(v,{options:m,selectOption:A,children:(0,r.jsx)(l.Z,{ref:D,className:p().inputMonth,"aria-label":f.Z.Messages.AGE_GATE_DOB_MONTH,menuPlacement:l.Z.MenuPlacements.TOP,placeholder:(0,r.jsx)("span",{"aria-hidden":!0,children:f.Z.Messages.AGE_GATE_DOB_MONTH}),options:m,value:T,onChange:function(t){var n=t.value;A(n);M(e+1)},maxMenuHeight:215})})});break;case"year":k.push({key:"year",input:(0,r.jsx)(v,{options:j,selectOption:C,children:(0,r.jsx)(l.Z,{ref:w,className:p().inputYear,"aria-label":f.Z.Messages.AGE_GATE_DOB_YEAR,menuPlacement:l.Z.MenuPlacements.TOP,placeholder:(0,r.jsx)("span",{"aria-hidden":!0,
children:f.Z.Messages.AGE_GATE_DOB_YEAR}),options:j,value:S,onChange:function(t){var n=t.value;C(n);M(e+1)},maxMenuHeight:215})})})}},i=e.value,s=e.wrapperClassName,d=e.onChange,h=e.onPopulated,E=e.error,g=e.autoFocus,O=function(e){var t=null,n=null,r=null;if(null!=e){t=e.date();n=e.month()+1;r=e.year()}var i=_(o.useState(t),2),a=i[0],s=i[1],c=_(o.useState(n),2),u=c[0],l=c[1],f=_(o.useState(r),2);return{day:a,setDay:s,month:u,setMonth:l,year:f[0],setYear:f[1]}}(i),I=O.day,N=O.setDay,T=O.month,A=O.setMonth,S=O.year,C=O.setYear,x=o.useMemo((function(){return null!=I&&null!=T&&null!=S?c()("".concat(I,"/").concat(T,"/").concat(S),"DD/MM/YYYY"):null}),[I,T,S]);o.useEffect((function(){d((null==x?void 0:x.isValid())?x:null)}),[x,d]);var R=E;null==x||x.isValid()||(R=f.Z.Messages.AGE_GATE_INVALID_BIRTHDAY);var j=function(){var e=(new Date).getFullYear(),t=o.useRef(Array.from(Array(150).keys()).map((function(t){return{value:e-t-3,label:"".concat(e-t-3)}})));o.useEffect((function(){
t.current=Array.from(Array(150).keys()).map((function(t){return{value:e-t-3,label:"".concat(e-t-3)}}))}),[e]);return t.current}(),P=_(o.useState(g?0:-1),2),L=P[0],M=P[1],Z=o.useRef(null),D=o.useRef(null),w=o.useRef(null),U=o.useMemo(b,[]),G=o.useCallback((function(){var e;switch(null===(e=U[L])||void 0===e?void 0:e.type){case"day":var t;null===(t=Z.current)||void 0===t||t.focus();break;case"month":var n;null===(n=D.current)||void 0===n||n.focus();break;case"year":var r;null===(r=w.current)||void 0===r||r.focus()}}),[L,Z,D,w,U]);o.useEffect((function(){setTimeout(G,500)}),[]);o.useEffect((function(){L>=U.length?null==h||h():G()}),[L,G]);for(var k=[],B=0;B<3;B++)n(B);return(0,r.jsxs)("fieldset",{className:a()(p().container,s),children:[(0,r.jsx)(u.vwX,{tag:"legend",children:f.Z.Messages.AGE_GATE_DATE_OF_BIRTH}),(0,r.jsx)("div",{className:p().inputs,children:k.map((function(e,t){var n=e.key,o=e.input;return(0,r.jsx)("div",{tabIndex:t+1,className:p()[n],children:o},n)}))}),(0,
r.jsx)(u.xvT,{className:p().errors,variant:"text-sm/normal",children:R})]})}))},110108:(e,t,n)=>{"use strict";n.d(t,{F:()=>r,L:()=>s});var r,o=n(327930),i=n(2590),a=n(897196);!function(e){e.ROLE_SUBSCRIPTION="role_subscription";e.ROLE_SUBSCRIPTION_SETTING="role_subscription_setting"}(r||(r={}));function s(e){var t=decodeURIComponent(e),n=(0,o.Qj)(t);return null!=n&&n.channelId===a.oC.ROLE_SUBSCRIPTIONS?r.ROLE_SUBSCRIPTION:t===i.Z5c.SETTINGS(i.oAB.SUBSCRIPTIONS,"role-subscriptions")?r.ROLE_SUBSCRIPTION_SETTING:void 0}},926543:(e,t,n)=>{"use strict";n.d(t,{M:()=>c,Z:()=>u});var r=n(785893),o=(n(667294),n(751615)),i=n(80783),a=n(2590),s=n(199790);function c(){var e=location.pathname+location.search;return s.a?a.Z5c.REGISTER:(0,i.U)(e,!1)}const u=function(){return(0,r.jsx)(o.l_,{to:c()})}},799663:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(730381),o=n.n(r),i=n(652591),a=n(2590);function s(e,t){i.default.track(a.rMx.AGE_GATE_SUBMITTED,{
dob:o()().diff(e,"years")<18?e.format("YYYY-MM-DD"):null,dob_day:e.date(),dob_month:e.month()+1,dob_year:e.year(),source:{section:t}})}},14515:(e,t,n)=>{"use strict";n.d(t,{r:()=>f});var r=n(785893),o=(n(667294),n(707961)),i=n(239813),a=n(269300),s=n(220109),c=n(33397),u=n.n(c);function l(e){var t=e.channel,n=(0,i.Th)(t.type);return(0,r.jsxs)("div",{className:u().channelInfoContainer,children:[null!=n?(0,r.jsx)(n,{width:20,height:20}):null,(0,r.jsx)(o.xvT,{className:u().channelInfoText,color:"none",variant:"text-sm/semibold",children:t.name})]})}function f(e){var t=e.channel,n=e.guildScheduledEvent;return(0,r.jsxs)("div",{className:u().container,children:[(0,r.jsx)(s.HZ,{className:u().statusContainer,userCount:n.user_count,startTime:n.scheduled_start_time,isActive:(0,a.xt)(n),isEnded:(0,a.Z2)(n),guildId:n.guild_id,eventType:n.entity_type}),(0,r.jsx)(s.Rf,{name:n.name,description:n.description,guildId:n.guild_id}),null!=t&&n.channel_id===t.id?(0,r.jsx)(l,{channel:t}):null]})}},
621634:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(785893),o=n(667294),i=n(707961),a=n(599467),s=n(605013),c=n(81472),u=n(3155),l=n(436393),f=n.n(l);function d(e){var t=e.guildScheduledEvent,n=e.channel,l=e.onClose,d=t.entity_type===u.WX.EXTERNAL,p=o.useCallback((function(e){return(0,s.Qt)(t,l)(e)}),[t,l]),h=(0,c.u)(t,n);if(null==h)return null;var _=h.IconComponent,E=h.locationName,y=(0,r.jsxs)(r.Fragment,{children:[null!=_&&(0,r.jsx)(_,{width:20,height:20,className:f().channelIcon}),(0,r.jsx)(i.xvT,{color:"header-secondary",variant:"text-sm/normal",className:f().locationText,children:(0,a.m)(E,!0)})]});return(0,r.jsx)("div",{className:f().row,children:null!=p?(0,r.jsx)(i.P3F,{className:d?f().externalLocation:f().channelLocation,onClick:p,children:y}):y})}},267342:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(335150),o=n(473708);function i(e){switch(e){case r.HQ.CLASSROOM:return{header:o.Z.Messages.GUILD_TEMPLATE_MODAL_TITLE_CLASSROOM,
description:o.Z.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_CLASSROOM,nameLabel:o.Z.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_CLASSROOM,terms:o.Z.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.Z.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_CLASSROOM,author:o.Z.Messages.DISCORD_NAME};case r.HQ.LOCAL_COMMUNITIES:return{header:o.Z.Messages.GUILD_TEMPLATE_MODAL_TITLE_LOCAL_COMMUNITIES,description:o.Z.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_LOCAL_COMMUNITIES,nameLabel:o.Z.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_LOCAL_COMMUNITIES,terms:o.Z.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.Z.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_LOCAL_COMMUNITIES,author:o.Z.Messages.DISCORD_NAME};case r.HQ.CREATORS_HOBBIES:return{header:o.Z.Messages.GUILD_TEMPLATE_MODAL_TITLE_CREATORS_HOBBIES,description:o.Z.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_CREATORS_HOBBIES,nameLabel:o.Z.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_CREATORS_HOBBIES,terms:o.Z.Messages.CREATE_SERVER_GUIDELINES,
defaultName:o.Z.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_CREATORS_HOBBIES,author:o.Z.Messages.DISCORD_NAME};case r.HQ.GLOBAL_COMMUNITIES:return{header:o.Z.Messages.GUILD_TEMPLATE_MODAL_TITLE_GLOBAL_COMMUNITIES,description:o.Z.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_GLOBAL_COMMUNITIES,nameLabel:o.Z.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_GLOBAL_COMMUNITIES,terms:o.Z.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.Z.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_GLOBAL_COMMUNITIES,author:o.Z.Messages.DISCORD_NAME};case r.HQ.FRIENDS_FAMILY:return{header:o.Z.Messages.GUILD_TEMPLATE_MODAL_TITLE_FRIENDS_FAMILY,description:o.Z.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_FRIENDS_FAMILY,nameLabel:o.Z.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_FRIENDS_FAMILY,terms:o.Z.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.Z.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_FRIENDS_FAMILY,author:o.Z.Messages.DISCORD_NAME};case r.HQ.STUDY_GROUPS:return{
header:o.Z.Messages.GUILD_TEMPLATE_MODAL_TITLE_STUDY_GROUPS,description:o.Z.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_STUDY_GROUPS,nameLabel:o.Z.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_STUDY_GROUPS,terms:o.Z.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.Z.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_STUDY_GROUPS,author:o.Z.Messages.DISCORD_NAME};case r.HQ.CREATE_FROM_SCRATCH:return{header:o.Z.Messages.GUILD_TEMPLATE_MODAL_TITLE_CREATE_FROM_SCRATCH,description:o.Z.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_CREATE_FROM_SCRATCH,nameLabel:o.Z.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_CREATE_FROM_SCRATCH,terms:o.Z.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.Z.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_CREATE_FROM_SCRATCH,author:o.Z.Messages.DISCORD_NAME};case r.HQ.CAMPUS_CLUBS:return{header:o.Z.Messages.GUILD_TEMPLATE_MODAL_TITLE_CAMPUS_CLUBS,description:o.Z.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_CAMPUS_CLUBS,nameLabel:o.Z.Messages.FORM_LABEL_SERVER_NAME,
terms:o.Z.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.Z.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_CAMPUS_CLUBS,author:o.Z.Messages.DISCORD_NAME};case r.HQ.LEAGUE_CLUBS:return{header:o.Z.Messages.GUILD_TEMPLATE_MODAL_TITLE_LEAGUE_CLUBS,description:o.Z.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_LEAGUE_CLUBS,nameLabel:o.Z.Messages.FORM_LABEL_SERVER_NAME,terms:o.Z.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.Z.Messages.CREATE_SERVER_DEFAULT_SERVER_NAME_FORMAT,author:o.Z.Messages.DISCORD_NAME};case r.HQ.GITHUB_HACKATHON:return{header:o.Z.Messages.GUILD_TEMPLATE_MODAL_TITLE_GITHUB_HACKATHON,description:o.Z.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_GITHUB_HACKATHON,nameLabel:o.Z.Messages.FORM_LABEL_SERVER_NAME,terms:o.Z.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.Z.Messages.CREATE_SERVER_DEFAULT_SERVER_NAME_FORMAT,author:"GitHub Education"};default:return{header:o.Z.Messages.GUILD_TEMPLATE_CREATE_DISCORD,nameLabel:o.Z.Messages.FORM_LABEL_SERVER_NAME,
terms:o.Z.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.Z.Messages.CREATE_SERVER_DEFAULT_SERVER_NAME_FORMAT}}}},985518:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),s=n(496486),c=n.n(s),u=n(547308),l=n(336194),f=n(707961),d=n(84441),p=n(285991),h=n(530847),_=n(473903),E=n(718831),y=n(436622),m=n(796938),g=n(281110),v=n(744564),b=n(934870),O=n(532548),I=n(567403),N=n(2590);const T=function(e,t,n){v.Z.dispatch({type:"GUILD_TEMPLATE_ACCEPT",code:e});return new Promise((function(r,o){g.Z.post({url:N.ANM.UNRESOLVED_GUILD_TEMPLATE(e),body:{name:t,icon:n},oldFormErrors:!0}).then((function(t){var n=t.body;v.Z.dispatch({type:"GUILD_TEMPLATE_ACCEPT_SUCCESS",code:e,guild:n});if(O.Z.isConnected())I.Z.addConditionalChangeListener((function(){if(null!=I.Z.getGuild(n.id)){(0,b.X)(n.id);r(n);return!1}}));else{(0,b.X)(n.id);r(n)}}),(function(t){v.Z.dispatch({type:"GUILD_TEMPLATE_ACCEPT_FAILURE",code:e});o(t.body)}))}))}
;var A=n(267342),S=n(652591),C=n(335150);function x(e){var t=o.useRef([]);o.useEffect((function(){if(null!=e&&e.state!==C.Rj.RESOLVING&&!t.current.includes(e.code)){t.current.push(e.code);S.default.track(N.rMx.CREATE_GUILD_VIEWED,{guild_template_code:e.code,guild_template_name:e.name,guild_template_description:e.description,guild_template_guild_id:e.sourceGuildId})}}))}var R=n(256273),j=n(473708),P=n(456124),L=n.n(P);n(424286);function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Z(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}function D(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Z(i,r,o,a,s,"next",e)}function s(e){Z(i,r,o,a,s,"throw",e)}a(void 0)}))}}function w(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function U(e,t){
return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){s=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var G=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function k(e){
var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=U(o.useState(""),2),i=n[0],a=n[1],s=U(o.useState(null),2),c=s[0],u=s[1],l=U(o.useState(null),2),E=l[0],y=l[1],m=(0,A.Z)(e.code);o.useEffect((function(){function e(){return(e=D((function(){var e;return G(this,(function(t){switch(t.label){case 0:if(null!=(e=_.default.getCurrentUser()))return[3,4];t.label=1;case 1:t.trys.push([1,3,,4]);return[4,(0,p.k)()];case 2:e=t.sent();return[3,4];case 3:t.sent();d.Z.verifySSOToken(null);return[3,4];case 4:null!=e&&a(m.defaultName.format({username:e.username}));return[2]}}))}))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[m.defaultName]);var g=function(){return T(e.code,i,c).catch((function(e){return y(e)}))};x(e);var v=(0,r.jsxs)(r.Fragment,{children:[t?(0,r.jsx)(R.Z,{guildTemplate:e}):null,(0,r.jsx)("div",{className:L().icon,children:(0,r.jsx)(h.Z,{icon:c,onChange:u})}),(0,r.jsx)(f.xJW,{title:m.nameLabel,children:(0,r.jsx)(f.oil,{type:"text",value:i,maxLength:100,
onChange:a,error:null==E?void 0:E.name})}),(0,r.jsx)(f.xvT,{variant:"text-xs/normal",color:"text-muted",className:L().guidelines,children:m.terms.format({guidelinesURL:N.EYA.GUIDELINES})})]}),b=e.serializedSourceGuild.roles.filter((function(e){return"@everyone"!==e.name})),O=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:L().divider}),(0,r.jsxs)(f.xJW,{className:L().previewSection,title:j.Z.Messages.GUILD_TEMPLATE_MODAL_CHANNELS_HEADER,children:[(0,r.jsx)(B,{channels:e.serializedSourceGuild.channels}),(0,r.jsxs)(f.xvT,{variant:"text-xs/normal",color:"header-secondary",className:L().protip,children:[(0,r.jsxs)("span",{className:L().protipText,children:[j.Z.Messages.FORM_LABEL_ROLES_PRO_TIP,":"]})," ",j.Z.Messages.GUILD_TEMPLATE_MODAL_CHANNELS_TIP]})]}),b.length>0?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(f.xJW,{className:L().previewSection,title:j.Z.Messages.GUILD_TEMPLATE_MODAL_ROLES_HEADER2,children:(0,r.jsx)(F,{roles:b})})}):null]});return{form:v,preview:O,handleSubmit:g}
}function B(e){var t=e.channels,n=c()(t).sortBy((function(e){return null==e.parent_id?1e4*Number(e.id):1e4*Number(e.parent_id)+e.id})).map((function(e){var t=function(e){var t=e.type;return t===N.d4z.GUILD_VOICE?m.Z:t===N.d4z.GUILD_CATEGORY?E.Z:y.Z}(e);return(0,r.jsxs)("div",{className:a()(L().channel,w({},L().category,e.type===N.d4z.GUILD_CATEGORY)),children:[(0,r.jsx)(t,{className:L().channelIcon}),(0,r.jsx)(f.xvT,{className:L().channelText,variant:"text-sm/normal",children:e.name})]},e.id)})).value();return(0,r.jsx)("div",{className:L().channelsWrapper,children:n})}function F(e){var t=e.roles.slice().reverse().map((function(e){return(0,r.jsx)(H,{role:e},e.id)}));return(0,r.jsx)("ul",{className:L().rolesWrapper,children:t})}function H(e){var t,n=e.role,o=null==n.color?l.Z.unsafe_rawColors.PRIMARY_300.css:(0,u.Rf)(n.color);return(0,r.jsxs)("li",{className:L().role,style:{borderColor:null!==(t=(0,u.wK)(o,.6))&&void 0!==t?t:void 0},children:[(0,r.jsx)(f.xko,{className:L().roleCircle,
color:o}),(0,r.jsx)("div",{className:L().roleName,children:n.name})]})}},145739:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(125333),o=n(58964),i=n(97245),a=n(269823),s=n(652591),c=n(877815),u=n(873297),l=n(2590);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var d="template";const p=function(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){f(e,t,n[t])}))}return e}({},u.Z),{openNativeAppModal:function(e){a.Z.openNativeAppModal(e,l.Etm.GUILD_TEMPLATE_BROWSER)},openMobileApp:function(e,t){if(!(null!=platform.ua&&platform.ua.toLowerCase().indexOf("googlebot")>-1)){var n=null!=e?(0,r.Oh)(e):(0,r.Gk)(),a=(0,o.WS)(),u=(0,o.ZP)(n,{utmSource:d,fingerprint:t,attemptId:a});s.default.track(l.rMx.DEEP_LINK_CLICKED,{fingerprint:(0,i.K)(t),attempt_id:a,source:d,guild_template_code:e});c.Z.launch(u,(function(){}))}}})},281437:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r,o=n(785893),i=(n(667294),n(558820)),a=n(267342),s=n(256273),c=n(335150),u=n(945381),l=n.n(u);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var d=(f(r={},c.HQ.CLASSROOM,n(149374)),
f(r,c.HQ.LOCAL_COMMUNITIES,n(106952)),f(r,c.HQ.CREATORS_HOBBIES,n(123555)),f(r,c.HQ.GLOBAL_COMMUNITIES,n(100553)),f(r,c.HQ.FRIENDS_FAMILY,n(614040)),f(r,c.HQ.STUDY_GROUPS,n(952587)),f(r,c.HQ.CREATE_FROM_SCRATCH,n(841860)),f(r,c.HQ.CAMPUS_CLUBS,n(661807)),f(r,c.HQ.LEAGUE_CLUBS,n(568534)),f(r,c.HQ.GITHUB_HACKATHON,n(525106)),r);function p(e){var t=e.headerId,n=e.guildTemplate,r=n.code,u=d[r];if(null!=u){var f,p=(0,a.Z)(r),h=p.header,_=p.description,E=p.author;return(0,o.jsxs)("div",{children:[(0,o.jsx)("img",{className:l().image,src:u,alt:""}),(0,o.jsx)(i.Dx,{className:l().header,id:t,children:h}),(0,o.jsx)(i.DK,{children:_}),n.state===c.Rj.RESOLVED?(0,o.jsx)(s.D,{className:l().usagePill,count:null!==(f=n.usageCount)&&void 0!==f?f:0,verifiedName:E}):null]})}return(0,o.jsx)(s.Z,{pillClassName:l().usagePill,guildTemplate:n,tall:!0})}},256273:(e,t,n)=>{"use strict";n.d(t,{D:()=>g,Z:()=>v});var r=n(785893),o=(n(667294),
n(294184)),i=n.n(o),a=n(707961),s=n(859917),c=n(558820),u=n(128181),l=n(267342);var f=n(335150),d=n(473708),p=n(828213),h=n.n(p),_=n(518280),E=n.n(_);function y(){return(0,r.jsx)(s.Z,{className:h().verifiedIcon,children:(0,r.jsx)("div",{className:h().verifiedCheckContainer,children:(0,r.jsx)(u.Z,{className:h().verifiedCheck})})})}function m(e){var t=e.verified,n=e.text;return t?(0,r.jsxs)("div",{className:h().verifiedNameContainer,children:[(0,r.jsx)(y,{}),n]}):(0,r.jsx)(r.Fragment,{children:n})}function g(e){var t=e.className,n=e.count,o=e.creator,a=e.verifiedName;return(0,r.jsx)("div",{className:i()(h().usagePill,t,h().userText),children:null!=o||null!=a?d.Z.Messages.GUILD_TEMPLATE_USAGES_BY_CREATOR2.format({usageCount:n,creator:null!=a?a:o,creatorHook:function(e,t){return(0,r.jsx)(m,{text:e,verified:null!=a},t)}}):d.Z.Messages.GUILD_TEMPLATE_USAGES.format({usageCount:n})})}function v(e){var t=e.guildTemplate,n=e.error,o=e.tall,s=e.pillClassName;if(null!=n&&""!==n)return(0,
r.jsxs)("div",{className:h().container,children:[(0,r.jsx)(c.Dx,{children:d.Z.Messages.INVITE_MODAL_ERROR_TITLE}),(0,r.jsx)(c.DK,{children:n})]});if(t.state===f.Rj.RESOLVING)return(0,r.jsx)("div",{className:h().container,children:(0,r.jsx)(a.$jN,{})});var u,p=(0,l.Z)(t.code).header;if(o){var _;return(0,r.jsxs)("div",{className:h().container,children:[(0,r.jsx)(c.Dx,{className:h().title,children:p}),(0,r.jsx)(c.DK,{className:i()(h().subtitle,E().marginTop2),children:d.Z.Messages.GUILD_TEMPLATE_BASED_ON}),(0,r.jsx)(c.Dx,{className:i()(h().title,h().userText),children:t.name}),null!=t.description&&""!==t.description&&(0,r.jsx)(c.DK,{className:i()(h().subtitle,h().userText,E().marginTop8),children:t.description}),(0,r.jsx)(g,{className:s,count:null!==(_=t.usageCount)&&void 0!==_?_:0,creator:t.creator.username,verifiedName:(u=t.code,(0,l.Z)(u).author)})]})}return(0,r.jsxs)("div",{className:h().container,children:[(0,r.jsx)(c.Dx,{className:h().title,children:p}),(0,r.jsx)(c.DK,{
className:i()(h().subtitle,h().userText),children:t.name})]})}},196644:(e,t,n)=>{"use strict";n.d(t,{HJ:()=>d,yD:()=>p,Zd:()=>h});var r=n(541554),o=n(281110),i=n(744564),a=n(84441),s=n(736818),c=n(873553),u=n(2590);function l(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,o)}var f=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){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:
if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function d(){var e,t,n=s.default.getId();c.Z.getUsers().forEach((t=(e=function(e){var t,a,s,c,l;return f(this,(function(f){switch(f.label){case 0:t=e.id;if(null==(a=r.Z.getToken(t))||""===a){i.Z.dispatch({type:"MULTI_ACCOUNT_VALIDATE_TOKEN_FAILURE",userId:t});return[2]}i.Z.dispatch({type:"MULTI_ACCOUNT_VALIDATE_TOKEN_REQUEST",userId:t});f.label=1;case 1:f.trys.push([1,3,,4]);return[4,o.Z.get({url:u.ANM.ME,headers:{authorization:a},retries:3})];case 2:s=f.sent();return[3,4];case 3:c=f.sent();l=401===(null==c?void 0:c.status)||403===(null==c?void 0:c.status);i.Z.dispatch({
type:l?"MULTI_ACCOUNT_VALIDATE_TOKEN_FAILURE":"MULTI_ACCOUNT_VALIDATE_TOKEN_SUCCESS",userId:t});return[2];case 4:i.Z.dispatch({type:n===t?"CURRENT_USER_UPDATE":"USER_UPDATE",user:s.body});i.Z.dispatch({type:"MULTI_ACCOUNT_VALIDATE_TOKEN_SUCCESS",userId:t});return[2]}}))},function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){l(i,r,o,a,s,"next",e)}function s(e){l(i,r,o,a,s,"throw",e)}a(void 0)}))}),function(e){return t.apply(this,arguments)}))}function p(e){var t=r.Z.getToken(e);null!=t?a.Z.switchAccountToken(t):i.Z.dispatch({type:"MULTI_ACCOUNT_VALIDATE_TOKEN_FAILURE",userId:e})}function h(e){i.Z.dispatch({type:"MULTI_ACCOUNT_REMOVE_ACCOUNT",userId:e})}},22724:(e,t,n)=>{"use strict";n.d(t,{L:()=>c});var r=n(667294),o=n(202351),i=n(744564),a=n(196644),s=n(873553);function c(){var e=(0,o.cj)([s.Z],(function(){return{isLoading:s.Z.getIsValidatingUsers(),multiAccountUsers:s.Z.getUsers()}}));r.useEffect((function(){i.Z.wait((function(){a.HJ()}))
}),[]);return e}},226613:(e,t,n)=>{"use strict";n.d(t,{c:()=>o,H:()=>i});var r=n(744564);function o(e){r.Z.wait((function(){return r.Z.dispatch({type:"NUF_NEW_USER",newUserType:e})}))}function i(){r.Z.wait((function(){return r.Z.dispatch({type:"NUF_COMPLETE"})}))}},239527:(e,t,n)=>{"use strict";n.d(t,{M5:()=>r});var r;!function(e){e[e.MARKETING_UNCLAIMED=0]="MARKETING_UNCLAIMED";e[e.INVITE_UNCLAIMED=1]="INVITE_UNCLAIMED";e[e.ORGANIC_REGISTERED=2]="ORGANIC_REGISTERED";e[e.ORGANIC_REGISTERED_GUILD_TEMPLATE=3]="ORGANIC_REGISTERED_GUILD_TEMPLATE"}(r||(r={}))},88415:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(202351),o=n(744564);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return a(e)}function s(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){
if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t){c=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return c(e,t)}var u=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}var f=null;var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&c(e,t)}(n,e);var t=l(n)
;function n(){i(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){var t;f=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:null};r.getType=function(){return f};r.getState=function(){return{type:f}};r.__getLocalVars=function(){return{type:f}};return n}(r.ZP.PersistedStore);d.displayName="NewUserStore";d.persistKey="nuf";const p=new d(o.Z,{NUF_NEW_USER:function(e){var t=e.newUserType;f=t},NUF_COMPLETE:function(){f=null}})},560837:(e,t,n)=>{"use strict";n.d(t,{Z:()=>E});var r=n(202351),o=n(744564),i=n(335186);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return s(e)}function c(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e,t){
u=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return u(e,t)}var l,f=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}var p=(0,i.K4)();function h(e){var t=e.countryCode;if(null!=t){var n;p=null!==(n=(0,i.Zz)(t))&&void 0!==n?n:(0,i.K4)()}}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&u(e,t)}(n,e);var t=d(n);function n(){
a(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){null!=e&&(l=e.selectedCountryCode)};r.getUserAgnosticState=function(){return{selectedCountryCode:l}};r.getCountryCode=function(){return null!=l?l:p};r.__getLocalVars=function(){return{selectedCountryCode:l,defaultCountryCode:p}};return n}(r.ZP.DeviceSettingsStore);_.displayName="PhoneStore";_.persistKey="PhoneStore";const E=new _(o.Z,{PHONE_SET_COUNTRY_CODE:function(e){var t=e.countryCode;l=t},CONNECTION_OPEN:h,SET_LOCATION_METADATA:h})},376845:(e,t,n)=>{"use strict";n.d(t,{Z:()=>S});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),s=n(824390),c=n.n(s),u=n(496486),l=n.n(u),f=n(268335),d=n(707961),p=n(335186),h=n(107364),_=n(473708),E=n(2270),y=n.n(E),m=n(637678),g=n.n(m);function v(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function b(e){b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)
};return b(e)}function O(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function I(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function N(e,t){N=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return N(e,t)}var T=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1
;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&N(e,t)}(n,e);var t=A(n);function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r;(r=t.call(this,e)).onChangeQuery=function(e){r.setState({query:e})};r.onClearQuery=function(){r.setState({query:""})};r.onClick=function(e){var t,n;null===(n=(t=r.props).onClick)||void 0===n||n.call(t,e)};r.state={query:""};return r}var i=n.prototype;i.renderItems=function(){
var e=this,t=this.state.query,n=f.Z.flatMap((function(e,t){var n=e.alpha2,o=e.phoneCountryCodes,i=e.name,a=(0,p.q9)(n);return o.map((function(e){return{key:"".concat(t,"-").concat(e),name:i,translatedName:a,countryData:{name:i,alpha2:n,code:e},children:(0,r.jsxs)(h.Z,{className:y().countryItem,justify:h.Z.Justify.CENTER,align:h.Z.Align.CENTER,children:[(0,r.jsx)(h.Z.Child,{className:y().countryName,children:a}),(0,r.jsx)(h.Z.Child,{className:y().countryCode,grow:0,shrink:0,children:e})]})}}))})),i=l()(n).filter((function(e){return 0===t.length||c()(t.toLowerCase(),e.name.toLowerCase())||c()(t.toLowerCase(),e.translatedName.toLowerCase())})).map((function(t){return(0,o.createElement)(d.mzC.Item,O(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))))
;r.forEach((function(t){v(e,t,n[t])}))}return e}({},t),{key:t.key,onClick:function(){return e.onClick(t.countryData)}}))})).value();return 0===i.length?(0,r.jsx)(d.mzC.Empty,{children:_.Z.Messages.NONE}):(0,r.jsx)(d.w0Z,{className:y().phoneFieldScroller,children:i})};i.render=function(){var e=this.props.className;return(0,r.jsxs)(d.mzC,{className:a()(y().phoneFieldPopout,g().elevationBorderLow,e),children:[(0,r.jsx)(d.mzC.SearchBar,{query:this.state.query,placeholder:_.Z.Messages.SEARCH_COUNTRY,onChange:this.onChangeQuery,onClear:this.onClearQuery,autoComplete:"off"}),(0,r.jsx)(d.mzC.Divider,{}),this.renderItems()]})};return n}(o.PureComponent)},770050:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(202351)),i=n(316878),a=n(776009),s=n(69427);function c(e){var t,c=e.giftStyle,u=e.className,l=e.shouldAnimate,f=void 0===l||l,d=(0,o.e7)([i.Z],(function(){return i.Z.useReducedMotion}));if(null==c)return null;switch(c){case s.Cj.SNOWGLOBE:t=function(){
return n.e(529).then(n.t.bind(n,400529,19)).then((function(e){return e.default}))};break;case s.Cj.BOX:t=function(){return n.e(12773).then(n.t.bind(n,512773,19)).then((function(e){return e.default}))};break;case s.Cj.CUP:t=function(){return n.e(45684).then(n.t.bind(n,45684,19)).then((function(e){return e.default}))};break;default:throw new Error("Unexpected giftStyle ".concat(c))}return(0,r.jsx)(a.Z,{importData:t,shouldAnimate:!d&&f,className:u})}},686874:(e,t,n)=>{"use strict";n.d(t,{e:()=>d});var r=n(468811),o=n.n(r),i=n(306472),a=n(652591),s=n(2590);function c(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function u(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})))
;n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.loadId=o().v4();this.appUIViewed=!1}var t=e.prototype;t.trackEvent=function(e,t){var n=this,r=Date.now();requestIdleCallback((function(){a.default.track(e,u(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){c(e,t,n[t])}))}return e}({},function(){var e,t,n,r="--campaign-id=",o=null!==(n=null===i.Z||void 0===i.Z||null===(e=i.Z.processUtils)||void 0===e||null===(t=e.getMainArgvSync)||void 0===t?void 0:t.call(e))&&void 0!==n?n:[],a=!0,s=!1,c=void 0;try{
for(var u,l=o[Symbol.iterator]();!(a=(u=l.next()).done);a=!0){var f=u.value;if(f.startsWith(r))return{referrer:f.substr(r.length)}}}catch(e){s=!0;c=e}finally{try{a||null==l.return||l.return()}finally{if(s)throw c}}return{}}(),function(){var e=!1,t={total_compressed_byte_size:0,total_uncompressed_byte_size:0,total_transfer_byte_size:0,js_compressed_byte_size:0,js_uncompressed_byte_size:0,js_transfer_byte_size:0,css_compressed_byte_size:0,css_uncompressed_byte_size:0,css_transfer_byte_size:0};null!=window.performance&&null!=window.performance.getEntries&&window.performance.getEntries().forEach((function(n){var r=null!=n.encodedBodySize?n.encodedBodySize:n.decodedBodySize,o=null!=n.decodedBodySize?n.decodedBodySize:n.encodedBodySize,i=n.transferSize;if(null!=o&&null!=r){e=!0;t.total_compressed_byte_size+=r;t.total_uncompressed_byte_size+=o;null!=i&&(t.total_uncompressed_byte_size+=i);if("resource"===n.entryType){if("script"===n.initiatorType&&null!=n.name&&null!=n.name.match(/\.js/)){
t.js_compressed_byte_size+=r;t.js_uncompressed_byte_size+=o;null!=i&&(t.js_uncompressed_byte_size+=i)}if("link"===n.initiatorType&&null!=n.name&&null!=n.name.match(/\.css/)){t.css_compressed_byte_size+=r;t.css_uncompressed_byte_size+=o;null!=i&&(t.css_uncompressed_byte_size+=i)}}}}));return e?t:{}}()),{load_id:n.loadId,screen_name:t,duration_ms_since_app_opened:r-window.GLOBAL_ENV.HTML_TIMESTAMP}))}))};t.trackAppUIViewed=function(e){if(!this.appUIViewed){this.trackEvent(s.rMx.APP_UI_VIEWED,e);this.appUIViewed=!0}};return e}(),f=new l;function d(e){f.trackAppUIViewed(e)}},571680:(e,t,n)=>{"use strict";n.d(t,{MK:()=>r,FF:()=>o,mx:()=>i,X2:()=>a,EW:()=>s});var r,o,i,a,s;!function(e){e.UNKNOWN="unknown";e.ANY="any";e.INVITE="invite";e.ORGANIC="organic_registration";e.ORGANIC_MARKETING="organic_marketing";e.ORGANIC_GUILD_TEMPLATES="organic_guild_template";e.CREATE_GUILD="create_guild"}(r||(r={}));!function(e){e.AGE_GATE="age_gate";e.AGE_GATE_UNDERAGE="age_gate_underage"}(o||(o={}))
;!function(e){e.CLAIM_ACCOUNT="claim_account";e.CLAIM_ACCOUNT_SUCCESS="claim_account_success"}(i||(i={}));!function(e){e.GUILD_TEMPLATES="guild_templates";e.GUILD_CREATE="guild_create";e.CREATION_INTENT="creation_intent";e.CHANNEL_PROMPT="channel_prompt";e.JOIN_GUILD="join_guild";e.SUCCESS="create_success"}(a||(a={}));!function(e){e.NUF_STARTED="nuf_started";e.AGE_GATE="age_gate";e.NUF_COMPLETE="nuf_complete";e.HUB_CONNECTION="hub_connection"}(s||(s={}))},415879:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(38736),o=n(630631),i=n(296602),a=n(652591),s=n(571680),c=n(2590);function u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))))
;r.forEach((function(t){u(e,t,n[t])}))}return e}function f(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function p(e){var t=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){
var r=n.call(e,t||"default");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===h(t)?t:String(t)}var h=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},_="UserFlowAnalyticsStore_current",E="UserFlowAnalyticsStore";new i.Z("UserFlowAnalytics");function y(e){if(e===s.MK.UNKNOWN)return null;var t=o.Z.get("".concat(E,"-").concat(e));if(null==t)return null;var n=t.version,r=d(t,["version"]);return 1!==n?null:r}var m=(0,r.Z)((function(e,t){return u({flows:{},currentFlow:null},"activeFlow",(function(){var e,n=null!==(e=t().currentFlow)&&void 0!==e?e:o.Z.get(_);if(null==n)return null;var r=t().flows[n],i=null!=r?r:y(n);return null!=(null==i?void 0:i.currentStep)?n:null}))}));m.subscribe((function(e){var t;if(null!=e){!function(e){if(e.type!==s.MK.UNKNOWN){var t="".concat(E,"-").concat(e.type);if(e.ended){o.Z.remove(t);o.Z.remove(_)}else{
o.Z.set("".concat(E,"-").concat(e.type),f(l({},e),{version:1}));o.Z.set(_,e.type)}}}(e);a.default.track(c.rMx.NUO_TRANSITION,{flow_type:e.type,from_step:e.lastStep,to_step:e.currentStep,seconds_on_from_step:"function"!=typeof(null===(t=e.lastTimestamp)||void 0===t?void 0:t.getTime)?0:(e.currentTimestamp.getTime()-e.lastTimestamp.getTime())/1e3},{flush:!0});if(e.ended){var n=l({},m.getState().flows);delete n[e.type];m.setState({flows:n,currentFlow:null})}}}),(function(e){return null!=e.currentFlow?e.flows[e.currentFlow]:void 0}));function g(e,t){var n=m.getState().flows,r=n[e],o=d(n,[e].map(p)),i=null!=r?r:y(e);if(null!=(null==i?void 0:i.currentStep)){if(i.currentStep===t)return;0}m.setState({flows:f(l({},o),u({},e,{type:e,lastStep:null,lastTimestamp:null,currentStep:t,currentTimestamp:new Date,skipped:!1})),currentFlow:e})}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e;if(e===s.MK.ANY){var o
;r=null!==(o=m.getState().activeFlow())&&void 0!==o?o:s.MK.UNKNOWN}var i=m.getState().flows,a=i[r],c=d(i,[r].map(p)),h=null!=a?a:y(r);null!=h&&null!=h.currentStep&&h.currentStep!==t&&m.setState({flows:f(l({},c),u({},r,f(l({},h),{lastStep:h.currentStep,lastTimestamp:h.currentTimestamp,currentStep:t,currentTimestamp:new Date,ended:n}))),currentFlow:r})}function b(){return null!=m.getState().activeFlow()}const O={flowStart:g,flowStepOrStart:function(e,t){b()?v(e,t):g(e,t)},flowStep:v,hasActiveFlow:b}},42261:(e,t,n)=>{"use strict";n.d(t,{vG:()=>i,M0:()=>a,Od:()=>s});var r,o=n(473708),i="emails";!function(e){e.COMMUNICATION="communication";e.SOCIAL="social";e.TIPS="tips";e.RECOMMENDATIONS_AND_EVENTS="recommendations_and_events";e.UPDATES_AND_ANNOUNCEMENTS="updates_and_announcements"}(r||(r={}));var a=[r.TIPS,r.RECOMMENDATIONS_AND_EVENTS,r.UPDATES_AND_ANNOUNCEMENTS],s=[{category:r.COMMUNICATION,label:function(){return o.Z.Messages.USER_SETTINGS_EMAIL_CATEGORY_COMMUNICATION},
subLabel:function(){return o.Z.Messages.USER_SETTINGS_EMAIL_CATEGORY_COMMUNICATION_SUBLABEL}},{category:r.SOCIAL,label:function(){return o.Z.Messages.USER_SETTINGS_EMAIL_CATEGORY_SOCIAL},subLabel:function(){return o.Z.Messages.USER_SETTINGS_EMAIL_CATEGORY_SOCIAL_SUBLABEL}},{category:r.UPDATES_AND_ANNOUNCEMENTS,label:function(){return o.Z.Messages.USER_SETTINGS_EMAIL_CATEGORY_UPDATES_AND_ANNOUNCEMENTS},subLabel:function(){return o.Z.Messages.USER_SETTINGS_EMAIL_CATEGORY_UPDATES_AND_ANNOUNCEMENTS_SUBLABEL}},{category:r.TIPS,label:function(){return o.Z.Messages.USER_SETTINGS_EMAIL_CATEGORY_TIPS},subLabel:function(){return o.Z.Messages.USER_SETTINGS_EMAIL_CATEGORY_TIPS_SUBLABEL}},{category:r.RECOMMENDATIONS_AND_EVENTS,label:function(){return o.Z.Messages.USER_SETTINGS_EMAIL_CATEGORY_RECOMMENDATIONS_AND_EVENTS},subLabel:function(){return o.Z.Messages.USER_SETTINGS_EMAIL_CATEGORY_RECOMMENDATIONS_AND_EVENTS_SUBLABEL}}]},543976:(e,t,n)=>{"use strict";n.d(t,{Z:()=>E})
;var r=n(730381),o=n.n(r),i=n(169376),a=n(661123),s=n(800336),c=n(203600);function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1;r.configurable=!0;"value"in r&&(r.writable=!0);Object.defineProperty(e,r.key,r)}}function l(e){l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return l(e)}function f(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e,t){d=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return d(e,t)}var p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))
;return!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}var _=Object.freeze({PAYMENT_SOURCE_REQUIRED:1,EXISTING_PREMIUM_SUBSCRIPTION_DISALLOWED:2,NOT_SELF_REDEEMABLE:4}),E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&d(e,t)}(n,e);var t=h(n);function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r;(r=t.call(this)).userId=e.userId;r.code=e.code;r.skuId=e.skuId;r.uses=e.uses;r.maxUses=e.maxUses;r.expiresAt=e.expiresAt;r.redeemed=e.redeemed;r.storeListingId=e.storeListingId;r.subscriptionPlanId=e.subscriptionPlanId;r.subscriptionPlan=e.subscriptionPlan;r.revoked=e.revoked;r.entitlementBranches=e.entitlementBranches
;r.flags=e.flags;r.subscriptionTrial=e.subscriptionTrial;r.promotion=e.promotion;r.giftStyle=e.giftStyle;return r}var r=n.prototype;r.isExpired=function(){var e=this.expiresAt;return null!=e&&o()().isAfter(e)};r.toString=function(){return this.code};n.createFromServer=function(e){return new n({userId:null!=e.user?e.user.id:null,code:e.code,skuId:e.sku_id,uses:e.uses,maxUses:e.max_uses,storeListingId:null!=e.store_listing?e.store_listing.id:null,expiresAt:null!=e.expires_at?o()(e.expires_at):null,redeemed:e.redeemed,subscriptionPlanId:null!=e.subscription_plan?e.subscription_plan.id:e.subscription_plan_id,subscriptionPlan:null!=e.subscription_plan?s.Z.createFromServer(e.subscription_plan):null,revoked:!1,entitlementBranches:null!=e.entitlement_branches?e.entitlement_branches:null,flags:null!=e.flags?e.flags:0,giftStyle:e.gift_style,subscriptionTrial:null!=e.subscription_trial?{id:e.subscription_trial.id,interval:e.subscription_trial.interval,
intervalCount:e.subscription_trial.interval_count,skuId:e.subscription_trial.sku_id}:null,promotion:null!=e.promotion?{id:e.promotion.id,startDate:e.promotion.start_date,endDate:e.promotion.end_date,inboundHeaderText:e.promotion.inbound_header_text,inboundBodyText:e.promotion.inbound_body_text,inboundHelpCenterLink:e.promotion.inbound_help_center_link}:null})};!function(e,t,n){t&&u(e.prototype,t);n&&u(e,n)}(n,[{key:"hasMultipleCopies",get:function(){return this.maxUses>1}},{key:"isClaimed",get:function(){return this.uses>=this.maxUses}},{key:"remainingUses",get:function(){return this.maxUses-this.uses}},{key:"isSubscription",get:function(){return null!=this.subscriptionPlanId}},{key:"premiumSubscriptionType",get:function(){return this.isSubscription&&c.y7[this.skuId]||null}},{key:"isSelfRedeemable",get:function(){return!(0,a.yE)(this.flags,_.NOT_SELF_REDEEMABLE)}},{key:"isExistingPremiumSubscriptionDisallowed",get:function(){return(0,
a.yE)(this.flags,_.EXISTING_PREMIUM_SUBSCRIPTION_DISALLOWED)}},{key:"analyticsData",get:function(){return{gift_code:this.code,gift_code_max_uses:this.maxUses}}}]);return n}(i.Z)},536038:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(202351),o=n(630631),i=n(744564),a=n(2590);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1;r.configurable=!0;"value"in r&&(r.writable=!0);Object.defineProperty(e,r.key,r)}}function u(e){u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return u(e)}function l(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e,t){f=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return f(e,t)}var d=function(e){
return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var h={lastViewedPath:null,lastViewedNonVoicePath:null},_=h,E="LAST_VIEWED_PATH";var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&f(e,t)}(n,e);var t=p(n);function n(){s(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h;_=null!=e?e:h};r.getState=function(){return _};r.__getLocalVars=function(){return{initialState:h,state:_,LEGACY_STORAGE_KEY:E}};!function(e,t,n){t&&c(e.prototype,t);n&&c(e,n)}(n,[{key:"defaultRoute",get:function(){return a.Z5c.ME}},{key:"lastNonVoiceRoute",get:function(){var e;return null!==(e=_.lastViewedNonVoicePath)&&void 0!==e?e:a.Z5c.ME}},{key:"fallbackRoute",get:function(){return a.Z5c.ME}}]);return n}(r.ZP.PersistedStore);y.displayName="DefaultRouteStore";y.persistKey="DefaultRouteStore";y.migrations=[function(){var e=o.Z.get(E,null);o.Z.remove(E);return{lastViewedPath:e}}];const m=new y(i.Z,{SAVE_LAST_ROUTE:function(e){var t=e.path;_.lastViewedPath=t;return!0},SAVE_LAST_NON_VOICE_ROUTE:function(e){var t=e.path;_.lastViewedNonVoicePath=t;return!0}})},836485:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),s=n(107364),c=n(304404),u=n.n(c);function l(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e){f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return f(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&h(e,t)}function p(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e,t){h=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return h(e,t)}var _=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{
Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}var y=function(e){d(n,e);var t=E(n);function n(){l(this,n);var e;(e=t.apply(this,arguments)).setCodeBlockRef=function(t){e._codeBlockRef=t};e.handleKeyDown=function(t){var n=8===t.which||37===t.which||39===t.which,r=t.which>=48&&t.which<=57||t.keyCode>=96&&t.keyCode<=105;n||r||t.preventDefault();var o=e.props.onKeyDown;null==o||o(t)};e.handleChange=function(t){var n=e.props.onChange;null==n||n(t.currentTarget.value)};return e}var o=n.prototype;o.render=function(){var e=this.props.className;return(0,r.jsx)("input",{ref:this.setCodeBlockRef,className:a()(u().input,e),maxLength:1,value:null!=this.props.code?this.props.code:void 0,autoFocus:this.props.autoFocus,onKeyDown:this.handleKeyDown,onChange:this.handleChange})};o.focus=function(){
var e;null===(e=this._codeBlockRef)||void 0===e||e.focus()};o.blur=function(){var e;null===(e=this._codeBlockRef)||void 0===e||e.blur()};return n}(o.PureComponent);y.defaultProps={autoFocus:!1};var m=function(e){d(n,e);var t=E(n);function n(e){l(this,n);var r;(r=t.call(this,e))._codeBlockRefs=new Array(r.props.count);r.state={codes:new Array(e.count)};return r}var o=n.prototype;o.render=function(){for(var e=function(e){e===a.length/2&&c.push((0,r.jsx)("div",{className:u().spacer},"spacer"));c.push((0,r.jsx)(y,{ref:function(n){return t.setCodeBlockRef(e,n)},code:a[e],autoFocus:0===e,onChange:function(n){return t.handleChange(e,n)},onKeyDown:function(n){return t.handleKeyDown(e,n)},className:i},e))},t=this,n=this.props,o=n.className,i=n.inputClassName,a=this.state.codes,c=[],l=0;l<a.length;l++)e(l);return(0,r.jsx)(s.Z,{align:s.Z.Align.CENTER,justify:s.Z.Justify.CENTER,className:o,children:c})};o.setCodeBlockRef=function(e,t){this._codeBlockRefs[e]=t};o.handleChange=function(e,t){
this.state.codes[e]=t;var n=this.getCodeOrFirstEmptyIndex();if("string"==typeof n)this.submit(n);else{var r=this._codeBlockRefs[n];null==r||r.focus()}};o.handleKeyDown=function(e,t){var n=this.state.codes;if(8===t.which&&e>0&&(null==n[e]||0===n[e].length)){var r=e-1;n[r]="";var o=this._codeBlockRefs[r];null==o||o.focus()}};o.getCodeOrFirstEmptyIndex=function(){for(var e=this.state.codes,t="",n=0;n<e.length;n++){if(isNaN(parseInt(e[n])))return n;t+=e[n]}return t};o.submit=function(e){var t=this.props.onSubmit;null==t||t(e)};return n}(o.PureComponent);m.defaultProps={count:6};const g=m},737797:(e,t,n)=>{"use strict";n.d(t,{v:()=>N,Z:()=>T});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),s=n(392224),c=n(707961),u=n(2590),l=n(473708),f=n(105227),d=n.n(f);function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _(e){
_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return _(e)}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){h(e,t,n[t])}))}return e}function y(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function m(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{}
;var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function g(e,t){return!t||"object"!==O(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e,t){v=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return v(e,t)}var b,O=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){
var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}!function(e){e.TOP="top";e.BOTTOM="bottom"}(b||(b={}));var N={container:function(e,t){var n=t.isDisabled;return y(E({},e),{cursor:n?"not-allowed":void 0,pointerEvents:void 0,fontSize:16,fontWeight:500,width:"100%"})},control:function(e,t){var n=t.isDisabled,r=t.menuIsOpen;return y(E({},e),{backgroundColor:"var(--input-background)",borderColor:"var(--input-background)",opacity:n?.6:1,boxShadow:void 0,borderRadius:r?"4px 4px 0 0":"4px",minHeight:40,transition:"border 0.15s ease",cursor:n?"not-allowed":void 0,pointerEvents:n?"none":void 0,"&:hover":{borderColor:"var(--input-background)"}})},singleValue:function(e,t){var n=t.isDisabled;return y(E({},e),{color:"var(--interactive-normal)",opacity:n?.5:1})},input:function(e){return y(E({},e),{color:"var(--interactive-normal)"})},menu:function(e){return y(E({},e),{backgroundColor:"var(--background-secondary)",
border:"1px solid var(--background-tertiary)",borderRadius:"0 0 4px 4px",color:"var(--interactive-normal)",marginTop:-1,marginBottom:-1})},clearIndicator:function(e,t){var n=t.isDisabled;return y(E({},e),{color:"var(--interactive-normal)",cursor:n?void 0:"pointer",opacity:.3,padding:"8px 0",transform:"scale(0.8)",":hover":{color:"var(--text-danger)",opacity:1}})},indicatorsContainer:function(e){return y(E({},e),{alignItems:"flex-start"})},dropdownIndicator:function(e,t){var n=t.isDisabled;return y(E({},e),{color:"var(--interactive-normal)",cursor:n?void 0:"pointer",opacity:n?.3:1,padding:"8px 8px 8px 0",":hover":{color:"var(--interactive-hover)",opacity:n?.3:1}})},menuList:function(e){return y(E({},e),{padding:0,"&::-webkit-scrollbar":{width:8,padding:"0px 2px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"var(--scrollbar-thin-thumb)",border:"2px solid transparent",backgroundClip:"padding-box",borderRadius:4},"&::-webkit-scrollbar-track-piece":{backgroundColor:"transparent",
borderColor:"transparent"}})},option:function(e,t){var n=t.isSelected,r=t.isFocused;return y(E({},e,n?{backgroundColor:"var(--background-modifier-selected)",color:"var(--interactive-active)"}:r?{backgroundColor:"var(--background-modifier-hover)",color:"var(--interactive-hover)"}:{backgroundColor:"transparent",color:"var(--interactive-normal)"}),{cursor:"pointer",display:"flex",padding:12,alignItems:"center",minHeight:40,"&:active":{backgroundColor:"var(--background-modifier-selected)",color:"var(--interactive-active)"}})},placeholder:function(e){return y(E({},e),{color:"var(--text-muted)"})}},T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&v(e,t)}(n,e);var t=I(n);function n(){p(this,n);var e;(e=t.apply(this,arguments))._selectRef=o.createRef();e._containerRef=o.createRef();e.state={isFocused:!1,
isOpen:!1};e.handleFocus=function(t){var n,r;e.setState({isFocused:!0});null===(r=(n=e.props).onFocus)||void 0===r||r.call(n,t)};e.handleBlur=function(t){var n,r;e.setState({isFocused:!1});null===(r=(n=e.props).onBlur)||void 0===r||r.call(n,t)};e.handleKeyDown=function(t){t.which===u.yXg.ESCAPE&&e.state.isOpen&&t.stopPropagation()};e.handleMenuOpen=function(){e.setState({isOpen:!0})};e.handleMenuClose=function(){e.setState({isOpen:!1})};return e}var i=n.prototype;i.focus=function(){var e;null===(e=this._selectRef.current)||void 0===e||e.focus()};i.render=function(){
var e=this.props,t=e.className,n=e.selectClassName,o=e.error,i=e.valueRenderer,u=e.optionRenderer,f=e.multiValueRenderer,p=e.options,_=e.value,g=e.autofocus,v=e.disabled,b=e.clearable,O=e.searchable,I=e.styleOverrides,T=e.isMulti,A=e.placeholder,S=e.filterOption,C=e.closeMenuOnSelect,x=void 0===C||C,R=E({},m(e,["className","selectClassName","error","valueRenderer","optionRenderer","multiValueRenderer","options","value","autofocus","disabled","clearable","searchable","styleOverrides","isMulti","placeholder","filterOption","closeMenuOnSelect"]));null!=g&&(R.autoFocus=g);null!=v&&(R.isDisabled=v);null!=b&&(R.isClearable=b);null!=O&&(R.isSearchable=O);var j={IndicatorSeparator:function(){return null}};null!=u&&(j.Option=function(e){return(0,r.jsx)(s.wx.Option,y(E({},e),{children:u(e.data)}))});null!=i&&(j.SingleValue=function(e){return(0,r.jsx)(s.wx.SingleValue,y(E({},e),{children:i(e.data)}))});null!=f&&(j.MultiValue=function(e){return f(e.data)});var P,L=null!=I?I:N
;if(T&&Array.isArray(_)){var M={};p.forEach((function(e){M[String(e.value)]=e}));P=_.map((function(e){return M[String(e)]}))}else P=null!=_?p.find((function(e){return e.value===_})):null;return(0,r.jsx)(c.tEY,{focused:this.state.isFocused&&!this.state.isOpen,ringTarget:this._containerRef,children:(0,r.jsxs)("div",{className:a()(d().select,t,h({},d().error,null!=o)),ref:this._containerRef,children:[(0,r.jsx)(s.ZP,y(E({},R),{className:n,ref:this._selectRef,isMulti:T,components:j,options:p,styles:L,onFocus:this.handleFocus,onBlur:this.handleBlur,onMenuOpen:this.handleMenuOpen,onMenuClose:this.handleMenuClose,closeMenuOnSelect:x,value:P,onKeyDown:this.handleKeyDown,placeholder:null!=A?A:l.Z.Messages.SELECT,noOptionsMessage:function(){return l.Z.Messages.NO_RESULTS_FOUND},filterOption:S})),null!=o?(0,r.jsx)("div",{className:d().errorMessage,children:o}):null]})})};return n}(o.Component);T.MenuPlacements=b},23727:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(633878))
;function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function c(e){
var t=e.width,n=void 0===t?24:t,c=e.height,u=void 0===c?24:c,l=e.color,f=void 0===l?"currentColor":l,d=e.foreground,p=s(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:u,viewBox:"0 0 24 24",children:(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{
d:"M12 2.00305C6.486 2.00305 2 6.48805 2 12.0031V20.0031C2 21.1071 2.895 22.0031 4 22.0031H6C7.104 22.0031 8 21.1071 8 20.0031V17.0031C8 15.8991 7.104 15.0031 6 15.0031H4V12.0031C4 7.59105 7.589 4.00305 12 4.00305C16.411 4.00305 20 7.59105 20 12.0031V15.0031H18C16.896 15.0031 16 15.8991 16 17.0031V20.0031C16 21.1071 16.896 22.0031 18 22.0031H20C21.104 22.0031 22 21.1071 22 20.0031V12.0031C22 6.48805 17.514 2.00305 12 2.00305Z",className:d,fill:f})})}))}},646161:(e,t,n)=>{"use strict";n.d(t,{w4:()=>v,DW:()=>O,t3:()=>I,Gn:()=>N});var r,o=n(131795),i=n.n(o),a=n(58964),s=n(736818),c=n(2590);function u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var l="Ubuntu",f="Debian",d="Fedora",p="Red Hat",h="SuSE",_="Linux",E="OS X",y="win",m="osx",g="linux";function v(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=t?"/ptb":"",o=null!=n?"&format=".concat(n):""
;return"".concat(c.fzT.DESKTOP).concat(r,"?platform=").concat(e).concat(o)}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(r=i().os)||void 0===r?void 0:r.family;return null==e?y:-1!==e.indexOf(l)||-1!==e.indexOf(f)||-1!==e.indexOf(d)||-1!==e.indexOf(p)||-1!==e.indexOf(h)||-1!==e.indexOf(_)?g:-1!==e.indexOf(E)?m:y}function O(e){var t;return(u(t={},y,"Windows"),u(t,m,"Mac"),u(t,g,"Linux"),t)[b(e)]}function I(){var e=b();return v(e,!1,e===g?"tar.gz":null)}function N(e,t,n){var r=null!=n?n.toString():null;switch(t){case"iOS":return(0,a.ZP)(null!=r?r:"https://itunes.apple.com/us/app/discord-chat-for-games/id985746746",{utmSource:e,fingerprint:s.default.getFingerprint(),attemptId:(0,a.WS)()});case"Android":return(0,a.ZP)(null!=r?r:"https://play.google.com/store/apps/details",{utmSource:e,id:"com.discord",fingerprint:s.default.getFingerprint(),attemptId:(0,a.WS)()});default:return null!=r?r:"https://www.discord.com"}}},530562:(e,t,n)=>{"use strict";n.d(t,{
yb:()=>u,R4:()=>l,GY:()=>f,oE:()=>d});var r=n(441143),o=n.n(r),i=n(810978),a=n(551778),s=n(2590),c=n(203600);function u(e){return function(e){return e.items.map((function(e){var t=a.Z.get(e.planId);o()(null!=t,"Unable to fetch plan");return t}))}(e).map((function(e){return e.skuId}))}function l(e,t,n){var r=e.getCurrentSubscriptionPlanIdForGroup(n);if(e.type===s.NYc.PREMIUM&&null==r)return!0;o()(null!=r,"Current subscription has no plan in group");o()(!(r===c.Xh.PREMIUM_YEAR_TIER_1&&t===c.Xh.PREMIUM_MONTH_TIER_2),"Unexpected plan switch");return n.indexOf(r)<n.indexOf(t)}function f(e,t,n){return!l(e,t,n)}function d(e,t){var n=a.Z.get(e);if(null==n){var r=c.GP[e];o()(null!=r,"Missing hardcoded subscriptionPlan: ".concat(e));var s=r.skuId;a.Z.isFetchingForSKU(s)||(0,i.GZ)(s,t)}return n}},412961:(e,t,n)=>{"use strict";n.d(t,{T:()=>l,s:()=>f});var r=n(384482),o=n(784426),i=n(736818),a=n(120415),s=n(2590);function c(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,
configurable:!0,writable:!0}):e[t]=n;return e}function u(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var l=a.FB?s.dG4:function(e,t){if(!(0,o.DB)())return r.default.request(s.Etm.DEEP_LINK,{type:e,params:t})},f=a.FB?s.dG4:function(e,t){if(!i.default.isAuthenticated())return l(e,u(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){c(e,t,n[t])}))}
return e}({},t||{}),{fingerprint:i.default.getFingerprint()}))}},970112:(e,t,n)=>{"use strict";n.d(t,{Ue:()=>m,U2:()=>g});function r(e){const t="==".slice(0,(4-e.length%4)%4),n=e.replace(/-/g,"+").replace(/_/g,"/")+t,r=atob(n),o=new ArrayBuffer(r.length),i=new Uint8Array(o);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);return o}function o(e){const t=new Uint8Array(e);let n="";for(const e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var i="copy",a="convert";function s(e,t,n){if(t===i)return n;if(t===a)return e(n);if(t instanceof Array)return n.map((n=>s(e,t[0],n)));if(t instanceof Object){const r={};for(const[o,i]of Object.entries(t)){if(i.derive){const e=i.derive(n);void 0!==e&&(n[o]=e)}if(o in n)null!=n[o]?r[o]=s(e,i.schema,n[o]):r[o]=null;else if(i.required)throw new Error(`Missing key: ${o}`)}return r}}function c(e,t){return{required:!0,schema:e,derive:t}}function u(e){return{required:!0,schema:e}}function l(e){return{
required:!1,schema:e}}var f={type:u(i),id:u(a),transports:l(i)},d={appid:l(i),appidExclude:l(i),credProps:l(i)},p={appid:l(i),appidExclude:l(i),credProps:l(i)},h={publicKey:u({rp:u(i),user:u({id:u(a),name:u(i),displayName:u(i)}),challenge:u(a),pubKeyCredParams:u(i),timeout:l(i),excludeCredentials:l([f]),authenticatorSelection:l(i),attestation:l(i),extensions:l(d)}),signal:l(i)},_={type:u(i),id:u(i),rawId:u(a),authenticatorAttachment:l(i),response:u({clientDataJSON:u(a),attestationObject:u(a),transports:c(i,(e=>{var t;return(null==(t=e.getTransports)?void 0:t.call(e))||[]}))}),clientExtensionResults:c(p,(e=>e.getClientExtensionResults()))},E={mediation:l(i),publicKey:u({challenge:u(a),timeout:l(i),rpId:l(i),allowCredentials:l([f]),userVerification:l(i),extensions:l(d)}),signal:l(i)},y={type:u(i),id:u(i),rawId:u(a),authenticatorAttachment:l(i),response:u({clientDataJSON:u(a),authenticatorData:u(a),signature:u(a),userHandle:u(a)}),
clientExtensionResults:c(p,(e=>e.getClientExtensionResults()))};async function m(e){const t=await navigator.credentials.create(function(e){return s(r,h,e)}(e));return function(e){return s(o,_,e)}(t)}async function g(e){const t=await navigator.credentials.get(function(e){return s(r,E,e)}(e));return function(e){return s(o,y,e)}(t)}}}]);
//# sourceMappingURL=bf653b84bfc53ff2d2c5.js.map

View File

@ -0,0 +1,21 @@
(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push([[65494],{148267:(e,t,r)=>{e.exports=r.p+"0f4d1ff76624bb45a3fee4189279ee92.svg"},359074:(e,t,r)=>{e.exports=r.p+"375217725f8ad1df6310e6738a7306e4.svg"},396679:(e,t,r)=>{e.exports=r.p+"a5844a7e2342caa1029833d27d976e99.svg"},250287:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(785893),o=(r(667294),r(701614)),s=r(528180),a=r(558820),i=r(488462),l=r(473708),c=r(913957),u=r.n(c),f=r(518280),d=r.n(f);const p=function(e){var t=e.title,c=e.onVerify,f=e.authBoxClassName,p=e.captchaService,h=void 0===p?o.hP.RECAPTCHA:p,m=e.sitekey;return(0,n.jsxs)(a.ZP,{className:f,children:[(0,n.jsx)("img",{alt:"",src:r(148267),className:d().marginBottom20}),null!=t?(0,n.jsx)(a.Dx,{className:d().marginBottom8,children:t}):null,(0,n.jsx)(a.DK,{className:d().marginBottom40,children:l.Z.Messages.BEEP_BOOP}),(0,n.jsx)("div",{className:u().flexCenter,children:(0,n.jsx)(s.Z,{onVerify:c,theme:i.BR.DARK,captchaService:h,sitekey:m})})]})}},
144936:(e,t,r)=>{"use strict";r.d(t,{Z:()=>P});var n=r(785893),o=r(667294),s=r(294184),a=r.n(s),i=r(517563),l=r(289283),c=r(202351),u=r(744564),f=r(84441),d=r(645106),p=r(845882),h=r(686874),m=r(736818),v=r(558820),g=r(930948),b=r(2590),y=r(473708),x=r(518280),S=r.n(x);function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e,t,r,n,o,s,a){try{var i=e[s](a),l=i.value}catch(e){r(e);return}i.done?t(l):Promise.resolve(l).then(n,o)}function N(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var s=e.apply(t,r);function a(e){O(s,n,o,a,i,"next",e)}function i(e){O(s,n,o,a,i,"throw",e)}a(void 0)}))}}function j(e){j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return j(e)}function E(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?C(e):t}function A(e,t){A=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return A(e,t)}
var T=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var r,n=j(e);if(t){var o=j(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return E(this,r)}}var w=function(e,t){var r,n,o,s,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function i(s){return function(i){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;(n=0,
o)&&(s=[2&s[0],o.value]);switch(s[0]){case 0:case 1:o=s;break;case 4:a.label++;return{value:s[1],done:!1};case 5:a.label++;n=s[1];s=[0];continue;case 7:s=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1];o=s;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(s);break}o[2]&&a.ops.pop();a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e];n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,i])}}};c.ZP.initialize();var I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&A(e,t)}(o,e);var t=_(o);function o(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o)
;var r,n,s,a=C(r=t.call(this,e));r.handleSubmit=(s=N((function(e){var t,r,n,o,s,i,l,c,p,h,m,v,x,S;return w(this,(function(C){switch(C.label){case 0:t=a.props,r=t.location,n=t.onLoginSuccess,o=t.resetToken;s=a.state,i=s.password,l=s.error;null!=e&&e.preventDefault();if(0===i.length){a.setState({error:y.Z.Messages.PASSWORD_REQUIRED});g.S.dispatch(b.CkL.WAVE_EMPHASIZE);return[2]}null!=l&&a.setState({error:null});c=o;null!=r&&(c=(0,d.Z)(r));if(null==c)return[2];a.setState({working:!0});C.label=1;case 1:C.trys.push([1,3,,4]);return[4,f.Z.resetPassword(c,i)];case 2:p=C.sent(),h=p.result,m=p.sms,v=p.webauthn,x=p.ticket,S=p.token;if(h===f.c.MFA)u.Z.dispatch({type:"LOGIN_MFA_STEP",ticket:x,sms:m,webauthn:v});else if(null!=n)n(S);else{u.Z.dispatch({type:"LOGIN_SUCCESS",token:S});a.handlePasswordChangeSuccess()}return[3,4];case 3:C.sent();return[3,4];case 4:a.setState({working:!1});return[2]}}))})),function(e){return s.apply(this,arguments)});var c=C(r);r.handleTokenSubmit=function(){
var e=N((function(e){var t,r,n,o,s,a,i,l,p,h,m;return w(this,(function(v){switch(v.label){case 0:t=c.props,r=t.location,n=t.mfaTicket,o=t.onLoginSuccess,s=t.resetToken;a=c.state,i=a.code,l=a.password,p=a.error;null!=e&&e.preventDefault();if(0===l.length){c.setState({error:y.Z.Messages.PASSWORD_REQUIRED});g.S.dispatch(b.CkL.WAVE_EMPHASIZE);return[2]}null!=p&&c.setState({error:null});h=s;null!=r&&(h=(0,d.Z)(r));if(null==h)return[2];c.setState({working:!0});v.label=1;case 1:v.trys.push([1,3,,4]);return[4,f.Z.resetPasswordMFA(i,n,l,h)];case 2:m=v.sent();if(null!=o)o(m);else{u.Z.dispatch({type:"LOGIN_SUCCESS",token:m});c.handlePasswordChangeSuccess()}return[3,4];case 3:v.sent();return[3,4];case 4:c.setState({working:!1});return[2]}}))}));return function(t){return e.apply(this,arguments)}}();r.handlePasswordChangeSuccess=function(){var e=r.props.replaceWith;l.Em||l.tq?r.setState({success:!0}):e(b.Z5c.APP)};r.handleGoToLogin=function(){var e=r.props.transitionTo;f.Z.loginReset()
;e(b.Z5c.LOGIN)};r.isSubmitting=function(){var e=r.props.loginStatus;return r.state.working||e===b.u34.LOGGING_IN_MFA};r.handleOpenApp=function(){(0,p.Z)("password_reset")};r.hasError=function(e){return null!=r.props.errors[e]||null!=r.state.error};r.renderError=function(e){var t=r.props.errors;if(r.hasError(e)){var n=t[e];return Array.isArray(n)?n[0]:n}return null};var h=null!=(null===(n=r.props.location)||void 0===n?void 0:n.search)&&""!==r.props.location.search?(0,i.parse)(r.props.location.search):null;r.state={password:"",code:"",error:null,hasCancel:null!=h&&null!=h.from_login,working:!1,success:!1};return r}var s=o.prototype;s.componentDidMount=function(){(0,h.e)("reset_password")};s.renderPasswordReset=function(){var e=this,t=this.state,o=t.password,s=t.error,a=t.hasCancel,i=this.isSubmitting(),l=null!=s?s:this.renderError("password");return(0,n.jsxs)(v.ZP,{onSubmit:this.handleSubmit,tag:"form",children:[(0,n.jsx)("img",{alt:"",src:r(null==l?359074:396679),
className:S().marginBottom20}),(0,n.jsx)(v.Dx,{children:y.Z.Messages.RESET_PASSWORD_TITLE}),(0,n.jsxs)(v.gO,{className:S().marginTop20,children:[(0,n.jsx)(v.II,{label:y.Z.Messages.FORM_LABEL_NEW_PASSWORD,className:S().marginBottom20,name:"password",value:o,onChange:function(t){return e.setState({password:t})},error:l,type:"password"}),(0,n.jsx)(v.zx,{type:"submit",submitting:i,children:y.Z.Messages.CHANGE_PASSWORD}),a?(0,n.jsx)(v.zx,{className:S().marginTop8,onClick:this.handleGoToLogin,submitting:i,color:v.zx.Colors.PRIMARY,children:y.Z.Messages.CANCEL}):null]})]})};s.renderMFA=function(){var e=this,t=this.state.error,o=null!=t?t:this.renderError("code");return(0,n.jsxs)(v.ZP,{onSubmit:this.handleTokenSubmit,tag:"form",children:[(0,n.jsx)("img",{alt:"",src:r(null==o?359074:396679),className:a()(S().marginBottom20,l.tq?S().marginTop20:"")}),(0,n.jsx)(v.Dx,{className:S().marginBottom8,children:y.Z.Messages.TWO_FA_ENTER_TOKEN_LABEL}),(0,n.jsx)(v.DK,{
children:y.Z.Messages.TWO_FA_ENTER_TOKEN_BODY}),(0,n.jsxs)(v.gO,{className:S().marginTop20,children:[(0,n.jsx)(v.II,{className:S().marginBottom8,error:o,onChange:function(t){return e.setState({code:t})},autoComplete:"off",placeholder:y.Z.Messages.TWO_FA_AUTH_CODE,spellCheck:"false",maxLength:10,autoFocus:!0,value:this.state.code}),(0,n.jsx)(v.zx,{type:"submit",submitting:this.isSubmitting(),children:y.Z.Messages._LOGIN})]})]})};s.renderSucceeded=function(){return(0,n.jsxs)(v.ZP,{children:[(0,n.jsx)("img",{alt:"",src:r(359074),className:a()(S().marginBottom20,l.tq?S().marginTop20:"")}),(0,n.jsx)(v.Dx,{className:S().marginBottom40,children:y.Z.Messages.RESET_PASSWORD_SUCCESS_TITLE}),(0,n.jsx)(v.zx,{onClick:this.handleOpenApp,children:y.Z.Messages.VERIFICATION_OPEN_DISCORD})]})};s.render=function(){return this.state.success?this.renderSucceeded():null!=this.props.mfaTicket&&""!==this.props.mfaTicket?this.renderMFA():this.renderPasswordReset()};return o}(o.PureComponent);I.defaultProps={
transitionTo:function(e){return r.g.location.assign(e)},replaceWith:function(e){return r.g.location.replace(e)}};const P=c.ZP.connectStores([m.default],(function(){return{loginStatus:m.default.getLoginStatus(),mfaTicket:m.default.getMFATicket(),errors:m.default.getErrors()}}))(I)},645106:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(517563);function o(e){var t=null!=e.hash&&""!==e.hash?(0,n.parse)(e.hash):null;if(null!=(null==t?void 0:t.token))return t.token;var r=null!=e.search&&""!==e.search?(0,n.parse)(e.search):null;return null!=(null==r?void 0:r.token)?r.token:null}},153081:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(785893),o=(r(667294),r(707961)),s=r(836485),a=r(107364),i=r(558820),l=r(473708),c=r(810436),u=r.n(c),f=r(518280),d=r.n(f);function p(e){var t=e.title,r=e.subtitle,c=e.error,f=e.onSubmit,p=e.onCancel;return(0,n.jsxs)(a.Z,{direction:a.Z.Direction.VERTICAL,children:[(0,n.jsx)(i.Dx,{className:d().marginBottom8,children:t}),(0,n.jsx)(i.DK,{className:u().subTitle,
children:r}),(0,n.jsxs)("div",{children:[(0,n.jsx)(s.Z,{inputClassName:u().codeInput,onSubmit:f}),null!=c?(0,n.jsx)(o.xvT,{className:u().error,variant:"text-sm/normal",children:c}):null]}),null!=p&&(0,n.jsx)(o.zxk,{className:u().button,onClick:p,color:o.zxk.Colors.PRIMARY,children:l.Z.Messages.CANCEL})]})}},349979:(e,t,r)=>{"use strict";r.d(t,{W:()=>n,Z:()=>T});var n,o=r(785893),s=r(667294),a=r(294184),i=r.n(a),l=r(202351),c=r(707961),u=r(84441),f=r(971402),d=r(722406),p=r(736818),h=r(793461),m=r(473903),v=r(186440),g=r(652591),b=r(749565),y=r(196644),x=r(873553),S=r(22724),C=r(2590),O=r(473708),N=r(347277),j=r.n(N);function E(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r;return e}!function(e){e[e.LOGIN_REQUIRED=0]="LOGIN_REQUIRED";e[e.SWITCHED=1]="SWITCHED";e[e.REMOVED=2]="REMOVED"}(n||(n={}));function A(e){var t=e.actionText,r=e.user,s=e.onAction,a=(0,l.cj)([m.default,h.Z,p.default],(function(){return{
currentUser:m.default.getCurrentUser(),hidePrivateData:h.Z.hidePersonalInformation,isAuthenticated:p.default.isAuthenticated()}})),S=a.currentUser,N=a.hidePrivateData,A=a.isAuthenticated,T=new d.Z(r),_=A&&(null==S?void 0:S.id)===T.id,w=r.tokenStatus===x.q.INVALID,I=N||T.isPomelo()?null:"#".concat(T.discriminator),P=null;_?P=(0,o.jsx)(c.xvT,{variant:"text-sm/semibold",className:j().hintText,color:"text-positive",children:O.Z.Messages.SWITCH_ACCOUNTS_ACTIVE_ACCOUNT}):w&&(P=(0,o.jsx)(c.xvT,{variant:"text-sm/semibold",className:j().hintText,color:"text-danger",children:O.Z.Messages.SWITCH_ACCOUNTS_INVALID_TOKEN}));return(0,o.jsx)("div",{className:j().accountCard,children:(0,o.jsxs)("div",{className:j().userDetails,children:[(0,o.jsx)(c.qEK,{src:T.getAvatarURL(void 0,40),size:c.EFr.SIZE_40,"aria-label":r.username}),(0,o.jsxs)("div",{className:i()(j().usernameSection,E({},j().hasActionMaxWidth,!_)),children:[(0,o.jsxs)("div",{className:j().username,children:[(0,o.jsx)(c.xvT,{
variant:"text-md/semibold",color:"header-primary",className:j().textOverflow,children:b.ZP.getUserTag(T,{mode:"username",identifiable:N?"never":"always"})}),(0,o.jsx)(c.xvT,{color:"header-secondary",variant:"text-sm/normal",children:I})]}),P]}),(0,o.jsxs)("div",{className:j().userActions,children:[!_&&(0,o.jsx)(c.zxk,{onClick:function(){if(w)s(n.LOGIN_REQUIRED,r.id);else{g.default.track(C.rMx.MULTI_ACCOUNT_SWITCH_ATTEMPT,{location:{section:C.jXE.MANAGE_ACCOUNTS_MODAL}});y.yD(r.id);s(n.SWITCHED,r.id)}},color:c.zxk.Colors.PRIMARY,children:w?O.Z.Messages.SWITCH_ACCOUNTS_ACTION_LOG_IN:t}),(0,o.jsx)(c.zxk,{className:j().userActionMenu,onClick:function(e){(0,f.vq)(e,(function(e){var t=e.onSelect;return(0,o.jsx)(c.v2r,{"aria-label":O.Z.Messages.SWITCH_ACCOUNTS_MANAGE_ACCOUNT,navId:"manage-multi-account",onClose:f.Zy,onSelect:t,children:(0,o.jsx)(c.sNh,{id:"remove-account",label:O.Z.Messages.SWITCH_ACCOUNTS_REMOVE_ACCOUNT,action:function(){!function(){u.Z.logout(null,r.id).finally((function(){
y.Zd(r.id)}));var e={};null!=S?e.section=C.jXE.MANAGE_ACCOUNTS_MODAL:e.page=C.Usc.LOGIN;g.default.track(C.rMx.MULTI_ACCOUNT_ACCOUNT_REMOVE,{location:e});s(n.REMOVED,r.id)}();null!=t&&t()},color:"danger"})})}))},size:c.zxk.Sizes.ICON,look:c.zxk.Looks.BLANK,color:c.zxk.Colors.WHITE,"aria-label":O.Z.Messages.MORE_OPTIONS,children:(0,o.jsx)(v.Z,{className:j().overflowMenuIcon})})]})]})})}function T(e){var t=e.actionText,r=e.onAction,n=(0,S.L)(),a=n.isLoading,i=n.multiAccountUsers;return(0,o.jsx)("div",{className:j().list,children:a?(0,o.jsx)(c.$jN,{}):i.map((function(e,n){return(0,o.jsxs)(s.Fragment,{children:[(0,o.jsx)(A,{user:e,actionText:t,onAction:r},e.id),i.length-1!==n&&(0,o.jsx)("div",{role:"separator",className:j().separator})]},e.id)}))})}},53540:(e,t,r)=>{"use strict";r.d(t,{Nz:()=>n,o9:()=>s});var n;!function(e){e.PHONE="phone";e.EMAIL="email"}(n||(n={}));var o=/^[-() \d]+$/;function s(e,t){return e===n.PHONE?!(r=t,r.startsWith("+")):e!==n.EMAIL&&(!(t.length<3)&&o.test(t));var r
}},78501:(e,t,r)=>{"use strict";r.d(t,{Z:()=>w});var n=r(785893),o=r(667294),s=r(294184),a=r.n(s),i=r(707961),l=r(443812),c=r(53540),u=r(248088),f=r(202351),d=r(316878),p=r(426797),h=r(376845),m=r(33031),v=r.n(m);function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r;return e}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))));n.forEach((function(t){b(e,t,r[t])}))}return e}function x(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e)
;t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));r.push.apply(r,n)}return r}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}));return e}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,s=[],a=!0,i=!1;try{for(r=r.call(e);!(a=(n=r.next()).done);a=!0){s.push(n.value);if(t&&s.length===t)break}}catch(e){i=!0;o=e}finally{try{a||null==r.return||r.return()}finally{if(i)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e,t)||function(){
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e){var t=e.show,r=e.alpha2,s=e.countryCode,l=(0,f.e7)([d.Z],(function(){return d.Z.useReducedMotion})),c=o.useRef(null),m=S(o.useState(0),2),g=m[0],C=m[1],O=S(o.useState(!1),2),N=O[0],j=O[1];o.useEffect((function(){var e=function(){var e,r;C(t&&null!==(r=null===(e=c.current)||void 0===e?void 0:e.getBoundingClientRect().width)&&void 0!==r?r:0)};e();window.addEventListener("resize",e);return function(){return window.removeEventListener("resize",e)}}),[t,r,s]);var E=(0,u.useSpring)({width:"".concat(g,"px"),immediate:l,onStart:function(){j(!0)},onRest:function(){j(!1)}});return(0,n.jsx)(i.yRy,{position:"top",renderPopout:function(e){return(0,n.jsx)(h.Z,{className:v().popout,onClick:function(t){!function(e){p.Z.setCountryCode(e)}(t);e.closePopout()}})},children:function(e){return(0,n.jsx)("div",{
className:a()(v().outerContainer,b({},v().hidden,!(t||N))),children:(0,n.jsx)(u.animated.div,{className:v().container,style:E,children:(0,n.jsxs)("div",{className:v().innerContainer,ref:c,children:[(0,n.jsxs)(i.P3F,x(y({},e),{className:v().countryCode,children:[r," ",s]})),(0,n.jsx)("div",{className:v().separator})]})})})}})}var O=r(543505),N=r.n(O),j=r(103468),E=r.n(j);function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function T(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r;return e}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,s=[],a=!0,i=!1;try{for(r=r.call(e);!(a=(n=r.next()).done);a=!0){s.push(n.value);if(t&&s.length===t)break}}catch(e){i=!0;o=e}finally{try{a||null==r.return||r.return()}finally{if(i)throw o}}return s}
}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e){var t,r=e.alpha2,s=e.countryCode,u=e.forceMode,f=e.label,d=e.error,p=e.className,h=e.required,m=e.value,v=e.setRef,g=e.placeholder,b=e.autoFocus,y=e.maxLength,x=e.spellCheck,S=e.autoComplete,O=e.autoCapitalize,j=e.autoCorrect,A=e.onChange,w=e.inputClassName,I=(0,l.Dt)(),P=_(o.useState(!1),2),k=P[0],Z=P[1],M=(0,c.o9)(u,m);return(0,n.jsx)(i.xJW,{title:f,error:d,className:p,required:h,tag:"label",htmlFor:I,children:(0,n.jsxs)("div",{className:a()(E().input,N().input,w,(t={},
T(t,E().error,null!=d),T(t,E().focused,k),t)),children:[(0,n.jsx)(C,{show:M,alpha2:r,countryCode:s}),(0,n.jsx)(i.oil,{id:I,name:"email",type:u===c.Nz.EMAIL?"email":"text",value:m,inputRef:v,placeholder:g,"aria-label":f,required:h,onChange:function(e){var t=(0,c.o9)(u,e)?s:"";A(e,t)},autoComplete:S,autoCapitalize:O,autoCorrect:j,autoFocus:b,maxLength:y,spellCheck:x,className:N().inputWrapper,inputClassName:N().inputField,onFocus:function(){return Z(!0)},onBlur:function(){return Z(!1)}})]})})}}}]);
//# sourceMappingURL=d8fae197b1507a2902a9.js.map