hc-basic 1.5.1 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/lib/hc-basic.common.js +85193 -55
  2. package/lib/hc-basic.umd.js +85204 -56
  3. package/lib/hc-basic.umd.min.js +41 -1
  4. package/package.json +10 -9
  5. package/lib/css/hc-basic.umd.596515ce.css +0 -1
  6. package/lib/css/hc-basic.umd.min.596515ce.css +0 -1
  7. package/lib/hc-basic.common.async-validator1680231905970.js +0 -984
  8. package/lib/hc-basic.common.axios1680231905971.js +0 -1644
  9. package/lib/hc-basic.common.babel-runtime1680231905970.js +0 -1242
  10. package/lib/hc-basic.common.crypto-js1680231905971.js +0 -6194
  11. package/lib/hc-basic.common.element-ui1680231905967.js +0 -43880
  12. package/lib/hc-basic.common.element-ui1680231905968.js +0 -5784
  13. package/lib/hc-basic.common.element-ui1680231905969.js +0 -14978
  14. package/lib/hc-basic.common.element-ui1680231905970.js +0 -3453
  15. package/lib/hc-basic.common.hc-basic.common.js +0 -3812
  16. package/lib/hc-basic.common.resize-observer-polyfill1680231905969.js +0 -941
  17. package/lib/hc-basic.common.vendors~hc-basic.common.js +0 -2203
  18. package/lib/hc-basic.umd.axios1680231905278.js +0 -1712
  19. package/lib/hc-basic.umd.babel-runtime1680231905277.js +0 -1411
  20. package/lib/hc-basic.umd.crypto-js1680231905278.js +0 -6194
  21. package/lib/hc-basic.umd.element-ui1680231905273.js +0 -43880
  22. package/lib/hc-basic.umd.element-ui1680231905274.js +0 -695
  23. package/lib/hc-basic.umd.element-ui1680231905275.js +0 -5158
  24. package/lib/hc-basic.umd.element-ui1680231905276.js +0 -14912
  25. package/lib/hc-basic.umd.element-ui1680231905278.js +0 -3453
  26. package/lib/hc-basic.umd.hc-basic.umd.js +0 -3822
  27. package/lib/hc-basic.umd.min.async-validator1680231905116.js +0 -1
  28. package/lib/hc-basic.umd.min.axios1680231905116.js +0 -1
  29. package/lib/hc-basic.umd.min.babel-runtime1680231905115.js +0 -1
  30. package/lib/hc-basic.umd.min.crypto-js1680231905116.js +0 -18
  31. package/lib/hc-basic.umd.min.element-ui1680231905113.js +0 -1
  32. package/lib/hc-basic.umd.min.element-ui1680231905114.js +0 -9
  33. package/lib/hc-basic.umd.min.element-ui1680231905116.js +0 -1
  34. package/lib/hc-basic.umd.min.hc-basic.umd.min.js +0 -1
  35. package/lib/hc-basic.umd.min.resize-observer-polyfill1680231905114.js +0 -1
  36. package/lib/hc-basic.umd.min.vendors~hc-basic.umd.min.js +0 -16
  37. package/lib/hc-basic.umd.resize-observer-polyfill1680231905275.js +0 -941
  38. package/lib/hc-basic.umd.vendors~hc-basic.umd.js +0 -2911
  39. /package/lib/{css/hc-basic.common.596515ce.css → hc-basic.css} +0 -0
