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