Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- webpackJsonp([132], {
- 1394: function(e, t, a) {
- "use strict";
- function i(e) {
- return e && e.__esModule ? e : {
- default: e
- }
- }
- t.__esModule = !0;
- var r = Object.assign || function(e) {
- for (var t = 1; t < arguments.length; t++) {
- var a = arguments[t];
- for (var i in a) Object.prototype.hasOwnProperty.call(a, i) && (e[i] = a[i])
- }
- return e
- },
- n = function() {
- var e = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
- return function(t, a, i, r) {
- var n = t && t.defaultProps,
- s = arguments.length - 3;
- if (a || 0 === s || (a = {}), a && n)
- for (var o in n) void 0 === a[o] && (a[o] = n[o]);
- else a || (a = n || {});
- if (1 === s) a.children = r;
- else if (s > 1) {
- for (var l = Array(s), u = 0; u < s; u++) l[u] = arguments[u + 3];
- a.children = l
- }
- return {
- $$typeof: e,
- type: t,
- key: void 0 === i ? null : "" + i,
- ref: null,
- props: a,
- _owner: null
- }
- }
- }(),
- s = i(a(3)),
- o = i(a(14)),
- l = i(a(15)),
- u = a(598),
- d = i(a(86)),
- f = a(206),
- c = i(a(21));
- a(1439), a(1755);
- var h = ["diablo", "dota2", "ffxiv", "league", "minecraft", "wow"],
- p = h[Math.floor(Math.random() * h.length)],
- v = a(1756)("./" + p + ".jpg"),
- m = a(1763),
- g = (0, u.backgroundImagePreloader)(function(e) {
- return s.default.createElement("div", e)
- }),
- b = n("div", {
- className: "auth-tiling-bg"
- }),
- y = n("div", {
- className: "auth-brand"
- }, void 0, n("div", {
- className: "auth-brand-inner"
- }, void 0, n("div", {
- className: "auth-logo"
- }), n("div", {
- className: "auth-name"
- }))),
- N = function(e) {
- function t(a) {
- ! function(e, t) {
- if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
- }(this, t);
- var i = function(e, t) {
- if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return !t || "object" != typeof t && "function" != typeof t ? e : t
- }(this, e.call(this, a));
- return i.state = {
- hasRendered: !1,
- visible: !1,
- splashVisible: !1,
- splashImageURL: null
- }, i.timeout = new f.Timeout, o.default.bindAll(i, ["handleBGLoad", "handleResize"]), i
- }
- return function(e, t) {
- if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
- e.prototype = Object.create(t && t.prototype, {
- constructor: {
- value: e,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
- }(t, e), t.prototype.splashImageURL = function() {
- var e = this.props.invite;
- if (null == e) return v;
- var t = e.guild;
- return t ? t.splash ? d.default.getGuildSplashURL({
- id: t.id,
- splash: t.splash
- }) : v : null
- }, t.prototype.handleBGLoad = function(e, t) {
- var a = this.splashImageURL();
- a && a === t ? this.setState({
- splashVisible: !e
- }) : this.setState({
- visible: !0
- })
- }, t.prototype.handleResize = function() {
- this.updateWidth()
- }, t.prototype.loadBackgroundImage = function() {
- var e = this.splashImageURL();
- null != e && e != this.state.splashImageURL && this.setState({
- splashImageURL: e
- })
- }, t.prototype.updateWidth = function() {
- var e = this.refs,
- t = e.copy,
- a = e.org;
- t.style.width = a.offsetWidth + "px", t.style.height = a.offsetHeight + "px"
- }, t.prototype.componentDidMount = function() {
- var e = this;
- this.updateWidth(), this.timeout.start(1e3, function() {
- e.setState({
- visible: !0
- })
- }), this.loadBackgroundImage(), this.setState({
- hasRendered: !0
- }), window.addEventListener("resize", this.handleResize)
- }, t.prototype.componentWillUnmount = function() {
- this.timeout.stop(), window.removeEventListener("resize", this.handleResize)
- }, t.prototype.componentWillUpdate = function(e, t) {
- t.visible && this.timeout.stop(), e.invite != this.props.invite && this.loadBackgroundImage(e.invite)
- }, t.prototype.componentDidUpdate = function() {
- this.updateWidth()
- }, t.prototype.render = function() {
- var e = this.state,
- t = e.visible,
- a = e.splashVisible,
- i = e.hasRendered,
- o = e.splashImageURL,
- u = {
- className: "auth-tiling-bg",
- style: {
- backgroundImage: i ? "url('" + m + "')" : null
- }
- },
- d = {
- className: "auth-background",
- style: {
- backgroundImage: i && o ? "url('" + o + "')" : null
- }
- };
- return n("div", {
- className: (0, l.default)("auth-wrap-background", {
- visible: t
- })
- }, void 0, s.default.createElement(g, r({}, u, {
- onBackgroundImageLoad: this.handleBGLoad
- })), n("div", {
- className: (0, l.default)("auth-wrap-background", {
- visible: a
- })
- }, void 0, s.default.createElement(g, r({}, d, {
- onBackgroundImageLoad: this.handleBGLoad
- }))), n("div", {
- className: "auth-copyright"
- }, void 0, c.default.Messages.ARTWORK_COPYRIGHT), n("div", {
- className: "auth-center"
- }, void 0, s.default.createElement("div", {
- className: "auth-blur-wrap",
- ref: "copy"
- }, n("div", {
- className: "auth-blur"
- }, void 0, b, s.default.createElement("div", u), n("div", {
- className: (0, l.default)("auth-wrap-background", {
- visible: a
- })
- }, void 0, s.default.createElement("div", d))))), n("div", {
- className: "auth-center"
- }, void 0, s.default.createElement("div", {
- className: "auth-inner",
- ref: "org"
- }, y, n("form", {
- className: (0, l.default)("auth-form form deprecated", this.props.authFormClassNames),
- onSubmit: this.props.onSubmit
- }, void 0, this.props.children))))
- }, t
- }(s.default.PureComponent);
- N.defaultProps = {
- invite: null,
- authFormClassNames: null
- }, t.default = N, e.exports = t.default
- },
- 1755: function(e, t) {},
- 1756: function(e, t, a) {
- function i(e) {
- return a(r(e))
- }
- function r(e) {
- var t = n[e];
- if (!(t + 1)) throw new Error("Cannot find module '" + e + "'.");
- return t
- }
- var n = {
- "./diablo.jpg": 1757,
- "./dota2.jpg": 1758,
- "./ffxiv.jpg": 1759,
- "./league.jpg": 1760,
- "./minecraft.jpg": 1761,
- "./wow.jpg": 1762
- };
- i.keys = function() {
- return Object.keys(n)
- }, i.resolve = r, e.exports = i, i.id = 1756
- },
- 1757: function(e, t, a) {
- e.exports = a.p + "d9716f4149b4153111af56ddcd1ba4fc.jpg"
- },
- 1758: function(e, t, a) {
- e.exports = a.p + "36511f92dae3fc67ab0d6c2a8e5e677f.jpg"
- },
- 1759: function(e, t, a) {
- e.exports = a.p + "57d8f3f7d76dae7c5ecdb19fb76fd7f1.jpg"
- },
- 1760: function(e, t, a) {
- e.exports = a.p + "fa7ba7a4c3d8665d3343fee590382bb9.jpg"
- },
- 1761: function(e, t, a) {
- e.exports = a.p + "85e031dc63742b86264cc0dbc2a6fdb8.jpg"
- },
- 1762: function(e, t, a) {
- e.exports = a.p + "03844e5fd2176980795f0f3fd4a4fd82.jpg"
- },
- 1763: function(e, t, a) {
- e.exports = a.p + "80bebd88344f603ad8e402de7c52ef6b.png"
- },
- 1878: function(e, t, a) {
- "use strict";
- function i(e) {
- return e && e.__esModule ? e : {
- default: e
- }
- }
- t.__esModule = !0, t.renderAuthCaptcha = void 0;
- var r = function() {
- var e = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
- return function(t, a, i, r) {
- var n = t && t.defaultProps,
- s = arguments.length - 3;
- if (a || 0 === s || (a = {}), a && n)
- for (var o in n) void 0 === a[o] && (a[o] = n[o]);
- else a || (a = n || {});
- if (1 === s) a.children = r;
- else if (s > 1) {
- for (var l = Array(s), u = 0; u < s; u++) l[u] = arguments[u + 3];
- a.children = l
- }
- return {
- $$typeof: e,
- type: t,
- key: void 0 === i ? null : "" + i,
- ref: null,
- props: a,
- _owner: null
- }
- }
- }(),
- n = (i(a(3)), i(a(21))),
- s = i(a(1394)),
- o = i(a(1534)),
- l = function(e) {
- var t = e.title,
- a = e.invite,
- i = e.onChange;
- return r(s.default, {
- invite: a,
- authFormClassNames: "auth-captcha"
- }, void 0, r("h1", {
- className: "old-h1"
- }, void 0, t, r("p", {}, void 0, n.default.Messages.BEEP_BOOP)), r("div", {
- className: "captcha-box"
- }, void 0, r(o.default, {
- onChange: i,
- theme: "dark"
- })))
- };
- t.renderAuthCaptcha = l;
- t.default = l
- },
- 1879: function(e, t, a) {
- "use strict";
- function i(e) {
- return e && e.__esModule ? e : {
- default: e
- }
- }
- t.__esModule = !0;
- var r = function() {
- var e = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
- return function(t, a, i, r) {
- var n = t && t.defaultProps,
- s = arguments.length - 3;
- if (a || 0 === s || (a = {}), a && n)
- for (var o in n) void 0 === a[o] && (a[o] = n[o]);
- else a || (a = n || {});
- if (1 === s) a.children = r;
- else if (s > 1) {
- for (var l = Array(s), u = 0; u < s; u++) l[u] = arguments[u + 3];
- a.children = l
- }
- return {
- $$typeof: e,
- type: t,
- key: void 0 === i ? null : "" + i,
- ref: null,
- props: a,
- _owner: null
- }
- }
- }(),
- n = i(a(3)),
- s = i(a(21)),
- o = i(a(144)),
- l = i(a(571));
- a(5014);
- var u = function(e) {
- var t = e.invite,
- a = new o.default(t.guild);
- return r("div", {
- className: "invite-header guild"
- }, void 0, r("h1", {
- className: "title"
- }, void 0, s.default.Messages.INSTANT_INVITE_YOU_HAVE_BEEN_INVITED_TO_JOIN), r("h2", {
- className: "old-h2"
- }, void 0, r(l.default, {
- guild: a,
- className: "invite-guild-icon",
- renderVerified: !0
- }), r("div", {}, void 0, a.name)))
- },
- d = function(e) {
- var t = e.invite,
- a = new o.default(t.guild),
- i = r(l.default, {
- guild: a,
- className: "invite-guild-icon",
- textScale: .7,
- renderVerified: !0
- });
- return r("div", {
- className: "invite-header full"
- }, void 0, r("h1", {
- className: "title"
- }, void 0, s.default.Messages.INSTANT_INVITE_YOU_HAVE_BEEN_INVITED_TO_JOIN), r("p", {}, void 0, s.default.Messages.INSTANT_INVITE_GUILD_BY_USER.format({
- username: t.inviter.username,
- guild: t.guild.name,
- guildNameHook: function(e, t) {
- return r("span", {
- className: "guild-wrap"
- }, t, i, e)
- }
- })))
- };
- t.default = function(e) {
- var t = e.invite;
- return null == t.inviter || t.approximate_member_count > 250 ? n.default.createElement(u, e) : n.default.createElement(d, e)
- }, e.exports = t.default
- },
- 5014: function(e, t) {},
- 5015: function(e, t, a) {
- "use strict";
- function i(e) {
- return e && e.__esModule ? e : {
- default: e
- }
- }
- t.__esModule = !0;
- var r = Object.assign || function(e) {
- for (var t = 1; t < arguments.length; t++) {
- var a = arguments[t];
- for (var i in a) Object.prototype.hasOwnProperty.call(a, i) && (e[i] = a[i])
- }
- return e
- },
- n = function() {
- var e = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
- return function(t, a, i, r) {
- var n = t && t.defaultProps,
- s = arguments.length - 3;
- if (a || 0 === s || (a = {}), a && n)
- for (var o in n) void 0 === a[o] && (a[o] = n[o]);
- else a || (a = n || {});
- if (1 === s) a.children = r;
- else if (s > 1) {
- for (var l = Array(s), u = 0; u < s; u++) l[u] = arguments[u + 3];
- a.children = l
- }
- return {
- $$typeof: e,
- type: t,
- key: void 0 === i ? null : "" + i,
- ref: null,
- props: a,
- _owner: null
- }
- }
- }(),
- s = i(a(547)),
- o = i(a(3)),
- l = i(a(548)),
- u = i(a(549)),
- d = a(103),
- f = a(568),
- c = i(a(49)),
- h = a(1595),
- p = i(a(15)),
- v = i(a(7)),
- m = i(a(1394)),
- g = i(a(1493)),
- b = a(1878),
- y = i(a(563)),
- N = i(a(24)),
- E = i(a(574)),
- _ = a(4),
- R = i(a(21)),
- I = i(a(1879)),
- S = a(1553),
- L = {
- mixins: [u.default, v.default.StoreListenerMixin(N.default)],
- getStateFromStores: function() {
- return {
- registering: N.default.getRegisterStatus(),
- errors: N.default.getErrors(),
- authenticated: N.default.isAuthenticated()
- }
- },
- componentDidMount: function() {
- y.default.fingerprint("Register"), this.maybeAuthenticated()
- },
- componentDidUpdate: function() {
- this.maybeAuthenticated()
- },
- maybeAuthenticated: function() {
- if (this.state.authenticated) {
- var e = (0, f.parse)(this.props.location.search);
- e.redirect_to && (0, S.isSafeRedirect)(e.redirect_to) ? window.location = e.redirect_to : c.default.transitionTo(E.default.defaultRoute)
- }
- },
- hasError: function(e) {
- return null != this.state.errors[e]
- },
- renderError: function(e) {
- return this.hasError(e) ? n("span", {
- className: "error"
- }, void 0, "(", this.state.errors[e], ")") : null
- },
- renderField: function(e, t, a) {
- var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {};
- return n("div", {
- className: (0, p.default)({
- "control-group": !0,
- error: this.hasError(t)
- })
- }, void 0, n("label", {
- htmlFor: "register-" + t
- }, void 0, a, " ", this.renderError(t)), o.default.createElement("input", r({
- id: "register-" + t,
- ref: t,
- autoComplete: "off",
- spellCheck: "false",
- type: e
- }, i)))
- },
- handleCaptchaChange: function(e) {
- var t = this;
- this.setState({
- captchaKey: e
- }, function() {
- t.handleRegister()
- })
- },
- render: function() {
- return this.hasError("captcha_key") ? (0, b.renderAuthCaptcha)({
- invite: this.props.invite,
- onChange: this.handleCaptchaChange,
- title: this.getFormHeading()
- }) : this.renderForm()
- }
- },
- M = n("div", {
- className: "divider"
- }),
- w = (0, l.default)({
- displayName: "RegisterFull",
- mixins: [L],
- handleSubmit: function(e) {
- var t = this;
- e.preventDefault();
- var a = this.refs.email.value,
- i = this.refs.username.value,
- r = this.refs.password.value;
- this.setState({
- email: a,
- username: i,
- password: r
- }, function() {
- t.handleRegister()
- })
- },
- handleRegister: function() {
- var e = this.state,
- t = e.email,
- a = e.username,
- i = e.password,
- r = e.captchaKey;
- y.default.registerFull(t, a, i, null != this.props.invite ? this.props.invite.code : void 0, r)
- },
- getFormHeading: function() {
- return R.default.Messages.REGISTER_TITLE
- },
- renderForm: function() {
- var e = this.props.invite,
- t = void 0,
- a = void 0;
- return null != e ? (t = n(I.default, {
- invite: e
- }), a = {
- pathname: _.Routes.INVITE(e.code),
- search: "mode=login"
- }) : (t = n("h1", {
- className: "old-h1"
- }, void 0, this.getFormHeading()), a = (0, h.getLoginPath)(_.Routes.INDEX, !1)), n(m.default, {
- onSubmit: this.handleSubmit,
- invite: this.props.invite
- }, void 0, t, this.renderField("email", "email", R.default.Messages.FORM_LABEL_EMAIL, {
- autoFocus: !0
- }), this.renderField("text", "username", R.default.Messages.FORM_LABEL_USERNAME), this.renderField("password", "password", R.default.Messages.FORM_LABEL_PASSWORD), n(g.default, {
- className: "btn btn-primary",
- disabled: this.state.registering
- }, void 0, R.default.Messages.CONTINUE), n("footer", {
- className: "margin-top-20"
- }, void 0, R.default.Messages.TERMS_PRIVACY.format({
- termsURL: _.MarketingURLs.TERMS,
- privacyURL: _.MarketingURLs.PRIVACY
- })), M, n("footer", {}, void 0, R.default.Messages.ALREADY_HAVE_ACCOUNT, " ", n(d.Link, {
- to: a,
- onClick: this.props.onLoginStart
- }, void 0, R.default.Messages.LOGIN)))
- }
- }),
- A = n("div", {
- className: "divider"
- }),
- T = (0, l.default)({
- displayName: "RegisterInvite",
- mixins: [L],
- contextTypes: {
- location: s.default.object
- },
- handleSubmit: function(e) {
- var t = this;
- e && e.preventDefault();
- var a = this.refs.username.value;
- this.setState({
- username: a
- }, function() {
- t.handleRegister()
- })
- },
- handleRegister: function() {
- var e = this.state,
- t = e.username,
- a = e.captchaKey;
- y.default.register(t, null != this.props.invite ? this.props.invite.code : void 0, a)
- },
- getFormHeading: function() {
- return R.default.Messages.INSTANT_INVITE_RESOLVED_TITLE
- },
- renderForm: function() {
- var e = this.props.invite,
- t = (0, f.parse)(this.props.location.search).username,
- a = {
- pathname: _.Routes.INVITE(e.code),
- search: "mode=login"
- };
- return n(m.default, {
- onSubmit: this.handleSubmit,
- invite: e,
- authFormClassNames: this.props.authFormClassNames
- }, void 0, n(I.default, {
- invite: e
- }), this.renderField("text", "username", R.default.Messages.FORM_PLACEHOLDER_USERNAME, {
- defaultValue: t,
- autoFocus: !0
- }), n(g.default, {
- className: "btn btn-primary",
- disabled: this.state.registering
- }, void 0, R.default.Messages.CONTINUE), n("footer", {
- className: "margin-top-20"
- }, void 0, R.default.Messages.TERMS_PRIVACY.format({
- termsURL: _.MarketingURLs.TERMS,
- privacyURL: _.MarketingURLs.PRIVACY
- })), A, n("footer", {}, void 0, R.default.Messages.ALREADY_HAVE_ACCOUNT, " ", n(d.Link, {
- to: a,
- onClick: this.props.onLoginStart
- }, void 0, R.default.Messages.LOGIN)))
- }
- });
- t.default = (0, d.withRouter)(function(e) {
- return e.guest ? o.default.createElement(T, e) : o.default.createElement(w, e)
- }), e.exports = t.default
- }
- });
- //# sourceMappingURL=132.c28dc057ad36e9308bc6.js.map
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement