Advertisement
Guest User

Untitled

a guest
Jan 7th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.39 KB | None | 0 0
  1. webpackJsonp([132], {
  2. 1394: function(e, t, a) {
  3. "use strict";
  4.  
  5. function i(e) {
  6. return e && e.__esModule ? e : {
  7. default: e
  8. }
  9. }
  10. t.__esModule = !0;
  11. var r = Object.assign || function(e) {
  12. for (var t = 1; t < arguments.length; t++) {
  13. var a = arguments[t];
  14. for (var i in a) Object.prototype.hasOwnProperty.call(a, i) && (e[i] = a[i])
  15. }
  16. return e
  17. },
  18. n = function() {
  19. var e = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
  20. return function(t, a, i, r) {
  21. var n = t && t.defaultProps,
  22. s = arguments.length - 3;
  23. if (a || 0 === s || (a = {}), a && n)
  24. for (var o in n) void 0 === a[o] && (a[o] = n[o]);
  25. else a || (a = n || {});
  26. if (1 === s) a.children = r;
  27. else if (s > 1) {
  28. for (var l = Array(s), u = 0; u < s; u++) l[u] = arguments[u + 3];
  29. a.children = l
  30. }
  31. return {
  32. $$typeof: e,
  33. type: t,
  34. key: void 0 === i ? null : "" + i,
  35. ref: null,
  36. props: a,
  37. _owner: null
  38. }
  39. }
  40. }(),
  41. s = i(a(3)),
  42. o = i(a(14)),
  43. l = i(a(15)),
  44. u = a(598),
  45. d = i(a(86)),
  46. f = a(206),
  47. c = i(a(21));
  48. a(1439), a(1755);
  49. var h = ["diablo", "dota2", "ffxiv", "league", "minecraft", "wow"],
  50. p = h[Math.floor(Math.random() * h.length)],
  51. v = a(1756)("./" + p + ".jpg"),
  52. m = a(1763),
  53. g = (0, u.backgroundImagePreloader)(function(e) {
  54. return s.default.createElement("div", e)
  55. }),
  56. b = n("div", {
  57. className: "auth-tiling-bg"
  58. }),
  59. y = n("div", {
  60. className: "auth-brand"
  61. }, void 0, n("div", {
  62. className: "auth-brand-inner"
  63. }, void 0, n("div", {
  64. className: "auth-logo"
  65. }), n("div", {
  66. className: "auth-name"
  67. }))),
  68. N = function(e) {
  69. function t(a) {
  70. ! function(e, t) {
  71. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  72. }(this, t);
  73. var i = function(e, t) {
  74. if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  75. return !t || "object" != typeof t && "function" != typeof t ? e : t
  76. }(this, e.call(this, a));
  77. return i.state = {
  78. hasRendered: !1,
  79. visible: !1,
  80. splashVisible: !1,
  81. splashImageURL: null
  82. }, i.timeout = new f.Timeout, o.default.bindAll(i, ["handleBGLoad", "handleResize"]), i
  83. }
  84. return function(e, t) {
  85. if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
  86. e.prototype = Object.create(t && t.prototype, {
  87. constructor: {
  88. value: e,
  89. enumerable: !1,
  90. writable: !0,
  91. configurable: !0
  92. }
  93. }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
  94. }(t, e), t.prototype.splashImageURL = function() {
  95. var e = this.props.invite;
  96. if (null == e) return v;
  97. var t = e.guild;
  98. return t ? t.splash ? d.default.getGuildSplashURL({
  99. id: t.id,
  100. splash: t.splash
  101. }) : v : null
  102. }, t.prototype.handleBGLoad = function(e, t) {
  103. var a = this.splashImageURL();
  104. a && a === t ? this.setState({
  105. splashVisible: !e
  106. }) : this.setState({
  107. visible: !0
  108. })
  109. }, t.prototype.handleResize = function() {
  110. this.updateWidth()
  111. }, t.prototype.loadBackgroundImage = function() {
  112. var e = this.splashImageURL();
  113. null != e && e != this.state.splashImageURL && this.setState({
  114. splashImageURL: e
  115. })
  116. }, t.prototype.updateWidth = function() {
  117. var e = this.refs,
  118. t = e.copy,
  119. a = e.org;
  120. t.style.width = a.offsetWidth + "px", t.style.height = a.offsetHeight + "px"
  121. }, t.prototype.componentDidMount = function() {
  122. var e = this;
  123. this.updateWidth(), this.timeout.start(1e3, function() {
  124. e.setState({
  125. visible: !0
  126. })
  127. }), this.loadBackgroundImage(), this.setState({
  128. hasRendered: !0
  129. }), window.addEventListener("resize", this.handleResize)
  130. }, t.prototype.componentWillUnmount = function() {
  131. this.timeout.stop(), window.removeEventListener("resize", this.handleResize)
  132. }, t.prototype.componentWillUpdate = function(e, t) {
  133. t.visible && this.timeout.stop(), e.invite != this.props.invite && this.loadBackgroundImage(e.invite)
  134. }, t.prototype.componentDidUpdate = function() {
  135. this.updateWidth()
  136. }, t.prototype.render = function() {
  137. var e = this.state,
  138. t = e.visible,
  139. a = e.splashVisible,
  140. i = e.hasRendered,
  141. o = e.splashImageURL,
  142. u = {
  143. className: "auth-tiling-bg",
  144. style: {
  145. backgroundImage: i ? "url('" + m + "')" : null
  146. }
  147. },
  148. d = {
  149. className: "auth-background",
  150. style: {
  151. backgroundImage: i && o ? "url('" + o + "')" : null
  152. }
  153. };
  154. return n("div", {
  155. className: (0, l.default)("auth-wrap-background", {
  156. visible: t
  157. })
  158. }, void 0, s.default.createElement(g, r({}, u, {
  159. onBackgroundImageLoad: this.handleBGLoad
  160. })), n("div", {
  161. className: (0, l.default)("auth-wrap-background", {
  162. visible: a
  163. })
  164. }, void 0, s.default.createElement(g, r({}, d, {
  165. onBackgroundImageLoad: this.handleBGLoad
  166. }))), n("div", {
  167. className: "auth-copyright"
  168. }, void 0, c.default.Messages.ARTWORK_COPYRIGHT), n("div", {
  169. className: "auth-center"
  170. }, void 0, s.default.createElement("div", {
  171. className: "auth-blur-wrap",
  172. ref: "copy"
  173. }, n("div", {
  174. className: "auth-blur"
  175. }, void 0, b, s.default.createElement("div", u), n("div", {
  176. className: (0, l.default)("auth-wrap-background", {
  177. visible: a
  178. })
  179. }, void 0, s.default.createElement("div", d))))), n("div", {
  180. className: "auth-center"
  181. }, void 0, s.default.createElement("div", {
  182. className: "auth-inner",
  183. ref: "org"
  184. }, y, n("form", {
  185. className: (0, l.default)("auth-form form deprecated", this.props.authFormClassNames),
  186. onSubmit: this.props.onSubmit
  187. }, void 0, this.props.children))))
  188. }, t
  189. }(s.default.PureComponent);
  190. N.defaultProps = {
  191. invite: null,
  192. authFormClassNames: null
  193. }, t.default = N, e.exports = t.default
  194. },
  195. 1755: function(e, t) {},
  196. 1756: function(e, t, a) {
  197. function i(e) {
  198. return a(r(e))
  199. }
  200.  
  201. function r(e) {
  202. var t = n[e];
  203. if (!(t + 1)) throw new Error("Cannot find module '" + e + "'.");
  204. return t
  205. }
  206. var n = {
  207. "./diablo.jpg": 1757,
  208. "./dota2.jpg": 1758,
  209. "./ffxiv.jpg": 1759,
  210. "./league.jpg": 1760,
  211. "./minecraft.jpg": 1761,
  212. "./wow.jpg": 1762
  213. };
  214. i.keys = function() {
  215. return Object.keys(n)
  216. }, i.resolve = r, e.exports = i, i.id = 1756
  217. },
  218. 1757: function(e, t, a) {
  219. e.exports = a.p + "d9716f4149b4153111af56ddcd1ba4fc.jpg"
  220. },
  221. 1758: function(e, t, a) {
  222. e.exports = a.p + "36511f92dae3fc67ab0d6c2a8e5e677f.jpg"
  223. },
  224. 1759: function(e, t, a) {
  225. e.exports = a.p + "57d8f3f7d76dae7c5ecdb19fb76fd7f1.jpg"
  226. },
  227. 1760: function(e, t, a) {
  228. e.exports = a.p + "fa7ba7a4c3d8665d3343fee590382bb9.jpg"
  229. },
  230. 1761: function(e, t, a) {
  231. e.exports = a.p + "85e031dc63742b86264cc0dbc2a6fdb8.jpg"
  232. },
  233. 1762: function(e, t, a) {
  234. e.exports = a.p + "03844e5fd2176980795f0f3fd4a4fd82.jpg"
  235. },
  236. 1763: function(e, t, a) {
  237. e.exports = a.p + "80bebd88344f603ad8e402de7c52ef6b.png"
  238. },
  239. 1878: function(e, t, a) {
  240. "use strict";
  241.  
  242. function i(e) {
  243. return e && e.__esModule ? e : {
  244. default: e
  245. }
  246. }
  247. t.__esModule = !0, t.renderAuthCaptcha = void 0;
  248. var r = function() {
  249. var e = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
  250. return function(t, a, i, r) {
  251. var n = t && t.defaultProps,
  252. s = arguments.length - 3;
  253. if (a || 0 === s || (a = {}), a && n)
  254. for (var o in n) void 0 === a[o] && (a[o] = n[o]);
  255. else a || (a = n || {});
  256. if (1 === s) a.children = r;
  257. else if (s > 1) {
  258. for (var l = Array(s), u = 0; u < s; u++) l[u] = arguments[u + 3];
  259. a.children = l
  260. }
  261. return {
  262. $$typeof: e,
  263. type: t,
  264. key: void 0 === i ? null : "" + i,
  265. ref: null,
  266. props: a,
  267. _owner: null
  268. }
  269. }
  270. }(),
  271. n = (i(a(3)), i(a(21))),
  272. s = i(a(1394)),
  273. o = i(a(1534)),
  274. l = function(e) {
  275. var t = e.title,
  276. a = e.invite,
  277. i = e.onChange;
  278. return r(s.default, {
  279. invite: a,
  280. authFormClassNames: "auth-captcha"
  281. }, void 0, r("h1", {
  282. className: "old-h1"
  283. }, void 0, t, r("p", {}, void 0, n.default.Messages.BEEP_BOOP)), r("div", {
  284. className: "captcha-box"
  285. }, void 0, r(o.default, {
  286. onChange: i,
  287. theme: "dark"
  288. })))
  289. };
  290. t.renderAuthCaptcha = l;
  291. t.default = l
  292. },
  293. 1879: function(e, t, a) {
  294. "use strict";
  295.  
  296. function i(e) {
  297. return e && e.__esModule ? e : {
  298. default: e
  299. }
  300. }
  301. t.__esModule = !0;
  302. var r = function() {
  303. var e = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
  304. return function(t, a, i, r) {
  305. var n = t && t.defaultProps,
  306. s = arguments.length - 3;
  307. if (a || 0 === s || (a = {}), a && n)
  308. for (var o in n) void 0 === a[o] && (a[o] = n[o]);
  309. else a || (a = n || {});
  310. if (1 === s) a.children = r;
  311. else if (s > 1) {
  312. for (var l = Array(s), u = 0; u < s; u++) l[u] = arguments[u + 3];
  313. a.children = l
  314. }
  315. return {
  316. $$typeof: e,
  317. type: t,
  318. key: void 0 === i ? null : "" + i,
  319. ref: null,
  320. props: a,
  321. _owner: null
  322. }
  323. }
  324. }(),
  325. n = i(a(3)),
  326. s = i(a(21)),
  327. o = i(a(144)),
  328. l = i(a(571));
  329. a(5014);
  330. var u = function(e) {
  331. var t = e.invite,
  332. a = new o.default(t.guild);
  333. return r("div", {
  334. className: "invite-header guild"
  335. }, void 0, r("h1", {
  336. className: "title"
  337. }, void 0, s.default.Messages.INSTANT_INVITE_YOU_HAVE_BEEN_INVITED_TO_JOIN), r("h2", {
  338. className: "old-h2"
  339. }, void 0, r(l.default, {
  340. guild: a,
  341. className: "invite-guild-icon",
  342. renderVerified: !0
  343. }), r("div", {}, void 0, a.name)))
  344. },
  345. d = function(e) {
  346. var t = e.invite,
  347. a = new o.default(t.guild),
  348. i = r(l.default, {
  349. guild: a,
  350. className: "invite-guild-icon",
  351. textScale: .7,
  352. renderVerified: !0
  353. });
  354. return r("div", {
  355. className: "invite-header full"
  356. }, void 0, r("h1", {
  357. className: "title"
  358. }, 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({
  359. username: t.inviter.username,
  360. guild: t.guild.name,
  361. guildNameHook: function(e, t) {
  362. return r("span", {
  363. className: "guild-wrap"
  364. }, t, i, e)
  365. }
  366. })))
  367. };
  368. t.default = function(e) {
  369. var t = e.invite;
  370. return null == t.inviter || t.approximate_member_count > 250 ? n.default.createElement(u, e) : n.default.createElement(d, e)
  371. }, e.exports = t.default
  372. },
  373. 5014: function(e, t) {},
  374. 5015: function(e, t, a) {
  375. "use strict";
  376.  
  377. function i(e) {
  378. return e && e.__esModule ? e : {
  379. default: e
  380. }
  381. }
  382. t.__esModule = !0;
  383. var r = Object.assign || function(e) {
  384. for (var t = 1; t < arguments.length; t++) {
  385. var a = arguments[t];
  386. for (var i in a) Object.prototype.hasOwnProperty.call(a, i) && (e[i] = a[i])
  387. }
  388. return e
  389. },
  390. n = function() {
  391. var e = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
  392. return function(t, a, i, r) {
  393. var n = t && t.defaultProps,
  394. s = arguments.length - 3;
  395. if (a || 0 === s || (a = {}), a && n)
  396. for (var o in n) void 0 === a[o] && (a[o] = n[o]);
  397. else a || (a = n || {});
  398. if (1 === s) a.children = r;
  399. else if (s > 1) {
  400. for (var l = Array(s), u = 0; u < s; u++) l[u] = arguments[u + 3];
  401. a.children = l
  402. }
  403. return {
  404. $$typeof: e,
  405. type: t,
  406. key: void 0 === i ? null : "" + i,
  407. ref: null,
  408. props: a,
  409. _owner: null
  410. }
  411. }
  412. }(),
  413. s = i(a(547)),
  414. o = i(a(3)),
  415. l = i(a(548)),
  416. u = i(a(549)),
  417. d = a(103),
  418. f = a(568),
  419. c = i(a(49)),
  420. h = a(1595),
  421. p = i(a(15)),
  422. v = i(a(7)),
  423. m = i(a(1394)),
  424. g = i(a(1493)),
  425. b = a(1878),
  426. y = i(a(563)),
  427. N = i(a(24)),
  428. E = i(a(574)),
  429. _ = a(4),
  430. R = i(a(21)),
  431. I = i(a(1879)),
  432. S = a(1553),
  433. L = {
  434. mixins: [u.default, v.default.StoreListenerMixin(N.default)],
  435. getStateFromStores: function() {
  436. return {
  437. registering: N.default.getRegisterStatus(),
  438. errors: N.default.getErrors(),
  439. authenticated: N.default.isAuthenticated()
  440. }
  441. },
  442. componentDidMount: function() {
  443. y.default.fingerprint("Register"), this.maybeAuthenticated()
  444. },
  445. componentDidUpdate: function() {
  446. this.maybeAuthenticated()
  447. },
  448. maybeAuthenticated: function() {
  449. if (this.state.authenticated) {
  450. var e = (0, f.parse)(this.props.location.search);
  451. e.redirect_to && (0, S.isSafeRedirect)(e.redirect_to) ? window.location = e.redirect_to : c.default.transitionTo(E.default.defaultRoute)
  452. }
  453. },
  454. hasError: function(e) {
  455. return null != this.state.errors[e]
  456. },
  457. renderError: function(e) {
  458. return this.hasError(e) ? n("span", {
  459. className: "error"
  460. }, void 0, "(", this.state.errors[e], ")") : null
  461. },
  462. renderField: function(e, t, a) {
  463. var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {};
  464. return n("div", {
  465. className: (0, p.default)({
  466. "control-group": !0,
  467. error: this.hasError(t)
  468. })
  469. }, void 0, n("label", {
  470. htmlFor: "register-" + t
  471. }, void 0, a, " ", this.renderError(t)), o.default.createElement("input", r({
  472. id: "register-" + t,
  473. ref: t,
  474. autoComplete: "off",
  475. spellCheck: "false",
  476. type: e
  477. }, i)))
  478. },
  479. handleCaptchaChange: function(e) {
  480. var t = this;
  481. this.setState({
  482. captchaKey: e
  483. }, function() {
  484. t.handleRegister()
  485. })
  486. },
  487. render: function() {
  488. return this.hasError("captcha_key") ? (0, b.renderAuthCaptcha)({
  489. invite: this.props.invite,
  490. onChange: this.handleCaptchaChange,
  491. title: this.getFormHeading()
  492. }) : this.renderForm()
  493. }
  494. },
  495. M = n("div", {
  496. className: "divider"
  497. }),
  498. w = (0, l.default)({
  499. displayName: "RegisterFull",
  500. mixins: [L],
  501. handleSubmit: function(e) {
  502. var t = this;
  503. e.preventDefault();
  504. var a = this.refs.email.value,
  505. i = this.refs.username.value,
  506. r = this.refs.password.value;
  507. this.setState({
  508. email: a,
  509. username: i,
  510. password: r
  511. }, function() {
  512. t.handleRegister()
  513. })
  514. },
  515. handleRegister: function() {
  516. var e = this.state,
  517. t = e.email,
  518. a = e.username,
  519. i = e.password,
  520. r = e.captchaKey;
  521. y.default.registerFull(t, a, i, null != this.props.invite ? this.props.invite.code : void 0, r)
  522. },
  523. getFormHeading: function() {
  524. return R.default.Messages.REGISTER_TITLE
  525. },
  526. renderForm: function() {
  527. var e = this.props.invite,
  528. t = void 0,
  529. a = void 0;
  530. return null != e ? (t = n(I.default, {
  531. invite: e
  532. }), a = {
  533. pathname: _.Routes.INVITE(e.code),
  534. search: "mode=login"
  535. }) : (t = n("h1", {
  536. className: "old-h1"
  537. }, void 0, this.getFormHeading()), a = (0, h.getLoginPath)(_.Routes.INDEX, !1)), n(m.default, {
  538. onSubmit: this.handleSubmit,
  539. invite: this.props.invite
  540. }, void 0, t, this.renderField("email", "email", R.default.Messages.FORM_LABEL_EMAIL, {
  541. autoFocus: !0
  542. }), this.renderField("text", "username", R.default.Messages.FORM_LABEL_USERNAME), this.renderField("password", "password", R.default.Messages.FORM_LABEL_PASSWORD), n(g.default, {
  543. className: "btn btn-primary",
  544. disabled: this.state.registering
  545. }, void 0, R.default.Messages.CONTINUE), n("footer", {
  546. className: "margin-top-20"
  547. }, void 0, R.default.Messages.TERMS_PRIVACY.format({
  548. termsURL: _.MarketingURLs.TERMS,
  549. privacyURL: _.MarketingURLs.PRIVACY
  550. })), M, n("footer", {}, void 0, R.default.Messages.ALREADY_HAVE_ACCOUNT, " ", n(d.Link, {
  551. to: a,
  552. onClick: this.props.onLoginStart
  553. }, void 0, R.default.Messages.LOGIN)))
  554. }
  555. }),
  556. A = n("div", {
  557. className: "divider"
  558. }),
  559. T = (0, l.default)({
  560. displayName: "RegisterInvite",
  561. mixins: [L],
  562. contextTypes: {
  563. location: s.default.object
  564. },
  565. handleSubmit: function(e) {
  566. var t = this;
  567. e && e.preventDefault();
  568. var a = this.refs.username.value;
  569. this.setState({
  570. username: a
  571. }, function() {
  572. t.handleRegister()
  573. })
  574. },
  575. handleRegister: function() {
  576. var e = this.state,
  577. t = e.username,
  578. a = e.captchaKey;
  579. y.default.register(t, null != this.props.invite ? this.props.invite.code : void 0, a)
  580. },
  581. getFormHeading: function() {
  582. return R.default.Messages.INSTANT_INVITE_RESOLVED_TITLE
  583. },
  584. renderForm: function() {
  585. var e = this.props.invite,
  586. t = (0, f.parse)(this.props.location.search).username,
  587. a = {
  588. pathname: _.Routes.INVITE(e.code),
  589. search: "mode=login"
  590. };
  591. return n(m.default, {
  592. onSubmit: this.handleSubmit,
  593. invite: e,
  594. authFormClassNames: this.props.authFormClassNames
  595. }, void 0, n(I.default, {
  596. invite: e
  597. }), this.renderField("text", "username", R.default.Messages.FORM_PLACEHOLDER_USERNAME, {
  598. defaultValue: t,
  599. autoFocus: !0
  600. }), n(g.default, {
  601. className: "btn btn-primary",
  602. disabled: this.state.registering
  603. }, void 0, R.default.Messages.CONTINUE), n("footer", {
  604. className: "margin-top-20"
  605. }, void 0, R.default.Messages.TERMS_PRIVACY.format({
  606. termsURL: _.MarketingURLs.TERMS,
  607. privacyURL: _.MarketingURLs.PRIVACY
  608. })), A, n("footer", {}, void 0, R.default.Messages.ALREADY_HAVE_ACCOUNT, " ", n(d.Link, {
  609. to: a,
  610. onClick: this.props.onLoginStart
  611. }, void 0, R.default.Messages.LOGIN)))
  612. }
  613. });
  614. t.default = (0, d.withRouter)(function(e) {
  615. return e.guest ? o.default.createElement(T, e) : o.default.createElement(w, e)
  616. }), e.exports = t.default
  617. }
  618. });
  619. //# sourceMappingURL=132.c28dc057ad36e9308bc6.js.map
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement