slide-vue3 1.0.2

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.
@@ -0,0 +1,2608 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = "2b1f");
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ "0997":
91
+ /***/ (function(module, exports, __webpack_require__) {
92
+
93
+ "use strict";
94
+
95
+
96
+ var utils = __webpack_require__("3d1e");
97
+ var buildURL = __webpack_require__("85b5");
98
+ var InterceptorManager = __webpack_require__("f80f");
99
+ var dispatchRequest = __webpack_require__("ab31");
100
+ var mergeConfig = __webpack_require__("9f97");
101
+
102
+ /**
103
+ * Create a new instance of Axios
104
+ *
105
+ * @param {Object} instanceConfig The default config for the instance
106
+ */
107
+ function Axios(instanceConfig) {
108
+ this.defaults = instanceConfig;
109
+ this.interceptors = {
110
+ request: new InterceptorManager(),
111
+ response: new InterceptorManager()
112
+ };
113
+ }
114
+
115
+ /**
116
+ * Dispatch a request
117
+ *
118
+ * @param {Object} config The config specific for this request (merged with this.defaults)
119
+ */
120
+ Axios.prototype.request = function request(config) {
121
+ /*eslint no-param-reassign:0*/
122
+ // Allow for axios('example/url'[, config]) a la fetch API
123
+ if (typeof config === 'string') {
124
+ config = arguments[1] || {};
125
+ config.url = arguments[0];
126
+ } else {
127
+ config = config || {};
128
+ }
129
+
130
+ config = mergeConfig(this.defaults, config);
131
+
132
+ // Set config.method
133
+ if (config.method) {
134
+ config.method = config.method.toLowerCase();
135
+ } else if (this.defaults.method) {
136
+ config.method = this.defaults.method.toLowerCase();
137
+ } else {
138
+ config.method = 'get';
139
+ }
140
+
141
+ // Hook up interceptors middleware
142
+ var chain = [dispatchRequest, undefined];
143
+ var promise = Promise.resolve(config);
144
+
145
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
146
+ chain.unshift(interceptor.fulfilled, interceptor.rejected);
147
+ });
148
+
149
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
150
+ chain.push(interceptor.fulfilled, interceptor.rejected);
151
+ });
152
+
153
+ while (chain.length) {
154
+ promise = promise.then(chain.shift(), chain.shift());
155
+ }
156
+
157
+ return promise;
158
+ };
159
+
160
+ Axios.prototype.getUri = function getUri(config) {
161
+ config = mergeConfig(this.defaults, config);
162
+ return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
163
+ };
164
+
165
+ // Provide aliases for supported request methods
166
+ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
167
+ /*eslint func-names:0*/
168
+ Axios.prototype[method] = function(url, config) {
169
+ return this.request(mergeConfig(config || {}, {
170
+ method: method,
171
+ url: url
172
+ }));
173
+ };
174
+ });
175
+
176
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
177
+ /*eslint func-names:0*/
178
+ Axios.prototype[method] = function(url, data, config) {
179
+ return this.request(mergeConfig(config || {}, {
180
+ method: method,
181
+ url: url,
182
+ data: data
183
+ }));
184
+ };
185
+ });
186
+
187
+ module.exports = Axios;
188
+
189
+
190
+ /***/ }),
191
+
192
+ /***/ "0cc7":
193
+ /***/ (function(module, exports, __webpack_require__) {
194
+
195
+ "use strict";
196
+
197
+
198
+ var utils = __webpack_require__("3d1e");
199
+
200
+ module.exports = function normalizeHeaderName(headers, normalizedName) {
201
+ utils.forEach(headers, function processHeader(value, name) {
202
+ if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
203
+ headers[normalizedName] = value;
204
+ delete headers[name];
205
+ }
206
+ });
207
+ };
208
+
209
+
210
+ /***/ }),
211
+
212
+ /***/ "26af":
213
+ /***/ (function(module, exports, __webpack_require__) {
214
+
215
+ "use strict";
216
+
217
+
218
+ /**
219
+ * Creates a new URL by combining the specified URLs
220
+ *
221
+ * @param {string} baseURL The base URL
222
+ * @param {string} relativeURL The relative URL
223
+ * @returns {string} The combined URL
224
+ */
225
+ module.exports = function combineURLs(baseURL, relativeURL) {
226
+ return relativeURL
227
+ ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
228
+ : baseURL;
229
+ };
230
+
231
+
232
+ /***/ }),
233
+
234
+ /***/ "2a78":
235
+ /***/ (function(module, exports, __webpack_require__) {
236
+
237
+ "use strict";
238
+
239
+
240
+ var createError = __webpack_require__("6c70");
241
+
242
+ /**
243
+ * Resolve or reject a Promise based on response status.
244
+ *
245
+ * @param {Function} resolve A function that resolves the promise.
246
+ * @param {Function} reject A function that rejects the promise.
247
+ * @param {object} response The response.
248
+ */
249
+ module.exports = function settle(resolve, reject, response) {
250
+ var validateStatus = response.config.validateStatus;
251
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
252
+ resolve(response);
253
+ } else {
254
+ reject(createError(
255
+ 'Request failed with status code ' + response.status,
256
+ response.config,
257
+ null,
258
+ response.request,
259
+ response
260
+ ));
261
+ }
262
+ };
263
+
264
+
265
+ /***/ }),
266
+
267
+ /***/ "2b1f":
268
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
269
+
270
+ "use strict";
271
+ // ESM COMPAT FLAG
272
+ __webpack_require__.r(__webpack_exports__);
273
+
274
+ // CONCATENATED MODULE: ./node_modules/_@vue_cli-service@4.5.19@@vue/cli-service/lib/commands/build/setPublicPath.js
275
+ // This file is imported into lib/wc client bundles.
276
+
277
+ if (typeof window !== 'undefined') {
278
+ var currentScript = window.document.currentScript
279
+ if (false) { var getCurrentScript; }
280
+
281
+ var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
282
+ if (src) {
283
+ __webpack_require__.p = src[1] // eslint-disable-line
284
+ }
285
+ }
286
+
287
+ // Indicate to webpack that this file can be concatenated
288
+ /* harmony default export */ var setPublicPath = (null);
289
+
290
+ // EXTERNAL MODULE: ./node_modules/_axios@0.20.0@axios/index.js
291
+ var _axios_0_20_0_axios = __webpack_require__("5976");
292
+ var _axios_0_20_0_axios_default = /*#__PURE__*/__webpack_require__.n(_axios_0_20_0_axios);
293
+
294
+ // CONCATENATED MODULE: ./packages/slidecode/js/utils.js
295
+ const isMobile = () => {
296
+ var sUserAgent = navigator.userAgent.toLowerCase();
297
+ var bIsIpad = sUserAgent.match(/ipad/i) == 'ipad';
298
+ var bIsIphoneOs = sUserAgent.match(/iphone os/i) == 'iphone os';
299
+ var bIsMidp = sUserAgent.match(/midp/i) == 'midp';
300
+ var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == 'rv:1.2.3.4';
301
+ var bIsUc = sUserAgent.match(/ucweb/i) == 'ucweb';
302
+ var bIsAndroid = sUserAgent.match(/android/i) == 'android';
303
+ var bIsCE = sUserAgent.match(/windows ce/i) == 'windows ce';
304
+ var bIsWM = sUserAgent.match(/windows mobile/i) == 'windows mobile';
305
+
306
+ if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
307
+ return true;
308
+ }
309
+
310
+ return false;
311
+ };
312
+
313
+
314
+ // EXTERNAL MODULE: ./packages/slidecode/css/slide.css
315
+ var slide = __webpack_require__("cdfd");
316
+
317
+ // CONCATENATED MODULE: ./packages/index.js
318
+ /* eslint-disable no-param-reassign */
319
+
320
+
321
+ // import SlideCode from'./slidecode/js/slidecode'
322
+
323
+ let SlideCode = __webpack_require__("9e42").default;
324
+
325
+ if (isMobile()) {
326
+ SlideCode = __webpack_require__("4554").default;
327
+ }
328
+
329
+ const packages_plugin = {
330
+ install: app => {
331
+ app.config.globalProperties.$getImg = (url, cb) => {
332
+ const service = _axios_0_20_0_axios_default.a.create();
333
+ service({
334
+ url,
335
+ method: 'get'
336
+ }).then(({
337
+ data
338
+ }) => {
339
+ if (data) {
340
+ const slide = new SlideCode({
341
+ frontimg: `data:image/png;base64,${data.slidingImage}`,
342
+ backimg: `data:image/png;base64,${data.backImage}`,
343
+ yHeight: data.yHeight,
344
+ capcode: data.capcode,
345
+
346
+ refreshcallback(bool) {
347
+ switch (bool) {
348
+ case true:
349
+ slide.showTips(true);
350
+ setTimeout(() => {
351
+ slide.destory();
352
+ }, 500);
353
+ break;
354
+
355
+ case false:
356
+ slide.showTips(false);
357
+ setTimeout(() => {
358
+ app.config.globalProperties.$getImg(url, cb);
359
+ }, 500);
360
+ break;
361
+
362
+ default:
363
+ app.config.globalProperties.$getImg(url, cb);
364
+ }
365
+ },
366
+
367
+ callback(result) {
368
+ cb({
369
+ data: result,
370
+ that: this
371
+ });
372
+ }
373
+
374
+ });
375
+ }
376
+ });
377
+ };
378
+ }
379
+ };
380
+ /* harmony default export */ var packages_0 = (packages_plugin);
381
+ // CONCATENATED MODULE: ./node_modules/_@vue_cli-service@4.5.19@@vue/cli-service/lib/commands/build/entry-lib.js
382
+
383
+
384
+ /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (packages_0);
385
+
386
+
387
+
388
+ /***/ }),
389
+
390
+ /***/ "3d1e":
391
+ /***/ (function(module, exports, __webpack_require__) {
392
+
393
+ "use strict";
394
+
395
+
396
+ var bind = __webpack_require__("efe0");
397
+
398
+ /*global toString:true*/
399
+
400
+ // utils is a library of generic helper functions non-specific to axios
401
+
402
+ var toString = Object.prototype.toString;
403
+
404
+ /**
405
+ * Determine if a value is an Array
406
+ *
407
+ * @param {Object} val The value to test
408
+ * @returns {boolean} True if value is an Array, otherwise false
409
+ */
410
+ function isArray(val) {
411
+ return toString.call(val) === '[object Array]';
412
+ }
413
+
414
+ /**
415
+ * Determine if a value is undefined
416
+ *
417
+ * @param {Object} val The value to test
418
+ * @returns {boolean} True if the value is undefined, otherwise false
419
+ */
420
+ function isUndefined(val) {
421
+ return typeof val === 'undefined';
422
+ }
423
+
424
+ /**
425
+ * Determine if a value is a Buffer
426
+ *
427
+ * @param {Object} val The value to test
428
+ * @returns {boolean} True if value is a Buffer, otherwise false
429
+ */
430
+ function isBuffer(val) {
431
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
432
+ && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
433
+ }
434
+
435
+ /**
436
+ * Determine if a value is an ArrayBuffer
437
+ *
438
+ * @param {Object} val The value to test
439
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
440
+ */
441
+ function isArrayBuffer(val) {
442
+ return toString.call(val) === '[object ArrayBuffer]';
443
+ }
444
+
445
+ /**
446
+ * Determine if a value is a FormData
447
+ *
448
+ * @param {Object} val The value to test
449
+ * @returns {boolean} True if value is an FormData, otherwise false
450
+ */
451
+ function isFormData(val) {
452
+ return (typeof FormData !== 'undefined') && (val instanceof FormData);
453
+ }
454
+
455
+ /**
456
+ * Determine if a value is a view on an ArrayBuffer
457
+ *
458
+ * @param {Object} val The value to test
459
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
460
+ */
461
+ function isArrayBufferView(val) {
462
+ var result;
463
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
464
+ result = ArrayBuffer.isView(val);
465
+ } else {
466
+ result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
467
+ }
468
+ return result;
469
+ }
470
+
471
+ /**
472
+ * Determine if a value is a String
473
+ *
474
+ * @param {Object} val The value to test
475
+ * @returns {boolean} True if value is a String, otherwise false
476
+ */
477
+ function isString(val) {
478
+ return typeof val === 'string';
479
+ }
480
+
481
+ /**
482
+ * Determine if a value is a Number
483
+ *
484
+ * @param {Object} val The value to test
485
+ * @returns {boolean} True if value is a Number, otherwise false
486
+ */
487
+ function isNumber(val) {
488
+ return typeof val === 'number';
489
+ }
490
+
491
+ /**
492
+ * Determine if a value is an Object
493
+ *
494
+ * @param {Object} val The value to test
495
+ * @returns {boolean} True if value is an Object, otherwise false
496
+ */
497
+ function isObject(val) {
498
+ return val !== null && typeof val === 'object';
499
+ }
500
+
501
+ /**
502
+ * Determine if a value is a plain Object
503
+ *
504
+ * @param {Object} val The value to test
505
+ * @return {boolean} True if value is a plain Object, otherwise false
506
+ */
507
+ function isPlainObject(val) {
508
+ if (toString.call(val) !== '[object Object]') {
509
+ return false;
510
+ }
511
+
512
+ var prototype = Object.getPrototypeOf(val);
513
+ return prototype === null || prototype === Object.prototype;
514
+ }
515
+
516
+ /**
517
+ * Determine if a value is a Date
518
+ *
519
+ * @param {Object} val The value to test
520
+ * @returns {boolean} True if value is a Date, otherwise false
521
+ */
522
+ function isDate(val) {
523
+ return toString.call(val) === '[object Date]';
524
+ }
525
+
526
+ /**
527
+ * Determine if a value is a File
528
+ *
529
+ * @param {Object} val The value to test
530
+ * @returns {boolean} True if value is a File, otherwise false
531
+ */
532
+ function isFile(val) {
533
+ return toString.call(val) === '[object File]';
534
+ }
535
+
536
+ /**
537
+ * Determine if a value is a Blob
538
+ *
539
+ * @param {Object} val The value to test
540
+ * @returns {boolean} True if value is a Blob, otherwise false
541
+ */
542
+ function isBlob(val) {
543
+ return toString.call(val) === '[object Blob]';
544
+ }
545
+
546
+ /**
547
+ * Determine if a value is a Function
548
+ *
549
+ * @param {Object} val The value to test
550
+ * @returns {boolean} True if value is a Function, otherwise false
551
+ */
552
+ function isFunction(val) {
553
+ return toString.call(val) === '[object Function]';
554
+ }
555
+
556
+ /**
557
+ * Determine if a value is a Stream
558
+ *
559
+ * @param {Object} val The value to test
560
+ * @returns {boolean} True if value is a Stream, otherwise false
561
+ */
562
+ function isStream(val) {
563
+ return isObject(val) && isFunction(val.pipe);
564
+ }
565
+
566
+ /**
567
+ * Determine if a value is a URLSearchParams object
568
+ *
569
+ * @param {Object} val The value to test
570
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
571
+ */
572
+ function isURLSearchParams(val) {
573
+ return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
574
+ }
575
+
576
+ /**
577
+ * Trim excess whitespace off the beginning and end of a string
578
+ *
579
+ * @param {String} str The String to trim
580
+ * @returns {String} The String freed of excess whitespace
581
+ */
582
+ function trim(str) {
583
+ return str.replace(/^\s*/, '').replace(/\s*$/, '');
584
+ }
585
+
586
+ /**
587
+ * Determine if we're running in a standard browser environment
588
+ *
589
+ * This allows axios to run in a web worker, and react-native.
590
+ * Both environments support XMLHttpRequest, but not fully standard globals.
591
+ *
592
+ * web workers:
593
+ * typeof window -> undefined
594
+ * typeof document -> undefined
595
+ *
596
+ * react-native:
597
+ * navigator.product -> 'ReactNative'
598
+ * nativescript
599
+ * navigator.product -> 'NativeScript' or 'NS'
600
+ */
601
+ function isStandardBrowserEnv() {
602
+ if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
603
+ navigator.product === 'NativeScript' ||
604
+ navigator.product === 'NS')) {
605
+ return false;
606
+ }
607
+ return (
608
+ typeof window !== 'undefined' &&
609
+ typeof document !== 'undefined'
610
+ );
611
+ }
612
+
613
+ /**
614
+ * Iterate over an Array or an Object invoking a function for each item.
615
+ *
616
+ * If `obj` is an Array callback will be called passing
617
+ * the value, index, and complete array for each item.
618
+ *
619
+ * If 'obj' is an Object callback will be called passing
620
+ * the value, key, and complete object for each property.
621
+ *
622
+ * @param {Object|Array} obj The object to iterate
623
+ * @param {Function} fn The callback to invoke for each item
624
+ */
625
+ function forEach(obj, fn) {
626
+ // Don't bother if no value provided
627
+ if (obj === null || typeof obj === 'undefined') {
628
+ return;
629
+ }
630
+
631
+ // Force an array if not already something iterable
632
+ if (typeof obj !== 'object') {
633
+ /*eslint no-param-reassign:0*/
634
+ obj = [obj];
635
+ }
636
+
637
+ if (isArray(obj)) {
638
+ // Iterate over array values
639
+ for (var i = 0, l = obj.length; i < l; i++) {
640
+ fn.call(null, obj[i], i, obj);
641
+ }
642
+ } else {
643
+ // Iterate over object keys
644
+ for (var key in obj) {
645
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
646
+ fn.call(null, obj[key], key, obj);
647
+ }
648
+ }
649
+ }
650
+ }
651
+
652
+ /**
653
+ * Accepts varargs expecting each argument to be an object, then
654
+ * immutably merges the properties of each object and returns result.
655
+ *
656
+ * When multiple objects contain the same key the later object in
657
+ * the arguments list will take precedence.
658
+ *
659
+ * Example:
660
+ *
661
+ * ```js
662
+ * var result = merge({foo: 123}, {foo: 456});
663
+ * console.log(result.foo); // outputs 456
664
+ * ```
665
+ *
666
+ * @param {Object} obj1 Object to merge
667
+ * @returns {Object} Result of all merge properties
668
+ */
669
+ function merge(/* obj1, obj2, obj3, ... */) {
670
+ var result = {};
671
+ function assignValue(val, key) {
672
+ if (isPlainObject(result[key]) && isPlainObject(val)) {
673
+ result[key] = merge(result[key], val);
674
+ } else if (isPlainObject(val)) {
675
+ result[key] = merge({}, val);
676
+ } else if (isArray(val)) {
677
+ result[key] = val.slice();
678
+ } else {
679
+ result[key] = val;
680
+ }
681
+ }
682
+
683
+ for (var i = 0, l = arguments.length; i < l; i++) {
684
+ forEach(arguments[i], assignValue);
685
+ }
686
+ return result;
687
+ }
688
+
689
+ /**
690
+ * Extends object a by mutably adding to it the properties of object b.
691
+ *
692
+ * @param {Object} a The object to be extended
693
+ * @param {Object} b The object to copy properties from
694
+ * @param {Object} thisArg The object to bind function to
695
+ * @return {Object} The resulting value of object a
696
+ */
697
+ function extend(a, b, thisArg) {
698
+ forEach(b, function assignValue(val, key) {
699
+ if (thisArg && typeof val === 'function') {
700
+ a[key] = bind(val, thisArg);
701
+ } else {
702
+ a[key] = val;
703
+ }
704
+ });
705
+ return a;
706
+ }
707
+
708
+ /**
709
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
710
+ *
711
+ * @param {string} content with BOM
712
+ * @return {string} content value without BOM
713
+ */
714
+ function stripBOM(content) {
715
+ if (content.charCodeAt(0) === 0xFEFF) {
716
+ content = content.slice(1);
717
+ }
718
+ return content;
719
+ }
720
+
721
+ module.exports = {
722
+ isArray: isArray,
723
+ isArrayBuffer: isArrayBuffer,
724
+ isBuffer: isBuffer,
725
+ isFormData: isFormData,
726
+ isArrayBufferView: isArrayBufferView,
727
+ isString: isString,
728
+ isNumber: isNumber,
729
+ isObject: isObject,
730
+ isPlainObject: isPlainObject,
731
+ isUndefined: isUndefined,
732
+ isDate: isDate,
733
+ isFile: isFile,
734
+ isBlob: isBlob,
735
+ isFunction: isFunction,
736
+ isStream: isStream,
737
+ isURLSearchParams: isURLSearchParams,
738
+ isStandardBrowserEnv: isStandardBrowserEnv,
739
+ forEach: forEach,
740
+ merge: merge,
741
+ extend: extend,
742
+ trim: trim,
743
+ stripBOM: stripBOM
744
+ };
745
+
746
+
747
+ /***/ }),
748
+
749
+ /***/ "4554":
750
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
751
+
752
+ "use strict";
753
+ __webpack_require__.r(__webpack_exports__);
754
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return SlideCode; });
755
+ class SlideCode {
756
+ constructor(options) {
757
+ const defaults = {
758
+ frontimg: '',
759
+ backimg: '',
760
+ callback: '',
761
+ refreshcallback: '',
762
+ yHeight: 1
763
+ };
764
+ this.opts = { ...defaults,
765
+ ...options
766
+ };
767
+ this.offset = {
768
+ x: 0,
769
+ y: 0
770
+ };
771
+ this.disX = 0;
772
+ this.moving = false;
773
+ this.init();
774
+ }
775
+
776
+ init() {
777
+ const html = `
778
+ <div class="code-k-div">
779
+ <div class="code_bg"></div>
780
+ <div class="code-con">
781
+ <div class="code-img">
782
+ <div class="code-img-con">
783
+ <div class="code-mask" style="margin-top:${this.opts.yHeight}px"><img class="code-front-img" src="${this.opts.frontimg}"></div>
784
+ <img class="code-back-img" src="${this.opts.backimg}">
785
+ </div>
786
+ <div class="code-push"><i class="icon-login-bg icon-w-25 icon-push">刷新</i><span class="code-tip"></span></div>
787
+ </div>
788
+ <div class="code-btn">
789
+ <div class="code-btn-img code-btn-m"></div>
790
+ <span class="code-span">按住滑块,拖动完成上方拼图</span>
791
+ </div>
792
+ </div>
793
+ </div>`;
794
+ this.destory();
795
+ const div = document.createElement('div');
796
+ div.className = 'slide-container';
797
+ div.innerHTML = html;
798
+ document.body.appendChild(div);
799
+ this.maskDom = document.querySelector('.code-mask');
800
+ this.moveBtnDom = document.querySelector('.code-btn-m');
801
+ this.moveWrapDom = document.querySelector('.code-btn');
802
+ this.refreshDom = document.querySelector('.code-push');
803
+ this.tipDom = document.querySelector('.code-tip');
804
+ this.bgDom = document.querySelector('.code_bg');
805
+ this.initEvent();
806
+ }
807
+
808
+ initEvent() {
809
+ this.refreshDom.addEventListener('click', () => {
810
+ this.opts.refreshcallback();
811
+ });
812
+ this.moveBtnDom.addEventListener('touchstart', event => {
813
+ let e = event || window.event;
814
+ e = e.targetTouches[0];
815
+ this.offset = {
816
+ x: e.pageX,
817
+ y: e.pageY
818
+ };
819
+ this.moving = true;
820
+ this.moveBtnDom.className += ' active';
821
+ });
822
+ this.moveBtnDom.addEventListener('touchmove', event => {
823
+ if (!this.moving) {
824
+ return;
825
+ }
826
+
827
+ let e = event || window.event;
828
+ e = e.targetTouches[0];
829
+ let disX = e.pageX - this.offset.x;
830
+
831
+ if (disX < 0) {
832
+ disX = 0;
833
+ } else if (disX > 245) {
834
+ disX = 245;
835
+ }
836
+
837
+ this.disX = disX;
838
+ this.moveBtnDom.style.left = `${disX + 10}px`;
839
+ this.maskDom.style.left = `${disX}px`;
840
+ });
841
+ this.moveBtnDom.addEventListener('touchend', event => {
842
+ this.moveEnd(event);
843
+ });
844
+ this.moveWrapDom.addEventListener('mouseleave', event => {
845
+ this.moveEnd(event);
846
+ });
847
+ this.bgDom.addEventListener('click', () => {
848
+ if (this.moving) {
849
+ return;
850
+ }
851
+
852
+ this.destory();
853
+ });
854
+ }
855
+
856
+ moveEnd() {
857
+ if (!this.moving) {
858
+ return;
859
+ }
860
+
861
+ this.offset = {
862
+ x: 0,
863
+ y: 0
864
+ };
865
+ this.moving = false;
866
+ this.moveBtnDom.className = this.moveBtnDom.className.replace(' active', '');
867
+ this.moveBtnDom.removeEventListener('mousemove', () => {});
868
+ this.opts.callback({
869
+ xpos: parseInt(this.disX),
870
+ capcode: this.opts.capcode,
871
+ image_valid_type: 'slide_image'
872
+ });
873
+ }
874
+
875
+ showTips(bool) {
876
+ const obj = {
877
+ true: {
878
+ name: '验证通过',
879
+ color: 'green'
880
+ },
881
+ false: {
882
+ name: '验证不通过',
883
+ color: 'red'
884
+ }
885
+ };
886
+ this.tipDom.innerHTML = obj[bool].name;
887
+ this.tipDom.style.color = obj[bool].color;
888
+ }
889
+
890
+ destory() {
891
+ if (document.querySelector('.slide-container')) {
892
+ document.body.removeChild(document.querySelector('.slide-container'));
893
+ }
894
+ }
895
+
896
+ }
897
+
898
+ /***/ }),
899
+
900
+ /***/ "4a94":
901
+ /***/ (function(module, exports, __webpack_require__) {
902
+
903
+ "use strict";
904
+
905
+
906
+ var utils = __webpack_require__("3d1e");
907
+ var settle = __webpack_require__("2a78");
908
+ var cookies = __webpack_require__("a74f");
909
+ var buildURL = __webpack_require__("85b5");
910
+ var buildFullPath = __webpack_require__("d547");
911
+ var parseHeaders = __webpack_require__("ce40");
912
+ var isURLSameOrigin = __webpack_require__("d5f5");
913
+ var createError = __webpack_require__("6c70");
914
+
915
+ module.exports = function xhrAdapter(config) {
916
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
917
+ var requestData = config.data;
918
+ var requestHeaders = config.headers;
919
+
920
+ if (utils.isFormData(requestData)) {
921
+ delete requestHeaders['Content-Type']; // Let the browser set it
922
+ }
923
+
924
+ if (
925
+ (utils.isBlob(requestData) || utils.isFile(requestData)) &&
926
+ requestData.type
927
+ ) {
928
+ delete requestHeaders['Content-Type']; // Let the browser set it
929
+ }
930
+
931
+ var request = new XMLHttpRequest();
932
+
933
+ // HTTP basic authentication
934
+ if (config.auth) {
935
+ var username = config.auth.username || '';
936
+ var password = unescape(encodeURIComponent(config.auth.password)) || '';
937
+ requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
938
+ }
939
+
940
+ var fullPath = buildFullPath(config.baseURL, config.url);
941
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
942
+
943
+ // Set the request timeout in MS
944
+ request.timeout = config.timeout;
945
+
946
+ // Listen for ready state
947
+ request.onreadystatechange = function handleLoad() {
948
+ if (!request || request.readyState !== 4) {
949
+ return;
950
+ }
951
+
952
+ // The request errored out and we didn't get a response, this will be
953
+ // handled by onerror instead
954
+ // With one exception: request that using file: protocol, most browsers
955
+ // will return status as 0 even though it's a successful request
956
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
957
+ return;
958
+ }
959
+
960
+ // Prepare the response
961
+ var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
962
+ var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
963
+ var response = {
964
+ data: responseData,
965
+ status: request.status,
966
+ statusText: request.statusText,
967
+ headers: responseHeaders,
968
+ config: config,
969
+ request: request
970
+ };
971
+
972
+ settle(resolve, reject, response);
973
+
974
+ // Clean up request
975
+ request = null;
976
+ };
977
+
978
+ // Handle browser request cancellation (as opposed to a manual cancellation)
979
+ request.onabort = function handleAbort() {
980
+ if (!request) {
981
+ return;
982
+ }
983
+
984
+ reject(createError('Request aborted', config, 'ECONNABORTED', request));
985
+
986
+ // Clean up request
987
+ request = null;
988
+ };
989
+
990
+ // Handle low level network errors
991
+ request.onerror = function handleError() {
992
+ // Real errors are hidden from us by the browser
993
+ // onerror should only fire if it's a network error
994
+ reject(createError('Network Error', config, null, request));
995
+
996
+ // Clean up request
997
+ request = null;
998
+ };
999
+
1000
+ // Handle timeout
1001
+ request.ontimeout = function handleTimeout() {
1002
+ var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
1003
+ if (config.timeoutErrorMessage) {
1004
+ timeoutErrorMessage = config.timeoutErrorMessage;
1005
+ }
1006
+ reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
1007
+ request));
1008
+
1009
+ // Clean up request
1010
+ request = null;
1011
+ };
1012
+
1013
+ // Add xsrf header
1014
+ // This is only done if running in a standard browser environment.
1015
+ // Specifically not if we're in a web worker, or react-native.
1016
+ if (utils.isStandardBrowserEnv()) {
1017
+ // Add xsrf header
1018
+ var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
1019
+ cookies.read(config.xsrfCookieName) :
1020
+ undefined;
1021
+
1022
+ if (xsrfValue) {
1023
+ requestHeaders[config.xsrfHeaderName] = xsrfValue;
1024
+ }
1025
+ }
1026
+
1027
+ // Add headers to the request
1028
+ if ('setRequestHeader' in request) {
1029
+ utils.forEach(requestHeaders, function setRequestHeader(val, key) {
1030
+ if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
1031
+ // Remove Content-Type if data is undefined
1032
+ delete requestHeaders[key];
1033
+ } else {
1034
+ // Otherwise add header to the request
1035
+ request.setRequestHeader(key, val);
1036
+ }
1037
+ });
1038
+ }
1039
+
1040
+ // Add withCredentials to request if needed
1041
+ if (!utils.isUndefined(config.withCredentials)) {
1042
+ request.withCredentials = !!config.withCredentials;
1043
+ }
1044
+
1045
+ // Add responseType to request if needed
1046
+ if (config.responseType) {
1047
+ try {
1048
+ request.responseType = config.responseType;
1049
+ } catch (e) {
1050
+ // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
1051
+ // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
1052
+ if (config.responseType !== 'json') {
1053
+ throw e;
1054
+ }
1055
+ }
1056
+ }
1057
+
1058
+ // Handle progress if needed
1059
+ if (typeof config.onDownloadProgress === 'function') {
1060
+ request.addEventListener('progress', config.onDownloadProgress);
1061
+ }
1062
+
1063
+ // Not all browsers support upload events
1064
+ if (typeof config.onUploadProgress === 'function' && request.upload) {
1065
+ request.upload.addEventListener('progress', config.onUploadProgress);
1066
+ }
1067
+
1068
+ if (config.cancelToken) {
1069
+ // Handle cancellation
1070
+ config.cancelToken.promise.then(function onCanceled(cancel) {
1071
+ if (!request) {
1072
+ return;
1073
+ }
1074
+
1075
+ request.abort();
1076
+ reject(cancel);
1077
+ // Clean up request
1078
+ request = null;
1079
+ });
1080
+ }
1081
+
1082
+ if (!requestData) {
1083
+ requestData = null;
1084
+ }
1085
+
1086
+ // Send the request
1087
+ request.send(requestData);
1088
+ });
1089
+ };
1090
+
1091
+
1092
+ /***/ }),
1093
+
1094
+ /***/ "50ca":
1095
+ /***/ (function(module, exports, __webpack_require__) {
1096
+
1097
+ "use strict";
1098
+
1099
+
1100
+ var utils = __webpack_require__("3d1e");
1101
+
1102
+ /**
1103
+ * Transform the data for a request or a response
1104
+ *
1105
+ * @param {Object|String} data The data to be transformed
1106
+ * @param {Array} headers The headers for the request or response
1107
+ * @param {Array|Function} fns A single function or Array of functions
1108
+ * @returns {*} The resulting transformed data
1109
+ */
1110
+ module.exports = function transformData(data, headers, fns) {
1111
+ /*eslint no-param-reassign:0*/
1112
+ utils.forEach(fns, function transform(fn) {
1113
+ data = fn(data, headers);
1114
+ });
1115
+
1116
+ return data;
1117
+ };
1118
+
1119
+
1120
+ /***/ }),
1121
+
1122
+ /***/ "5976":
1123
+ /***/ (function(module, exports, __webpack_require__) {
1124
+
1125
+ module.exports = __webpack_require__("cf08");
1126
+
1127
+ /***/ }),
1128
+
1129
+ /***/ "61f6":
1130
+ /***/ (function(module, exports, __webpack_require__) {
1131
+
1132
+ "use strict";
1133
+
1134
+
1135
+ /**
1136
+ * Update an Error with the specified config, error code, and response.
1137
+ *
1138
+ * @param {Error} error The error to update.
1139
+ * @param {Object} config The config.
1140
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
1141
+ * @param {Object} [request] The request.
1142
+ * @param {Object} [response] The response.
1143
+ * @returns {Error} The error.
1144
+ */
1145
+ module.exports = function enhanceError(error, config, code, request, response) {
1146
+ error.config = config;
1147
+ if (code) {
1148
+ error.code = code;
1149
+ }
1150
+
1151
+ error.request = request;
1152
+ error.response = response;
1153
+ error.isAxiosError = true;
1154
+
1155
+ error.toJSON = function toJSON() {
1156
+ return {
1157
+ // Standard
1158
+ message: this.message,
1159
+ name: this.name,
1160
+ // Microsoft
1161
+ description: this.description,
1162
+ number: this.number,
1163
+ // Mozilla
1164
+ fileName: this.fileName,
1165
+ lineNumber: this.lineNumber,
1166
+ columnNumber: this.columnNumber,
1167
+ stack: this.stack,
1168
+ // Axios
1169
+ config: this.config,
1170
+ code: this.code
1171
+ };
1172
+ };
1173
+ return error;
1174
+ };
1175
+
1176
+
1177
+ /***/ }),
1178
+
1179
+ /***/ "6266":
1180
+ /***/ (function(module, exports, __webpack_require__) {
1181
+
1182
+ /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
1183
+ // backported and transplited with Babel, with backwards-compat fixes
1184
+
1185
+ // Copyright Joyent, Inc. and other Node contributors.
1186
+ //
1187
+ // Permission is hereby granted, free of charge, to any person obtaining a
1188
+ // copy of this software and associated documentation files (the
1189
+ // "Software"), to deal in the Software without restriction, including
1190
+ // without limitation the rights to use, copy, modify, merge, publish,
1191
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
1192
+ // persons to whom the Software is furnished to do so, subject to the
1193
+ // following conditions:
1194
+ //
1195
+ // The above copyright notice and this permission notice shall be included
1196
+ // in all copies or substantial portions of the Software.
1197
+ //
1198
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1199
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1200
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
1201
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
1202
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
1203
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
1204
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
1205
+
1206
+ // resolves . and .. elements in a path array with directory names there
1207
+ // must be no slashes, empty elements, or device names (c:\) in the array
1208
+ // (so also no leading and trailing slashes - it does not distinguish
1209
+ // relative and absolute paths)
1210
+ function normalizeArray(parts, allowAboveRoot) {
1211
+ // if the path tries to go above the root, `up` ends up > 0
1212
+ var up = 0;
1213
+ for (var i = parts.length - 1; i >= 0; i--) {
1214
+ var last = parts[i];
1215
+ if (last === '.') {
1216
+ parts.splice(i, 1);
1217
+ } else if (last === '..') {
1218
+ parts.splice(i, 1);
1219
+ up++;
1220
+ } else if (up) {
1221
+ parts.splice(i, 1);
1222
+ up--;
1223
+ }
1224
+ }
1225
+
1226
+ // if the path is allowed to go above the root, restore leading ..s
1227
+ if (allowAboveRoot) {
1228
+ for (; up--; up) {
1229
+ parts.unshift('..');
1230
+ }
1231
+ }
1232
+
1233
+ return parts;
1234
+ }
1235
+
1236
+ // path.resolve([from ...], to)
1237
+ // posix version
1238
+ exports.resolve = function() {
1239
+ var resolvedPath = '',
1240
+ resolvedAbsolute = false;
1241
+
1242
+ for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
1243
+ var path = (i >= 0) ? arguments[i] : process.cwd();
1244
+
1245
+ // Skip empty and invalid entries
1246
+ if (typeof path !== 'string') {
1247
+ throw new TypeError('Arguments to path.resolve must be strings');
1248
+ } else if (!path) {
1249
+ continue;
1250
+ }
1251
+
1252
+ resolvedPath = path + '/' + resolvedPath;
1253
+ resolvedAbsolute = path.charAt(0) === '/';
1254
+ }
1255
+
1256
+ // At this point the path should be resolved to a full absolute path, but
1257
+ // handle relative paths to be safe (might happen when process.cwd() fails)
1258
+
1259
+ // Normalize the path
1260
+ resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
1261
+ return !!p;
1262
+ }), !resolvedAbsolute).join('/');
1263
+
1264
+ return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
1265
+ };
1266
+
1267
+ // path.normalize(path)
1268
+ // posix version
1269
+ exports.normalize = function(path) {
1270
+ var isAbsolute = exports.isAbsolute(path),
1271
+ trailingSlash = substr(path, -1) === '/';
1272
+
1273
+ // Normalize the path
1274
+ path = normalizeArray(filter(path.split('/'), function(p) {
1275
+ return !!p;
1276
+ }), !isAbsolute).join('/');
1277
+
1278
+ if (!path && !isAbsolute) {
1279
+ path = '.';
1280
+ }
1281
+ if (path && trailingSlash) {
1282
+ path += '/';
1283
+ }
1284
+
1285
+ return (isAbsolute ? '/' : '') + path;
1286
+ };
1287
+
1288
+ // posix version
1289
+ exports.isAbsolute = function(path) {
1290
+ return path.charAt(0) === '/';
1291
+ };
1292
+
1293
+ // posix version
1294
+ exports.join = function() {
1295
+ var paths = Array.prototype.slice.call(arguments, 0);
1296
+ return exports.normalize(filter(paths, function(p, index) {
1297
+ if (typeof p !== 'string') {
1298
+ throw new TypeError('Arguments to path.join must be strings');
1299
+ }
1300
+ return p;
1301
+ }).join('/'));
1302
+ };
1303
+
1304
+
1305
+ // path.relative(from, to)
1306
+ // posix version
1307
+ exports.relative = function(from, to) {
1308
+ from = exports.resolve(from).substr(1);
1309
+ to = exports.resolve(to).substr(1);
1310
+
1311
+ function trim(arr) {
1312
+ var start = 0;
1313
+ for (; start < arr.length; start++) {
1314
+ if (arr[start] !== '') break;
1315
+ }
1316
+
1317
+ var end = arr.length - 1;
1318
+ for (; end >= 0; end--) {
1319
+ if (arr[end] !== '') break;
1320
+ }
1321
+
1322
+ if (start > end) return [];
1323
+ return arr.slice(start, end - start + 1);
1324
+ }
1325
+
1326
+ var fromParts = trim(from.split('/'));
1327
+ var toParts = trim(to.split('/'));
1328
+
1329
+ var length = Math.min(fromParts.length, toParts.length);
1330
+ var samePartsLength = length;
1331
+ for (var i = 0; i < length; i++) {
1332
+ if (fromParts[i] !== toParts[i]) {
1333
+ samePartsLength = i;
1334
+ break;
1335
+ }
1336
+ }
1337
+
1338
+ var outputParts = [];
1339
+ for (var i = samePartsLength; i < fromParts.length; i++) {
1340
+ outputParts.push('..');
1341
+ }
1342
+
1343
+ outputParts = outputParts.concat(toParts.slice(samePartsLength));
1344
+
1345
+ return outputParts.join('/');
1346
+ };
1347
+
1348
+ exports.sep = '/';
1349
+ exports.delimiter = ':';
1350
+
1351
+ exports.dirname = function (path) {
1352
+ if (typeof path !== 'string') path = path + '';
1353
+ if (path.length === 0) return '.';
1354
+ var code = path.charCodeAt(0);
1355
+ var hasRoot = code === 47 /*/*/;
1356
+ var end = -1;
1357
+ var matchedSlash = true;
1358
+ for (var i = path.length - 1; i >= 1; --i) {
1359
+ code = path.charCodeAt(i);
1360
+ if (code === 47 /*/*/) {
1361
+ if (!matchedSlash) {
1362
+ end = i;
1363
+ break;
1364
+ }
1365
+ } else {
1366
+ // We saw the first non-path separator
1367
+ matchedSlash = false;
1368
+ }
1369
+ }
1370
+
1371
+ if (end === -1) return hasRoot ? '/' : '.';
1372
+ if (hasRoot && end === 1) {
1373
+ // return '//';
1374
+ // Backwards-compat fix:
1375
+ return '/';
1376
+ }
1377
+ return path.slice(0, end);
1378
+ };
1379
+
1380
+ function basename(path) {
1381
+ if (typeof path !== 'string') path = path + '';
1382
+
1383
+ var start = 0;
1384
+ var end = -1;
1385
+ var matchedSlash = true;
1386
+ var i;
1387
+
1388
+ for (i = path.length - 1; i >= 0; --i) {
1389
+ if (path.charCodeAt(i) === 47 /*/*/) {
1390
+ // If we reached a path separator that was not part of a set of path
1391
+ // separators at the end of the string, stop now
1392
+ if (!matchedSlash) {
1393
+ start = i + 1;
1394
+ break;
1395
+ }
1396
+ } else if (end === -1) {
1397
+ // We saw the first non-path separator, mark this as the end of our
1398
+ // path component
1399
+ matchedSlash = false;
1400
+ end = i + 1;
1401
+ }
1402
+ }
1403
+
1404
+ if (end === -1) return '';
1405
+ return path.slice(start, end);
1406
+ }
1407
+
1408
+ // Uses a mixed approach for backwards-compatibility, as ext behavior changed
1409
+ // in new Node.js versions, so only basename() above is backported here
1410
+ exports.basename = function (path, ext) {
1411
+ var f = basename(path);
1412
+ if (ext && f.substr(-1 * ext.length) === ext) {
1413
+ f = f.substr(0, f.length - ext.length);
1414
+ }
1415
+ return f;
1416
+ };
1417
+
1418
+ exports.extname = function (path) {
1419
+ if (typeof path !== 'string') path = path + '';
1420
+ var startDot = -1;
1421
+ var startPart = 0;
1422
+ var end = -1;
1423
+ var matchedSlash = true;
1424
+ // Track the state of characters (if any) we see before our first dot and
1425
+ // after any path separator we find
1426
+ var preDotState = 0;
1427
+ for (var i = path.length - 1; i >= 0; --i) {
1428
+ var code = path.charCodeAt(i);
1429
+ if (code === 47 /*/*/) {
1430
+ // If we reached a path separator that was not part of a set of path
1431
+ // separators at the end of the string, stop now
1432
+ if (!matchedSlash) {
1433
+ startPart = i + 1;
1434
+ break;
1435
+ }
1436
+ continue;
1437
+ }
1438
+ if (end === -1) {
1439
+ // We saw the first non-path separator, mark this as the end of our
1440
+ // extension
1441
+ matchedSlash = false;
1442
+ end = i + 1;
1443
+ }
1444
+ if (code === 46 /*.*/) {
1445
+ // If this is our first dot, mark it as the start of our extension
1446
+ if (startDot === -1)
1447
+ startDot = i;
1448
+ else if (preDotState !== 1)
1449
+ preDotState = 1;
1450
+ } else if (startDot !== -1) {
1451
+ // We saw a non-dot and non-path separator before our dot, so we should
1452
+ // have a good chance at having a non-empty extension
1453
+ preDotState = -1;
1454
+ }
1455
+ }
1456
+
1457
+ if (startDot === -1 || end === -1 ||
1458
+ // We saw a non-dot character immediately before the dot
1459
+ preDotState === 0 ||
1460
+ // The (right-most) trimmed path component is exactly '..'
1461
+ preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
1462
+ return '';
1463
+ }
1464
+ return path.slice(startDot, end);
1465
+ };
1466
+
1467
+ function filter (xs, f) {
1468
+ if (xs.filter) return xs.filter(f);
1469
+ var res = [];
1470
+ for (var i = 0; i < xs.length; i++) {
1471
+ if (f(xs[i], i, xs)) res.push(xs[i]);
1472
+ }
1473
+ return res;
1474
+ }
1475
+
1476
+ // String.prototype.substr - negative index don't work in IE8
1477
+ var substr = 'ab'.substr(-1) === 'b'
1478
+ ? function (str, start, len) { return str.substr(start, len) }
1479
+ : function (str, start, len) {
1480
+ if (start < 0) start = str.length + start;
1481
+ return str.substr(start, len);
1482
+ }
1483
+ ;
1484
+
1485
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("eef6")))
1486
+
1487
+ /***/ }),
1488
+
1489
+ /***/ "6c70":
1490
+ /***/ (function(module, exports, __webpack_require__) {
1491
+
1492
+ "use strict";
1493
+
1494
+
1495
+ var enhanceError = __webpack_require__("61f6");
1496
+
1497
+ /**
1498
+ * Create an Error with the specified message, config, error code, request and response.
1499
+ *
1500
+ * @param {string} message The error message.
1501
+ * @param {Object} config The config.
1502
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
1503
+ * @param {Object} [request] The request.
1504
+ * @param {Object} [response] The response.
1505
+ * @returns {Error} The created error.
1506
+ */
1507
+ module.exports = function createError(message, config, code, request, response) {
1508
+ var error = new Error(message);
1509
+ return enhanceError(error, config, code, request, response);
1510
+ };
1511
+
1512
+
1513
+ /***/ }),
1514
+
1515
+ /***/ "85b5":
1516
+ /***/ (function(module, exports, __webpack_require__) {
1517
+
1518
+ "use strict";
1519
+
1520
+
1521
+ var utils = __webpack_require__("3d1e");
1522
+
1523
+ function encode(val) {
1524
+ return encodeURIComponent(val).
1525
+ replace(/%3A/gi, ':').
1526
+ replace(/%24/g, '$').
1527
+ replace(/%2C/gi, ',').
1528
+ replace(/%20/g, '+').
1529
+ replace(/%5B/gi, '[').
1530
+ replace(/%5D/gi, ']');
1531
+ }
1532
+
1533
+ /**
1534
+ * Build a URL by appending params to the end
1535
+ *
1536
+ * @param {string} url The base of the url (e.g., http://www.google.com)
1537
+ * @param {object} [params] The params to be appended
1538
+ * @returns {string} The formatted url
1539
+ */
1540
+ module.exports = function buildURL(url, params, paramsSerializer) {
1541
+ /*eslint no-param-reassign:0*/
1542
+ if (!params) {
1543
+ return url;
1544
+ }
1545
+
1546
+ var serializedParams;
1547
+ if (paramsSerializer) {
1548
+ serializedParams = paramsSerializer(params);
1549
+ } else if (utils.isURLSearchParams(params)) {
1550
+ serializedParams = params.toString();
1551
+ } else {
1552
+ var parts = [];
1553
+
1554
+ utils.forEach(params, function serialize(val, key) {
1555
+ if (val === null || typeof val === 'undefined') {
1556
+ return;
1557
+ }
1558
+
1559
+ if (utils.isArray(val)) {
1560
+ key = key + '[]';
1561
+ } else {
1562
+ val = [val];
1563
+ }
1564
+
1565
+ utils.forEach(val, function parseValue(v) {
1566
+ if (utils.isDate(v)) {
1567
+ v = v.toISOString();
1568
+ } else if (utils.isObject(v)) {
1569
+ v = JSON.stringify(v);
1570
+ }
1571
+ parts.push(encode(key) + '=' + encode(v));
1572
+ });
1573
+ });
1574
+
1575
+ serializedParams = parts.join('&');
1576
+ }
1577
+
1578
+ if (serializedParams) {
1579
+ var hashmarkIndex = url.indexOf('#');
1580
+ if (hashmarkIndex !== -1) {
1581
+ url = url.slice(0, hashmarkIndex);
1582
+ }
1583
+
1584
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1585
+ }
1586
+
1587
+ return url;
1588
+ };
1589
+
1590
+
1591
+ /***/ }),
1592
+
1593
+ /***/ "9147":
1594
+ /***/ (function(module, exports, __webpack_require__) {
1595
+
1596
+ "use strict";
1597
+
1598
+
1599
+ /**
1600
+ * A `Cancel` is an object that is thrown when an operation is canceled.
1601
+ *
1602
+ * @class
1603
+ * @param {string=} message The message.
1604
+ */
1605
+ function Cancel(message) {
1606
+ this.message = message;
1607
+ }
1608
+
1609
+ Cancel.prototype.toString = function toString() {
1610
+ return 'Cancel' + (this.message ? ': ' + this.message : '');
1611
+ };
1612
+
1613
+ Cancel.prototype.__CANCEL__ = true;
1614
+
1615
+ module.exports = Cancel;
1616
+
1617
+
1618
+ /***/ }),
1619
+
1620
+ /***/ "9e42":
1621
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1622
+
1623
+ "use strict";
1624
+ __webpack_require__.r(__webpack_exports__);
1625
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return SlideCode; });
1626
+ class SlideCode {
1627
+ constructor(options) {
1628
+ const defaults = {
1629
+ frontimg: '',
1630
+ backimg: '',
1631
+ callback: '',
1632
+ refreshcallback: '',
1633
+ yHeight: 1
1634
+ };
1635
+ this.opts = { ...defaults,
1636
+ ...options
1637
+ };
1638
+ this.offset = {
1639
+ x: 0,
1640
+ y: 0
1641
+ };
1642
+ this.disX = 0;
1643
+ this.moving = false;
1644
+ this.init();
1645
+ }
1646
+
1647
+ init() {
1648
+ const html = `
1649
+ <div class="code-k-div">
1650
+ <div class="code_bg"></div>
1651
+ <div class="code-con">
1652
+ <div class="code-img">
1653
+ <div class="code-img-con">
1654
+ <div class="code-mask" style="margin-top:${this.opts.yHeight}px"><img class="code-front-img" src="${this.opts.frontimg}"></div>
1655
+ <img class="code-back-img" src="${this.opts.backimg}">
1656
+ </div>
1657
+ <div class="code-push"><i class="icon-login-bg icon-w-25 icon-push">刷新</i><span class="code-tip"></span></div>
1658
+ </div>
1659
+ <div class="code-btn">
1660
+ <div class="code-btn-img code-btn-m"></div>
1661
+ <span class="code-span">按住滑块,拖动完成上方拼图</span>
1662
+ </div>
1663
+ </div>
1664
+ </div>`;
1665
+ this.destory();
1666
+ const div = document.createElement('div');
1667
+ div.className = 'slide-container';
1668
+ div.innerHTML = html;
1669
+ document.body.appendChild(div);
1670
+ this.maskDom = document.querySelector('.code-mask');
1671
+ this.moveBtnDom = document.querySelector('.code-btn-m');
1672
+ this.moveWrapDom = document.querySelector('.code-btn');
1673
+ this.refreshDom = document.querySelector('.code-push');
1674
+ this.tipDom = document.querySelector('.code-tip');
1675
+ this.bgDom = document.querySelector('.code_bg');
1676
+ this.body = document.body;
1677
+ this.initEvent();
1678
+ }
1679
+
1680
+ initEvent() {
1681
+ this.refreshDom.addEventListener('click', () => {
1682
+ this.opts.refreshcallback();
1683
+ });
1684
+ this.moveBtnDom.addEventListener('mousedown', event => {
1685
+ const e = event || window.event;
1686
+ this.offset = {
1687
+ x: e.pageX,
1688
+ y: e.pageY
1689
+ };
1690
+ this.moving = true;
1691
+ this.moveBtnDom.className += ' active';
1692
+ });
1693
+ this.body.addEventListener('mousemove', event => {
1694
+ if (!this.moving) {
1695
+ return;
1696
+ }
1697
+
1698
+ const e = event || window.event;
1699
+ let disX = e.pageX - this.offset.x;
1700
+
1701
+ if (disX < 0) {
1702
+ disX = 0;
1703
+ } else if (disX > 245) {
1704
+ disX = 245;
1705
+ }
1706
+
1707
+ this.disX = disX;
1708
+ this.moveBtnDom.style.left = `${disX + 10}px`;
1709
+ this.maskDom.style.left = `${disX}px`;
1710
+ });
1711
+ this.body.addEventListener('mouseup', event => {
1712
+ this.moveEnd(event);
1713
+ }); // this.moveWrapDom.addEventListener('mouseleave', (event) => {
1714
+ // this.moveEnd(event);
1715
+ // });
1716
+
1717
+ this.bgDom.addEventListener('click', () => {
1718
+ if (this.moving) {
1719
+ return;
1720
+ }
1721
+
1722
+ this.destory();
1723
+ });
1724
+ }
1725
+
1726
+ moveEnd() {
1727
+ if (!this.moving) {
1728
+ return;
1729
+ }
1730
+
1731
+ this.offset = {
1732
+ x: 0,
1733
+ y: 0
1734
+ };
1735
+ this.moving = false;
1736
+ this.moveBtnDom.className = this.moveBtnDom.className.replace(' active', '');
1737
+ this.moveBtnDom.removeEventListener('mousemove', () => {});
1738
+ this.opts.callback({
1739
+ xpos: parseInt(this.disX),
1740
+ capcode: this.opts.capcode,
1741
+ image_valid_type: 'slide_image'
1742
+ });
1743
+ }
1744
+
1745
+ showTips(bool) {
1746
+ const obj = {
1747
+ true: {
1748
+ name: '验证通过',
1749
+ color: 'green'
1750
+ },
1751
+ false: {
1752
+ name: '验证不通过',
1753
+ color: 'red'
1754
+ }
1755
+ };
1756
+ this.tipDom.innerHTML = obj[bool].name;
1757
+ this.tipDom.style.color = obj[bool].color;
1758
+ }
1759
+
1760
+ destory() {
1761
+ if (document.querySelector('.slide-container')) {
1762
+ document.body.removeChild(document.querySelector('.slide-container'));
1763
+ }
1764
+ }
1765
+
1766
+ }
1767
+
1768
+ /***/ }),
1769
+
1770
+ /***/ "9f97":
1771
+ /***/ (function(module, exports, __webpack_require__) {
1772
+
1773
+ "use strict";
1774
+
1775
+
1776
+ var utils = __webpack_require__("3d1e");
1777
+
1778
+ /**
1779
+ * Config-specific merge-function which creates a new config-object
1780
+ * by merging two configuration objects together.
1781
+ *
1782
+ * @param {Object} config1
1783
+ * @param {Object} config2
1784
+ * @returns {Object} New object resulting from merging config2 to config1
1785
+ */
1786
+ module.exports = function mergeConfig(config1, config2) {
1787
+ // eslint-disable-next-line no-param-reassign
1788
+ config2 = config2 || {};
1789
+ var config = {};
1790
+
1791
+ var valueFromConfig2Keys = ['url', 'method', 'data'];
1792
+ var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
1793
+ var defaultToConfig2Keys = [
1794
+ 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
1795
+ 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
1796
+ 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
1797
+ 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
1798
+ 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
1799
+ ];
1800
+ var directMergeKeys = ['validateStatus'];
1801
+
1802
+ function getMergedValue(target, source) {
1803
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
1804
+ return utils.merge(target, source);
1805
+ } else if (utils.isPlainObject(source)) {
1806
+ return utils.merge({}, source);
1807
+ } else if (utils.isArray(source)) {
1808
+ return source.slice();
1809
+ }
1810
+ return source;
1811
+ }
1812
+
1813
+ function mergeDeepProperties(prop) {
1814
+ if (!utils.isUndefined(config2[prop])) {
1815
+ config[prop] = getMergedValue(config1[prop], config2[prop]);
1816
+ } else if (!utils.isUndefined(config1[prop])) {
1817
+ config[prop] = getMergedValue(undefined, config1[prop]);
1818
+ }
1819
+ }
1820
+
1821
+ utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
1822
+ if (!utils.isUndefined(config2[prop])) {
1823
+ config[prop] = getMergedValue(undefined, config2[prop]);
1824
+ }
1825
+ });
1826
+
1827
+ utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
1828
+
1829
+ utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
1830
+ if (!utils.isUndefined(config2[prop])) {
1831
+ config[prop] = getMergedValue(undefined, config2[prop]);
1832
+ } else if (!utils.isUndefined(config1[prop])) {
1833
+ config[prop] = getMergedValue(undefined, config1[prop]);
1834
+ }
1835
+ });
1836
+
1837
+ utils.forEach(directMergeKeys, function merge(prop) {
1838
+ if (prop in config2) {
1839
+ config[prop] = getMergedValue(config1[prop], config2[prop]);
1840
+ } else if (prop in config1) {
1841
+ config[prop] = getMergedValue(undefined, config1[prop]);
1842
+ }
1843
+ });
1844
+
1845
+ var axiosKeys = valueFromConfig2Keys
1846
+ .concat(mergeDeepPropertiesKeys)
1847
+ .concat(defaultToConfig2Keys)
1848
+ .concat(directMergeKeys);
1849
+
1850
+ var otherKeys = Object
1851
+ .keys(config1)
1852
+ .concat(Object.keys(config2))
1853
+ .filter(function filterAxiosKeys(key) {
1854
+ return axiosKeys.indexOf(key) === -1;
1855
+ });
1856
+
1857
+ utils.forEach(otherKeys, mergeDeepProperties);
1858
+
1859
+ return config;
1860
+ };
1861
+
1862
+
1863
+ /***/ }),
1864
+
1865
+ /***/ "a620":
1866
+ /***/ (function(module, exports, __webpack_require__) {
1867
+
1868
+ "use strict";
1869
+
1870
+
1871
+ var Cancel = __webpack_require__("9147");
1872
+
1873
+ /**
1874
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
1875
+ *
1876
+ * @class
1877
+ * @param {Function} executor The executor function.
1878
+ */
1879
+ function CancelToken(executor) {
1880
+ if (typeof executor !== 'function') {
1881
+ throw new TypeError('executor must be a function.');
1882
+ }
1883
+
1884
+ var resolvePromise;
1885
+ this.promise = new Promise(function promiseExecutor(resolve) {
1886
+ resolvePromise = resolve;
1887
+ });
1888
+
1889
+ var token = this;
1890
+ executor(function cancel(message) {
1891
+ if (token.reason) {
1892
+ // Cancellation has already been requested
1893
+ return;
1894
+ }
1895
+
1896
+ token.reason = new Cancel(message);
1897
+ resolvePromise(token.reason);
1898
+ });
1899
+ }
1900
+
1901
+ /**
1902
+ * Throws a `Cancel` if cancellation has been requested.
1903
+ */
1904
+ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
1905
+ if (this.reason) {
1906
+ throw this.reason;
1907
+ }
1908
+ };
1909
+
1910
+ /**
1911
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1912
+ * cancels the `CancelToken`.
1913
+ */
1914
+ CancelToken.source = function source() {
1915
+ var cancel;
1916
+ var token = new CancelToken(function executor(c) {
1917
+ cancel = c;
1918
+ });
1919
+ return {
1920
+ token: token,
1921
+ cancel: cancel
1922
+ };
1923
+ };
1924
+
1925
+ module.exports = CancelToken;
1926
+
1927
+
1928
+ /***/ }),
1929
+
1930
+ /***/ "a74f":
1931
+ /***/ (function(module, exports, __webpack_require__) {
1932
+
1933
+ "use strict";
1934
+
1935
+
1936
+ var utils = __webpack_require__("3d1e");
1937
+
1938
+ module.exports = (
1939
+ utils.isStandardBrowserEnv() ?
1940
+
1941
+ // Standard browser envs support document.cookie
1942
+ (function standardBrowserEnv() {
1943
+ return {
1944
+ write: function write(name, value, expires, path, domain, secure) {
1945
+ var cookie = [];
1946
+ cookie.push(name + '=' + encodeURIComponent(value));
1947
+
1948
+ if (utils.isNumber(expires)) {
1949
+ cookie.push('expires=' + new Date(expires).toGMTString());
1950
+ }
1951
+
1952
+ if (utils.isString(path)) {
1953
+ cookie.push('path=' + path);
1954
+ }
1955
+
1956
+ if (utils.isString(domain)) {
1957
+ cookie.push('domain=' + domain);
1958
+ }
1959
+
1960
+ if (secure === true) {
1961
+ cookie.push('secure');
1962
+ }
1963
+
1964
+ document.cookie = cookie.join('; ');
1965
+ },
1966
+
1967
+ read: function read(name) {
1968
+ var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
1969
+ return (match ? decodeURIComponent(match[3]) : null);
1970
+ },
1971
+
1972
+ remove: function remove(name) {
1973
+ this.write(name, '', Date.now() - 86400000);
1974
+ }
1975
+ };
1976
+ })() :
1977
+
1978
+ // Non standard browser env (web workers, react-native) lack needed support.
1979
+ (function nonStandardBrowserEnv() {
1980
+ return {
1981
+ write: function write() {},
1982
+ read: function read() { return null; },
1983
+ remove: function remove() {}
1984
+ };
1985
+ })()
1986
+ );
1987
+
1988
+
1989
+ /***/ }),
1990
+
1991
+ /***/ "ab31":
1992
+ /***/ (function(module, exports, __webpack_require__) {
1993
+
1994
+ "use strict";
1995
+
1996
+
1997
+ var utils = __webpack_require__("3d1e");
1998
+ var transformData = __webpack_require__("50ca");
1999
+ var isCancel = __webpack_require__("af9d");
2000
+ var defaults = __webpack_require__("fb04");
2001
+
2002
+ /**
2003
+ * Throws a `Cancel` if cancellation has been requested.
2004
+ */
2005
+ function throwIfCancellationRequested(config) {
2006
+ if (config.cancelToken) {
2007
+ config.cancelToken.throwIfRequested();
2008
+ }
2009
+ }
2010
+
2011
+ /**
2012
+ * Dispatch a request to the server using the configured adapter.
2013
+ *
2014
+ * @param {object} config The config that is to be used for the request
2015
+ * @returns {Promise} The Promise to be fulfilled
2016
+ */
2017
+ module.exports = function dispatchRequest(config) {
2018
+ throwIfCancellationRequested(config);
2019
+
2020
+ // Ensure headers exist
2021
+ config.headers = config.headers || {};
2022
+
2023
+ // Transform request data
2024
+ config.data = transformData(
2025
+ config.data,
2026
+ config.headers,
2027
+ config.transformRequest
2028
+ );
2029
+
2030
+ // Flatten headers
2031
+ config.headers = utils.merge(
2032
+ config.headers.common || {},
2033
+ config.headers[config.method] || {},
2034
+ config.headers
2035
+ );
2036
+
2037
+ utils.forEach(
2038
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
2039
+ function cleanHeaderConfig(method) {
2040
+ delete config.headers[method];
2041
+ }
2042
+ );
2043
+
2044
+ var adapter = config.adapter || defaults.adapter;
2045
+
2046
+ return adapter(config).then(function onAdapterResolution(response) {
2047
+ throwIfCancellationRequested(config);
2048
+
2049
+ // Transform response data
2050
+ response.data = transformData(
2051
+ response.data,
2052
+ response.headers,
2053
+ config.transformResponse
2054
+ );
2055
+
2056
+ return response;
2057
+ }, function onAdapterRejection(reason) {
2058
+ if (!isCancel(reason)) {
2059
+ throwIfCancellationRequested(config);
2060
+
2061
+ // Transform response data
2062
+ if (reason && reason.response) {
2063
+ reason.response.data = transformData(
2064
+ reason.response.data,
2065
+ reason.response.headers,
2066
+ config.transformResponse
2067
+ );
2068
+ }
2069
+ }
2070
+
2071
+ return Promise.reject(reason);
2072
+ });
2073
+ };
2074
+
2075
+
2076
+ /***/ }),
2077
+
2078
+ /***/ "af9d":
2079
+ /***/ (function(module, exports, __webpack_require__) {
2080
+
2081
+ "use strict";
2082
+
2083
+
2084
+ module.exports = function isCancel(value) {
2085
+ return !!(value && value.__CANCEL__);
2086
+ };
2087
+
2088
+
2089
+ /***/ }),
2090
+
2091
+ /***/ "cdfd":
2092
+ /***/ (function(module, exports, __webpack_require__) {
2093
+
2094
+ // extracted by mini-css-extract-plugin
2095
+
2096
+ /***/ }),
2097
+
2098
+ /***/ "ce40":
2099
+ /***/ (function(module, exports, __webpack_require__) {
2100
+
2101
+ "use strict";
2102
+
2103
+
2104
+ var utils = __webpack_require__("3d1e");
2105
+
2106
+ // Headers whose duplicates are ignored by node
2107
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
2108
+ var ignoreDuplicateOf = [
2109
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
2110
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
2111
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
2112
+ 'referer', 'retry-after', 'user-agent'
2113
+ ];
2114
+
2115
+ /**
2116
+ * Parse headers into an object
2117
+ *
2118
+ * ```
2119
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
2120
+ * Content-Type: application/json
2121
+ * Connection: keep-alive
2122
+ * Transfer-Encoding: chunked
2123
+ * ```
2124
+ *
2125
+ * @param {String} headers Headers needing to be parsed
2126
+ * @returns {Object} Headers parsed into an object
2127
+ */
2128
+ module.exports = function parseHeaders(headers) {
2129
+ var parsed = {};
2130
+ var key;
2131
+ var val;
2132
+ var i;
2133
+
2134
+ if (!headers) { return parsed; }
2135
+
2136
+ utils.forEach(headers.split('\n'), function parser(line) {
2137
+ i = line.indexOf(':');
2138
+ key = utils.trim(line.substr(0, i)).toLowerCase();
2139
+ val = utils.trim(line.substr(i + 1));
2140
+
2141
+ if (key) {
2142
+ if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
2143
+ return;
2144
+ }
2145
+ if (key === 'set-cookie') {
2146
+ parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
2147
+ } else {
2148
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
2149
+ }
2150
+ }
2151
+ });
2152
+
2153
+ return parsed;
2154
+ };
2155
+
2156
+
2157
+ /***/ }),
2158
+
2159
+ /***/ "cf08":
2160
+ /***/ (function(module, exports, __webpack_require__) {
2161
+
2162
+ "use strict";
2163
+
2164
+
2165
+ var utils = __webpack_require__("3d1e");
2166
+ var bind = __webpack_require__("efe0");
2167
+ var Axios = __webpack_require__("0997");
2168
+ var mergeConfig = __webpack_require__("9f97");
2169
+ var defaults = __webpack_require__("fb04");
2170
+
2171
+ /**
2172
+ * Create an instance of Axios
2173
+ *
2174
+ * @param {Object} defaultConfig The default config for the instance
2175
+ * @return {Axios} A new instance of Axios
2176
+ */
2177
+ function createInstance(defaultConfig) {
2178
+ var context = new Axios(defaultConfig);
2179
+ var instance = bind(Axios.prototype.request, context);
2180
+
2181
+ // Copy axios.prototype to instance
2182
+ utils.extend(instance, Axios.prototype, context);
2183
+
2184
+ // Copy context to instance
2185
+ utils.extend(instance, context);
2186
+
2187
+ return instance;
2188
+ }
2189
+
2190
+ // Create the default instance to be exported
2191
+ var axios = createInstance(defaults);
2192
+
2193
+ // Expose Axios class to allow class inheritance
2194
+ axios.Axios = Axios;
2195
+
2196
+ // Factory for creating new instances
2197
+ axios.create = function create(instanceConfig) {
2198
+ return createInstance(mergeConfig(axios.defaults, instanceConfig));
2199
+ };
2200
+
2201
+ // Expose Cancel & CancelToken
2202
+ axios.Cancel = __webpack_require__("9147");
2203
+ axios.CancelToken = __webpack_require__("a620");
2204
+ axios.isCancel = __webpack_require__("af9d");
2205
+
2206
+ // Expose all/spread
2207
+ axios.all = function all(promises) {
2208
+ return Promise.all(promises);
2209
+ };
2210
+ axios.spread = __webpack_require__("ee08");
2211
+
2212
+ module.exports = axios;
2213
+
2214
+ // Allow use of default import syntax in TypeScript
2215
+ module.exports.default = axios;
2216
+
2217
+
2218
+ /***/ }),
2219
+
2220
+ /***/ "d547":
2221
+ /***/ (function(module, exports, __webpack_require__) {
2222
+
2223
+ "use strict";
2224
+
2225
+
2226
+ var isAbsoluteURL = __webpack_require__("da4a");
2227
+ var combineURLs = __webpack_require__("26af");
2228
+
2229
+ /**
2230
+ * Creates a new URL by combining the baseURL with the requestedURL,
2231
+ * only when the requestedURL is not already an absolute URL.
2232
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
2233
+ *
2234
+ * @param {string} baseURL The base URL
2235
+ * @param {string} requestedURL Absolute or relative URL to combine
2236
+ * @returns {string} The combined full path
2237
+ */
2238
+ module.exports = function buildFullPath(baseURL, requestedURL) {
2239
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
2240
+ return combineURLs(baseURL, requestedURL);
2241
+ }
2242
+ return requestedURL;
2243
+ };
2244
+
2245
+
2246
+ /***/ }),
2247
+
2248
+ /***/ "d5f5":
2249
+ /***/ (function(module, exports, __webpack_require__) {
2250
+
2251
+ "use strict";
2252
+
2253
+
2254
+ var utils = __webpack_require__("3d1e");
2255
+
2256
+ module.exports = (
2257
+ utils.isStandardBrowserEnv() ?
2258
+
2259
+ // Standard browser envs have full support of the APIs needed to test
2260
+ // whether the request URL is of the same origin as current location.
2261
+ (function standardBrowserEnv() {
2262
+ var msie = /(msie|trident)/i.test(navigator.userAgent);
2263
+ var urlParsingNode = document.createElement('a');
2264
+ var originURL;
2265
+
2266
+ /**
2267
+ * Parse a URL to discover it's components
2268
+ *
2269
+ * @param {String} url The URL to be parsed
2270
+ * @returns {Object}
2271
+ */
2272
+ function resolveURL(url) {
2273
+ var href = url;
2274
+
2275
+ if (msie) {
2276
+ // IE needs attribute set twice to normalize properties
2277
+ urlParsingNode.setAttribute('href', href);
2278
+ href = urlParsingNode.href;
2279
+ }
2280
+
2281
+ urlParsingNode.setAttribute('href', href);
2282
+
2283
+ // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
2284
+ return {
2285
+ href: urlParsingNode.href,
2286
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
2287
+ host: urlParsingNode.host,
2288
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
2289
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
2290
+ hostname: urlParsingNode.hostname,
2291
+ port: urlParsingNode.port,
2292
+ pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
2293
+ urlParsingNode.pathname :
2294
+ '/' + urlParsingNode.pathname
2295
+ };
2296
+ }
2297
+
2298
+ originURL = resolveURL(window.location.href);
2299
+
2300
+ /**
2301
+ * Determine if a URL shares the same origin as the current location
2302
+ *
2303
+ * @param {String} requestURL The URL to test
2304
+ * @returns {boolean} True if URL shares the same origin, otherwise false
2305
+ */
2306
+ return function isURLSameOrigin(requestURL) {
2307
+ var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
2308
+ return (parsed.protocol === originURL.protocol &&
2309
+ parsed.host === originURL.host);
2310
+ };
2311
+ })() :
2312
+
2313
+ // Non standard browser envs (web workers, react-native) lack needed support.
2314
+ (function nonStandardBrowserEnv() {
2315
+ return function isURLSameOrigin() {
2316
+ return true;
2317
+ };
2318
+ })()
2319
+ );
2320
+
2321
+
2322
+ /***/ }),
2323
+
2324
+ /***/ "da4a":
2325
+ /***/ (function(module, exports, __webpack_require__) {
2326
+
2327
+ "use strict";
2328
+
2329
+
2330
+ /**
2331
+ * Determines whether the specified URL is absolute
2332
+ *
2333
+ * @param {string} url The URL to test
2334
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
2335
+ */
2336
+ module.exports = function isAbsoluteURL(url) {
2337
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
2338
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
2339
+ // by any combination of letters, digits, plus, period, or hyphen.
2340
+ return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
2341
+ };
2342
+
2343
+
2344
+ /***/ }),
2345
+
2346
+ /***/ "ee08":
2347
+ /***/ (function(module, exports, __webpack_require__) {
2348
+
2349
+ "use strict";
2350
+
2351
+
2352
+ /**
2353
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
2354
+ *
2355
+ * Common use case would be to use `Function.prototype.apply`.
2356
+ *
2357
+ * ```js
2358
+ * function f(x, y, z) {}
2359
+ * var args = [1, 2, 3];
2360
+ * f.apply(null, args);
2361
+ * ```
2362
+ *
2363
+ * With `spread` this example can be re-written.
2364
+ *
2365
+ * ```js
2366
+ * spread(function(x, y, z) {})([1, 2, 3]);
2367
+ * ```
2368
+ *
2369
+ * @param {Function} callback
2370
+ * @returns {Function}
2371
+ */
2372
+ module.exports = function spread(callback) {
2373
+ return function wrap(arr) {
2374
+ return callback.apply(null, arr);
2375
+ };
2376
+ };
2377
+
2378
+
2379
+ /***/ }),
2380
+
2381
+ /***/ "eef6":
2382
+ /***/ (function(module, exports, __webpack_require__) {
2383
+
2384
+ exports.nextTick = function nextTick(fn) {
2385
+ var args = Array.prototype.slice.call(arguments);
2386
+ args.shift();
2387
+ setTimeout(function () {
2388
+ fn.apply(null, args);
2389
+ }, 0);
2390
+ };
2391
+
2392
+ exports.platform = exports.arch =
2393
+ exports.execPath = exports.title = 'browser';
2394
+ exports.pid = 1;
2395
+ exports.browser = true;
2396
+ exports.env = {};
2397
+ exports.argv = [];
2398
+
2399
+ exports.binding = function (name) {
2400
+ throw new Error('No such module. (Possibly not yet loaded)')
2401
+ };
2402
+
2403
+ (function () {
2404
+ var cwd = '/';
2405
+ var path;
2406
+ exports.cwd = function () { return cwd };
2407
+ exports.chdir = function (dir) {
2408
+ if (!path) path = __webpack_require__("6266");
2409
+ cwd = path.resolve(dir, cwd);
2410
+ };
2411
+ })();
2412
+
2413
+ exports.exit = exports.kill =
2414
+ exports.umask = exports.dlopen =
2415
+ exports.uptime = exports.memoryUsage =
2416
+ exports.uvCounters = function() {};
2417
+ exports.features = {};
2418
+
2419
+
2420
+ /***/ }),
2421
+
2422
+ /***/ "efe0":
2423
+ /***/ (function(module, exports, __webpack_require__) {
2424
+
2425
+ "use strict";
2426
+
2427
+
2428
+ module.exports = function bind(fn, thisArg) {
2429
+ return function wrap() {
2430
+ var args = new Array(arguments.length);
2431
+ for (var i = 0; i < args.length; i++) {
2432
+ args[i] = arguments[i];
2433
+ }
2434
+ return fn.apply(thisArg, args);
2435
+ };
2436
+ };
2437
+
2438
+
2439
+ /***/ }),
2440
+
2441
+ /***/ "f80f":
2442
+ /***/ (function(module, exports, __webpack_require__) {
2443
+
2444
+ "use strict";
2445
+
2446
+
2447
+ var utils = __webpack_require__("3d1e");
2448
+
2449
+ function InterceptorManager() {
2450
+ this.handlers = [];
2451
+ }
2452
+
2453
+ /**
2454
+ * Add a new interceptor to the stack
2455
+ *
2456
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
2457
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
2458
+ *
2459
+ * @return {Number} An ID used to remove interceptor later
2460
+ */
2461
+ InterceptorManager.prototype.use = function use(fulfilled, rejected) {
2462
+ this.handlers.push({
2463
+ fulfilled: fulfilled,
2464
+ rejected: rejected
2465
+ });
2466
+ return this.handlers.length - 1;
2467
+ };
2468
+
2469
+ /**
2470
+ * Remove an interceptor from the stack
2471
+ *
2472
+ * @param {Number} id The ID that was returned by `use`
2473
+ */
2474
+ InterceptorManager.prototype.eject = function eject(id) {
2475
+ if (this.handlers[id]) {
2476
+ this.handlers[id] = null;
2477
+ }
2478
+ };
2479
+
2480
+ /**
2481
+ * Iterate over all the registered interceptors
2482
+ *
2483
+ * This method is particularly useful for skipping over any
2484
+ * interceptors that may have become `null` calling `eject`.
2485
+ *
2486
+ * @param {Function} fn The function to call for each interceptor
2487
+ */
2488
+ InterceptorManager.prototype.forEach = function forEach(fn) {
2489
+ utils.forEach(this.handlers, function forEachHandler(h) {
2490
+ if (h !== null) {
2491
+ fn(h);
2492
+ }
2493
+ });
2494
+ };
2495
+
2496
+ module.exports = InterceptorManager;
2497
+
2498
+
2499
+ /***/ }),
2500
+
2501
+ /***/ "fb04":
2502
+ /***/ (function(module, exports, __webpack_require__) {
2503
+
2504
+ "use strict";
2505
+ /* WEBPACK VAR INJECTION */(function(process) {
2506
+
2507
+ var utils = __webpack_require__("3d1e");
2508
+ var normalizeHeaderName = __webpack_require__("0cc7");
2509
+
2510
+ var DEFAULT_CONTENT_TYPE = {
2511
+ 'Content-Type': 'application/x-www-form-urlencoded'
2512
+ };
2513
+
2514
+ function setContentTypeIfUnset(headers, value) {
2515
+ if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
2516
+ headers['Content-Type'] = value;
2517
+ }
2518
+ }
2519
+
2520
+ function getDefaultAdapter() {
2521
+ var adapter;
2522
+ if (typeof XMLHttpRequest !== 'undefined') {
2523
+ // For browsers use XHR adapter
2524
+ adapter = __webpack_require__("4a94");
2525
+ } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
2526
+ // For node use HTTP adapter
2527
+ adapter = __webpack_require__("4a94");
2528
+ }
2529
+ return adapter;
2530
+ }
2531
+
2532
+ var defaults = {
2533
+ adapter: getDefaultAdapter(),
2534
+
2535
+ transformRequest: [function transformRequest(data, headers) {
2536
+ normalizeHeaderName(headers, 'Accept');
2537
+ normalizeHeaderName(headers, 'Content-Type');
2538
+ if (utils.isFormData(data) ||
2539
+ utils.isArrayBuffer(data) ||
2540
+ utils.isBuffer(data) ||
2541
+ utils.isStream(data) ||
2542
+ utils.isFile(data) ||
2543
+ utils.isBlob(data)
2544
+ ) {
2545
+ return data;
2546
+ }
2547
+ if (utils.isArrayBufferView(data)) {
2548
+ return data.buffer;
2549
+ }
2550
+ if (utils.isURLSearchParams(data)) {
2551
+ setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
2552
+ return data.toString();
2553
+ }
2554
+ if (utils.isObject(data)) {
2555
+ setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
2556
+ return JSON.stringify(data);
2557
+ }
2558
+ return data;
2559
+ }],
2560
+
2561
+ transformResponse: [function transformResponse(data) {
2562
+ /*eslint no-param-reassign:0*/
2563
+ if (typeof data === 'string') {
2564
+ try {
2565
+ data = JSON.parse(data);
2566
+ } catch (e) { /* Ignore */ }
2567
+ }
2568
+ return data;
2569
+ }],
2570
+
2571
+ /**
2572
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
2573
+ * timeout is not created.
2574
+ */
2575
+ timeout: 0,
2576
+
2577
+ xsrfCookieName: 'XSRF-TOKEN',
2578
+ xsrfHeaderName: 'X-XSRF-TOKEN',
2579
+
2580
+ maxContentLength: -1,
2581
+ maxBodyLength: -1,
2582
+
2583
+ validateStatus: function validateStatus(status) {
2584
+ return status >= 200 && status < 300;
2585
+ }
2586
+ };
2587
+
2588
+ defaults.headers = {
2589
+ common: {
2590
+ 'Accept': 'application/json, text/plain, */*'
2591
+ }
2592
+ };
2593
+
2594
+ utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
2595
+ defaults.headers[method] = {};
2596
+ });
2597
+
2598
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
2599
+ defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
2600
+ });
2601
+
2602
+ module.exports = defaults;
2603
+
2604
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("eef6")))
2605
+
2606
+ /***/ })
2607
+
2608
+ /******/ });