@@ -1,1644 +0,0 @@
1
- ((typeof self !== 'undefined' ? self : this)["webpackJsonphc_basic"] = (typeof self !== 'undefined' ? self : this)["webpackJsonphc_basic"] || []).push([[1],{
2
-
3
- /***/ "0a06":
4
- /***/ (function(module, exports, __webpack_require__) {
5
-
6
- "use strict";
7
-
8
-
9
- var utils = __webpack_require__("c532");
10
- var buildURL = __webpack_require__("30b5");
11
- var InterceptorManager = __webpack_require__("f6b4");
12
- var dispatchRequest = __webpack_require__("5270");
13
- var mergeConfig = __webpack_require__("4a7b");
14
-
15
- /**
16
- * Create a new instance of Axios
17
- *
18
- * @param {Object} instanceConfig The default config for the instance
19
- */
20
- function Axios(instanceConfig) {
21
- this.defaults = instanceConfig;
22
- this.interceptors = {
23
- request: new InterceptorManager(),
24
- response: new InterceptorManager()
25
- };
26
- }
27
-
28
- /**
29
- * Dispatch a request
30
- *
31
- * @param {Object} config The config specific for this request (merged with this.defaults)
32
- */
33
- Axios.prototype.request = function request(config) {
34
- /*eslint no-param-reassign:0*/
35
- // Allow for axios('example/url'[, config]) a la fetch API
36
- if (typeof config === 'string') {
37
- config = arguments[1] || {};
38
- config.url = arguments[0];
39
- } else {
40
- config = config || {};
41
- }
42
-
43
- config = mergeConfig(this.defaults, config);
44
-
45
- // Set config.method
46
- if (config.method) {
47
- config.method = config.method.toLowerCase();
48
- } else if (this.defaults.method) {
49
- config.method = this.defaults.method.toLowerCase();
50
- } else {
51
- config.method = 'get';
52
- }
53
-
54
- // Hook up interceptors middleware
55
- var chain = [dispatchRequest, undefined];
56
- var promise = Promise.resolve(config);
57
-
58
- this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
59
- chain.unshift(interceptor.fulfilled, interceptor.rejected);
60
- });
61
-
62
- this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
63
- chain.push(interceptor.fulfilled, interceptor.rejected);
64
- });
65
-
66
- while (chain.length) {
67
- promise = promise.then(chain.shift(), chain.shift());
68
- }
69
-
70
- return promise;
71
- };
72
-
73
- Axios.prototype.getUri = function getUri(config) {
74
- config = mergeConfig(this.defaults, config);
75
- return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
76
- };
77
-
78
- // Provide aliases for supported request methods
79
- utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
80
- /*eslint func-names:0*/
81
- Axios.prototype[method] = function(url, config) {
82
- return this.request(utils.merge(config || {}, {
83
- method: method,
84
- url: url
85
- }));
86
- };
87
- });
88
-
89
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
90
- /*eslint func-names:0*/
91
- Axios.prototype[method] = function(url, data, config) {
92
- return this.request(utils.merge(config || {}, {
93
- method: method,
94
- url: url,
95
- data: data
96
- }));
97
- };
98
- });
99
-
100
- module.exports = Axios;
101
-
102
-
103
- /***/ }),
104
-
105
- /***/ "0df6":
106
- /***/ (function(module, exports, __webpack_require__) {
107
-
108
- "use strict";
109
-
110
-
111
- /**
112
- * Syntactic sugar for invoking a function and expanding an array for arguments.
113
- *
114
- * Common use case would be to use `Function.prototype.apply`.
115
- *
116
- * ```js
117
- * function f(x, y, z) {}
118
- * var args = [1, 2, 3];
119
- * f.apply(null, args);
120
- * ```
121
- *
122
- * With `spread` this example can be re-written.
123
- *
124
- * ```js
125
- * spread(function(x, y, z) {})([1, 2, 3]);
126
- * ```
127
- *
128
- * @param {Function} callback
129
- * @returns {Function}
130
- */
131
- module.exports = function spread(callback) {
132
- return function wrap(arr) {
133
- return callback.apply(null, arr);
134
- };
135
- };
136
-
137
-
138
- /***/ }),
139
-
140
- /***/ "1d2b":
141
- /***/ (function(module, exports, __webpack_require__) {
142
-
143
- "use strict";
144
-
145
-
146
- module.exports = function bind(fn, thisArg) {
147
- return function wrap() {
148
- var args = new Array(arguments.length);
149
- for (var i = 0; i < args.length; i++) {
150
- args[i] = arguments[i];
151
- }
152
- return fn.apply(thisArg, args);
153
- };
154
- };
155
-
156
-
157
- /***/ }),
158
-
159
- /***/ "2444":
160
- /***/ (function(module, exports, __webpack_require__) {
161
-
162
- "use strict";
163
- /* WEBPACK VAR INJECTION */(function(process) {
164
-
165
- var utils = __webpack_require__("c532");
166
- var normalizeHeaderName = __webpack_require__("c8af");
167
-
168
- var DEFAULT_CONTENT_TYPE = {
169
- 'Content-Type': 'application/x-www-form-urlencoded'
170
- };
171
-
172
- function setContentTypeIfUnset(headers, value) {
173
- if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
174
- headers['Content-Type'] = value;
175
- }
176
- }
177
-
178
- function getDefaultAdapter() {
179
- var adapter;
180
- if (typeof XMLHttpRequest !== 'undefined') {
181
- // For browsers use XHR adapter
182
- adapter = __webpack_require__("b50d");
183
- } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
184
- // For node use HTTP adapter
185
- adapter = __webpack_require__("b50d");
186
- }
187
- return adapter;
188
- }
189
-
190
- var defaults = {
191
- adapter: getDefaultAdapter(),
192
-
193
- transformRequest: [function transformRequest(data, headers) {
194
- normalizeHeaderName(headers, 'Accept');
195
- normalizeHeaderName(headers, 'Content-Type');
196
- if (utils.isFormData(data) ||
197
- utils.isArrayBuffer(data) ||
198
- utils.isBuffer(data) ||
199
- utils.isStream(data) ||
200
- utils.isFile(data) ||
201
- utils.isBlob(data)
202
- ) {
203
- return data;
204
- }
205
- if (utils.isArrayBufferView(data)) {
206
- return data.buffer;
207
- }
208
- if (utils.isURLSearchParams(data)) {
209
- setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
210
- return data.toString();
211
- }
212
- if (utils.isObject(data)) {
213
- setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
214
- return JSON.stringify(data);
215
- }
216
- return data;
217
- }],
218
-
219
- transformResponse: [function transformResponse(data) {
220
- /*eslint no-param-reassign:0*/
221
- if (typeof data === 'string') {
222
- try {
223
- data = JSON.parse(data);
224
- } catch (e) { /* Ignore */ }
225
- }
226
- return data;
227
- }],
228
-
229
- /**
230
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
231
- * timeout is not created.
232
- */
233
- timeout: 0,
234
-
235
- xsrfCookieName: 'XSRF-TOKEN',
236
- xsrfHeaderName: 'X-XSRF-TOKEN',
237
-
238
- maxContentLength: -1,
239
-
240
- validateStatus: function validateStatus(status) {
241
- return status >= 200 && status < 300;
242
- }
243
- };
244
-
245
- defaults.headers = {
246
- common: {
247
- 'Accept': 'application/json, text/plain, */*'
248
- }
249
- };
250
-
251
- utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
252
- defaults.headers[method] = {};
253
- });
254
-
255
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
256
- defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
257
- });
258
-
259
- module.exports = defaults;
260
-
261
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362")))
262
-
263
- /***/ }),
264
-
265
- /***/ "2d83":
266
- /***/ (function(module, exports, __webpack_require__) {
267
-
268
- "use strict";
269
-
270
-
271
- var enhanceError = __webpack_require__("387f");
272
-
273
- /**
274
- * Create an Error with the specified message, config, error code, request and response.
275
- *
276
- * @param {string} message The error message.
277
- * @param {Object} config The config.
278
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
279
- * @param {Object} [request] The request.
280
- * @param {Object} [response] The response.
281
- * @returns {Error} The created error.
282
- */
283
- module.exports = function createError(message, config, code, request, response) {
284
- var error = new Error(message);
285
- return enhanceError(error, config, code, request, response);
286
- };
287
-
288
-
289
- /***/ }),
290
-
291
- /***/ "2e67":
292
- /***/ (function(module, exports, __webpack_require__) {
293
-
294
- "use strict";
295
-
296
-
297
- module.exports = function isCancel(value) {
298
- return !!(value && value.__CANCEL__);
299
- };
300
-
301
-
302
- /***/ }),
303
-
304
- /***/ "30b5":
305
- /***/ (function(module, exports, __webpack_require__) {
306
-
307
- "use strict";
308
-
309
-
310
- var utils = __webpack_require__("c532");
311
-
312
- function encode(val) {
313
- return encodeURIComponent(val).
314
- replace(/%40/gi, '@').
315
- replace(/%3A/gi, ':').
316
- replace(/%24/g, '$').
317
- replace(/%2C/gi, ',').
318
- replace(/%20/g, '+').
319
- replace(/%5B/gi, '[').
320
- replace(/%5D/gi, ']');
321
- }
322
-
323
- /**
324
- * Build a URL by appending params to the end
325
- *
326
- * @param {string} url The base of the url (e.g., http://www.google.com)
327
- * @param {object} [params] The params to be appended
328
- * @returns {string} The formatted url
329
- */
330
- module.exports = function buildURL(url, params, paramsSerializer) {
331
- /*eslint no-param-reassign:0*/
332
- if (!params) {
333
- return url;
334
- }
335
-
336
- var serializedParams;
337
- if (paramsSerializer) {
338
- serializedParams = paramsSerializer(params);
339
- } else if (utils.isURLSearchParams(params)) {
340
- serializedParams = params.toString();
341
- } else {
342
- var parts = [];
343
-
344
- utils.forEach(params, function serialize(val, key) {
345
- if (val === null || typeof val === 'undefined') {
346
- return;
347
- }
348
-
349
- if (utils.isArray(val)) {
350
- key = key + '[]';
351
- } else {
352
- val = [val];
353
- }
354
-
355
- utils.forEach(val, function parseValue(v) {
356
- if (utils.isDate(v)) {
357
- v = v.toISOString();
358
- } else if (utils.isObject(v)) {
359
- v = JSON.stringify(v);
360
- }
361
- parts.push(encode(key) + '=' + encode(v));
362
- });
363
- });
364
-
365
- serializedParams = parts.join('&');
366
- }
367
-
368
- if (serializedParams) {
369
- var hashmarkIndex = url.indexOf('#');
370
- if (hashmarkIndex !== -1) {
371
- url = url.slice(0, hashmarkIndex);
372
- }
373
-
374
- url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
375
- }
376
-
377
- return url;
378
- };
379
-
380
-
381
- /***/ }),
382
-
383
- /***/ "387f":
384
- /***/ (function(module, exports, __webpack_require__) {
385
-
386
- "use strict";
387
-
388
-
389
- /**
390
- * Update an Error with the specified config, error code, and response.
391
- *
392
- * @param {Error} error The error to update.
393
- * @param {Object} config The config.
394
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
395
- * @param {Object} [request] The request.
396
- * @param {Object} [response] The response.
397
- * @returns {Error} The error.
398
- */
399
- module.exports = function enhanceError(error, config, code, request, response) {
400
- error.config = config;
401
- if (code) {
402
- error.code = code;
403
- }
404
-
405
- error.request = request;
406
- error.response = response;
407
- error.isAxiosError = true;
408
-
409
- error.toJSON = function() {
410
- return {
411
- // Standard
412
- message: this.message,
413
- name: this.name,
414
- // Microsoft
415
- description: this.description,
416
- number: this.number,
417
- // Mozilla
418
- fileName: this.fileName,
419
- lineNumber: this.lineNumber,
420
- columnNumber: this.columnNumber,
421
- stack: this.stack,
422
- // Axios
423
- config: this.config,
424
- code: this.code
425
- };
426
- };
427
- return error;
428
- };
429
-
430
-
431
- /***/ }),
432
-
433
- /***/ "3934":
434
- /***/ (function(module, exports, __webpack_require__) {
435
-
436
- "use strict";
437
-
438
-
439
- var utils = __webpack_require__("c532");
440
-
441
- module.exports = (
442
- utils.isStandardBrowserEnv() ?
443
-
444
- // Standard browser envs have full support of the APIs needed to test
445
- // whether the request URL is of the same origin as current location.
446
- (function standardBrowserEnv() {
447
- var msie = /(msie|trident)/i.test(navigator.userAgent);
448
- var urlParsingNode = document.createElement('a');
449
- var originURL;
450
-
451
- /**
452
- * Parse a URL to discover it's components
453
- *
454
- * @param {String} url The URL to be parsed
455
- * @returns {Object}
456
- */
457
- function resolveURL(url) {
458
- var href = url;
459
-
460
- if (msie) {
461
- // IE needs attribute set twice to normalize properties
462
- urlParsingNode.setAttribute('href', href);
463
- href = urlParsingNode.href;
464
- }
465
-
466
- urlParsingNode.setAttribute('href', href);
467
-
468
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
469
- return {
470
- href: urlParsingNode.href,
471
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
472
- host: urlParsingNode.host,
473
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
474
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
475
- hostname: urlParsingNode.hostname,
476
- port: urlParsingNode.port,
477
- pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
478
- urlParsingNode.pathname :
479
- '/' + urlParsingNode.pathname
480
- };
481
- }
482
-
483
- originURL = resolveURL(window.location.href);
484
-
485
- /**
486
- * Determine if a URL shares the same origin as the current location
487
- *
488
- * @param {String} requestURL The URL to test
489
- * @returns {boolean} True if URL shares the same origin, otherwise false
490
- */
491
- return function isURLSameOrigin(requestURL) {
492
- var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
493
- return (parsed.protocol === originURL.protocol &&
494
- parsed.host === originURL.host);
495
- };
496
- })() :
497
-
498
- // Non standard browser envs (web workers, react-native) lack needed support.
499
- (function nonStandardBrowserEnv() {
500
- return function isURLSameOrigin() {
501
- return true;
502
- };
503
- })()
504
- );
505
-
506
-
507
- /***/ }),
508
-
509
- /***/ "467f":
510
- /***/ (function(module, exports, __webpack_require__) {
511
-
512
- "use strict";
513
-
514
-
515
- var createError = __webpack_require__("2d83");
516
-
517
- /**
518
- * Resolve or reject a Promise based on response status.
519
- *
520
- * @param {Function} resolve A function that resolves the promise.
521
- * @param {Function} reject A function that rejects the promise.
522
- * @param {object} response The response.
523
- */
524
- module.exports = function settle(resolve, reject, response) {
525
- var validateStatus = response.config.validateStatus;
526
- if (!validateStatus || validateStatus(response.status)) {
527
- resolve(response);
528
- } else {
529
- reject(createError(
530
- 'Request failed with status code ' + response.status,
531
- response.config,
532
- null,
533
- response.request,
534
- response
535
- ));
536
- }
537
- };
538
-
539
-
540
- /***/ }),
541
-
542
- /***/ "4a7b":
543
- /***/ (function(module, exports, __webpack_require__) {
544
-
545
- "use strict";
546
-
547
-
548
- var utils = __webpack_require__("c532");
549
-
550
- /**
551
- * Config-specific merge-function which creates a new config-object
552
- * by merging two configuration objects together.
553
- *
554
- * @param {Object} config1
555
- * @param {Object} config2
556
- * @returns {Object} New object resulting from merging config2 to config1
557
- */
558
- module.exports = function mergeConfig(config1, config2) {
559
- // eslint-disable-next-line no-param-reassign
560
- config2 = config2 || {};
561
- var config = {};
562
-
563
- var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];
564
- var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];
565
- var defaultToConfig2Keys = [
566
- 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer',
567
- 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
568
- 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress',
569
- 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent',
570
- 'httpsAgent', 'cancelToken', 'socketPath'
571
- ];
572
-
573
- utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
574
- if (typeof config2[prop] !== 'undefined') {
575
- config[prop] = config2[prop];
576
- }
577
- });
578
-
579
- utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {
580
- if (utils.isObject(config2[prop])) {
581
- config[prop] = utils.deepMerge(config1[prop], config2[prop]);
582
- } else if (typeof config2[prop] !== 'undefined') {
583
- config[prop] = config2[prop];
584
- } else if (utils.isObject(config1[prop])) {
585
- config[prop] = utils.deepMerge(config1[prop]);
586
- } else if (typeof config1[prop] !== 'undefined') {
587
- config[prop] = config1[prop];
588
- }
589
- });
590
-
591
- utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
592
- if (typeof config2[prop] !== 'undefined') {
593
- config[prop] = config2[prop];
594
- } else if (typeof config1[prop] !== 'undefined') {
595
- config[prop] = config1[prop];
596
- }
597
- });
598
-
599
- var axiosKeys = valueFromConfig2Keys
600
- .concat(mergeDeepPropertiesKeys)
601
- .concat(defaultToConfig2Keys);
602
-
603
- var otherKeys = Object
604
- .keys(config2)
605
- .filter(function filterAxiosKeys(key) {
606
- return axiosKeys.indexOf(key) === -1;
607
- });
608
-
609
- utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {
610
- if (typeof config2[prop] !== 'undefined') {
611
- config[prop] = config2[prop];
612
- } else if (typeof config1[prop] !== 'undefined') {
613
- config[prop] = config1[prop];
614
- }
615
- });
616
-
617
- return config;
618
- };
619
-
620
-
621
- /***/ }),
622
-
623
- /***/ "5270":
624
- /***/ (function(module, exports, __webpack_require__) {
625
-
626
- "use strict";
627
-
628
-
629
- var utils = __webpack_require__("c532");
630
- var transformData = __webpack_require__("c401");
631
- var isCancel = __webpack_require__("2e67");
632
- var defaults = __webpack_require__("2444");
633
-
634
- /**
635
- * Throws a `Cancel` if cancellation has been requested.
636
- */
637
- function throwIfCancellationRequested(config) {
638
- if (config.cancelToken) {
639
- config.cancelToken.throwIfRequested();
640
- }
641
- }
642
-
643
- /**
644
- * Dispatch a request to the server using the configured adapter.
645
- *
646
- * @param {object} config The config that is to be used for the request
647
- * @returns {Promise} The Promise to be fulfilled
648
- */
649
- module.exports = function dispatchRequest(config) {
650
- throwIfCancellationRequested(config);
651
-
652
- // Ensure headers exist
653
- config.headers = config.headers || {};
654
-
655
- // Transform request data
656
- config.data = transformData(
657
- config.data,
658
- config.headers,
659
- config.transformRequest
660
- );
661
-
662
- // Flatten headers
663
- config.headers = utils.merge(
664
- config.headers.common || {},
665
- config.headers[config.method] || {},
666
- config.headers
667
- );
668
-
669
- utils.forEach(
670
- ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
671
- function cleanHeaderConfig(method) {
672
- delete config.headers[method];
673
- }
674
- );
675
-
676
- var adapter = config.adapter || defaults.adapter;
677
-
678
- return adapter(config).then(function onAdapterResolution(response) {
679
- throwIfCancellationRequested(config);
680
-
681
- // Transform response data
682
- response.data = transformData(
683
- response.data,
684
- response.headers,
685
- config.transformResponse
686
- );
687
-
688
- return response;
689
- }, function onAdapterRejection(reason) {
690
- if (!isCancel(reason)) {
691
- throwIfCancellationRequested(config);
692
-
693
- // Transform response data
694
- if (reason && reason.response) {
695
- reason.response.data = transformData(
696
- reason.response.data,
697
- reason.response.headers,
698
- config.transformResponse
699
- );
700
- }
701
- }
702
-
703
- return Promise.reject(reason);
704
- });
705
- };
706
-
707
-
708
- /***/ }),
709
-
710
- /***/ "7a77":
711
- /***/ (function(module, exports, __webpack_require__) {
712
-
713
- "use strict";
714
-
715
-
716
- /**
717
- * A `Cancel` is an object that is thrown when an operation is canceled.
718
- *
719
- * @class
720
- * @param {string=} message The message.
721
- */
722
- function Cancel(message) {
723
- this.message = message;
724
- }
725
-
726
- Cancel.prototype.toString = function toString() {
727
- return 'Cancel' + (this.message ? ': ' + this.message : '');
728
- };
729
-
730
- Cancel.prototype.__CANCEL__ = true;
731
-
732
- module.exports = Cancel;
733
-
734
-
735
- /***/ }),
736
-
737
- /***/ "7aac":
738
- /***/ (function(module, exports, __webpack_require__) {
739
-
740
- "use strict";
741
-
742
-
743
- var utils = __webpack_require__("c532");
744
-
745
- module.exports = (
746
- utils.isStandardBrowserEnv() ?
747
-
748
- // Standard browser envs support document.cookie
749
- (function standardBrowserEnv() {
750
- return {
751
- write: function write(name, value, expires, path, domain, secure) {
752
- var cookie = [];
753
- cookie.push(name + '=' + encodeURIComponent(value));
754
-
755
- if (utils.isNumber(expires)) {
756
- cookie.push('expires=' + new Date(expires).toGMTString());
757
- }
758
-
759
- if (utils.isString(path)) {
760
- cookie.push('path=' + path);
761
- }
762
-
763
- if (utils.isString(domain)) {
764
- cookie.push('domain=' + domain);
765
- }
766
-
767
- if (secure === true) {
768
- cookie.push('secure');
769
- }
770
-
771
- document.cookie = cookie.join('; ');
772
- },
773
-
774
- read: function read(name) {
775
- var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
776
- return (match ? decodeURIComponent(match[3]) : null);
777
- },
778
-
779
- remove: function remove(name) {
780
- this.write(name, '', Date.now() - 86400000);
781
- }
782
- };
783
- })() :
784
-
785
- // Non standard browser env (web workers, react-native) lack needed support.
786
- (function nonStandardBrowserEnv() {
787
- return {
788
- write: function write() {},
789
- read: function read() { return null; },
790
- remove: function remove() {}
791
- };
792
- })()
793
- );
794
-
795
-
796
- /***/ }),
797
-
798
- /***/ "83b9":
799
- /***/ (function(module, exports, __webpack_require__) {
800
-
801
- "use strict";
802
-
803
-
804
- var isAbsoluteURL = __webpack_require__("d925");
805
- var combineURLs = __webpack_require__("e683");
806
-
807
- /**
808
- * Creates a new URL by combining the baseURL with the requestedURL,
809
- * only when the requestedURL is not already an absolute URL.
810
- * If the requestURL is absolute, this function returns the requestedURL untouched.
811
- *
812
- * @param {string} baseURL The base URL
813
- * @param {string} requestedURL Absolute or relative URL to combine
814
- * @returns {string} The combined full path
815
- */
816
- module.exports = function buildFullPath(baseURL, requestedURL) {
817
- if (baseURL && !isAbsoluteURL(requestedURL)) {
818
- return combineURLs(baseURL, requestedURL);
819
- }
820
- return requestedURL;
821
- };
822
-
823
-
824
- /***/ }),
825
-
826
- /***/ "8df4":
827
- /***/ (function(module, exports, __webpack_require__) {
828
-
829
- "use strict";
830
-
831
-
832
- var Cancel = __webpack_require__("7a77");
833
-
834
- /**
835
- * A `CancelToken` is an object that can be used to request cancellation of an operation.
836
- *
837
- * @class
838
- * @param {Function} executor The executor function.
839
- */
840
- function CancelToken(executor) {
841
- if (typeof executor !== 'function') {
842
- throw new TypeError('executor must be a function.');
843
- }
844
-
845
- var resolvePromise;
846
- this.promise = new Promise(function promiseExecutor(resolve) {
847
- resolvePromise = resolve;
848
- });
849
-
850
- var token = this;
851
- executor(function cancel(message) {
852
- if (token.reason) {
853
- // Cancellation has already been requested
854
- return;
855
- }
856
-
857
- token.reason = new Cancel(message);
858
- resolvePromise(token.reason);
859
- });
860
- }
861
-
862
- /**
863
- * Throws a `Cancel` if cancellation has been requested.
864
- */
865
- CancelToken.prototype.throwIfRequested = function throwIfRequested() {
866
- if (this.reason) {
867
- throw this.reason;
868
- }
869
- };
870
-
871
- /**
872
- * Returns an object that contains a new `CancelToken` and a function that, when called,
873
- * cancels the `CancelToken`.
874
- */
875
- CancelToken.source = function source() {
876
- var cancel;
877
- var token = new CancelToken(function executor(c) {
878
- cancel = c;
879
- });
880
- return {
881
- token: token,
882
- cancel: cancel
883
- };
884
- };
885
-
886
- module.exports = CancelToken;
887
-
888
-
889
- /***/ }),
890
-
891
- /***/ "b50d":
892
- /***/ (function(module, exports, __webpack_require__) {
893
-
894
- "use strict";
895
-
896
-
897
- var utils = __webpack_require__("c532");
898
- var settle = __webpack_require__("467f");
899
- var buildURL = __webpack_require__("30b5");
900
- var buildFullPath = __webpack_require__("83b9");
901
- var parseHeaders = __webpack_require__("c345");
902
- var isURLSameOrigin = __webpack_require__("3934");
903
- var createError = __webpack_require__("2d83");
904
-
905
- module.exports = function xhrAdapter(config) {
906
- return new Promise(function dispatchXhrRequest(resolve, reject) {
907
- var requestData = config.data;
908
- var requestHeaders = config.headers;
909
-
910
- if (utils.isFormData(requestData)) {
911
- delete requestHeaders['Content-Type']; // Let the browser set it
912
- }
913
-
914
- var request = new XMLHttpRequest();
915
-
916
- // HTTP basic authentication
917
- if (config.auth) {
918
- var username = config.auth.username || '';
919
- var password = config.auth.password || '';
920
- requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
921
- }
922
-
923
- var fullPath = buildFullPath(config.baseURL, config.url);
924
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
925
-
926
- // Set the request timeout in MS
927
- request.timeout = config.timeout;
928
-
929
- // Listen for ready state
930
- request.onreadystatechange = function handleLoad() {
931
- if (!request || request.readyState !== 4) {
932
- return;
933
- }
934
-
935
- // The request errored out and we didn't get a response, this will be
936
- // handled by onerror instead
937
- // With one exception: request that using file: protocol, most browsers
938
- // will return status as 0 even though it's a successful request
939
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
940
- return;
941
- }
942
-
943
- // Prepare the response
944
- var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
945
- var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
946
- var response = {
947
- data: responseData,
948
- status: request.status,
949
- statusText: request.statusText,
950
- headers: responseHeaders,
951
- config: config,
952
- request: request
953
- };
954
-
955
- settle(resolve, reject, response);
956
-
957
- // Clean up request
958
- request = null;
959
- };
960
-
961
- // Handle browser request cancellation (as opposed to a manual cancellation)
962
- request.onabort = function handleAbort() {
963
- if (!request) {
964
- return;
965
- }
966
-
967
- reject(createError('Request aborted', config, 'ECONNABORTED', request));
968
-
969
- // Clean up request
970
- request = null;
971
- };
972
-
973
- // Handle low level network errors
974
- request.onerror = function handleError() {
975
- // Real errors are hidden from us by the browser
976
- // onerror should only fire if it's a network error
977
- reject(createError('Network Error', config, null, request));
978
-
979
- // Clean up request
980
- request = null;
981
- };
982
-
983
- // Handle timeout
984
- request.ontimeout = function handleTimeout() {
985
- var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
986
- if (config.timeoutErrorMessage) {
987
- timeoutErrorMessage = config.timeoutErrorMessage;
988
- }
989
- reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
990
- request));
991
-
992
- // Clean up request
993
- request = null;
994
- };
995
-
996
- // Add xsrf header
997
- // This is only done if running in a standard browser environment.
998
- // Specifically not if we're in a web worker, or react-native.
999
- if (utils.isStandardBrowserEnv()) {
1000
- var cookies = __webpack_require__("7aac");
1001
-
1002
- // Add xsrf header
1003
- var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
1004
- cookies.read(config.xsrfCookieName) :
1005
- undefined;
1006
-
1007
- if (xsrfValue) {
1008
- requestHeaders[config.xsrfHeaderName] = xsrfValue;
1009
- }
1010
- }
1011
-
1012
- // Add headers to the request
1013
- if ('setRequestHeader' in request) {
1014
- utils.forEach(requestHeaders, function setRequestHeader(val, key) {
1015
- if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
1016
- // Remove Content-Type if data is undefined
1017
- delete requestHeaders[key];
1018
- } else {
1019
- // Otherwise add header to the request
1020
- request.setRequestHeader(key, val);
1021
- }
1022
- });
1023
- }
1024
-
1025
- // Add withCredentials to request if needed
1026
- if (!utils.isUndefined(config.withCredentials)) {
1027
- request.withCredentials = !!config.withCredentials;
1028
- }
1029
-
1030
- // Add responseType to request if needed
1031
- if (config.responseType) {
1032
- try {
1033
- request.responseType = config.responseType;
1034
- } catch (e) {
1035
- // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
1036
- // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
1037
- if (config.responseType !== 'json') {
1038
- throw e;
1039
- }
1040
- }
1041
- }
1042
-
1043
- // Handle progress if needed
1044
- if (typeof config.onDownloadProgress === 'function') {
1045
- request.addEventListener('progress', config.onDownloadProgress);
1046
- }
1047
-
1048
- // Not all browsers support upload events
1049
- if (typeof config.onUploadProgress === 'function' && request.upload) {
1050
- request.upload.addEventListener('progress', config.onUploadProgress);
1051
- }
1052
-
1053
- if (config.cancelToken) {
1054
- // Handle cancellation
1055
- config.cancelToken.promise.then(function onCanceled(cancel) {
1056
- if (!request) {
1057
- return;
1058
- }
1059
-
1060
- request.abort();
1061
- reject(cancel);
1062
- // Clean up request
1063
- request = null;
1064
- });
1065
- }
1066
-
1067
- if (requestData === undefined) {
1068
- requestData = null;
1069
- }
1070
-
1071
- // Send the request
1072
- request.send(requestData);
1073
- });
1074
- };
1075
-
1076
-
1077
- /***/ }),
1078
-
1079
- /***/ "c345":
1080
- /***/ (function(module, exports, __webpack_require__) {
1081
-
1082
- "use strict";
1083
-
1084
-
1085
- var utils = __webpack_require__("c532");
1086
-
1087
- // Headers whose duplicates are ignored by node
1088
- // c.f. https://nodejs.org/api/http.html#http_message_headers
1089
- var ignoreDuplicateOf = [
1090
- 'age', 'authorization', 'content-length', 'content-type', 'etag',
1091
- 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1092
- 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
1093
- 'referer', 'retry-after', 'user-agent'
1094
- ];
1095
-
1096
- /**
1097
- * Parse headers into an object
1098
- *
1099
- * ```
1100
- * Date: Wed, 27 Aug 2014 08:58:49 GMT
1101
- * Content-Type: application/json
1102
- * Connection: keep-alive
1103
- * Transfer-Encoding: chunked
1104
- * ```
1105
- *
1106
- * @param {String} headers Headers needing to be parsed
1107
- * @returns {Object} Headers parsed into an object
1108
- */
1109
- module.exports = function parseHeaders(headers) {
1110
- var parsed = {};
1111
- var key;
1112
- var val;
1113
- var i;
1114
-
1115
- if (!headers) { return parsed; }
1116
-
1117
- utils.forEach(headers.split('\n'), function parser(line) {
1118
- i = line.indexOf(':');
1119
- key = utils.trim(line.substr(0, i)).toLowerCase();
1120
- val = utils.trim(line.substr(i + 1));
1121
-
1122
- if (key) {
1123
- if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
1124
- return;
1125
- }
1126
- if (key === 'set-cookie') {
1127
- parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
1128
- } else {
1129
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1130
- }
1131
- }
1132
- });
1133
-
1134
- return parsed;
1135
- };
1136
-
1137
-
1138
- /***/ }),
1139
-
1140
- /***/ "c401":
1141
- /***/ (function(module, exports, __webpack_require__) {
1142
-
1143
- "use strict";
1144
-
1145
-
1146
- var utils = __webpack_require__("c532");
1147
-
1148
- /**
1149
- * Transform the data for a request or a response
1150
- *
1151
- * @param {Object|String} data The data to be transformed
1152
- * @param {Array} headers The headers for the request or response
1153
- * @param {Array|Function} fns A single function or Array of functions
1154
- * @returns {*} The resulting transformed data
1155
- */
1156
- module.exports = function transformData(data, headers, fns) {
1157
- /*eslint no-param-reassign:0*/
1158
- utils.forEach(fns, function transform(fn) {
1159
- data = fn(data, headers);
1160
- });
1161
-
1162
- return data;
1163
- };
1164
-
1165
-
1166
- /***/ }),
1167
-
1168
- /***/ "c532":
1169
- /***/ (function(module, exports, __webpack_require__) {
1170
-
1171
- "use strict";
1172
-
1173
-
1174
- var bind = __webpack_require__("1d2b");
1175
-
1176
- /*global toString:true*/
1177
-
1178
- // utils is a library of generic helper functions non-specific to axios
1179
-
1180
- var toString = Object.prototype.toString;
1181
-
1182
- /**
1183
- * Determine if a value is an Array
1184
- *
1185
- * @param {Object} val The value to test
1186
- * @returns {boolean} True if value is an Array, otherwise false
1187
- */
1188
- function isArray(val) {
1189
- return toString.call(val) === '[object Array]';
1190
- }
1191
-
1192
- /**
1193
- * Determine if a value is undefined
1194
- *
1195
- * @param {Object} val The value to test
1196
- * @returns {boolean} True if the value is undefined, otherwise false
1197
- */
1198
- function isUndefined(val) {
1199
- return typeof val === 'undefined';
1200
- }
1201
-
1202
- /**
1203
- * Determine if a value is a Buffer
1204
- *
1205
- * @param {Object} val The value to test
1206
- * @returns {boolean} True if value is a Buffer, otherwise false
1207
- */
1208
- function isBuffer(val) {
1209
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
1210
- && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
1211
- }
1212
-
1213
- /**
1214
- * Determine if a value is an ArrayBuffer
1215
- *
1216
- * @param {Object} val The value to test
1217
- * @returns {boolean} True if value is an ArrayBuffer, otherwise false
1218
- */
1219
- function isArrayBuffer(val) {
1220
- return toString.call(val) === '[object ArrayBuffer]';
1221
- }
1222
-
1223
- /**
1224
- * Determine if a value is a FormData
1225
- *
1226
- * @param {Object} val The value to test
1227
- * @returns {boolean} True if value is an FormData, otherwise false
1228
- */
1229
- function isFormData(val) {
1230
- return (typeof FormData !== 'undefined') && (val instanceof FormData);
1231
- }
1232
-
1233
- /**
1234
- * Determine if a value is a view on an ArrayBuffer
1235
- *
1236
- * @param {Object} val The value to test
1237
- * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
1238
- */
1239
- function isArrayBufferView(val) {
1240
- var result;
1241
- if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
1242
- result = ArrayBuffer.isView(val);
1243
- } else {
1244
- result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
1245
- }
1246
- return result;
1247
- }
1248
-
1249
- /**
1250
- * Determine if a value is a String
1251
- *
1252
- * @param {Object} val The value to test
1253
- * @returns {boolean} True if value is a String, otherwise false
1254
- */
1255
- function isString(val) {
1256
- return typeof val === 'string';
1257
- }
1258
-
1259
- /**
1260
- * Determine if a value is a Number
1261
- *
1262
- * @param {Object} val The value to test
1263
- * @returns {boolean} True if value is a Number, otherwise false
1264
- */
1265
- function isNumber(val) {
1266
- return typeof val === 'number';
1267
- }
1268
-
1269
- /**
1270
- * Determine if a value is an Object
1271
- *
1272
- * @param {Object} val The value to test
1273
- * @returns {boolean} True if value is an Object, otherwise false
1274
- */
1275
- function isObject(val) {
1276
- return val !== null && typeof val === 'object';
1277
- }
1278
-
1279
- /**
1280
- * Determine if a value is a Date
1281
- *
1282
- * @param {Object} val The value to test
1283
- * @returns {boolean} True if value is a Date, otherwise false
1284
- */
1285
- function isDate(val) {
1286
- return toString.call(val) === '[object Date]';
1287
- }
1288
-
1289
- /**
1290
- * Determine if a value is a File
1291
- *
1292
- * @param {Object} val The value to test
1293
- * @returns {boolean} True if value is a File, otherwise false
1294
- */
1295
- function isFile(val) {
1296
- return toString.call(val) === '[object File]';
1297
- }
1298
-
1299
- /**
1300
- * Determine if a value is a Blob
1301
- *
1302
- * @param {Object} val The value to test
1303
- * @returns {boolean} True if value is a Blob, otherwise false
1304
- */
1305
- function isBlob(val) {
1306
- return toString.call(val) === '[object Blob]';
1307
- }
1308
-
1309
- /**
1310
- * Determine if a value is a Function
1311
- *
1312
- * @param {Object} val The value to test
1313
- * @returns {boolean} True if value is a Function, otherwise false
1314
- */
1315
- function isFunction(val) {
1316
- return toString.call(val) === '[object Function]';
1317
- }
1318
-
1319
- /**
1320
- * Determine if a value is a Stream
1321
- *
1322
- * @param {Object} val The value to test
1323
- * @returns {boolean} True if value is a Stream, otherwise false
1324
- */
1325
- function isStream(val) {
1326
- return isObject(val) && isFunction(val.pipe);
1327
- }
1328
-
1329
- /**
1330
- * Determine if a value is a URLSearchParams object
1331
- *
1332
- * @param {Object} val The value to test
1333
- * @returns {boolean} True if value is a URLSearchParams object, otherwise false
1334
- */
1335
- function isURLSearchParams(val) {
1336
- return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
1337
- }
1338
-
1339
- /**
1340
- * Trim excess whitespace off the beginning and end of a string
1341
- *
1342
- * @param {String} str The String to trim
1343
- * @returns {String} The String freed of excess whitespace
1344
- */
1345
- function trim(str) {
1346
- return str.replace(/^\s*/, '').replace(/\s*$/, '');
1347
- }
1348
-
1349
- /**
1350
- * Determine if we're running in a standard browser environment
1351
- *
1352
- * This allows axios to run in a web worker, and react-native.
1353
- * Both environments support XMLHttpRequest, but not fully standard globals.
1354
- *
1355
- * web workers:
1356
- * typeof window -> undefined
1357
- * typeof document -> undefined
1358
- *
1359
- * react-native:
1360
- * navigator.product -> 'ReactNative'
1361
- * nativescript
1362
- * navigator.product -> 'NativeScript' or 'NS'
1363
- */
1364
- function isStandardBrowserEnv() {
1365
- if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
1366
- navigator.product === 'NativeScript' ||
1367
- navigator.product === 'NS')) {
1368
- return false;
1369
- }
1370
- return (
1371
- typeof window !== 'undefined' &&
1372
- typeof document !== 'undefined'
1373
- );
1374
- }
1375
-
1376
- /**
1377
- * Iterate over an Array or an Object invoking a function for each item.
1378
- *
1379
- * If `obj` is an Array callback will be called passing
1380
- * the value, index, and complete array for each item.
1381
- *
1382
- * If 'obj' is an Object callback will be called passing
1383
- * the value, key, and complete object for each property.
1384
- *
1385
- * @param {Object|Array} obj The object to iterate
1386
- * @param {Function} fn The callback to invoke for each item
1387
- */
1388
- function forEach(obj, fn) {
1389
- // Don't bother if no value provided
1390
- if (obj === null || typeof obj === 'undefined') {
1391
- return;
1392
- }
1393
-
1394
- // Force an array if not already something iterable
1395
- if (typeof obj !== 'object') {
1396
- /*eslint no-param-reassign:0*/
1397
- obj = [obj];
1398
- }
1399
-
1400
- if (isArray(obj)) {
1401
- // Iterate over array values
1402
- for (var i = 0, l = obj.length; i < l; i++) {
1403
- fn.call(null, obj[i], i, obj);
1404
- }
1405
- } else {
1406
- // Iterate over object keys
1407
- for (var key in obj) {
1408
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
1409
- fn.call(null, obj[key], key, obj);
1410
- }
1411
- }
1412
- }
1413
- }
1414
-
1415
- /**
1416
- * Accepts varargs expecting each argument to be an object, then
1417
- * immutably merges the properties of each object and returns result.
1418
- *
1419
- * When multiple objects contain the same key the later object in
1420
- * the arguments list will take precedence.
1421
- *
1422
- * Example:
1423
- *
1424
- * ```js
1425
- * var result = merge({foo: 123}, {foo: 456});
1426
- * console.log(result.foo); // outputs 456
1427
- * ```
1428
- *
1429
- * @param {Object} obj1 Object to merge
1430
- * @returns {Object} Result of all merge properties
1431
- */
1432
- function merge(/* obj1, obj2, obj3, ... */) {
1433
- var result = {};
1434
- function assignValue(val, key) {
1435
- if (typeof result[key] === 'object' && typeof val === 'object') {
1436
- result[key] = merge(result[key], val);
1437
- } else {
1438
- result[key] = val;
1439
- }
1440
- }
1441
-
1442
- for (var i = 0, l = arguments.length; i < l; i++) {
1443
- forEach(arguments[i], assignValue);
1444
- }
1445
- return result;
1446
- }
1447
-
1448
- /**
1449
- * Function equal to merge with the difference being that no reference
1450
- * to original objects is kept.
1451
- *
1452
- * @see merge
1453
- * @param {Object} obj1 Object to merge
1454
- * @returns {Object} Result of all merge properties
1455
- */
1456
- function deepMerge(/* obj1, obj2, obj3, ... */) {
1457
- var result = {};
1458
- function assignValue(val, key) {
1459
- if (typeof result[key] === 'object' && typeof val === 'object') {
1460
- result[key] = deepMerge(result[key], val);
1461
- } else if (typeof val === 'object') {
1462
- result[key] = deepMerge({}, val);
1463
- } else {
1464
- result[key] = val;
1465
- }
1466
- }
1467
-
1468
- for (var i = 0, l = arguments.length; i < l; i++) {
1469
- forEach(arguments[i], assignValue);
1470
- }
1471
- return result;
1472
- }
1473
-
1474
- /**
1475
- * Extends object a by mutably adding to it the properties of object b.
1476
- *
1477
- * @param {Object} a The object to be extended
1478
- * @param {Object} b The object to copy properties from
1479
- * @param {Object} thisArg The object to bind function to
1480
- * @return {Object} The resulting value of object a
1481
- */
1482
- function extend(a, b, thisArg) {
1483
- forEach(b, function assignValue(val, key) {
1484
- if (thisArg && typeof val === 'function') {
1485
- a[key] = bind(val, thisArg);
1486
- } else {
1487
- a[key] = val;
1488
- }
1489
- });
1490
- return a;
1491
- }
1492
-
1493
- module.exports = {
1494
- isArray: isArray,
1495
- isArrayBuffer: isArrayBuffer,
1496
- isBuffer: isBuffer,
1497
- isFormData: isFormData,
1498
- isArrayBufferView: isArrayBufferView,
1499
- isString: isString,
1500
- isNumber: isNumber,
1501
- isObject: isObject,
1502
- isUndefined: isUndefined,
1503
- isDate: isDate,
1504
- isFile: isFile,
1505
- isBlob: isBlob,
1506
- isFunction: isFunction,
1507
- isStream: isStream,
1508
- isURLSearchParams: isURLSearchParams,
1509
- isStandardBrowserEnv: isStandardBrowserEnv,
1510
- forEach: forEach,
1511
- merge: merge,
1512
- deepMerge: deepMerge,
1513
- extend: extend,
1514
- trim: trim
1515
- };
1516
-
1517
-
1518
- /***/ }),
1519
-
1520
- /***/ "c8af":
1521
- /***/ (function(module, exports, __webpack_require__) {
1522
-
1523
- "use strict";
1524
-
1525
-
1526
- var utils = __webpack_require__("c532");
1527
-
1528
- module.exports = function normalizeHeaderName(headers, normalizedName) {
1529
- utils.forEach(headers, function processHeader(value, name) {
1530
- if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
1531
- headers[normalizedName] = value;
1532
- delete headers[name];
1533
- }
1534
- });
1535
- };
1536
-
1537
-
1538
- /***/ }),
1539
-
1540
- /***/ "d925":
1541
- /***/ (function(module, exports, __webpack_require__) {
1542
-
1543
- "use strict";
1544
-
1545
-
1546
- /**
1547
- * Determines whether the specified URL is absolute
1548
- *
1549
- * @param {string} url The URL to test
1550
- * @returns {boolean} True if the specified URL is absolute, otherwise false
1551
- */
1552
- module.exports = function isAbsoluteURL(url) {
1553
- // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
1554
- // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
1555
- // by any combination of letters, digits, plus, period, or hyphen.
1556
- return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
1557
- };
1558
-
1559
-
1560
- /***/ }),
1561
-
1562
- /***/ "e683":
1563
- /***/ (function(module, exports, __webpack_require__) {
1564
-
1565
- "use strict";
1566
-
1567
-
1568
- /**
1569
- * Creates a new URL by combining the specified URLs
1570
- *
1571
- * @param {string} baseURL The base URL
1572
- * @param {string} relativeURL The relative URL
1573
- * @returns {string} The combined URL
1574
- */
1575
- module.exports = function combineURLs(baseURL, relativeURL) {
1576
- return relativeURL
1577
- ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
1578
- : baseURL;
1579
- };
1580
-
1581
-
1582
- /***/ }),
1583
-
1584
- /***/ "f6b4":
1585
- /***/ (function(module, exports, __webpack_require__) {
1586
-
1587
- "use strict";
1588
-
1589
-
1590
- var utils = __webpack_require__("c532");
1591
-
1592
- function InterceptorManager() {
1593
- this.handlers = [];
1594
- }
1595
-
1596
- /**
1597
- * Add a new interceptor to the stack
1598
- *
1599
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
1600
- * @param {Function} rejected The function to handle `reject` for a `Promise`
1601
- *
1602
- * @return {Number} An ID used to remove interceptor later
1603
- */
1604
- InterceptorManager.prototype.use = function use(fulfilled, rejected) {
1605
- this.handlers.push({
1606
- fulfilled: fulfilled,
1607
- rejected: rejected
1608
- });
1609
- return this.handlers.length - 1;
1610
- };
1611
-
1612
- /**
1613
- * Remove an interceptor from the stack
1614
- *
1615
- * @param {Number} id The ID that was returned by `use`
1616
- */
1617
- InterceptorManager.prototype.eject = function eject(id) {
1618
- if (this.handlers[id]) {
1619
- this.handlers[id] = null;
1620
- }
1621
- };
1622
-
1623
- /**
1624
- * Iterate over all the registered interceptors
1625
- *
1626
- * This method is particularly useful for skipping over any
1627
- * interceptors that may have become `null` calling `eject`.
1628
- *
1629
- * @param {Function} fn The function to call for each interceptor
1630
- */
1631
- InterceptorManager.prototype.forEach = function forEach(fn) {
1632
- utils.forEach(this.handlers, function forEachHandler(h) {
1633
- if (h !== null) {
1634
- fn(h);
1635
- }
1636
- });
1637
- };
1638
-
1639
- module.exports = InterceptorManager;
1640
-
1641
-
1642
- /***/ })
1643
-
1644
- }]);