"use strict";(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push([[11177,75651],{975651:(e,t,n)=>{n.r(t);n.d(t,{default:()=>b});var r=n(785893),o=n(667294),i=n(707961),a=n(473708),c=n(300393),u=n.n(c);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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"!==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 p(e,t){p=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return p(e,t)}var h=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=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 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&&p(e,t)}(n,e);var t=d(n);function n(){s(this,n);var e;(e=t.apply(this,arguments)).state={value:"",error:null,isLoading:!1};e.handleSubmit=function(t){t.preventDefault();var n=e.state.value,r=e.props,o=r.handleSubmit,i=r.onClose,a=r.onError;e.setState({isLoading:!0});o(n).then((function(e){return i(null!=e?e:void 0)}),(function(t){if(null!=t.body){null==a||a(t.body);t.body.password?e.setState({error:t.body.password,isLoading:!1}):t.body.message&&e.setState({error:t.body.message,isLoading:!1})}}))} ;e.handleCancel=function(){(0,e.props.onClose)()};e.handlePasswordChange=function(t){var n=e.props.onPasswordChange;null==n||n(t);e.setState({value:t})};return e}n.prototype.render=function(){var e=this.props,t=e.title,n=e.actionText,c=e.children,s=e.transitionState,l=this.state,f=l.error,p=l.isLoading,h=l.value,d=o.Children.count(c)>0?(0,r.jsx)(i.Zbd,{type:i.Zbd.Types.WARNING,className:u().card,children:(0,r.jsx)(i.xvT,{className:u().warning,variant:"text-md/normal",children:c})}):null;return(0,r.jsx)(i.Y0X,{transitionState:s,children:(0,r.jsxs)("form",{onSubmit:this.handleSubmit,children:[(0,r.jsx)(i.xBx,{separator:!1,children:(0,r.jsx)(i.X6q,{variant:"heading-lg/semibold",children:t})}),(0,r.jsxs)(i.hzk,{children:[d,(0,r.jsxs)(i.xJW,{title:a.Z.Messages.FORM_LABEL_PASSWORD,className:u().spacing,children:[(0,r.jsx)(i.oil,{type:"password",autoComplete:"off",autoFocus:!0,value:h,onChange:this.handlePasswordChange}),null!=f&&""!==f?(0,r.jsxs)(i.xvT,{variant:"text-xs/normal", color:"text-danger",className:u().error,children:[" ",f," "]}):null]})]}),(0,r.jsxs)(i.mzw,{children:[(0,r.jsx)(i.zxk,{type:"submit",disabled:p||0===h.length,children:null!=n?n:a.Z.Messages.CONFIRM}),(0,r.jsx)(i.zxk,{onClick:this.handleCancel,look:i.zxk.Looks.LINK,color:i.zxk.Colors.PRIMARY,children:a.Z.Messages.CANCEL})]})]})})};return n}(o.PureComponent);y.key=function(){return"password-confirm-modal"};const b=y},411177:(e,t,n)=>{n.r(t);n.d(t,{default:()=>ae});var r=n(785893),o=n(667294),i=n(202351),a=n(975651),c=n(539381),u=n(426797),s=n(82726),l=n(984237),f=n(473903),p=n(294184),h=n.n(p),d=n(468811),y=n.n(d),b=n(999357),E=n(707961),m=n(528180),v=n(836485),R=n(107364),g=n(268335),_=n(376845),C=n(718831),I=n(473708),O=n(517866),P=n.n(O),w=n(637678),j=n.n(w),N=n(518280),S=n.n(N);function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length) ;for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0){var Z=O.captchaFields;k.captchaService=(0,$.B)(Z.captcha_service);k.captchaSitekey=Z.captcha_sitekey}return(0,r.jsx)(X,function(e){for(var t=1;t{n.d(t,{Z:()=>w});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),c=n(824390),u=n.n(c),s=n(496486),l=n.n(s),f=n(268335),p=n(707961),h=n(335186),d=n(107364),y=n(473708),b=n(2270),E=n.n(b),m=n(637678),v=n.n(m);function R(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function g(e){g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return g(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 C(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 I(e,t){I=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return I(e,t)}var O=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=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return C(this,n)}}var w=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=P(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,h.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)(d.Z,{className:E().countryItem,justify:d.Z.Justify.CENTER,align:d.Z.Align.CENTER,children:[(0,r.jsx)(d.Z.Child,{className:E().countryName,children:a}),(0,r.jsx)(d.Z.Child,{className:E().countryCode,grow:0,shrink:0,children:e})]})}}))})),i=l()(n).filter((function(e){return 0===t.length||u()(t.toLowerCase(),e.name.toLowerCase())||u()(t.toLowerCase(),e.translatedName.toLowerCase())})).map((function(t){return(0,o.createElement)(p.mzC.Item,_(function(e){for(var t=1;t{n.d(t,{Z:()=>y});var r=n(496486),o=n.n(r),i=n(2590),a=n(473708);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}var u,s=i.PUi.CAPTCHA,l=i.PUi.EMAIL,f=i.PUi.PHONE,p=i.PUi.REVERIFY_EMAIL,h=i.PUi.REVERIFY_PHONE,d=(c(u={},i.c2C.REQUIRE_VERIFIED_EMAIL,[l]),c(u,i.c2C.REQUIRE_VERIFIED_PHONE,[f]), c(u,i.c2C.REQUIRE_REVERIFIED_EMAIL,[p]),c(u,i.c2C.REQUIRE_REVERIFIED_PHONE,[h]),c(u,i.c2C.REQUIRE_VERIFIED_EMAIL_OR_VERIFIED_PHONE,[l,f]),c(u,i.c2C.REQUIRE_REVERIFIED_EMAIL_OR_VERIFIED_PHONE,[f,p]),c(u,i.c2C.REQUIRE_VERIFIED_EMAIL_OR_REVERIFIED_PHONE,[l,h]),c(u,i.c2C.REQUIRE_REVERIFIED_EMAIL_OR_REVERIFIED_PHONE,[p,h]),c(u,i.c2C.REQUIRE_CAPTCHA,[s]),c(u,i.c2C.AGREEMENTS,[]),u);const y={isPhoneReverification:function(e,t){return void 0!==e&&e.isPhoneVerified()&&(t===i.c2C.REQUIRE_REVERIFIED_PHONE||t===i.c2C.REQUIRE_REVERIFIED_EMAIL_OR_REVERIFIED_PHONE||t===i.c2C.REQUIRE_VERIFIED_EMAIL_OR_REVERIFIED_PHONE)},isEmailReverification:function(e){return e===i.c2C.REQUIRE_REVERIFIED_EMAIL||e===i.c2C.REQUIRE_REVERIFIED_EMAIL_OR_REVERIFIED_PHONE||e===i.c2C.REQUIRE_REVERIFIED_EMAIL_OR_VERIFIED_PHONE},getVerificationTypes:function(e){return null==e||"symbol"==(void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)?[]:d[e];var t}, getButtonTitle:function(e){switch(e){case i.PUi.EMAIL:return a.Z.Messages.VERIFY_BY_EMAIL;case i.PUi.PHONE:return a.Z.Messages.START_PHONE_VERIFICATION_BUTTON;case i.PUi.REVERIFY_EMAIL:return a.Z.Messages.START_EMAIL_REVERIFICATION_BUTTON;case i.PUi.REVERIFY_PHONE:return a.Z.Messages.START_PHONE_REVERIFICATION_BUTTON;default:return a.Z.Messages.START_VERIFICATION_BUTTON}},areVerificationTypesEqual:function(e,t){return o().isEqual(e,t)}}},836485:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),c=n(107364),u=n(304404),s=n.n(u);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 p(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)}function h(e,t){return!t||"object"!==y(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 y=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function b(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 h(this,n)}}var E=function(e){p(n,e);var t=b(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()(s().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);E.defaultProps={autoFocus:!1};var m=function(e){p(n,e);var t=b(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&&u.push((0,r.jsx)("div",{className:s().spacer},"spacer"));u.push((0,r.jsx)(E,{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,u=[],l=0;l0&&(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