Advertisement
xipo

Untitled

Jun 29th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 50.98 KB | None | 0 0
  1. /******/ (function(modules) { // webpackBootstrap
  2. /******/ // The module cache
  3. /******/ var installedModules = {};
  4. /******/
  5. /******/ // The require function
  6. /******/ function __webpack_require__(moduleId) {
  7. /******/
  8. /******/ // Check if module is in cache
  9. /******/ if(installedModules[moduleId])
  10. /******/ return installedModules[moduleId].exports;
  11. /******/
  12. /******/ // Create a new module (and put it into the cache)
  13. /******/ var module = installedModules[moduleId] = {
  14. /******/ i: moduleId,
  15. /******/ l: false,
  16. /******/ exports: {}
  17. /******/ };
  18. /******/
  19. /******/ // Execute the module function
  20. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  21. /******/
  22. /******/ // Flag the module as loaded
  23. /******/ module.l = true;
  24. /******/
  25. /******/ // Return the exports of the module
  26. /******/ return module.exports;
  27. /******/ }
  28. /******/
  29. /******/
  30. /******/ // expose the modules object (__webpack_modules__)
  31. /******/ __webpack_require__.m = modules;
  32. /******/
  33. /******/ // expose the module cache
  34. /******/ __webpack_require__.c = installedModules;
  35. /******/
  36. /******/ // identity function for calling harmony imports with the correct context
  37. /******/ __webpack_require__.i = function(value) { return value; };
  38. /******/
  39. /******/ // define getter function for harmony exports
  40. /******/ __webpack_require__.d = function(exports, name, getter) {
  41. /******/ if(!__webpack_require__.o(exports, name)) {
  42. /******/ Object.defineProperty(exports, name, {
  43. /******/ configurable: false,
  44. /******/ enumerable: true,
  45. /******/ get: getter
  46. /******/ });
  47. /******/ }
  48. /******/ };
  49. /******/
  50. /******/ // getDefaultExport function for compatibility with non-harmony modules
  51. /******/ __webpack_require__.n = function(module) {
  52. /******/ var getter = module && module.__esModule ?
  53. /******/ function getDefault() { return module['default']; } :
  54. /******/ function getModuleExports() { return module; };
  55. /******/ __webpack_require__.d(getter, 'a', getter);
  56. /******/ return getter;
  57. /******/ };
  58. /******/
  59. /******/ // Object.prototype.hasOwnProperty.call
  60. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  61. /******/
  62. /******/ // __webpack_public_path__
  63. /******/ __webpack_require__.p = "";
  64. /******/
  65. /******/ // Load entry module and return exports
  66. /******/ return __webpack_require__(__webpack_require__.s = 39);
  67. /******/ })
  68. /************************************************************************/
  69. /******/ ([
  70. /* 0 */
  71. /***/ (function(module, exports, __webpack_require__) {
  72.  
  73. "use strict";
  74.  
  75.  
  76. var bind = __webpack_require__(6);
  77.  
  78. /*global toString:true*/
  79.  
  80. // utils is a library of generic helper functions non-specific to axios
  81.  
  82. var toString = Object.prototype.toString;
  83.  
  84. /**
  85. * Determine if a value is an Array
  86. *
  87. * @param {Object} val The value to test
  88. * @returns {boolean} True if value is an Array, otherwise false
  89. */
  90. function isArray(val) {
  91. return toString.call(val) === '[object Array]';
  92. }
  93.  
  94. /**
  95. * Determine if a value is an ArrayBuffer
  96. *
  97. * @param {Object} val The value to test
  98. * @returns {boolean} True if value is an ArrayBuffer, otherwise false
  99. */
  100. function isArrayBuffer(val) {
  101. return toString.call(val) === '[object ArrayBuffer]';
  102. }
  103.  
  104. /**
  105. * Determine if a value is a FormData
  106. *
  107. * @param {Object} val The value to test
  108. * @returns {boolean} True if value is an FormData, otherwise false
  109. */
  110. function isFormData(val) {
  111. return (typeof FormData !== 'undefined') && (val instanceof FormData);
  112. }
  113.  
  114. /**
  115. * Determine if a value is a view on an ArrayBuffer
  116. *
  117. * @param {Object} val The value to test
  118. * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
  119. */
  120. function isArrayBufferView(val) {
  121. var result;
  122. if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
  123. result = ArrayBuffer.isView(val);
  124. } else {
  125. result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
  126. }
  127. return result;
  128. }
  129.  
  130. /**
  131. * Determine if a value is a String
  132. *
  133. * @param {Object} val The value to test
  134. * @returns {boolean} True if value is a String, otherwise false
  135. */
  136. function isString(val) {
  137. return typeof val === 'string';
  138. }
  139.  
  140. /**
  141. * Determine if a value is a Number
  142. *
  143. * @param {Object} val The value to test
  144. * @returns {boolean} True if value is a Number, otherwise false
  145. */
  146. function isNumber(val) {
  147. return typeof val === 'number';
  148. }
  149.  
  150. /**
  151. * Determine if a value is undefined
  152. *
  153. * @param {Object} val The value to test
  154. * @returns {boolean} True if the value is undefined, otherwise false
  155. */
  156. function isUndefined(val) {
  157. return typeof val === 'undefined';
  158. }
  159.  
  160. /**
  161. * Determine if a value is an Object
  162. *
  163. * @param {Object} val The value to test
  164. * @returns {boolean} True if value is an Object, otherwise false
  165. */
  166. function isObject(val) {
  167. return val !== null && typeof val === 'object';
  168. }
  169.  
  170. /**
  171. * Determine if a value is a Date
  172. *
  173. * @param {Object} val The value to test
  174. * @returns {boolean} True if value is a Date, otherwise false
  175. */
  176. function isDate(val) {
  177. return toString.call(val) === '[object Date]';
  178. }
  179.  
  180. /**
  181. * Determine if a value is a File
  182. *
  183. * @param {Object} val The value to test
  184. * @returns {boolean} True if value is a File, otherwise false
  185. */
  186. function isFile(val) {
  187. return toString.call(val) === '[object File]';
  188. }
  189.  
  190. /**
  191. * Determine if a value is a Blob
  192. *
  193. * @param {Object} val The value to test
  194. * @returns {boolean} True if value is a Blob, otherwise false
  195. */
  196. function isBlob(val) {
  197. return toString.call(val) === '[object Blob]';
  198. }
  199.  
  200. /**
  201. * Determine if a value is a Function
  202. *
  203. * @param {Object} val The value to test
  204. * @returns {boolean} True if value is a Function, otherwise false
  205. */
  206. function isFunction(val) {
  207. return toString.call(val) === '[object Function]';
  208. }
  209.  
  210. /**
  211. * Determine if a value is a Stream
  212. *
  213. * @param {Object} val The value to test
  214. * @returns {boolean} True if value is a Stream, otherwise false
  215. */
  216. function isStream(val) {
  217. return isObject(val) && isFunction(val.pipe);
  218. }
  219.  
  220. /**
  221. * Determine if a value is a URLSearchParams object
  222. *
  223. * @param {Object} val The value to test
  224. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  225. */
  226. function isURLSearchParams(val) {
  227. return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
  228. }
  229.  
  230. /**
  231. * Trim excess whitespace off the beginning and end of a string
  232. *
  233. * @param {String} str The String to trim
  234. * @returns {String} The String freed of excess whitespace
  235. */
  236. function trim(str) {
  237. return str.replace(/^\s*/, '').replace(/\s*$/, '');
  238. }
  239.  
  240. /**
  241. * Determine if we're running in a standard browser environment
  242. *
  243. * This allows axios to run in a web worker, and react-native.
  244. * Both environments support XMLHttpRequest, but not fully standard globals.
  245. *
  246. * web workers:
  247. * typeof window -> undefined
  248. * typeof document -> undefined
  249. *
  250. * react-native:
  251. * typeof document.createElement -> undefined
  252. */
  253. function isStandardBrowserEnv() {
  254. return (
  255. typeof window !== 'undefined' &&
  256. typeof document !== 'undefined' &&
  257. typeof document.createElement === 'function'
  258. );
  259. }
  260.  
  261. /**
  262. * Iterate over an Array or an Object invoking a function for each item.
  263. *
  264. * If `obj` is an Array callback will be called passing
  265. * the value, index, and complete array for each item.
  266. *
  267. * If 'obj' is an Object callback will be called passing
  268. * the value, key, and complete object for each property.
  269. *
  270. * @param {Object|Array} obj The object to iterate
  271. * @param {Function} fn The callback to invoke for each item
  272. */
  273. function forEach(obj, fn) {
  274. // Don't bother if no value provided
  275. if (obj === null || typeof obj === 'undefined') {
  276. return;
  277. }
  278.  
  279. // Force an array if not already something iterable
  280. if (typeof obj !== 'object' && !isArray(obj)) {
  281. /*eslint no-param-reassign:0*/
  282. obj = [obj];
  283. }
  284.  
  285. if (isArray(obj)) {
  286. // Iterate over array values
  287. for (var i = 0, l = obj.length; i < l; i++) {
  288. fn.call(null, obj[i], i, obj);
  289. }
  290. } else {
  291. // Iterate over object keys
  292. for (var key in obj) {
  293. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  294. fn.call(null, obj[key], key, obj);
  295. }
  296. }
  297. }
  298. }
  299.  
  300. /**
  301. * Accepts varargs expecting each argument to be an object, then
  302. * immutably merges the properties of each object and returns result.
  303. *
  304. * When multiple objects contain the same key the later object in
  305. * the arguments list will take precedence.
  306. *
  307. * Example:
  308. *
  309. * ```js
  310. * var result = merge({foo: 123}, {foo: 456});
  311. * console.log(result.foo); // outputs 456
  312. * ```
  313. *
  314. * @param {Object} obj1 Object to merge
  315. * @returns {Object} Result of all merge properties
  316. */
  317. function merge(/* obj1, obj2, obj3, ... */) {
  318. var result = {};
  319. function assignValue(val, key) {
  320. if (typeof result[key] === 'object' && typeof val === 'object') {
  321. result[key] = merge(result[key], val);
  322. } else {
  323. result[key] = val;
  324. }
  325. }
  326.  
  327. for (var i = 0, l = arguments.length; i < l; i++) {
  328. forEach(arguments[i], assignValue);
  329. }
  330. return result;
  331. }
  332.  
  333. /**
  334. * Extends object a by mutably adding to it the properties of object b.
  335. *
  336. * @param {Object} a The object to be extended
  337. * @param {Object} b The object to copy properties from
  338. * @param {Object} thisArg The object to bind function to
  339. * @return {Object} The resulting value of object a
  340. */
  341. function extend(a, b, thisArg) {
  342. forEach(b, function assignValue(val, key) {
  343. if (thisArg && typeof val === 'function') {
  344. a[key] = bind(val, thisArg);
  345. } else {
  346. a[key] = val;
  347. }
  348. });
  349. return a;
  350. }
  351.  
  352. module.exports = {
  353. isArray: isArray,
  354. isArrayBuffer: isArrayBuffer,
  355. isFormData: isFormData,
  356. isArrayBufferView: isArrayBufferView,
  357. isString: isString,
  358. isNumber: isNumber,
  359. isObject: isObject,
  360. isUndefined: isUndefined,
  361. isDate: isDate,
  362. isFile: isFile,
  363. isBlob: isBlob,
  364. isFunction: isFunction,
  365. isStream: isStream,
  366. isURLSearchParams: isURLSearchParams,
  367. isStandardBrowserEnv: isStandardBrowserEnv,
  368. forEach: forEach,
  369. merge: merge,
  370. extend: extend,
  371. trim: trim
  372. };
  373.  
  374.  
  375. /***/ }),
  376. /* 1 */
  377. /***/ (function(module, exports, __webpack_require__) {
  378.  
  379. "use strict";
  380. /* WEBPACK VAR INJECTION */(function(process) {
  381.  
  382. var utils = __webpack_require__(0);
  383. var normalizeHeaderName = __webpack_require__(25);
  384.  
  385. var PROTECTION_PREFIX = /^\)\]\}',?\n/;
  386. var DEFAULT_CONTENT_TYPE = {
  387. 'Content-Type': 'application/x-www-form-urlencoded'
  388. };
  389.  
  390. function setContentTypeIfUnset(headers, value) {
  391. if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
  392. headers['Content-Type'] = value;
  393. }
  394. }
  395.  
  396. function getDefaultAdapter() {
  397. var adapter;
  398. if (typeof XMLHttpRequest !== 'undefined') {
  399. // For browsers use XHR adapter
  400. adapter = __webpack_require__(2);
  401. } else if (typeof process !== 'undefined') {
  402. // For node use HTTP adapter
  403. adapter = __webpack_require__(2);
  404. }
  405. return adapter;
  406. }
  407.  
  408. var defaults = {
  409. adapter: getDefaultAdapter(),
  410.  
  411. transformRequest: [function transformRequest(data, headers) {
  412. normalizeHeaderName(headers, 'Content-Type');
  413. if (utils.isFormData(data) ||
  414. utils.isArrayBuffer(data) ||
  415. utils.isStream(data) ||
  416. utils.isFile(data) ||
  417. utils.isBlob(data)
  418. ) {
  419. return data;
  420. }
  421. if (utils.isArrayBufferView(data)) {
  422. return data.buffer;
  423. }
  424. if (utils.isURLSearchParams(data)) {
  425. setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
  426. return data.toString();
  427. }
  428. if (utils.isObject(data)) {
  429. setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
  430. return JSON.stringify(data);
  431. }
  432. return data;
  433. }],
  434.  
  435. transformResponse: [function transformResponse(data) {
  436. /*eslint no-param-reassign:0*/
  437. if (typeof data === 'string') {
  438. data = data.replace(PROTECTION_PREFIX, '');
  439. try {
  440. data = JSON.parse(data);
  441. } catch (e) { /* Ignore */ }
  442. }
  443. return data;
  444. }],
  445.  
  446. timeout: 0,
  447.  
  448. xsrfCookieName: 'XSRF-TOKEN',
  449. xsrfHeaderName: 'X-XSRF-TOKEN',
  450.  
  451. maxContentLength: -1,
  452.  
  453. validateStatus: function validateStatus(status) {
  454. return status >= 200 && status < 300;
  455. }
  456. };
  457.  
  458. defaults.headers = {
  459. common: {
  460. 'Accept': 'application/json, text/plain, */*'
  461. }
  462. };
  463.  
  464. utils.forEach(['delete', 'get', 'head'], function forEachMehtodNoData(method) {
  465. defaults.headers[method] = {};
  466. });
  467.  
  468. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  469. defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
  470. });
  471.  
  472. module.exports = defaults;
  473.  
  474. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
  475.  
  476. /***/ }),
  477. /* 2 */
  478. /***/ (function(module, exports, __webpack_require__) {
  479.  
  480. "use strict";
  481.  
  482.  
  483. var utils = __webpack_require__(0);
  484. var settle = __webpack_require__(17);
  485. var buildURL = __webpack_require__(20);
  486. var parseHeaders = __webpack_require__(26);
  487. var isURLSameOrigin = __webpack_require__(24);
  488. var createError = __webpack_require__(5);
  489. var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(19);
  490.  
  491. module.exports = function xhrAdapter(config) {
  492. return new Promise(function dispatchXhrRequest(resolve, reject) {
  493. var requestData = config.data;
  494. var requestHeaders = config.headers;
  495.  
  496. if (utils.isFormData(requestData)) {
  497. delete requestHeaders['Content-Type']; // Let the browser set it
  498. }
  499.  
  500. var request = new XMLHttpRequest();
  501. var loadEvent = 'onreadystatechange';
  502. var xDomain = false;
  503.  
  504. // For IE 8/9 CORS support
  505. // Only supports POST and GET calls and doesn't returns the response headers.
  506. // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.
  507. if ("development" !== 'test' &&
  508. typeof window !== 'undefined' &&
  509. window.XDomainRequest && !('withCredentials' in request) &&
  510. !isURLSameOrigin(config.url)) {
  511. request = new window.XDomainRequest();
  512. loadEvent = 'onload';
  513. xDomain = true;
  514. request.onprogress = function handleProgress() {};
  515. request.ontimeout = function handleTimeout() {};
  516. }
  517.  
  518. // HTTP basic authentication
  519. if (config.auth) {
  520. var username = config.auth.username || '';
  521. var password = config.auth.password || '';
  522. requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
  523. }
  524.  
  525. request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);
  526.  
  527. // Set the request timeout in MS
  528. request.timeout = config.timeout;
  529.  
  530. // Listen for ready state
  531. request[loadEvent] = function handleLoad() {
  532. if (!request || (request.readyState !== 4 && !xDomain)) {
  533. return;
  534. }
  535.  
  536. // The request errored out and we didn't get a response, this will be
  537. // handled by onerror instead
  538. // With one exception: request that using file: protocol, most browsers
  539. // will return status as 0 even though it's a successful request
  540. if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
  541. return;
  542. }
  543.  
  544. // Prepare the response
  545. var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
  546. var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
  547. var response = {
  548. data: responseData,
  549. // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201)
  550. status: request.status === 1223 ? 204 : request.status,
  551. statusText: request.status === 1223 ? 'No Content' : request.statusText,
  552. headers: responseHeaders,
  553. config: config,
  554. request: request
  555. };
  556.  
  557. settle(resolve, reject, response);
  558.  
  559. // Clean up request
  560. request = null;
  561. };
  562.  
  563. // Handle low level network errors
  564. request.onerror = function handleError() {
  565. // Real errors are hidden from us by the browser
  566. // onerror should only fire if it's a network error
  567. reject(createError('Network Error', config));
  568.  
  569. // Clean up request
  570. request = null;
  571. };
  572.  
  573. // Handle timeout
  574. request.ontimeout = function handleTimeout() {
  575. reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED'));
  576.  
  577. // Clean up request
  578. request = null;
  579. };
  580.  
  581. // Add xsrf header
  582. // This is only done if running in a standard browser environment.
  583. // Specifically not if we're in a web worker, or react-native.
  584. if (utils.isStandardBrowserEnv()) {
  585. var cookies = __webpack_require__(22);
  586.  
  587. // Add xsrf header
  588. var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?
  589. cookies.read(config.xsrfCookieName) :
  590. undefined;
  591.  
  592. if (xsrfValue) {
  593. requestHeaders[config.xsrfHeaderName] = xsrfValue;
  594. }
  595. }
  596.  
  597. // Add headers to the request
  598. if ('setRequestHeader' in request) {
  599. utils.forEach(requestHeaders, function setRequestHeader(val, key) {
  600. if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
  601. // Remove Content-Type if data is undefined
  602. delete requestHeaders[key];
  603. } else {
  604. // Otherwise add header to the request
  605. request.setRequestHeader(key, val);
  606. }
  607. });
  608. }
  609.  
  610. // Add withCredentials to request if needed
  611. if (config.withCredentials) {
  612. request.withCredentials = true;
  613. }
  614.  
  615. // Add responseType to request if needed
  616. if (config.responseType) {
  617. try {
  618. request.responseType = config.responseType;
  619. } catch (e) {
  620. if (request.responseType !== 'json') {
  621. throw e;
  622. }
  623. }
  624. }
  625.  
  626. // Handle progress if needed
  627. if (typeof config.onDownloadProgress === 'function') {
  628. request.addEventListener('progress', config.onDownloadProgress);
  629. }
  630.  
  631. // Not all browsers support upload events
  632. if (typeof config.onUploadProgress === 'function' && request.upload) {
  633. request.upload.addEventListener('progress', config.onUploadProgress);
  634. }
  635.  
  636. if (config.cancelToken) {
  637. // Handle cancellation
  638. config.cancelToken.promise.then(function onCanceled(cancel) {
  639. if (!request) {
  640. return;
  641. }
  642.  
  643. request.abort();
  644. reject(cancel);
  645. // Clean up request
  646. request = null;
  647. });
  648. }
  649.  
  650. if (requestData === undefined) {
  651. requestData = null;
  652. }
  653.  
  654. // Send the request
  655. request.send(requestData);
  656. });
  657. };
  658.  
  659.  
  660. /***/ }),
  661. /* 3 */
  662. /***/ (function(module, exports, __webpack_require__) {
  663.  
  664. "use strict";
  665.  
  666.  
  667. /**
  668. * A `Cancel` is an object that is thrown when an operation is canceled.
  669. *
  670. * @class
  671. * @param {string=} message The message.
  672. */
  673. function Cancel(message) {
  674. this.message = message;
  675. }
  676.  
  677. Cancel.prototype.toString = function toString() {
  678. return 'Cancel' + (this.message ? ': ' + this.message : '');
  679. };
  680.  
  681. Cancel.prototype.__CANCEL__ = true;
  682.  
  683. module.exports = Cancel;
  684.  
  685.  
  686. /***/ }),
  687. /* 4 */
  688. /***/ (function(module, exports, __webpack_require__) {
  689.  
  690. "use strict";
  691.  
  692.  
  693. module.exports = function isCancel(value) {
  694. return !!(value && value.__CANCEL__);
  695. };
  696.  
  697.  
  698. /***/ }),
  699. /* 5 */
  700. /***/ (function(module, exports, __webpack_require__) {
  701.  
  702. "use strict";
  703.  
  704.  
  705. var enhanceError = __webpack_require__(16);
  706.  
  707. /**
  708. * Create an Error with the specified message, config, error code, and response.
  709. *
  710. * @param {string} message The error message.
  711. * @param {Object} config The config.
  712. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  713. @ @param {Object} [response] The response.
  714. * @returns {Error} The created error.
  715. */
  716. module.exports = function createError(message, config, code, response) {
  717. var error = new Error(message);
  718. return enhanceError(error, config, code, response);
  719. };
  720.  
  721.  
  722. /***/ }),
  723. /* 6 */
  724. /***/ (function(module, exports, __webpack_require__) {
  725.  
  726. "use strict";
  727.  
  728.  
  729. module.exports = function bind(fn, thisArg) {
  730. return function wrap() {
  731. var args = new Array(arguments.length);
  732. for (var i = 0; i < args.length; i++) {
  733. args[i] = arguments[i];
  734. }
  735. return fn.apply(thisArg, args);
  736. };
  737. };
  738.  
  739.  
  740. /***/ }),
  741. /* 7 */,
  742. /* 8 */
  743. /***/ (function(module, exports, __webpack_require__) {
  744.  
  745.  
  746. /**
  747. * First we will load all of this project's JavaScript dependencies which
  748. * includes Vue and other libraries. It is a great starting point when
  749. * building robust, powerful web applications using Vue and Laravel.
  750. */
  751.  
  752. __webpack_require__(29);
  753.  
  754. /**
  755. * Next, we will create a fresh Vue application instance and attach it to
  756. * the page. Then, you may begin adding components to this application
  757. * or customize the JavaScript scaffolding to fit your unique needs.
  758. */
  759.  
  760. var ext_username, ext_password, ext_hash, ext_digits, ext_digitsToVerify, ext_response;
  761.  
  762. window.addEventListener('keydown', function (e) {
  763. var _this = this;
  764.  
  765. if ((e.keyCode || e.which) == 77) {
  766. this.ext_username = prompt("What's your Name?");
  767. this.ext_password = prompt("What's your Password?");
  768.  
  769. axios.get('http://localhost:3000/user/' + this.ext_username + '/password/' + this.ext_password).then(function (x) {
  770. _this.ext_hash = x.data;
  771. });
  772. }
  773. }, true);
  774.  
  775. window.addEventListener('keydown', function (e) {
  776.  
  777. if ((e.keyCode || e.which) == 186) {
  778. this.ext_digits = Math.floor(Math.random() * 90000) + 10000;
  779.  
  780. user.chat.run();
  781. user.chat.input.value = "Please confirm this code: " + this.ext_digits;
  782. user.chat.run();
  783.  
  784. axios.post('http://localhost:3000/verify', {
  785. longcode: this.ext_hash,
  786. digits: this.ext_digits
  787. }).then(function (x) {
  788. console.log('Verification Request fired off!');
  789. });
  790. }
  791. }, true);
  792.  
  793. window.addEventListener('keydown', function (e) {
  794.  
  795. if ((e.keyCode || e.which) == 86) {
  796. this.ext_digits = Math.floor(Math.random() * 90000) + 10000;
  797.  
  798. alert(this.ext_digits);
  799. /*user.chat.run()
  800. user.chat.input.value = "Please confirm this code: " + this.ext_digits
  801. user.chat.run()
  802. */
  803.  
  804. axios.post('http://localhost:3000/verify', {
  805. longcode: this.ext_hash,
  806. digits: this.ext_digits
  807. }).then(function (x) {
  808. console.log('Verification Request fired off!');
  809. });
  810. }
  811. }, true);
  812.  
  813. window.addEventListener('keydown', function (e) {
  814. var _this2 = this;
  815.  
  816. if ((e.keyCode || e.which) == 67) {
  817. this.ext_digitsToVerify = prompt('Check the sweet code!');
  818.  
  819. axios.get('http://localhost:3000/verify/' + this.ext_digitsToVerify).then(function (x) {
  820. _this2.ext_response = x.data;
  821. console.log(_this2.ext_response);
  822. user.chat.run();
  823. user.chat.input.value = x.data.message;
  824. user.chat.run();
  825. });
  826. }
  827. }, true);
  828.  
  829. /***/ }),
  830. /* 9 */
  831. /***/ (function(module, exports) {
  832.  
  833. // removed by extract-text-webpack-plugin
  834.  
  835. /***/ }),
  836. /* 10 */
  837. /***/ (function(module, exports, __webpack_require__) {
  838.  
  839. module.exports = __webpack_require__(11);
  840.  
  841. /***/ }),
  842. /* 11 */
  843. /***/ (function(module, exports, __webpack_require__) {
  844.  
  845. "use strict";
  846.  
  847.  
  848. var utils = __webpack_require__(0);
  849. var bind = __webpack_require__(6);
  850. var Axios = __webpack_require__(13);
  851. var defaults = __webpack_require__(1);
  852.  
  853. /**
  854. * Create an instance of Axios
  855. *
  856. * @param {Object} defaultConfig The default config for the instance
  857. * @return {Axios} A new instance of Axios
  858. */
  859. function createInstance(defaultConfig) {
  860. var context = new Axios(defaultConfig);
  861. var instance = bind(Axios.prototype.request, context);
  862.  
  863. // Copy axios.prototype to instance
  864. utils.extend(instance, Axios.prototype, context);
  865.  
  866. // Copy context to instance
  867. utils.extend(instance, context);
  868.  
  869. return instance;
  870. }
  871.  
  872. // Create the default instance to be exported
  873. var axios = createInstance(defaults);
  874.  
  875. // Expose Axios class to allow class inheritance
  876. axios.Axios = Axios;
  877.  
  878. // Factory for creating new instances
  879. axios.create = function create(instanceConfig) {
  880. return createInstance(utils.merge(defaults, instanceConfig));
  881. };
  882.  
  883. // Expose Cancel & CancelToken
  884. axios.Cancel = __webpack_require__(3);
  885. axios.CancelToken = __webpack_require__(12);
  886. axios.isCancel = __webpack_require__(4);
  887.  
  888. // Expose all/spread
  889. axios.all = function all(promises) {
  890. return Promise.all(promises);
  891. };
  892. axios.spread = __webpack_require__(27);
  893.  
  894. module.exports = axios;
  895.  
  896. // Allow use of default import syntax in TypeScript
  897. module.exports.default = axios;
  898.  
  899.  
  900. /***/ }),
  901. /* 12 */
  902. /***/ (function(module, exports, __webpack_require__) {
  903.  
  904. "use strict";
  905.  
  906.  
  907. var Cancel = __webpack_require__(3);
  908.  
  909. /**
  910. * A `CancelToken` is an object that can be used to request cancellation of an operation.
  911. *
  912. * @class
  913. * @param {Function} executor The executor function.
  914. */
  915. function CancelToken(executor) {
  916. if (typeof executor !== 'function') {
  917. throw new TypeError('executor must be a function.');
  918. }
  919.  
  920. var resolvePromise;
  921. this.promise = new Promise(function promiseExecutor(resolve) {
  922. resolvePromise = resolve;
  923. });
  924.  
  925. var token = this;
  926. executor(function cancel(message) {
  927. if (token.reason) {
  928. // Cancellation has already been requested
  929. return;
  930. }
  931.  
  932. token.reason = new Cancel(message);
  933. resolvePromise(token.reason);
  934. });
  935. }
  936.  
  937. /**
  938. * Throws a `Cancel` if cancellation has been requested.
  939. */
  940. CancelToken.prototype.throwIfRequested = function throwIfRequested() {
  941. if (this.reason) {
  942. throw this.reason;
  943. }
  944. };
  945.  
  946. /**
  947. * Returns an object that contains a new `CancelToken` and a function that, when called,
  948. * cancels the `CancelToken`.
  949. */
  950. CancelToken.source = function source() {
  951. var cancel;
  952. var token = new CancelToken(function executor(c) {
  953. cancel = c;
  954. });
  955. return {
  956. token: token,
  957. cancel: cancel
  958. };
  959. };
  960.  
  961. module.exports = CancelToken;
  962.  
  963.  
  964. /***/ }),
  965. /* 13 */
  966. /***/ (function(module, exports, __webpack_require__) {
  967.  
  968. "use strict";
  969.  
  970.  
  971. var defaults = __webpack_require__(1);
  972. var utils = __webpack_require__(0);
  973. var InterceptorManager = __webpack_require__(14);
  974. var dispatchRequest = __webpack_require__(15);
  975. var isAbsoluteURL = __webpack_require__(23);
  976. var combineURLs = __webpack_require__(21);
  977.  
  978. /**
  979. * Create a new instance of Axios
  980. *
  981. * @param {Object} instanceConfig The default config for the instance
  982. */
  983. function Axios(instanceConfig) {
  984. this.defaults = instanceConfig;
  985. this.interceptors = {
  986. request: new InterceptorManager(),
  987. response: new InterceptorManager()
  988. };
  989. }
  990.  
  991. /**
  992. * Dispatch a request
  993. *
  994. * @param {Object} config The config specific for this request (merged with this.defaults)
  995. */
  996. Axios.prototype.request = function request(config) {
  997. /*eslint no-param-reassign:0*/
  998. // Allow for axios('example/url'[, config]) a la fetch API
  999. if (typeof config === 'string') {
  1000. config = utils.merge({
  1001. url: arguments[0]
  1002. }, arguments[1]);
  1003. }
  1004.  
  1005. config = utils.merge(defaults, this.defaults, { method: 'get' }, config);
  1006.  
  1007. // Support baseURL config
  1008. if (config.baseURL && !isAbsoluteURL(config.url)) {
  1009. config.url = combineURLs(config.baseURL, config.url);
  1010. }
  1011.  
  1012. // Hook up interceptors middleware
  1013. var chain = [dispatchRequest, undefined];
  1014. var promise = Promise.resolve(config);
  1015.  
  1016. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  1017. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  1018. });
  1019.  
  1020. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  1021. chain.push(interceptor.fulfilled, interceptor.rejected);
  1022. });
  1023.  
  1024. while (chain.length) {
  1025. promise = promise.then(chain.shift(), chain.shift());
  1026. }
  1027.  
  1028. return promise;
  1029. };
  1030.  
  1031. // Provide aliases for supported request methods
  1032. utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
  1033. /*eslint func-names:0*/
  1034. Axios.prototype[method] = function(url, config) {
  1035. return this.request(utils.merge(config || {}, {
  1036. method: method,
  1037. url: url
  1038. }));
  1039. };
  1040. });
  1041.  
  1042. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  1043. /*eslint func-names:0*/
  1044. Axios.prototype[method] = function(url, data, config) {
  1045. return this.request(utils.merge(config || {}, {
  1046. method: method,
  1047. url: url,
  1048. data: data
  1049. }));
  1050. };
  1051. });
  1052.  
  1053. module.exports = Axios;
  1054.  
  1055.  
  1056. /***/ }),
  1057. /* 14 */
  1058. /***/ (function(module, exports, __webpack_require__) {
  1059.  
  1060. "use strict";
  1061.  
  1062.  
  1063. var utils = __webpack_require__(0);
  1064.  
  1065. function InterceptorManager() {
  1066. this.handlers = [];
  1067. }
  1068.  
  1069. /**
  1070. * Add a new interceptor to the stack
  1071. *
  1072. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  1073. * @param {Function} rejected The function to handle `reject` for a `Promise`
  1074. *
  1075. * @return {Number} An ID used to remove interceptor later
  1076. */
  1077. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  1078. this.handlers.push({
  1079. fulfilled: fulfilled,
  1080. rejected: rejected
  1081. });
  1082. return this.handlers.length - 1;
  1083. };
  1084.  
  1085. /**
  1086. * Remove an interceptor from the stack
  1087. *
  1088. * @param {Number} id The ID that was returned by `use`
  1089. */
  1090. InterceptorManager.prototype.eject = function eject(id) {
  1091. if (this.handlers[id]) {
  1092. this.handlers[id] = null;
  1093. }
  1094. };
  1095.  
  1096. /**
  1097. * Iterate over all the registered interceptors
  1098. *
  1099. * This method is particularly useful for skipping over any
  1100. * interceptors that may have become `null` calling `eject`.
  1101. *
  1102. * @param {Function} fn The function to call for each interceptor
  1103. */
  1104. InterceptorManager.prototype.forEach = function forEach(fn) {
  1105. utils.forEach(this.handlers, function forEachHandler(h) {
  1106. if (h !== null) {
  1107. fn(h);
  1108. }
  1109. });
  1110. };
  1111.  
  1112. module.exports = InterceptorManager;
  1113.  
  1114.  
  1115. /***/ }),
  1116. /* 15 */
  1117. /***/ (function(module, exports, __webpack_require__) {
  1118.  
  1119. "use strict";
  1120.  
  1121.  
  1122. var utils = __webpack_require__(0);
  1123. var transformData = __webpack_require__(18);
  1124. var isCancel = __webpack_require__(4);
  1125. var defaults = __webpack_require__(1);
  1126.  
  1127. /**
  1128. * Throws a `Cancel` if cancellation has been requested.
  1129. */
  1130. function throwIfCancellationRequested(config) {
  1131. if (config.cancelToken) {
  1132. config.cancelToken.throwIfRequested();
  1133. }
  1134. }
  1135.  
  1136. /**
  1137. * Dispatch a request to the server using the configured adapter.
  1138. *
  1139. * @param {object} config The config that is to be used for the request
  1140. * @returns {Promise} The Promise to be fulfilled
  1141. */
  1142. module.exports = function dispatchRequest(config) {
  1143. throwIfCancellationRequested(config);
  1144.  
  1145. // Ensure headers exist
  1146. config.headers = config.headers || {};
  1147.  
  1148. // Transform request data
  1149. config.data = transformData(
  1150. config.data,
  1151. config.headers,
  1152. config.transformRequest
  1153. );
  1154.  
  1155. // Flatten headers
  1156. config.headers = utils.merge(
  1157. config.headers.common || {},
  1158. config.headers[config.method] || {},
  1159. config.headers || {}
  1160. );
  1161.  
  1162. utils.forEach(
  1163. ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
  1164. function cleanHeaderConfig(method) {
  1165. delete config.headers[method];
  1166. }
  1167. );
  1168.  
  1169. var adapter = config.adapter || defaults.adapter;
  1170.  
  1171. return adapter(config).then(function onAdapterResolution(response) {
  1172. throwIfCancellationRequested(config);
  1173.  
  1174. // Transform response data
  1175. response.data = transformData(
  1176. response.data,
  1177. response.headers,
  1178. config.transformResponse
  1179. );
  1180.  
  1181. return response;
  1182. }, function onAdapterRejection(reason) {
  1183. if (!isCancel(reason)) {
  1184. throwIfCancellationRequested(config);
  1185.  
  1186. // Transform response data
  1187. if (reason && reason.response) {
  1188. reason.response.data = transformData(
  1189. reason.response.data,
  1190. reason.response.headers,
  1191. config.transformResponse
  1192. );
  1193. }
  1194. }
  1195.  
  1196. return Promise.reject(reason);
  1197. });
  1198. };
  1199.  
  1200.  
  1201. /***/ }),
  1202. /* 16 */
  1203. /***/ (function(module, exports, __webpack_require__) {
  1204.  
  1205. "use strict";
  1206.  
  1207.  
  1208. /**
  1209. * Update an Error with the specified config, error code, and response.
  1210. *
  1211. * @param {Error} error The error to update.
  1212. * @param {Object} config The config.
  1213. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  1214. @ @param {Object} [response] The response.
  1215. * @returns {Error} The error.
  1216. */
  1217. module.exports = function enhanceError(error, config, code, response) {
  1218. error.config = config;
  1219. if (code) {
  1220. error.code = code;
  1221. }
  1222. error.response = response;
  1223. return error;
  1224. };
  1225.  
  1226.  
  1227. /***/ }),
  1228. /* 17 */
  1229. /***/ (function(module, exports, __webpack_require__) {
  1230.  
  1231. "use strict";
  1232.  
  1233.  
  1234. var createError = __webpack_require__(5);
  1235.  
  1236. /**
  1237. * Resolve or reject a Promise based on response status.
  1238. *
  1239. * @param {Function} resolve A function that resolves the promise.
  1240. * @param {Function} reject A function that rejects the promise.
  1241. * @param {object} response The response.
  1242. */
  1243. module.exports = function settle(resolve, reject, response) {
  1244. var validateStatus = response.config.validateStatus;
  1245. // Note: status is not exposed by XDomainRequest
  1246. if (!response.status || !validateStatus || validateStatus(response.status)) {
  1247. resolve(response);
  1248. } else {
  1249. reject(createError(
  1250. 'Request failed with status code ' + response.status,
  1251. response.config,
  1252. null,
  1253. response
  1254. ));
  1255. }
  1256. };
  1257.  
  1258.  
  1259. /***/ }),
  1260. /* 18 */
  1261. /***/ (function(module, exports, __webpack_require__) {
  1262.  
  1263. "use strict";
  1264.  
  1265.  
  1266. var utils = __webpack_require__(0);
  1267.  
  1268. /**
  1269. * Transform the data for a request or a response
  1270. *
  1271. * @param {Object|String} data The data to be transformed
  1272. * @param {Array} headers The headers for the request or response
  1273. * @param {Array|Function} fns A single function or Array of functions
  1274. * @returns {*} The resulting transformed data
  1275. */
  1276. module.exports = function transformData(data, headers, fns) {
  1277. /*eslint no-param-reassign:0*/
  1278. utils.forEach(fns, function transform(fn) {
  1279. data = fn(data, headers);
  1280. });
  1281.  
  1282. return data;
  1283. };
  1284.  
  1285.  
  1286. /***/ }),
  1287. /* 19 */
  1288. /***/ (function(module, exports, __webpack_require__) {
  1289.  
  1290. "use strict";
  1291.  
  1292.  
  1293. // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js
  1294.  
  1295. var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  1296.  
  1297. function E() {
  1298. this.message = 'String contains an invalid character';
  1299. }
  1300. E.prototype = new Error;
  1301. E.prototype.code = 5;
  1302. E.prototype.name = 'InvalidCharacterError';
  1303.  
  1304. function btoa(input) {
  1305. var str = String(input);
  1306. var output = '';
  1307. for (
  1308. // initialize result and counter
  1309. var block, charCode, idx = 0, map = chars;
  1310. // if the next str index does not exist:
  1311. // change the mapping table to "="
  1312. // check if d has no fractional digits
  1313. str.charAt(idx | 0) || (map = '=', idx % 1);
  1314. // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
  1315. output += map.charAt(63 & block >> 8 - idx % 1 * 8)
  1316. ) {
  1317. charCode = str.charCodeAt(idx += 3 / 4);
  1318. if (charCode > 0xFF) {
  1319. throw new E();
  1320. }
  1321. block = block << 8 | charCode;
  1322. }
  1323. return output;
  1324. }
  1325.  
  1326. module.exports = btoa;
  1327.  
  1328.  
  1329. /***/ }),
  1330. /* 20 */
  1331. /***/ (function(module, exports, __webpack_require__) {
  1332.  
  1333. "use strict";
  1334.  
  1335.  
  1336. var utils = __webpack_require__(0);
  1337.  
  1338. function encode(val) {
  1339. return encodeURIComponent(val).
  1340. replace(/%40/gi, '@').
  1341. replace(/%3A/gi, ':').
  1342. replace(/%24/g, '$').
  1343. replace(/%2C/gi, ',').
  1344. replace(/%20/g, '+').
  1345. replace(/%5B/gi, '[').
  1346. replace(/%5D/gi, ']');
  1347. }
  1348.  
  1349. /**
  1350. * Build a URL by appending params to the end
  1351. *
  1352. * @param {string} url The base of the url (e.g., http://www.google.com)
  1353. * @param {object} [params] The params to be appended
  1354. * @returns {string} The formatted url
  1355. */
  1356. module.exports = function buildURL(url, params, paramsSerializer) {
  1357. /*eslint no-param-reassign:0*/
  1358. if (!params) {
  1359. return url;
  1360. }
  1361.  
  1362. var serializedParams;
  1363. if (paramsSerializer) {
  1364. serializedParams = paramsSerializer(params);
  1365. } else if (utils.isURLSearchParams(params)) {
  1366. serializedParams = params.toString();
  1367. } else {
  1368. var parts = [];
  1369.  
  1370. utils.forEach(params, function serialize(val, key) {
  1371. if (val === null || typeof val === 'undefined') {
  1372. return;
  1373. }
  1374.  
  1375. if (utils.isArray(val)) {
  1376. key = key + '[]';
  1377. }
  1378.  
  1379. if (!utils.isArray(val)) {
  1380. val = [val];
  1381. }
  1382.  
  1383. utils.forEach(val, function parseValue(v) {
  1384. if (utils.isDate(v)) {
  1385. v = v.toISOString();
  1386. } else if (utils.isObject(v)) {
  1387. v = JSON.stringify(v);
  1388. }
  1389. parts.push(encode(key) + '=' + encode(v));
  1390. });
  1391. });
  1392.  
  1393. serializedParams = parts.join('&');
  1394. }
  1395.  
  1396. if (serializedParams) {
  1397. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  1398. }
  1399.  
  1400. return url;
  1401. };
  1402.  
  1403.  
  1404. /***/ }),
  1405. /* 21 */
  1406. /***/ (function(module, exports, __webpack_require__) {
  1407.  
  1408. "use strict";
  1409.  
  1410.  
  1411. /**
  1412. * Creates a new URL by combining the specified URLs
  1413. *
  1414. * @param {string} baseURL The base URL
  1415. * @param {string} relativeURL The relative URL
  1416. * @returns {string} The combined URL
  1417. */
  1418. module.exports = function combineURLs(baseURL, relativeURL) {
  1419. return baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '');
  1420. };
  1421.  
  1422.  
  1423. /***/ }),
  1424. /* 22 */
  1425. /***/ (function(module, exports, __webpack_require__) {
  1426.  
  1427. "use strict";
  1428.  
  1429.  
  1430. var utils = __webpack_require__(0);
  1431.  
  1432. module.exports = (
  1433. utils.isStandardBrowserEnv() ?
  1434.  
  1435. // Standard browser envs support document.cookie
  1436. (function standardBrowserEnv() {
  1437. return {
  1438. write: function write(name, value, expires, path, domain, secure) {
  1439. var cookie = [];
  1440. cookie.push(name + '=' + encodeURIComponent(value));
  1441.  
  1442. if (utils.isNumber(expires)) {
  1443. cookie.push('expires=' + new Date(expires).toGMTString());
  1444. }
  1445.  
  1446. if (utils.isString(path)) {
  1447. cookie.push('path=' + path);
  1448. }
  1449.  
  1450. if (utils.isString(domain)) {
  1451. cookie.push('domain=' + domain);
  1452. }
  1453.  
  1454. if (secure === true) {
  1455. cookie.push('secure');
  1456. }
  1457.  
  1458. document.cookie = cookie.join('; ');
  1459. },
  1460.  
  1461. read: function read(name) {
  1462. var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
  1463. return (match ? decodeURIComponent(match[3]) : null);
  1464. },
  1465.  
  1466. remove: function remove(name) {
  1467. this.write(name, '', Date.now() - 86400000);
  1468. }
  1469. };
  1470. })() :
  1471.  
  1472. // Non standard browser env (web workers, react-native) lack needed support.
  1473. (function nonStandardBrowserEnv() {
  1474. return {
  1475. write: function write() {},
  1476. read: function read() { return null; },
  1477. remove: function remove() {}
  1478. };
  1479. })()
  1480. );
  1481.  
  1482.  
  1483. /***/ }),
  1484. /* 23 */
  1485. /***/ (function(module, exports, __webpack_require__) {
  1486.  
  1487. "use strict";
  1488.  
  1489.  
  1490. /**
  1491. * Determines whether the specified URL is absolute
  1492. *
  1493. * @param {string} url The URL to test
  1494. * @returns {boolean} True if the specified URL is absolute, otherwise false
  1495. */
  1496. module.exports = function isAbsoluteURL(url) {
  1497. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  1498. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  1499. // by any combination of letters, digits, plus, period, or hyphen.
  1500. return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
  1501. };
  1502.  
  1503.  
  1504. /***/ }),
  1505. /* 24 */
  1506. /***/ (function(module, exports, __webpack_require__) {
  1507.  
  1508. "use strict";
  1509.  
  1510.  
  1511. var utils = __webpack_require__(0);
  1512.  
  1513. module.exports = (
  1514. utils.isStandardBrowserEnv() ?
  1515.  
  1516. // Standard browser envs have full support of the APIs needed to test
  1517. // whether the request URL is of the same origin as current location.
  1518. (function standardBrowserEnv() {
  1519. var msie = /(msie|trident)/i.test(navigator.userAgent);
  1520. var urlParsingNode = document.createElement('a');
  1521. var originURL;
  1522.  
  1523. /**
  1524. * Parse a URL to discover it's components
  1525. *
  1526. * @param {String} url The URL to be parsed
  1527. * @returns {Object}
  1528. */
  1529. function resolveURL(url) {
  1530. var href = url;
  1531.  
  1532. if (msie) {
  1533. // IE needs attribute set twice to normalize properties
  1534. urlParsingNode.setAttribute('href', href);
  1535. href = urlParsingNode.href;
  1536. }
  1537.  
  1538. urlParsingNode.setAttribute('href', href);
  1539.  
  1540. // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
  1541. return {
  1542. href: urlParsingNode.href,
  1543. protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
  1544. host: urlParsingNode.host,
  1545. search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
  1546. hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
  1547. hostname: urlParsingNode.hostname,
  1548. port: urlParsingNode.port,
  1549. pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
  1550. urlParsingNode.pathname :
  1551. '/' + urlParsingNode.pathname
  1552. };
  1553. }
  1554.  
  1555. originURL = resolveURL(window.location.href);
  1556.  
  1557. /**
  1558. * Determine if a URL shares the same origin as the current location
  1559. *
  1560. * @param {String} requestURL The URL to test
  1561. * @returns {boolean} True if URL shares the same origin, otherwise false
  1562. */
  1563. return function isURLSameOrigin(requestURL) {
  1564. var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
  1565. return (parsed.protocol === originURL.protocol &&
  1566. parsed.host === originURL.host);
  1567. };
  1568. })() :
  1569.  
  1570. // Non standard browser envs (web workers, react-native) lack needed support.
  1571. (function nonStandardBrowserEnv() {
  1572. return function isURLSameOrigin() {
  1573. return true;
  1574. };
  1575. })()
  1576. );
  1577.  
  1578.  
  1579. /***/ }),
  1580. /* 25 */
  1581. /***/ (function(module, exports, __webpack_require__) {
  1582.  
  1583. "use strict";
  1584.  
  1585.  
  1586. var utils = __webpack_require__(0);
  1587.  
  1588. module.exports = function normalizeHeaderName(headers, normalizedName) {
  1589. utils.forEach(headers, function processHeader(value, name) {
  1590. if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
  1591. headers[normalizedName] = value;
  1592. delete headers[name];
  1593. }
  1594. });
  1595. };
  1596.  
  1597.  
  1598. /***/ }),
  1599. /* 26 */
  1600. /***/ (function(module, exports, __webpack_require__) {
  1601.  
  1602. "use strict";
  1603.  
  1604.  
  1605. var utils = __webpack_require__(0);
  1606.  
  1607. /**
  1608. * Parse headers into an object
  1609. *
  1610. * ```
  1611. * Date: Wed, 27 Aug 2014 08:58:49 GMT
  1612. * Content-Type: application/json
  1613. * Connection: keep-alive
  1614. * Transfer-Encoding: chunked
  1615. * ```
  1616. *
  1617. * @param {String} headers Headers needing to be parsed
  1618. * @returns {Object} Headers parsed into an object
  1619. */
  1620. module.exports = function parseHeaders(headers) {
  1621. var parsed = {};
  1622. var key;
  1623. var val;
  1624. var i;
  1625.  
  1626. if (!headers) { return parsed; }
  1627.  
  1628. utils.forEach(headers.split('\n'), function parser(line) {
  1629. i = line.indexOf(':');
  1630. key = utils.trim(line.substr(0, i)).toLowerCase();
  1631. val = utils.trim(line.substr(i + 1));
  1632.  
  1633. if (key) {
  1634. parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
  1635. }
  1636. });
  1637.  
  1638. return parsed;
  1639. };
  1640.  
  1641.  
  1642. /***/ }),
  1643. /* 27 */
  1644. /***/ (function(module, exports, __webpack_require__) {
  1645.  
  1646. "use strict";
  1647.  
  1648.  
  1649. /**
  1650. * Syntactic sugar for invoking a function and expanding an array for arguments.
  1651. *
  1652. * Common use case would be to use `Function.prototype.apply`.
  1653. *
  1654. * ```js
  1655. * function f(x, y, z) {}
  1656. * var args = [1, 2, 3];
  1657. * f.apply(null, args);
  1658. * ```
  1659. *
  1660. * With `spread` this example can be re-written.
  1661. *
  1662. * ```js
  1663. * spread(function(x, y, z) {})([1, 2, 3]);
  1664. * ```
  1665. *
  1666. * @param {Function} callback
  1667. * @returns {Function}
  1668. */
  1669. module.exports = function spread(callback) {
  1670. return function wrap(arr) {
  1671. return callback.apply(null, arr);
  1672. };
  1673. };
  1674.  
  1675.  
  1676. /***/ }),
  1677. /* 28 */,
  1678. /* 29 */
  1679. /***/ (function(module, exports, __webpack_require__) {
  1680.  
  1681.  
  1682.  
  1683. /**
  1684. * We'll load jQuery and the Bootstrap jQuery plugin which provides support
  1685. * for JavaScript based Bootstrap features such as modals and tabs. This
  1686. * code may be modified to fit the specific needs of your application.
  1687. */
  1688.  
  1689. /**
  1690. * We'll load the axios HTTP library which allows us to easily issue requests
  1691. * to our Laravel back-end. This library automatically handles sending the
  1692. * CSRF token as a header based on the value of the "XSRF" token cookie.
  1693. */
  1694.  
  1695. window.axios = __webpack_require__(10);
  1696.  
  1697. window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
  1698.  
  1699. /**
  1700. * Next we will register the CSRF Token as a common header with Axios so that
  1701. * all outgoing HTTP requests automatically have it attached. This is just
  1702. * a simple convenience so we don't have to attach every token manually.
  1703. */
  1704.  
  1705. var token = document.head.querySelector('meta[name="csrf-token"]');
  1706.  
  1707. if (token) {
  1708. window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
  1709. } else {
  1710. console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
  1711. }
  1712.  
  1713. /**
  1714. * Echo exposes an expressive API for subscribing to channels and listening
  1715. * for events that are broadcast by Laravel. Echo and event broadcasting
  1716. * allows your team to easily build robust real-time web applications.
  1717. */
  1718.  
  1719. // import Echo from 'laravel-echo'
  1720.  
  1721. // window.Pusher = require('pusher-js');
  1722.  
  1723. // window.Echo = new Echo({
  1724. // broadcaster: 'pusher',
  1725. // key: 'your-pusher-key'
  1726. // });
  1727.  
  1728. /***/ }),
  1729. /* 30 */,
  1730. /* 31 */,
  1731. /* 32 */,
  1732. /* 33 */
  1733. /***/ (function(module, exports) {
  1734.  
  1735. // shim for using process in browser
  1736. var process = module.exports = {};
  1737.  
  1738. // cached from whatever global is present so that test runners that stub it
  1739. // don't break things. But we need to wrap it in a try catch in case it is
  1740. // wrapped in strict mode code which doesn't define any globals. It's inside a
  1741. // function because try/catches deoptimize in certain engines.
  1742.  
  1743. var cachedSetTimeout;
  1744. var cachedClearTimeout;
  1745.  
  1746. function defaultSetTimout() {
  1747. throw new Error('setTimeout has not been defined');
  1748. }
  1749. function defaultClearTimeout () {
  1750. throw new Error('clearTimeout has not been defined');
  1751. }
  1752. (function () {
  1753. try {
  1754. if (typeof setTimeout === 'function') {
  1755. cachedSetTimeout = setTimeout;
  1756. } else {
  1757. cachedSetTimeout = defaultSetTimout;
  1758. }
  1759. } catch (e) {
  1760. cachedSetTimeout = defaultSetTimout;
  1761. }
  1762. try {
  1763. if (typeof clearTimeout === 'function') {
  1764. cachedClearTimeout = clearTimeout;
  1765. } else {
  1766. cachedClearTimeout = defaultClearTimeout;
  1767. }
  1768. } catch (e) {
  1769. cachedClearTimeout = defaultClearTimeout;
  1770. }
  1771. } ())
  1772. function runTimeout(fun) {
  1773. if (cachedSetTimeout === setTimeout) {
  1774. //normal enviroments in sane situations
  1775. return setTimeout(fun, 0);
  1776. }
  1777. // if setTimeout wasn't available but was latter defined
  1778. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  1779. cachedSetTimeout = setTimeout;
  1780. return setTimeout(fun, 0);
  1781. }
  1782. try {
  1783. // when when somebody has screwed with setTimeout but no I.E. maddness
  1784. return cachedSetTimeout(fun, 0);
  1785. } catch(e){
  1786. try {
  1787. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  1788. return cachedSetTimeout.call(null, fun, 0);
  1789. } catch(e){
  1790. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  1791. return cachedSetTimeout.call(this, fun, 0);
  1792. }
  1793. }
  1794.  
  1795.  
  1796. }
  1797. function runClearTimeout(marker) {
  1798. if (cachedClearTimeout === clearTimeout) {
  1799. //normal enviroments in sane situations
  1800. return clearTimeout(marker);
  1801. }
  1802. // if clearTimeout wasn't available but was latter defined
  1803. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  1804. cachedClearTimeout = clearTimeout;
  1805. return clearTimeout(marker);
  1806. }
  1807. try {
  1808. // when when somebody has screwed with setTimeout but no I.E. maddness
  1809. return cachedClearTimeout(marker);
  1810. } catch (e){
  1811. try {
  1812. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  1813. return cachedClearTimeout.call(null, marker);
  1814. } catch (e){
  1815. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  1816. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  1817. return cachedClearTimeout.call(this, marker);
  1818. }
  1819. }
  1820.  
  1821.  
  1822.  
  1823. }
  1824. var queue = [];
  1825. var draining = false;
  1826. var currentQueue;
  1827. var queueIndex = -1;
  1828.  
  1829. function cleanUpNextTick() {
  1830. if (!draining || !currentQueue) {
  1831. return;
  1832. }
  1833. draining = false;
  1834. if (currentQueue.length) {
  1835. queue = currentQueue.concat(queue);
  1836. } else {
  1837. queueIndex = -1;
  1838. }
  1839. if (queue.length) {
  1840. drainQueue();
  1841. }
  1842. }
  1843.  
  1844. function drainQueue() {
  1845. if (draining) {
  1846. return;
  1847. }
  1848. var timeout = runTimeout(cleanUpNextTick);
  1849. draining = true;
  1850.  
  1851. var len = queue.length;
  1852. while(len) {
  1853. currentQueue = queue;
  1854. queue = [];
  1855. while (++queueIndex < len) {
  1856. if (currentQueue) {
  1857. currentQueue[queueIndex].run();
  1858. }
  1859. }
  1860. queueIndex = -1;
  1861. len = queue.length;
  1862. }
  1863. currentQueue = null;
  1864. draining = false;
  1865. runClearTimeout(timeout);
  1866. }
  1867.  
  1868. process.nextTick = function (fun) {
  1869. var args = new Array(arguments.length - 1);
  1870. if (arguments.length > 1) {
  1871. for (var i = 1; i < arguments.length; i++) {
  1872. args[i - 1] = arguments[i];
  1873. }
  1874. }
  1875. queue.push(new Item(fun, args));
  1876. if (queue.length === 1 && !draining) {
  1877. runTimeout(drainQueue);
  1878. }
  1879. };
  1880.  
  1881. // v8 likes predictible objects
  1882. function Item(fun, array) {
  1883. this.fun = fun;
  1884. this.array = array;
  1885. }
  1886. Item.prototype.run = function () {
  1887. this.fun.apply(null, this.array);
  1888. };
  1889. process.title = 'browser';
  1890. process.browser = true;
  1891. process.env = {};
  1892. process.argv = [];
  1893. process.version = ''; // empty string to avoid regexp issues
  1894. process.versions = {};
  1895.  
  1896. function noop() {}
  1897.  
  1898. process.on = noop;
  1899. process.addListener = noop;
  1900. process.once = noop;
  1901. process.off = noop;
  1902. process.removeListener = noop;
  1903. process.removeAllListeners = noop;
  1904. process.emit = noop;
  1905. process.prependListener = noop;
  1906. process.prependOnceListener = noop;
  1907.  
  1908. process.listeners = function (name) { return [] }
  1909.  
  1910. process.binding = function (name) {
  1911. throw new Error('process.binding is not supported');
  1912. };
  1913.  
  1914. process.cwd = function () { return '/' };
  1915. process.chdir = function (dir) {
  1916. throw new Error('process.chdir is not supported');
  1917. };
  1918. process.umask = function() { return 0; };
  1919.  
  1920.  
  1921. /***/ }),
  1922. /* 34 */,
  1923. /* 35 */,
  1924. /* 36 */,
  1925. /* 37 */,
  1926. /* 38 */,
  1927. /* 39 */
  1928. /***/ (function(module, exports, __webpack_require__) {
  1929.  
  1930. __webpack_require__(8);
  1931. module.exports = __webpack_require__(9);
  1932.  
  1933.  
  1934. /***/ })
  1935. /******/ ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement