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,2911 +0,0 @@
1
- ((typeof self !== 'undefined' ? self : this)["webpackJsonphc_basic"] = (typeof self !== 'undefined' ? self : this)["webpackJsonphc_basic"] || []).push([[11],{
2
-
3
- /***/ "0e15":
4
- /***/ (function(module, exports, __webpack_require__) {
5
-
6
- /* eslint-disable no-undefined */
7
-
8
- var throttle = __webpack_require__("597f");
9
-
10
- /**
11
- * Debounce execution of a function. Debouncing, unlike throttling,
12
- * guarantees that a function is only executed a single time, either at the
13
- * very beginning of a series of calls, or at the very end.
14
- *
15
- * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
16
- * @param {Boolean} [atBegin] Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
17
- * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
18
- * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
19
- * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
20
- * to `callback` when the debounced-function is executed.
21
- *
22
- * @return {Function} A new, debounced function.
23
- */
24
- module.exports = function ( delay, atBegin, callback ) {
25
- return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
26
- };
27
-
28
-
29
- /***/ }),
30
-
31
- /***/ "2877":
32
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
33
-
34
- "use strict";
35
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
36
- /* globals __VUE_SSR_CONTEXT__ */
37
-
38
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
39
- // This module is a runtime utility for cleaner component module output and will
40
- // be included in the final webpack user bundle.
41
-
42
- function normalizeComponent(
43
- scriptExports,
44
- render,
45
- staticRenderFns,
46
- functionalTemplate,
47
- injectStyles,
48
- scopeId,
49
- moduleIdentifier /* server only */,
50
- shadowMode /* vue-cli only */
51
- ) {
52
- // Vue.extend constructor export interop
53
- var options =
54
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
55
-
56
- // render functions
57
- if (render) {
58
- options.render = render
59
- options.staticRenderFns = staticRenderFns
60
- options._compiled = true
61
- }
62
-
63
- // functional template
64
- if (functionalTemplate) {
65
- options.functional = true
66
- }
67
-
68
- // scopedId
69
- if (scopeId) {
70
- options._scopeId = 'data-v-' + scopeId
71
- }
72
-
73
- var hook
74
- if (moduleIdentifier) {
75
- // server build
76
- hook = function (context) {
77
- // 2.3 injection
78
- context =
79
- context || // cached call
80
- (this.$vnode && this.$vnode.ssrContext) || // stateful
81
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
82
- // 2.2 with runInNewContext: true
83
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
84
- context = __VUE_SSR_CONTEXT__
85
- }
86
- // inject component styles
87
- if (injectStyles) {
88
- injectStyles.call(this, context)
89
- }
90
- // register component module identifier for async chunk inferrence
91
- if (context && context._registeredComponents) {
92
- context._registeredComponents.add(moduleIdentifier)
93
- }
94
- }
95
- // used by ssr in case component is cached and beforeCreate
96
- // never gets called
97
- options._ssrRegister = hook
98
- } else if (injectStyles) {
99
- hook = shadowMode
100
- ? function () {
101
- injectStyles.call(
102
- this,
103
- (options.functional ? this.parent : this).$root.$options.shadowRoot
104
- )
105
- }
106
- : injectStyles
107
- }
108
-
109
- if (hook) {
110
- if (options.functional) {
111
- // for template-only hot-reload because in that case the render fn doesn't
112
- // go through the normalizer
113
- options._injectStyles = hook
114
- // register for functional component in vue file
115
- var originalRender = options.render
116
- options.render = function renderWithStyleInjection(h, context) {
117
- hook.call(context)
118
- return originalRender(h, context)
119
- }
120
- } else {
121
- // inject component registration as beforeCreate hook
122
- var existing = options.beforeCreate
123
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
124
- }
125
- }
126
-
127
- return {
128
- exports: scriptExports,
129
- options: options
130
- }
131
- }
132
-
133
-
134
- /***/ }),
135
-
136
- /***/ "3c35":
137
- /***/ (function(module, exports) {
138
-
139
- /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
140
- module.exports = __webpack_amd_options__;
141
-
142
- /* WEBPACK VAR INJECTION */}.call(this, {}))
143
-
144
- /***/ }),
145
-
146
- /***/ "3c4e":
147
- /***/ (function(module, exports, __webpack_require__) {
148
-
149
- "use strict";
150
-
151
-
152
- var isMergeableObject = function isMergeableObject(value) {
153
- return isNonNullObject(value)
154
- && !isSpecial(value)
155
- };
156
-
157
- function isNonNullObject(value) {
158
- return !!value && typeof value === 'object'
159
- }
160
-
161
- function isSpecial(value) {
162
- var stringValue = Object.prototype.toString.call(value);
163
-
164
- return stringValue === '[object RegExp]'
165
- || stringValue === '[object Date]'
166
- || isReactElement(value)
167
- }
168
-
169
- // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
170
- var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
171
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
172
-
173
- function isReactElement(value) {
174
- return value.$$typeof === REACT_ELEMENT_TYPE
175
- }
176
-
177
- function emptyTarget(val) {
178
- return Array.isArray(val) ? [] : {}
179
- }
180
-
181
- function cloneIfNecessary(value, optionsArgument) {
182
- var clone = optionsArgument && optionsArgument.clone === true;
183
- return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
184
- }
185
-
186
- function defaultArrayMerge(target, source, optionsArgument) {
187
- var destination = target.slice();
188
- source.forEach(function(e, i) {
189
- if (typeof destination[i] === 'undefined') {
190
- destination[i] = cloneIfNecessary(e, optionsArgument);
191
- } else if (isMergeableObject(e)) {
192
- destination[i] = deepmerge(target[i], e, optionsArgument);
193
- } else if (target.indexOf(e) === -1) {
194
- destination.push(cloneIfNecessary(e, optionsArgument));
195
- }
196
- });
197
- return destination
198
- }
199
-
200
- function mergeObject(target, source, optionsArgument) {
201
- var destination = {};
202
- if (isMergeableObject(target)) {
203
- Object.keys(target).forEach(function(key) {
204
- destination[key] = cloneIfNecessary(target[key], optionsArgument);
205
- });
206
- }
207
- Object.keys(source).forEach(function(key) {
208
- if (!isMergeableObject(source[key]) || !target[key]) {
209
- destination[key] = cloneIfNecessary(source[key], optionsArgument);
210
- } else {
211
- destination[key] = deepmerge(target[key], source[key], optionsArgument);
212
- }
213
- });
214
- return destination
215
- }
216
-
217
- function deepmerge(target, source, optionsArgument) {
218
- var sourceIsArray = Array.isArray(source);
219
- var targetIsArray = Array.isArray(target);
220
- var options = optionsArgument || { arrayMerge: defaultArrayMerge };
221
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
222
-
223
- if (!sourceAndTargetTypesMatch) {
224
- return cloneIfNecessary(source, optionsArgument)
225
- } else if (sourceIsArray) {
226
- var arrayMerge = options.arrayMerge || defaultArrayMerge;
227
- return arrayMerge(target, source, optionsArgument)
228
- } else {
229
- return mergeObject(target, source, optionsArgument)
230
- }
231
- }
232
-
233
- deepmerge.all = function deepmergeAll(array, optionsArgument) {
234
- if (!Array.isArray(array) || array.length < 2) {
235
- throw new Error('first argument should be an array with at least two elements')
236
- }
237
-
238
- // we are sure there are at least 2 values, so it is safe to have no initial value
239
- return array.reduce(function(prev, next) {
240
- return deepmerge(prev, next, optionsArgument)
241
- })
242
- };
243
-
244
- var deepmerge_1 = deepmerge;
245
-
246
- module.exports = deepmerge_1;
247
-
248
-
249
- /***/ }),
250
-
251
- /***/ "3f6b":
252
- /***/ (function(module, exports, __webpack_require__) {
253
-
254
- module.exports = { "default": __webpack_require__("b9c7"), __esModule: true };
255
-
256
- /***/ }),
257
-
258
- /***/ "41b2":
259
- /***/ (function(module, exports, __webpack_require__) {
260
-
261
- "use strict";
262
-
263
-
264
- exports.__esModule = true;
265
-
266
- var _assign = __webpack_require__("3f6b");
267
-
268
- var _assign2 = _interopRequireDefault(_assign);
269
-
270
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
271
-
272
- exports.default = _assign2.default || function (target) {
273
- for (var i = 1; i < arguments.length; i++) {
274
- var source = arguments[i];
275
-
276
- for (var key in source) {
277
- if (Object.prototype.hasOwnProperty.call(source, key)) {
278
- target[key] = source[key];
279
- }
280
- }
281
- }
282
-
283
- return target;
284
- };
285
-
286
- /***/ }),
287
-
288
- /***/ "4362":
289
- /***/ (function(module, exports, __webpack_require__) {
290
-
291
- exports.nextTick = function nextTick(fn) {
292
- var args = Array.prototype.slice.call(arguments);
293
- args.shift();
294
- setTimeout(function () {
295
- fn.apply(null, args);
296
- }, 0);
297
- };
298
-
299
- exports.platform = exports.arch =
300
- exports.execPath = exports.title = 'browser';
301
- exports.pid = 1;
302
- exports.browser = true;
303
- exports.env = {};
304
- exports.argv = [];
305
-
306
- exports.binding = function (name) {
307
- throw new Error('No such module. (Possibly not yet loaded)')
308
- };
309
-
310
- (function () {
311
- var cwd = '/';
312
- var path;
313
- exports.cwd = function () { return cwd };
314
- exports.chdir = function (dir) {
315
- if (!path) path = __webpack_require__("df7c");
316
- cwd = path.resolve(dir, cwd);
317
- };
318
- })();
319
-
320
- exports.exit = exports.kill =
321
- exports.umask = exports.dlopen =
322
- exports.uptime = exports.memoryUsage =
323
- exports.uvCounters = function() {};
324
- exports.features = {};
325
-
326
-
327
- /***/ }),
328
-
329
- /***/ "512c":
330
- /***/ (function(module, exports, __webpack_require__) {
331
-
332
- var global = __webpack_require__("ef08");
333
- var core = __webpack_require__("5524");
334
- var ctx = __webpack_require__("9c0c");
335
- var hide = __webpack_require__("051b");
336
- var has = __webpack_require__("9c0e");
337
- var PROTOTYPE = 'prototype';
338
-
339
- var $export = function (type, name, source) {
340
- var IS_FORCED = type & $export.F;
341
- var IS_GLOBAL = type & $export.G;
342
- var IS_STATIC = type & $export.S;
343
- var IS_PROTO = type & $export.P;
344
- var IS_BIND = type & $export.B;
345
- var IS_WRAP = type & $export.W;
346
- var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
347
- var expProto = exports[PROTOTYPE];
348
- var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
349
- var key, own, out;
350
- if (IS_GLOBAL) source = name;
351
- for (key in source) {
352
- // contains in native
353
- own = !IS_FORCED && target && target[key] !== undefined;
354
- if (own && has(exports, key)) continue;
355
- // export native or passed
356
- out = own ? target[key] : source[key];
357
- // prevent global pollution for namespaces
358
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
359
- // bind timers to global for call from export context
360
- : IS_BIND && own ? ctx(out, global)
361
- // wrap global constructors for prevent change them in library
362
- : IS_WRAP && target[key] == out ? (function (C) {
363
- var F = function (a, b, c) {
364
- if (this instanceof C) {
365
- switch (arguments.length) {
366
- case 0: return new C();
367
- case 1: return new C(a);
368
- case 2: return new C(a, b);
369
- } return new C(a, b, c);
370
- } return C.apply(this, arguments);
371
- };
372
- F[PROTOTYPE] = C[PROTOTYPE];
373
- return F;
374
- // make static versions for prototype methods
375
- })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
376
- // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
377
- if (IS_PROTO) {
378
- (exports.virtual || (exports.virtual = {}))[key] = out;
379
- // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
380
- if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
381
- }
382
- }
383
- };
384
- // type bitmap
385
- $export.F = 1; // forced
386
- $export.G = 2; // global
387
- $export.S = 4; // static
388
- $export.P = 8; // proto
389
- $export.B = 16; // bind
390
- $export.W = 32; // wrap
391
- $export.U = 64; // safe
392
- $export.R = 128; // real proto method for `library`
393
- module.exports = $export;
394
-
395
-
396
- /***/ }),
397
-
398
- /***/ "597f":
399
- /***/ (function(module, exports) {
400
-
401
- /* eslint-disable no-undefined,no-param-reassign,no-shadow */
402
-
403
- /**
404
- * Throttle execution of a function. Especially useful for rate limiting
405
- * execution of handlers on events like resize and scroll.
406
- *
407
- * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
408
- * @param {Boolean} [noTrailing] Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the
409
- * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time
410
- * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,
411
- * the internal counter is reset)
412
- * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
413
- * to `callback` when the throttled-function is executed.
414
- * @param {Boolean} [debounceMode] If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),
415
- * schedule `callback` to execute after `delay` ms.
416
- *
417
- * @return {Function} A new, throttled, function.
418
- */
419
- module.exports = function ( delay, noTrailing, callback, debounceMode ) {
420
-
421
- // After wrapper has stopped being called, this timeout ensures that
422
- // `callback` is executed at the proper times in `throttle` and `end`
423
- // debounce modes.
424
- var timeoutID;
425
-
426
- // Keep track of the last time `callback` was executed.
427
- var lastExec = 0;
428
-
429
- // `noTrailing` defaults to falsy.
430
- if ( typeof noTrailing !== 'boolean' ) {
431
- debounceMode = callback;
432
- callback = noTrailing;
433
- noTrailing = undefined;
434
- }
435
-
436
- // The `wrapper` function encapsulates all of the throttling / debouncing
437
- // functionality and when executed will limit the rate at which `callback`
438
- // is executed.
439
- function wrapper () {
440
-
441
- var self = this;
442
- var elapsed = Number(new Date()) - lastExec;
443
- var args = arguments;
444
-
445
- // Execute `callback` and update the `lastExec` timestamp.
446
- function exec () {
447
- lastExec = Number(new Date());
448
- callback.apply(self, args);
449
- }
450
-
451
- // If `debounceMode` is true (at begin) this is used to clear the flag
452
- // to allow future `callback` executions.
453
- function clear () {
454
- timeoutID = undefined;
455
- }
456
-
457
- if ( debounceMode && !timeoutID ) {
458
- // Since `wrapper` is being called for the first time and
459
- // `debounceMode` is true (at begin), execute `callback`.
460
- exec();
461
- }
462
-
463
- // Clear any existing timeout.
464
- if ( timeoutID ) {
465
- clearTimeout(timeoutID);
466
- }
467
-
468
- if ( debounceMode === undefined && elapsed > delay ) {
469
- // In throttle mode, if `delay` time has been exceeded, execute
470
- // `callback`.
471
- exec();
472
-
473
- } else if ( noTrailing !== true ) {
474
- // In trailing throttle mode, since `delay` time has not been
475
- // exceeded, schedule `callback` to execute `delay` ms after most
476
- // recent execution.
477
- //
478
- // If `debounceMode` is true (at begin), schedule `clear` to execute
479
- // after `delay` ms.
480
- //
481
- // If `debounceMode` is false (at end), schedule `callback` to
482
- // execute after `delay` ms.
483
- timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
484
- }
485
-
486
- }
487
-
488
- // Return the wrapper function.
489
- return wrapper;
490
-
491
- };
492
-
493
-
494
- /***/ }),
495
-
496
- /***/ "62e4":
497
- /***/ (function(module, exports) {
498
-
499
- module.exports = function(module) {
500
- if (!module.webpackPolyfill) {
501
- module.deprecate = function() {};
502
- module.paths = [];
503
- // module.parent = undefined by default
504
- if (!module.children) module.children = [];
505
- Object.defineProperty(module, "loaded", {
506
- enumerable: true,
507
- get: function() {
508
- return module.l;
509
- }
510
- });
511
- Object.defineProperty(module, "id", {
512
- enumerable: true,
513
- get: function() {
514
- return module.i;
515
- }
516
- });
517
- module.webpackPolyfill = 1;
518
- }
519
- return module;
520
- };
521
-
522
-
523
- /***/ }),
524
-
525
- /***/ "7b3e":
526
- /***/ (function(module, exports, __webpack_require__) {
527
-
528
- "use strict";
529
- /**
530
- * Copyright 2013-2015, Facebook, Inc.
531
- * All rights reserved.
532
- *
533
- * This source code is licensed under the BSD-style license found in the
534
- * LICENSE file in the root directory of this source tree. An additional grant
535
- * of patent rights can be found in the PATENTS file in the same directory.
536
- *
537
- * @providesModule isEventSupported
538
- */
539
-
540
-
541
-
542
- var ExecutionEnvironment = __webpack_require__("a3de");
543
-
544
- var useHasFeature;
545
- if (ExecutionEnvironment.canUseDOM) {
546
- useHasFeature =
547
- document.implementation &&
548
- document.implementation.hasFeature &&
549
- // always returns true in newer browsers as per the standard.
550
- // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
551
- document.implementation.hasFeature('', '') !== true;
552
- }
553
-
554
- /**
555
- * Checks if an event is supported in the current execution environment.
556
- *
557
- * NOTE: This will not work correctly for non-generic events such as `change`,
558
- * `reset`, `load`, `error`, and `select`.
559
- *
560
- * Borrows from Modernizr.
561
- *
562
- * @param {string} eventNameSuffix Event name, e.g. "click".
563
- * @param {?boolean} capture Check if the capture phase is supported.
564
- * @return {boolean} True if the event is supported.
565
- * @internal
566
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
567
- */
568
- function isEventSupported(eventNameSuffix, capture) {
569
- if (!ExecutionEnvironment.canUseDOM ||
570
- capture && !('addEventListener' in document)) {
571
- return false;
572
- }
573
-
574
- var eventName = 'on' + eventNameSuffix;
575
- var isSupported = eventName in document;
576
-
577
- if (!isSupported) {
578
- var element = document.createElement('div');
579
- element.setAttribute(eventName, 'return;');
580
- isSupported = typeof element[eventName] === 'function';
581
- }
582
-
583
- if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
584
- // This is the only way to test support for the `wheel` event in IE9+.
585
- isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
586
- }
587
-
588
- return isSupported;
589
- }
590
-
591
- module.exports = isEventSupported;
592
-
593
-
594
- /***/ }),
595
-
596
- /***/ "8875":
597
- /***/ (function(module, exports, __webpack_require__) {
598
-
599
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
600
- // MIT license
601
- // source: https://github.com/amiller-gh/currentScript-polyfill
602
-
603
- // added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
604
-
605
- (function (root, factory) {
606
- if (true) {
607
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
608
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
609
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
610
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
611
- } else {}
612
- }(typeof self !== 'undefined' ? self : this, function () {
613
- function getCurrentScript () {
614
- var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
615
- // for chrome
616
- if (!descriptor && 'currentScript' in document && document.currentScript) {
617
- return document.currentScript
618
- }
619
-
620
- // for other browsers with native support for currentScript
621
- if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
622
- return document.currentScript
623
- }
624
-
625
- // IE 8-10 support script readyState
626
- // IE 11+ & Firefox support stack trace
627
- try {
628
- throw new Error();
629
- }
630
- catch (err) {
631
- // Find the second match for the "at" string to get file src url from stack.
632
- var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
633
- ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
634
- stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
635
- scriptLocation = (stackDetails && stackDetails[1]) || false,
636
- line = (stackDetails && stackDetails[2]) || false,
637
- currentLocation = document.location.href.replace(document.location.hash, ''),
638
- pageSource,
639
- inlineScriptSourceRegExp,
640
- inlineScriptSource,
641
- scripts = document.getElementsByTagName('script'); // Live NodeList collection
642
-
643
- if (scriptLocation === currentLocation) {
644
- pageSource = document.documentElement.outerHTML;
645
- inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
646
- inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
647
- }
648
-
649
- for (var i = 0; i < scripts.length; i++) {
650
- // If ready state is interactive, return the script tag
651
- if (scripts[i].readyState === 'interactive') {
652
- return scripts[i];
653
- }
654
-
655
- // If src matches, return the script tag
656
- if (scripts[i].src === scriptLocation) {
657
- return scripts[i];
658
- }
659
-
660
- // If inline source matches, return the script tag
661
- if (
662
- scriptLocation === currentLocation &&
663
- scripts[i].innerHTML &&
664
- scripts[i].innerHTML.trim() === inlineScriptSource
665
- ) {
666
- return scripts[i];
667
- }
668
- }
669
-
670
- // If no match, return null
671
- return null;
672
- }
673
- };
674
-
675
- return getCurrentScript
676
- }));
677
-
678
-
679
- /***/ }),
680
-
681
- /***/ "8eb7":
682
- /***/ (function(module, exports) {
683
-
684
- /**
685
- * Copyright 2004-present Facebook. All Rights Reserved.
686
- *
687
- * @providesModule UserAgent_DEPRECATED
688
- */
689
-
690
- /**
691
- * Provides entirely client-side User Agent and OS detection. You should prefer
692
- * the non-deprecated UserAgent module when possible, which exposes our
693
- * authoritative server-side PHP-based detection to the client.
694
- *
695
- * Usage is straightforward:
696
- *
697
- * if (UserAgent_DEPRECATED.ie()) {
698
- * // IE
699
- * }
700
- *
701
- * You can also do version checks:
702
- *
703
- * if (UserAgent_DEPRECATED.ie() >= 7) {
704
- * // IE7 or better
705
- * }
706
- *
707
- * The browser functions will return NaN if the browser does not match, so
708
- * you can also do version compares the other way:
709
- *
710
- * if (UserAgent_DEPRECATED.ie() < 7) {
711
- * // IE6 or worse
712
- * }
713
- *
714
- * Note that the version is a float and may include a minor version number,
715
- * so you should always use range operators to perform comparisons, not
716
- * strict equality.
717
- *
718
- * **Note:** You should **strongly** prefer capability detection to browser
719
- * version detection where it's reasonable:
720
- *
721
- * http://www.quirksmode.org/js/support.html
722
- *
723
- * Further, we have a large number of mature wrapper functions and classes
724
- * which abstract away many browser irregularities. Check the documentation,
725
- * grep for things, or ask on javascript@lists.facebook.com before writing yet
726
- * another copy of "event || window.event".
727
- *
728
- */
729
-
730
- var _populated = false;
731
-
732
- // Browsers
733
- var _ie, _firefox, _opera, _webkit, _chrome;
734
-
735
- // Actual IE browser for compatibility mode
736
- var _ie_real_version;
737
-
738
- // Platforms
739
- var _osx, _windows, _linux, _android;
740
-
741
- // Architectures
742
- var _win64;
743
-
744
- // Devices
745
- var _iphone, _ipad, _native;
746
-
747
- var _mobile;
748
-
749
- function _populate() {
750
- if (_populated) {
751
- return;
752
- }
753
-
754
- _populated = true;
755
-
756
- // To work around buggy JS libraries that can't handle multi-digit
757
- // version numbers, Opera 10's user agent string claims it's Opera
758
- // 9, then later includes a Version/X.Y field:
759
- //
760
- // Opera/9.80 (foo) Presto/2.2.15 Version/10.10
761
- var uas = navigator.userAgent;
762
- var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
763
- var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
764
-
765
- _iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
766
- _ipad = /\b(iP[ao]d)/.exec(uas);
767
- _android = /Android/i.exec(uas);
768
- _native = /FBAN\/\w+;/i.exec(uas);
769
- _mobile = /Mobile/i.exec(uas);
770
-
771
- // Note that the IE team blog would have you believe you should be checking
772
- // for 'Win64; x64'. But MSDN then reveals that you can actually be coming
773
- // from either x64 or ia64; so ultimately, you should just check for Win64
774
- // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
775
- // Windows will send 'WOW64' instead.
776
- _win64 = !!(/Win64/.exec(uas));
777
-
778
- if (agent) {
779
- _ie = agent[1] ? parseFloat(agent[1]) : (
780
- agent[5] ? parseFloat(agent[5]) : NaN);
781
- // IE compatibility mode
782
- if (_ie && document && document.documentMode) {
783
- _ie = document.documentMode;
784
- }
785
- // grab the "true" ie version from the trident token if available
786
- var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
787
- _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
788
-
789
- _firefox = agent[2] ? parseFloat(agent[2]) : NaN;
790
- _opera = agent[3] ? parseFloat(agent[3]) : NaN;
791
- _webkit = agent[4] ? parseFloat(agent[4]) : NaN;
792
- if (_webkit) {
793
- // We do not add the regexp to the above test, because it will always
794
- // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
795
- // the userAgent string.
796
- agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
797
- _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
798
- } else {
799
- _chrome = NaN;
800
- }
801
- } else {
802
- _ie = _firefox = _opera = _chrome = _webkit = NaN;
803
- }
804
-
805
- if (os) {
806
- if (os[1]) {
807
- // Detect OS X version. If no version number matches, set _osx to true.
808
- // Version examples: 10, 10_6_1, 10.7
809
- // Parses version number as a float, taking only first two sets of
810
- // digits. If only one set of digits is found, returns just the major
811
- // version number.
812
- var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
813
-
814
- _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
815
- } else {
816
- _osx = false;
817
- }
818
- _windows = !!os[2];
819
- _linux = !!os[3];
820
- } else {
821
- _osx = _windows = _linux = false;
822
- }
823
- }
824
-
825
- var UserAgent_DEPRECATED = {
826
-
827
- /**
828
- * Check if the UA is Internet Explorer.
829
- *
830
- *
831
- * @return float|NaN Version number (if match) or NaN.
832
- */
833
- ie: function() {
834
- return _populate() || _ie;
835
- },
836
-
837
- /**
838
- * Check if we're in Internet Explorer compatibility mode.
839
- *
840
- * @return bool true if in compatibility mode, false if
841
- * not compatibility mode or not ie
842
- */
843
- ieCompatibilityMode: function() {
844
- return _populate() || (_ie_real_version > _ie);
845
- },
846
-
847
-
848
- /**
849
- * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
850
- * only need this because Skype can't handle 64-bit IE yet. We need to remove
851
- * this when we don't need it -- tracked by #601957.
852
- */
853
- ie64: function() {
854
- return UserAgent_DEPRECATED.ie() && _win64;
855
- },
856
-
857
- /**
858
- * Check if the UA is Firefox.
859
- *
860
- *
861
- * @return float|NaN Version number (if match) or NaN.
862
- */
863
- firefox: function() {
864
- return _populate() || _firefox;
865
- },
866
-
867
-
868
- /**
869
- * Check if the UA is Opera.
870
- *
871
- *
872
- * @return float|NaN Version number (if match) or NaN.
873
- */
874
- opera: function() {
875
- return _populate() || _opera;
876
- },
877
-
878
-
879
- /**
880
- * Check if the UA is WebKit.
881
- *
882
- *
883
- * @return float|NaN Version number (if match) or NaN.
884
- */
885
- webkit: function() {
886
- return _populate() || _webkit;
887
- },
888
-
889
- /**
890
- * For Push
891
- * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
892
- */
893
- safari: function() {
894
- return UserAgent_DEPRECATED.webkit();
895
- },
896
-
897
- /**
898
- * Check if the UA is a Chrome browser.
899
- *
900
- *
901
- * @return float|NaN Version number (if match) or NaN.
902
- */
903
- chrome : function() {
904
- return _populate() || _chrome;
905
- },
906
-
907
-
908
- /**
909
- * Check if the user is running Windows.
910
- *
911
- * @return bool `true' if the user's OS is Windows.
912
- */
913
- windows: function() {
914
- return _populate() || _windows;
915
- },
916
-
917
-
918
- /**
919
- * Check if the user is running Mac OS X.
920
- *
921
- * @return float|bool Returns a float if a version number is detected,
922
- * otherwise true/false.
923
- */
924
- osx: function() {
925
- return _populate() || _osx;
926
- },
927
-
928
- /**
929
- * Check if the user is running Linux.
930
- *
931
- * @return bool `true' if the user's OS is some flavor of Linux.
932
- */
933
- linux: function() {
934
- return _populate() || _linux;
935
- },
936
-
937
- /**
938
- * Check if the user is running on an iPhone or iPod platform.
939
- *
940
- * @return bool `true' if the user is running some flavor of the
941
- * iPhone OS.
942
- */
943
- iphone: function() {
944
- return _populate() || _iphone;
945
- },
946
-
947
- mobile: function() {
948
- return _populate() || (_iphone || _ipad || _android || _mobile);
949
- },
950
-
951
- nativeApp: function() {
952
- // webviews inside of the native apps
953
- return _populate() || _native;
954
- },
955
-
956
- android: function() {
957
- return _populate() || _android;
958
- },
959
-
960
- ipad: function() {
961
- return _populate() || _ipad;
962
- }
963
- };
964
-
965
- module.exports = UserAgent_DEPRECATED;
966
-
967
-
968
- /***/ }),
969
-
970
- /***/ "92fa":
971
- /***/ (function(module, exports) {
972
-
973
- var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/
974
-
975
- module.exports = function mergeJSXProps (objs) {
976
- return objs.reduce(function (a, b) {
977
- var aa, bb, key, nestedKey, temp
978
- for (key in b) {
979
- aa = a[key]
980
- bb = b[key]
981
- if (aa && nestRE.test(key)) {
982
- // normalize class
983
- if (key === 'class') {
984
- if (typeof aa === 'string') {
985
- temp = aa
986
- a[key] = aa = {}
987
- aa[temp] = true
988
- }
989
- if (typeof bb === 'string') {
990
- temp = bb
991
- b[key] = bb = {}
992
- bb[temp] = true
993
- }
994
- }
995
- if (key === 'on' || key === 'nativeOn' || key === 'hook') {
996
- // merge functions
997
- for (nestedKey in bb) {
998
- aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey])
999
- }
1000
- } else if (Array.isArray(aa)) {
1001
- a[key] = aa.concat(bb)
1002
- } else if (Array.isArray(bb)) {
1003
- a[key] = [aa].concat(bb)
1004
- } else {
1005
- for (nestedKey in bb) {
1006
- aa[nestedKey] = bb[nestedKey]
1007
- }
1008
- }
1009
- } else {
1010
- a[key] = b[key]
1011
- }
1012
- }
1013
- return a
1014
- }, {})
1015
- }
1016
-
1017
- function mergeFn (a, b) {
1018
- return function () {
1019
- a && a.apply(this, arguments)
1020
- b && b.apply(this, arguments)
1021
- }
1022
- }
1023
-
1024
-
1025
- /***/ }),
1026
-
1027
- /***/ "9619":
1028
- /***/ (function(module, exports, __webpack_require__) {
1029
-
1030
- var throttle = __webpack_require__("597f");
1031
- var debounce = __webpack_require__("0e15");
1032
-
1033
- module.exports = {
1034
- throttle: throttle,
1035
- debounce: debounce
1036
- };
1037
-
1038
-
1039
- /***/ }),
1040
-
1041
- /***/ "a15e":
1042
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1043
-
1044
- "use strict";
1045
- // ESM COMPAT FLAG
1046
- __webpack_require__.r(__webpack_exports__);
1047
-
1048
- // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/extends.js
1049
- var helpers_extends = __webpack_require__("41b2");
1050
- var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
1051
-
1052
- // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/typeof.js
1053
- var helpers_typeof = __webpack_require__("1098");
1054
- var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
1055
-
1056
- // CONCATENATED MODULE: ./node_modules/async-validator/es/util.js
1057
-
1058
-
1059
- var formatRegExp = /%[sdj%]/g;
1060
-
1061
- var warning = function warning() {};
1062
-
1063
- // don't print warning message when in production env or node runtime
1064
- if (false) {}
1065
-
1066
- function format() {
1067
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
1068
- args[_key] = arguments[_key];
1069
- }
1070
-
1071
- var i = 1;
1072
- var f = args[0];
1073
- var len = args.length;
1074
- if (typeof f === 'function') {
1075
- return f.apply(null, args.slice(1));
1076
- }
1077
- if (typeof f === 'string') {
1078
- var str = String(f).replace(formatRegExp, function (x) {
1079
- if (x === '%%') {
1080
- return '%';
1081
- }
1082
- if (i >= len) {
1083
- return x;
1084
- }
1085
- switch (x) {
1086
- case '%s':
1087
- return String(args[i++]);
1088
- case '%d':
1089
- return Number(args[i++]);
1090
- case '%j':
1091
- try {
1092
- return JSON.stringify(args[i++]);
1093
- } catch (_) {
1094
- return '[Circular]';
1095
- }
1096
- break;
1097
- default:
1098
- return x;
1099
- }
1100
- });
1101
- for (var arg = args[i]; i < len; arg = args[++i]) {
1102
- str += ' ' + arg;
1103
- }
1104
- return str;
1105
- }
1106
- return f;
1107
- }
1108
-
1109
- function isNativeStringType(type) {
1110
- return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
1111
- }
1112
-
1113
- function isEmptyValue(value, type) {
1114
- if (value === undefined || value === null) {
1115
- return true;
1116
- }
1117
- if (type === 'array' && Array.isArray(value) && !value.length) {
1118
- return true;
1119
- }
1120
- if (isNativeStringType(type) && typeof value === 'string' && !value) {
1121
- return true;
1122
- }
1123
- return false;
1124
- }
1125
-
1126
- function isEmptyObject(obj) {
1127
- return Object.keys(obj).length === 0;
1128
- }
1129
-
1130
- function asyncParallelArray(arr, func, callback) {
1131
- var results = [];
1132
- var total = 0;
1133
- var arrLength = arr.length;
1134
-
1135
- function count(errors) {
1136
- results.push.apply(results, errors);
1137
- total++;
1138
- if (total === arrLength) {
1139
- callback(results);
1140
- }
1141
- }
1142
-
1143
- arr.forEach(function (a) {
1144
- func(a, count);
1145
- });
1146
- }
1147
-
1148
- function asyncSerialArray(arr, func, callback) {
1149
- var index = 0;
1150
- var arrLength = arr.length;
1151
-
1152
- function next(errors) {
1153
- if (errors && errors.length) {
1154
- callback(errors);
1155
- return;
1156
- }
1157
- var original = index;
1158
- index = index + 1;
1159
- if (original < arrLength) {
1160
- func(arr[original], next);
1161
- } else {
1162
- callback([]);
1163
- }
1164
- }
1165
-
1166
- next([]);
1167
- }
1168
-
1169
- function flattenObjArr(objArr) {
1170
- var ret = [];
1171
- Object.keys(objArr).forEach(function (k) {
1172
- ret.push.apply(ret, objArr[k]);
1173
- });
1174
- return ret;
1175
- }
1176
-
1177
- function asyncMap(objArr, option, func, callback) {
1178
- if (option.first) {
1179
- var flattenArr = flattenObjArr(objArr);
1180
- return asyncSerialArray(flattenArr, func, callback);
1181
- }
1182
- var firstFields = option.firstFields || [];
1183
- if (firstFields === true) {
1184
- firstFields = Object.keys(objArr);
1185
- }
1186
- var objArrKeys = Object.keys(objArr);
1187
- var objArrLength = objArrKeys.length;
1188
- var total = 0;
1189
- var results = [];
1190
- var next = function next(errors) {
1191
- results.push.apply(results, errors);
1192
- total++;
1193
- if (total === objArrLength) {
1194
- callback(results);
1195
- }
1196
- };
1197
- objArrKeys.forEach(function (key) {
1198
- var arr = objArr[key];
1199
- if (firstFields.indexOf(key) !== -1) {
1200
- asyncSerialArray(arr, func, next);
1201
- } else {
1202
- asyncParallelArray(arr, func, next);
1203
- }
1204
- });
1205
- }
1206
-
1207
- function complementError(rule) {
1208
- return function (oe) {
1209
- if (oe && oe.message) {
1210
- oe.field = oe.field || rule.fullField;
1211
- return oe;
1212
- }
1213
- return {
1214
- message: oe,
1215
- field: oe.field || rule.fullField
1216
- };
1217
- };
1218
- }
1219
-
1220
- function deepMerge(target, source) {
1221
- if (source) {
1222
- for (var s in source) {
1223
- if (source.hasOwnProperty(s)) {
1224
- var value = source[s];
1225
- if ((typeof value === 'undefined' ? 'undefined' : typeof_default()(value)) === 'object' && typeof_default()(target[s]) === 'object') {
1226
- target[s] = extends_default()({}, target[s], value);
1227
- } else {
1228
- target[s] = value;
1229
- }
1230
- }
1231
- }
1232
- }
1233
- return target;
1234
- }
1235
- // CONCATENATED MODULE: ./node_modules/async-validator/es/rule/required.js
1236
-
1237
-
1238
- /**
1239
- * Rule for validating required fields.
1240
- *
1241
- * @param rule The validation rule.
1242
- * @param value The value of the field on the source object.
1243
- * @param source The source object being validated.
1244
- * @param errors An array of errors that this rule may add
1245
- * validation errors to.
1246
- * @param options The validation options.
1247
- * @param options.messages The validation messages.
1248
- */
1249
- function required(rule, value, source, errors, options, type) {
1250
- if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
1251
- errors.push(format(options.messages.required, rule.fullField));
1252
- }
1253
- }
1254
-
1255
- /* harmony default export */ var rule_required = (required);
1256
- // CONCATENATED MODULE: ./node_modules/async-validator/es/rule/whitespace.js
1257
-
1258
-
1259
- /**
1260
- * Rule for validating whitespace.
1261
- *
1262
- * @param rule The validation rule.
1263
- * @param value The value of the field on the source object.
1264
- * @param source The source object being validated.
1265
- * @param errors An array of errors that this rule may add
1266
- * validation errors to.
1267
- * @param options The validation options.
1268
- * @param options.messages The validation messages.
1269
- */
1270
- function whitespace(rule, value, source, errors, options) {
1271
- if (/^\s+$/.test(value) || value === '') {
1272
- errors.push(format(options.messages.whitespace, rule.fullField));
1273
- }
1274
- }
1275
-
1276
- /* harmony default export */ var rule_whitespace = (whitespace);
1277
- // CONCATENATED MODULE: ./node_modules/async-validator/es/rule/type.js
1278
-
1279
-
1280
-
1281
-
1282
- /* eslint max-len:0 */
1283
-
1284
- var pattern = {
1285
- // http://emailregex.com/
1286
- email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
1287
- url: new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', 'i'),
1288
- hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
1289
- };
1290
-
1291
- var types = {
1292
- integer: function integer(value) {
1293
- return types.number(value) && parseInt(value, 10) === value;
1294
- },
1295
- float: function float(value) {
1296
- return types.number(value) && !types.integer(value);
1297
- },
1298
- array: function array(value) {
1299
- return Array.isArray(value);
1300
- },
1301
- regexp: function regexp(value) {
1302
- if (value instanceof RegExp) {
1303
- return true;
1304
- }
1305
- try {
1306
- return !!new RegExp(value);
1307
- } catch (e) {
1308
- return false;
1309
- }
1310
- },
1311
- date: function date(value) {
1312
- return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
1313
- },
1314
- number: function number(value) {
1315
- if (isNaN(value)) {
1316
- return false;
1317
- }
1318
- return typeof value === 'number';
1319
- },
1320
- object: function object(value) {
1321
- return (typeof value === 'undefined' ? 'undefined' : typeof_default()(value)) === 'object' && !types.array(value);
1322
- },
1323
- method: function method(value) {
1324
- return typeof value === 'function';
1325
- },
1326
- email: function email(value) {
1327
- return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
1328
- },
1329
- url: function url(value) {
1330
- return typeof value === 'string' && !!value.match(pattern.url);
1331
- },
1332
- hex: function hex(value) {
1333
- return typeof value === 'string' && !!value.match(pattern.hex);
1334
- }
1335
- };
1336
-
1337
- /**
1338
- * Rule for validating the type of a value.
1339
- *
1340
- * @param rule The validation rule.
1341
- * @param value The value of the field on the source object.
1342
- * @param source The source object being validated.
1343
- * @param errors An array of errors that this rule may add
1344
- * validation errors to.
1345
- * @param options The validation options.
1346
- * @param options.messages The validation messages.
1347
- */
1348
- function type_type(rule, value, source, errors, options) {
1349
- if (rule.required && value === undefined) {
1350
- rule_required(rule, value, source, errors, options);
1351
- return;
1352
- }
1353
- var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
1354
- var ruleType = rule.type;
1355
- if (custom.indexOf(ruleType) > -1) {
1356
- if (!types[ruleType](value)) {
1357
- errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
1358
- }
1359
- // straight typeof check
1360
- } else if (ruleType && (typeof value === 'undefined' ? 'undefined' : typeof_default()(value)) !== rule.type) {
1361
- errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
1362
- }
1363
- }
1364
-
1365
- /* harmony default export */ var rule_type = (type_type);
1366
- // CONCATENATED MODULE: ./node_modules/async-validator/es/rule/range.js
1367
-
1368
-
1369
- /**
1370
- * Rule for validating minimum and maximum allowed values.
1371
- *
1372
- * @param rule The validation rule.
1373
- * @param value The value of the field on the source object.
1374
- * @param source The source object being validated.
1375
- * @param errors An array of errors that this rule may add
1376
- * validation errors to.
1377
- * @param options The validation options.
1378
- * @param options.messages The validation messages.
1379
- */
1380
- function range(rule, value, source, errors, options) {
1381
- var len = typeof rule.len === 'number';
1382
- var min = typeof rule.min === 'number';
1383
- var max = typeof rule.max === 'number';
1384
- // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
1385
- var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
1386
- var val = value;
1387
- var key = null;
1388
- var num = typeof value === 'number';
1389
- var str = typeof value === 'string';
1390
- var arr = Array.isArray(value);
1391
- if (num) {
1392
- key = 'number';
1393
- } else if (str) {
1394
- key = 'string';
1395
- } else if (arr) {
1396
- key = 'array';
1397
- }
1398
- // if the value is not of a supported type for range validation
1399
- // the validation rule rule should use the
1400
- // type property to also test for a particular type
1401
- if (!key) {
1402
- return false;
1403
- }
1404
- if (arr) {
1405
- val = value.length;
1406
- }
1407
- if (str) {
1408
- // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
1409
- val = value.replace(spRegexp, '_').length;
1410
- }
1411
- if (len) {
1412
- if (val !== rule.len) {
1413
- errors.push(format(options.messages[key].len, rule.fullField, rule.len));
1414
- }
1415
- } else if (min && !max && val < rule.min) {
1416
- errors.push(format(options.messages[key].min, rule.fullField, rule.min));
1417
- } else if (max && !min && val > rule.max) {
1418
- errors.push(format(options.messages[key].max, rule.fullField, rule.max));
1419
- } else if (min && max && (val < rule.min || val > rule.max)) {
1420
- errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
1421
- }
1422
- }
1423
-
1424
- /* harmony default export */ var rule_range = (range);
1425
- // CONCATENATED MODULE: ./node_modules/async-validator/es/rule/enum.js
1426
-
1427
- var ENUM = 'enum';
1428
-
1429
- /**
1430
- * Rule for validating a value exists in an enumerable list.
1431
- *
1432
- * @param rule The validation rule.
1433
- * @param value The value of the field on the source object.
1434
- * @param source The source object being validated.
1435
- * @param errors An array of errors that this rule may add
1436
- * validation errors to.
1437
- * @param options The validation options.
1438
- * @param options.messages The validation messages.
1439
- */
1440
- function enumerable(rule, value, source, errors, options) {
1441
- rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
1442
- if (rule[ENUM].indexOf(value) === -1) {
1443
- errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
1444
- }
1445
- }
1446
-
1447
- /* harmony default export */ var rule_enum = (enumerable);
1448
- // CONCATENATED MODULE: ./node_modules/async-validator/es/rule/pattern.js
1449
-
1450
-
1451
- /**
1452
- * Rule for validating a regular expression pattern.
1453
- *
1454
- * @param rule The validation rule.
1455
- * @param value The value of the field on the source object.
1456
- * @param source The source object being validated.
1457
- * @param errors An array of errors that this rule may add
1458
- * validation errors to.
1459
- * @param options The validation options.
1460
- * @param options.messages The validation messages.
1461
- */
1462
- function pattern_pattern(rule, value, source, errors, options) {
1463
- if (rule.pattern) {
1464
- if (rule.pattern instanceof RegExp) {
1465
- // if a RegExp instance is passed, reset `lastIndex` in case its `global`
1466
- // flag is accidentally set to `true`, which in a validation scenario
1467
- // is not necessary and the result might be misleading
1468
- rule.pattern.lastIndex = 0;
1469
- if (!rule.pattern.test(value)) {
1470
- errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
1471
- }
1472
- } else if (typeof rule.pattern === 'string') {
1473
- var _pattern = new RegExp(rule.pattern);
1474
- if (!_pattern.test(value)) {
1475
- errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
1476
- }
1477
- }
1478
- }
1479
- }
1480
-
1481
- /* harmony default export */ var rule_pattern = (pattern_pattern);
1482
- // CONCATENATED MODULE: ./node_modules/async-validator/es/rule/index.js
1483
-
1484
-
1485
-
1486
-
1487
-
1488
-
1489
-
1490
- /* harmony default export */ var es_rule = ({
1491
- required: rule_required,
1492
- whitespace: rule_whitespace,
1493
- type: rule_type,
1494
- range: rule_range,
1495
- 'enum': rule_enum,
1496
- pattern: rule_pattern
1497
- });
1498
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/string.js
1499
-
1500
-
1501
-
1502
- /**
1503
- * Performs validation for string types.
1504
- *
1505
- * @param rule The validation rule.
1506
- * @param value The value of the field on the source object.
1507
- * @param callback The callback function.
1508
- * @param source The source object being validated.
1509
- * @param options The validation options.
1510
- * @param options.messages The validation messages.
1511
- */
1512
- function string(rule, value, callback, source, options) {
1513
- var errors = [];
1514
- var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
1515
- if (validate) {
1516
- if (isEmptyValue(value, 'string') && !rule.required) {
1517
- return callback();
1518
- }
1519
- es_rule.required(rule, value, source, errors, options, 'string');
1520
- if (!isEmptyValue(value, 'string')) {
1521
- es_rule.type(rule, value, source, errors, options);
1522
- es_rule.range(rule, value, source, errors, options);
1523
- es_rule.pattern(rule, value, source, errors, options);
1524
- if (rule.whitespace === true) {
1525
- es_rule.whitespace(rule, value, source, errors, options);
1526
- }
1527
- }
1528
- }
1529
- callback(errors);
1530
- }
1531
-
1532
- /* harmony default export */ var validator_string = (string);
1533
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/method.js
1534
-
1535
-
1536
-
1537
- /**
1538
- * Validates a function.
1539
- *
1540
- * @param rule The validation rule.
1541
- * @param value The value of the field on the source object.
1542
- * @param callback The callback function.
1543
- * @param source The source object being validated.
1544
- * @param options The validation options.
1545
- * @param options.messages The validation messages.
1546
- */
1547
- function method(rule, value, callback, source, options) {
1548
- var errors = [];
1549
- var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
1550
- if (validate) {
1551
- if (isEmptyValue(value) && !rule.required) {
1552
- return callback();
1553
- }
1554
- es_rule.required(rule, value, source, errors, options);
1555
- if (value !== undefined) {
1556
- es_rule.type(rule, value, source, errors, options);
1557
- }
1558
- }
1559
- callback(errors);
1560
- }
1561
-
1562
- /* harmony default export */ var validator_method = (method);
1563
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/number.js
1564
-
1565
-
1566
-
1567
- /**
1568
- * Validates a number.
1569
- *
1570
- * @param rule The validation rule.
1571
- * @param value The value of the field on the source object.
1572
- * @param callback The callback function.
1573
- * @param source The source object being validated.
1574
- * @param options The validation options.
1575
- * @param options.messages The validation messages.
1576
- */
1577
- function number(rule, value, callback, source, options) {
1578
- var errors = [];
1579
- var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
1580
- if (validate) {
1581
- if (isEmptyValue(value) && !rule.required) {
1582
- return callback();
1583
- }
1584
- es_rule.required(rule, value, source, errors, options);
1585
- if (value !== undefined) {
1586
- es_rule.type(rule, value, source, errors, options);
1587
- es_rule.range(rule, value, source, errors, options);
1588
- }
1589
- }
1590
- callback(errors);
1591
- }
1592
-
1593
- /* harmony default export */ var validator_number = (number);
1594
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/boolean.js
1595
-
1596
-
1597
-
1598
- /**
1599
- * Validates a boolean.
1600
- *
1601
- * @param rule The validation rule.
1602
- * @param value The value of the field on the source object.
1603
- * @param callback The callback function.
1604
- * @param source The source object being validated.
1605
- * @param options The validation options.
1606
- * @param options.messages The validation messages.
1607
- */
1608
- function boolean_boolean(rule, value, callback, source, options) {
1609
- var errors = [];
1610
- var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
1611
- if (validate) {
1612
- if (isEmptyValue(value) && !rule.required) {
1613
- return callback();
1614
- }
1615
- es_rule.required(rule, value, source, errors, options);
1616
- if (value !== undefined) {
1617
- es_rule.type(rule, value, source, errors, options);
1618
- }
1619
- }
1620
- callback(errors);
1621
- }
1622
-
1623
- /* harmony default export */ var validator_boolean = (boolean_boolean);
1624
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/regexp.js
1625
-
1626
-
1627
-
1628
- /**
1629
- * Validates the regular expression type.
1630
- *
1631
- * @param rule The validation rule.
1632
- * @param value The value of the field on the source object.
1633
- * @param callback The callback function.
1634
- * @param source The source object being validated.
1635
- * @param options The validation options.
1636
- * @param options.messages The validation messages.
1637
- */
1638
- function regexp(rule, value, callback, source, options) {
1639
- var errors = [];
1640
- var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
1641
- if (validate) {
1642
- if (isEmptyValue(value) && !rule.required) {
1643
- return callback();
1644
- }
1645
- es_rule.required(rule, value, source, errors, options);
1646
- if (!isEmptyValue(value)) {
1647
- es_rule.type(rule, value, source, errors, options);
1648
- }
1649
- }
1650
- callback(errors);
1651
- }
1652
-
1653
- /* harmony default export */ var validator_regexp = (regexp);
1654
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/integer.js
1655
-
1656
-
1657
-
1658
- /**
1659
- * Validates a number is an integer.
1660
- *
1661
- * @param rule The validation rule.
1662
- * @param value The value of the field on the source object.
1663
- * @param callback The callback function.
1664
- * @param source The source object being validated.
1665
- * @param options The validation options.
1666
- * @param options.messages The validation messages.
1667
- */
1668
- function integer(rule, value, callback, source, options) {
1669
- var errors = [];
1670
- var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
1671
- if (validate) {
1672
- if (isEmptyValue(value) && !rule.required) {
1673
- return callback();
1674
- }
1675
- es_rule.required(rule, value, source, errors, options);
1676
- if (value !== undefined) {
1677
- es_rule.type(rule, value, source, errors, options);
1678
- es_rule.range(rule, value, source, errors, options);
1679
- }
1680
- }
1681
- callback(errors);
1682
- }
1683
-
1684
- /* harmony default export */ var validator_integer = (integer);
1685
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/float.js
1686
-
1687
-
1688
-
1689
- /**
1690
- * Validates a number is a floating point number.
1691
- *
1692
- * @param rule The validation rule.
1693
- * @param value The value of the field on the source object.
1694
- * @param callback The callback function.
1695
- * @param source The source object being validated.
1696
- * @param options The validation options.
1697
- * @param options.messages The validation messages.
1698
- */
1699
- function floatFn(rule, value, callback, source, options) {
1700
- var errors = [];
1701
- var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
1702
- if (validate) {
1703
- if (isEmptyValue(value) && !rule.required) {
1704
- return callback();
1705
- }
1706
- es_rule.required(rule, value, source, errors, options);
1707
- if (value !== undefined) {
1708
- es_rule.type(rule, value, source, errors, options);
1709
- es_rule.range(rule, value, source, errors, options);
1710
- }
1711
- }
1712
- callback(errors);
1713
- }
1714
-
1715
- /* harmony default export */ var validator_float = (floatFn);
1716
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/array.js
1717
-
1718
-
1719
- /**
1720
- * Validates an array.
1721
- *
1722
- * @param rule The validation rule.
1723
- * @param value The value of the field on the source object.
1724
- * @param callback The callback function.
1725
- * @param source The source object being validated.
1726
- * @param options The validation options.
1727
- * @param options.messages The validation messages.
1728
- */
1729
- function array(rule, value, callback, source, options) {
1730
- var errors = [];
1731
- var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
1732
- if (validate) {
1733
- if (isEmptyValue(value, 'array') && !rule.required) {
1734
- return callback();
1735
- }
1736
- es_rule.required(rule, value, source, errors, options, 'array');
1737
- if (!isEmptyValue(value, 'array')) {
1738
- es_rule.type(rule, value, source, errors, options);
1739
- es_rule.range(rule, value, source, errors, options);
1740
- }
1741
- }
1742
- callback(errors);
1743
- }
1744
-
1745
- /* harmony default export */ var validator_array = (array);
1746
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/object.js
1747
-
1748
-
1749
-
1750
- /**
1751
- * Validates an object.
1752
- *
1753
- * @param rule The validation rule.
1754
- * @param value The value of the field on the source object.
1755
- * @param callback The callback function.
1756
- * @param source The source object being validated.
1757
- * @param options The validation options.
1758
- * @param options.messages The validation messages.
1759
- */
1760
- function object_object(rule, value, callback, source, options) {
1761
- var errors = [];
1762
- var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
1763
- if (validate) {
1764
- if (isEmptyValue(value) && !rule.required) {
1765
- return callback();
1766
- }
1767
- es_rule.required(rule, value, source, errors, options);
1768
- if (value !== undefined) {
1769
- es_rule.type(rule, value, source, errors, options);
1770
- }
1771
- }
1772
- callback(errors);
1773
- }
1774
-
1775
- /* harmony default export */ var validator_object = (object_object);
1776
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/enum.js
1777
-
1778
-
1779
- var enum_ENUM = 'enum';
1780
-
1781
- /**
1782
- * Validates an enumerable list.
1783
- *
1784
- * @param rule The validation rule.
1785
- * @param value The value of the field on the source object.
1786
- * @param callback The callback function.
1787
- * @param source The source object being validated.
1788
- * @param options The validation options.
1789
- * @param options.messages The validation messages.
1790
- */
1791
- function enum_enumerable(rule, value, callback, source, options) {
1792
- var errors = [];
1793
- var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
1794
- if (validate) {
1795
- if (isEmptyValue(value) && !rule.required) {
1796
- return callback();
1797
- }
1798
- es_rule.required(rule, value, source, errors, options);
1799
- if (value) {
1800
- es_rule[enum_ENUM](rule, value, source, errors, options);
1801
- }
1802
- }
1803
- callback(errors);
1804
- }
1805
-
1806
- /* harmony default export */ var validator_enum = (enum_enumerable);
1807
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/pattern.js
1808
-
1809
-
1810
-
1811
- /**
1812
- * Validates a regular expression pattern.
1813
- *
1814
- * Performs validation when a rule only contains
1815
- * a pattern property but is not declared as a string type.
1816
- *
1817
- * @param rule The validation rule.
1818
- * @param value The value of the field on the source object.
1819
- * @param callback The callback function.
1820
- * @param source The source object being validated.
1821
- * @param options The validation options.
1822
- * @param options.messages The validation messages.
1823
- */
1824
- function validator_pattern_pattern(rule, value, callback, source, options) {
1825
- var errors = [];
1826
- var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
1827
- if (validate) {
1828
- if (isEmptyValue(value, 'string') && !rule.required) {
1829
- return callback();
1830
- }
1831
- es_rule.required(rule, value, source, errors, options);
1832
- if (!isEmptyValue(value, 'string')) {
1833
- es_rule.pattern(rule, value, source, errors, options);
1834
- }
1835
- }
1836
- callback(errors);
1837
- }
1838
-
1839
- /* harmony default export */ var validator_pattern = (validator_pattern_pattern);
1840
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/date.js
1841
-
1842
-
1843
-
1844
- function date(rule, value, callback, source, options) {
1845
- // console.log('integer rule called %j', rule);
1846
- var errors = [];
1847
- var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
1848
- // console.log('validate on %s value', value);
1849
- if (validate) {
1850
- if (isEmptyValue(value) && !rule.required) {
1851
- return callback();
1852
- }
1853
- es_rule.required(rule, value, source, errors, options);
1854
- if (!isEmptyValue(value)) {
1855
- var dateObject = void 0;
1856
-
1857
- if (typeof value === 'number') {
1858
- dateObject = new Date(value);
1859
- } else {
1860
- dateObject = value;
1861
- }
1862
-
1863
- es_rule.type(rule, dateObject, source, errors, options);
1864
- if (dateObject) {
1865
- es_rule.range(rule, dateObject.getTime(), source, errors, options);
1866
- }
1867
- }
1868
- }
1869
- callback(errors);
1870
- }
1871
-
1872
- /* harmony default export */ var validator_date = (date);
1873
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/required.js
1874
-
1875
-
1876
-
1877
- function required_required(rule, value, callback, source, options) {
1878
- var errors = [];
1879
- var type = Array.isArray(value) ? 'array' : typeof value === 'undefined' ? 'undefined' : typeof_default()(value);
1880
- es_rule.required(rule, value, source, errors, options, type);
1881
- callback(errors);
1882
- }
1883
-
1884
- /* harmony default export */ var validator_required = (required_required);
1885
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/type.js
1886
-
1887
-
1888
-
1889
- function validator_type_type(rule, value, callback, source, options) {
1890
- var ruleType = rule.type;
1891
- var errors = [];
1892
- var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
1893
- if (validate) {
1894
- if (isEmptyValue(value, ruleType) && !rule.required) {
1895
- return callback();
1896
- }
1897
- es_rule.required(rule, value, source, errors, options, ruleType);
1898
- if (!isEmptyValue(value, ruleType)) {
1899
- es_rule.type(rule, value, source, errors, options);
1900
- }
1901
- }
1902
- callback(errors);
1903
- }
1904
-
1905
- /* harmony default export */ var validator_type = (validator_type_type);
1906
- // CONCATENATED MODULE: ./node_modules/async-validator/es/validator/index.js
1907
-
1908
-
1909
-
1910
-
1911
-
1912
-
1913
-
1914
-
1915
-
1916
-
1917
-
1918
-
1919
-
1920
-
1921
-
1922
- /* harmony default export */ var es_validator = ({
1923
- string: validator_string,
1924
- method: validator_method,
1925
- number: validator_number,
1926
- boolean: validator_boolean,
1927
- regexp: validator_regexp,
1928
- integer: validator_integer,
1929
- float: validator_float,
1930
- array: validator_array,
1931
- object: validator_object,
1932
- 'enum': validator_enum,
1933
- pattern: validator_pattern,
1934
- date: validator_date,
1935
- url: validator_type,
1936
- hex: validator_type,
1937
- email: validator_type,
1938
- required: validator_required
1939
- });
1940
- // CONCATENATED MODULE: ./node_modules/async-validator/es/messages.js
1941
- function newMessages() {
1942
- return {
1943
- 'default': 'Validation error on field %s',
1944
- required: '%s is required',
1945
- 'enum': '%s must be one of %s',
1946
- whitespace: '%s cannot be empty',
1947
- date: {
1948
- format: '%s date %s is invalid for format %s',
1949
- parse: '%s date could not be parsed, %s is invalid ',
1950
- invalid: '%s date %s is invalid'
1951
- },
1952
- types: {
1953
- string: '%s is not a %s',
1954
- method: '%s is not a %s (function)',
1955
- array: '%s is not an %s',
1956
- object: '%s is not an %s',
1957
- number: '%s is not a %s',
1958
- date: '%s is not a %s',
1959
- boolean: '%s is not a %s',
1960
- integer: '%s is not an %s',
1961
- float: '%s is not a %s',
1962
- regexp: '%s is not a valid %s',
1963
- email: '%s is not a valid %s',
1964
- url: '%s is not a valid %s',
1965
- hex: '%s is not a valid %s'
1966
- },
1967
- string: {
1968
- len: '%s must be exactly %s characters',
1969
- min: '%s must be at least %s characters',
1970
- max: '%s cannot be longer than %s characters',
1971
- range: '%s must be between %s and %s characters'
1972
- },
1973
- number: {
1974
- len: '%s must equal %s',
1975
- min: '%s cannot be less than %s',
1976
- max: '%s cannot be greater than %s',
1977
- range: '%s must be between %s and %s'
1978
- },
1979
- array: {
1980
- len: '%s must be exactly %s in length',
1981
- min: '%s cannot be less than %s in length',
1982
- max: '%s cannot be greater than %s in length',
1983
- range: '%s must be between %s and %s in length'
1984
- },
1985
- pattern: {
1986
- mismatch: '%s value %s does not match pattern %s'
1987
- },
1988
- clone: function clone() {
1989
- var cloned = JSON.parse(JSON.stringify(this));
1990
- cloned.clone = this.clone;
1991
- return cloned;
1992
- }
1993
- };
1994
- }
1995
-
1996
- var messages_messages = newMessages();
1997
- // CONCATENATED MODULE: ./node_modules/async-validator/es/index.js
1998
-
1999
-
2000
-
2001
-
2002
-
2003
-
2004
- /**
2005
- * Encapsulates a validation schema.
2006
- *
2007
- * @param descriptor An object declaring validation rules
2008
- * for this schema.
2009
- */
2010
- function Schema(descriptor) {
2011
- this.rules = null;
2012
- this._messages = messages_messages;
2013
- this.define(descriptor);
2014
- }
2015
-
2016
- Schema.prototype = {
2017
- messages: function messages(_messages) {
2018
- if (_messages) {
2019
- this._messages = deepMerge(newMessages(), _messages);
2020
- }
2021
- return this._messages;
2022
- },
2023
- define: function define(rules) {
2024
- if (!rules) {
2025
- throw new Error('Cannot configure a schema with no rules');
2026
- }
2027
- if ((typeof rules === 'undefined' ? 'undefined' : typeof_default()(rules)) !== 'object' || Array.isArray(rules)) {
2028
- throw new Error('Rules must be an object');
2029
- }
2030
- this.rules = {};
2031
- var z = void 0;
2032
- var item = void 0;
2033
- for (z in rules) {
2034
- if (rules.hasOwnProperty(z)) {
2035
- item = rules[z];
2036
- this.rules[z] = Array.isArray(item) ? item : [item];
2037
- }
2038
- }
2039
- },
2040
- validate: function validate(source_) {
2041
- var _this = this;
2042
-
2043
- var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2044
- var oc = arguments[2];
2045
-
2046
- var source = source_;
2047
- var options = o;
2048
- var callback = oc;
2049
- if (typeof options === 'function') {
2050
- callback = options;
2051
- options = {};
2052
- }
2053
- if (!this.rules || Object.keys(this.rules).length === 0) {
2054
- if (callback) {
2055
- callback();
2056
- }
2057
- return;
2058
- }
2059
- function complete(results) {
2060
- var i = void 0;
2061
- var field = void 0;
2062
- var errors = [];
2063
- var fields = {};
2064
-
2065
- function add(e) {
2066
- if (Array.isArray(e)) {
2067
- errors = errors.concat.apply(errors, e);
2068
- } else {
2069
- errors.push(e);
2070
- }
2071
- }
2072
-
2073
- for (i = 0; i < results.length; i++) {
2074
- add(results[i]);
2075
- }
2076
- if (!errors.length) {
2077
- errors = null;
2078
- fields = null;
2079
- } else {
2080
- for (i = 0; i < errors.length; i++) {
2081
- field = errors[i].field;
2082
- fields[field] = fields[field] || [];
2083
- fields[field].push(errors[i]);
2084
- }
2085
- }
2086
- callback(errors, fields);
2087
- }
2088
-
2089
- if (options.messages) {
2090
- var messages = this.messages();
2091
- if (messages === messages_messages) {
2092
- messages = newMessages();
2093
- }
2094
- deepMerge(messages, options.messages);
2095
- options.messages = messages;
2096
- } else {
2097
- options.messages = this.messages();
2098
- }
2099
- var arr = void 0;
2100
- var value = void 0;
2101
- var series = {};
2102
- var keys = options.keys || Object.keys(this.rules);
2103
- keys.forEach(function (z) {
2104
- arr = _this.rules[z];
2105
- value = source[z];
2106
- arr.forEach(function (r) {
2107
- var rule = r;
2108
- if (typeof rule.transform === 'function') {
2109
- if (source === source_) {
2110
- source = extends_default()({}, source);
2111
- }
2112
- value = source[z] = rule.transform(value);
2113
- }
2114
- if (typeof rule === 'function') {
2115
- rule = {
2116
- validator: rule
2117
- };
2118
- } else {
2119
- rule = extends_default()({}, rule);
2120
- }
2121
- rule.validator = _this.getValidationMethod(rule);
2122
- rule.field = z;
2123
- rule.fullField = rule.fullField || z;
2124
- rule.type = _this.getType(rule);
2125
- if (!rule.validator) {
2126
- return;
2127
- }
2128
- series[z] = series[z] || [];
2129
- series[z].push({
2130
- rule: rule,
2131
- value: value,
2132
- source: source,
2133
- field: z
2134
- });
2135
- });
2136
- });
2137
- var errorFields = {};
2138
- asyncMap(series, options, function (data, doIt) {
2139
- var rule = data.rule;
2140
- var deep = (rule.type === 'object' || rule.type === 'array') && (typeof_default()(rule.fields) === 'object' || typeof_default()(rule.defaultField) === 'object');
2141
- deep = deep && (rule.required || !rule.required && data.value);
2142
- rule.field = data.field;
2143
- function addFullfield(key, schema) {
2144
- return extends_default()({}, schema, {
2145
- fullField: rule.fullField + '.' + key
2146
- });
2147
- }
2148
-
2149
- function cb() {
2150
- var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
2151
-
2152
- var errors = e;
2153
- if (!Array.isArray(errors)) {
2154
- errors = [errors];
2155
- }
2156
- if (errors.length) {
2157
- warning('async-validator:', errors);
2158
- }
2159
- if (errors.length && rule.message) {
2160
- errors = [].concat(rule.message);
2161
- }
2162
-
2163
- errors = errors.map(complementError(rule));
2164
-
2165
- if (options.first && errors.length) {
2166
- errorFields[rule.field] = 1;
2167
- return doIt(errors);
2168
- }
2169
- if (!deep) {
2170
- doIt(errors);
2171
- } else {
2172
- // if rule is required but the target object
2173
- // does not exist fail at the rule level and don't
2174
- // go deeper
2175
- if (rule.required && !data.value) {
2176
- if (rule.message) {
2177
- errors = [].concat(rule.message).map(complementError(rule));
2178
- } else if (options.error) {
2179
- errors = [options.error(rule, format(options.messages.required, rule.field))];
2180
- } else {
2181
- errors = [];
2182
- }
2183
- return doIt(errors);
2184
- }
2185
-
2186
- var fieldsSchema = {};
2187
- if (rule.defaultField) {
2188
- for (var k in data.value) {
2189
- if (data.value.hasOwnProperty(k)) {
2190
- fieldsSchema[k] = rule.defaultField;
2191
- }
2192
- }
2193
- }
2194
- fieldsSchema = extends_default()({}, fieldsSchema, data.rule.fields);
2195
- for (var f in fieldsSchema) {
2196
- if (fieldsSchema.hasOwnProperty(f)) {
2197
- var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
2198
- fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
2199
- }
2200
- }
2201
- var schema = new Schema(fieldsSchema);
2202
- schema.messages(options.messages);
2203
- if (data.rule.options) {
2204
- data.rule.options.messages = options.messages;
2205
- data.rule.options.error = options.error;
2206
- }
2207
- schema.validate(data.value, data.rule.options || options, function (errs) {
2208
- doIt(errs && errs.length ? errors.concat(errs) : errs);
2209
- });
2210
- }
2211
- }
2212
-
2213
- var res = rule.validator(rule, data.value, cb, data.source, options);
2214
- if (res && res.then) {
2215
- res.then(function () {
2216
- return cb();
2217
- }, function (e) {
2218
- return cb(e);
2219
- });
2220
- }
2221
- }, function (results) {
2222
- complete(results);
2223
- });
2224
- },
2225
- getType: function getType(rule) {
2226
- if (rule.type === undefined && rule.pattern instanceof RegExp) {
2227
- rule.type = 'pattern';
2228
- }
2229
- if (typeof rule.validator !== 'function' && rule.type && !es_validator.hasOwnProperty(rule.type)) {
2230
- throw new Error(format('Unknown rule type %s', rule.type));
2231
- }
2232
- return rule.type || 'string';
2233
- },
2234
- getValidationMethod: function getValidationMethod(rule) {
2235
- if (typeof rule.validator === 'function') {
2236
- return rule.validator;
2237
- }
2238
- var keys = Object.keys(rule);
2239
- var messageIndex = keys.indexOf('message');
2240
- if (messageIndex !== -1) {
2241
- keys.splice(messageIndex, 1);
2242
- }
2243
- if (keys.length === 1 && keys[0] === 'required') {
2244
- return es_validator.required;
2245
- }
2246
- return es_validator[this.getType(rule)] || false;
2247
- }
2248
- };
2249
-
2250
- Schema.register = function register(type, validator) {
2251
- if (typeof validator !== 'function') {
2252
- throw new Error('Cannot register a validator by type, validator is not a function');
2253
- }
2254
- es_validator[type] = validator;
2255
- };
2256
-
2257
- Schema.messages = messages_messages;
2258
-
2259
- /* harmony default export */ var es = __webpack_exports__["default"] = (Schema);
2260
-
2261
- /***/ }),
2262
-
2263
- /***/ "a3de":
2264
- /***/ (function(module, exports, __webpack_require__) {
2265
-
2266
- "use strict";
2267
- /**
2268
- * Copyright (c) 2015, Facebook, Inc.
2269
- * All rights reserved.
2270
- *
2271
- * This source code is licensed under the BSD-style license found in the
2272
- * LICENSE file in the root directory of this source tree. An additional grant
2273
- * of patent rights can be found in the PATENTS file in the same directory.
2274
- *
2275
- * @providesModule ExecutionEnvironment
2276
- */
2277
-
2278
- /*jslint evil: true */
2279
-
2280
-
2281
-
2282
- var canUseDOM = !!(
2283
- typeof window !== 'undefined' &&
2284
- window.document &&
2285
- window.document.createElement
2286
- );
2287
-
2288
- /**
2289
- * Simple, lightweight module assisting with the detection and context of
2290
- * Worker. Helps avoid circular dependencies and allows code to reason about
2291
- * whether or not they are in a Worker, even if they never include the main
2292
- * `ReactWorker` dependency.
2293
- */
2294
- var ExecutionEnvironment = {
2295
-
2296
- canUseDOM: canUseDOM,
2297
-
2298
- canUseWorkers: typeof Worker !== 'undefined',
2299
-
2300
- canUseEventListeners:
2301
- canUseDOM && !!(window.addEventListener || window.attachEvent),
2302
-
2303
- canUseViewport: canUseDOM && !!window.screen,
2304
-
2305
- isInWorker: !canUseDOM // For now, this is true - might change in the future.
2306
-
2307
- };
2308
-
2309
- module.exports = ExecutionEnvironment;
2310
-
2311
-
2312
- /***/ }),
2313
-
2314
- /***/ "b9c7":
2315
- /***/ (function(module, exports, __webpack_require__) {
2316
-
2317
- __webpack_require__("e507");
2318
- module.exports = __webpack_require__("5524").Object.assign;
2319
-
2320
-
2321
- /***/ }),
2322
-
2323
- /***/ "c098":
2324
- /***/ (function(module, exports, __webpack_require__) {
2325
-
2326
- module.exports = __webpack_require__("d4af");
2327
-
2328
-
2329
- /***/ }),
2330
-
2331
- /***/ "c8ba":
2332
- /***/ (function(module, exports) {
2333
-
2334
- var g;
2335
-
2336
- // This works in non-strict mode
2337
- g = (function() {
2338
- return this;
2339
- })();
2340
-
2341
- try {
2342
- // This works if eval is allowed (see CSP)
2343
- g = g || new Function("return this")();
2344
- } catch (e) {
2345
- // This works if the window reference is available
2346
- if (typeof window === "object") g = window;
2347
- }
2348
-
2349
- // g can still be undefined, but nothing to do about it...
2350
- // We return undefined, instead of nothing here, so it's
2351
- // easier to handle this case. if(!global) { ...}
2352
-
2353
- module.exports = g;
2354
-
2355
-
2356
- /***/ }),
2357
-
2358
- /***/ "d4af":
2359
- /***/ (function(module, exports, __webpack_require__) {
2360
-
2361
- "use strict";
2362
- /**
2363
- * Copyright (c) 2015, Facebook, Inc.
2364
- * All rights reserved.
2365
- *
2366
- * This source code is licensed under the BSD-style license found in the
2367
- * LICENSE file in the root directory of this source tree. An additional grant
2368
- * of patent rights can be found in the PATENTS file in the same directory.
2369
- *
2370
- * @providesModule normalizeWheel
2371
- * @typechecks
2372
- */
2373
-
2374
-
2375
-
2376
- var UserAgent_DEPRECATED = __webpack_require__("8eb7");
2377
-
2378
- var isEventSupported = __webpack_require__("7b3e");
2379
-
2380
-
2381
- // Reasonable defaults
2382
- var PIXEL_STEP = 10;
2383
- var LINE_HEIGHT = 40;
2384
- var PAGE_HEIGHT = 800;
2385
-
2386
- /**
2387
- * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
2388
- * complicated, thus this doc is long and (hopefully) detailed enough to answer
2389
- * your questions.
2390
- *
2391
- * If you need to react to the mouse wheel in a predictable way, this code is
2392
- * like your bestest friend. * hugs *
2393
- *
2394
- * As of today, there are 4 DOM event types you can listen to:
2395
- *
2396
- * 'wheel' -- Chrome(31+), FF(17+), IE(9+)
2397
- * 'mousewheel' -- Chrome, IE(6+), Opera, Safari
2398
- * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
2399
- * 'DOMMouseScroll' -- FF(0.9.7+) since 2003
2400
- *
2401
- * So what to do? The is the best:
2402
- *
2403
- * normalizeWheel.getEventType();
2404
- *
2405
- * In your event callback, use this code to get sane interpretation of the
2406
- * deltas. This code will return an object with properties:
2407
- *
2408
- * spinX -- normalized spin speed (use for zoom) - x plane
2409
- * spinY -- " - y plane
2410
- * pixelX -- normalized distance (to pixels) - x plane
2411
- * pixelY -- " - y plane
2412
- *
2413
- * Wheel values are provided by the browser assuming you are using the wheel to
2414
- * scroll a web page by a number of lines or pixels (or pages). Values can vary
2415
- * significantly on different platforms and browsers, forgetting that you can
2416
- * scroll at different speeds. Some devices (like trackpads) emit more events
2417
- * at smaller increments with fine granularity, and some emit massive jumps with
2418
- * linear speed or acceleration.
2419
- *
2420
- * This code does its best to normalize the deltas for you:
2421
- *
2422
- * - spin is trying to normalize how far the wheel was spun (or trackpad
2423
- * dragged). This is super useful for zoom support where you want to
2424
- * throw away the chunky scroll steps on the PC and make those equal to
2425
- * the slow and smooth tiny steps on the Mac. Key data: This code tries to
2426
- * resolve a single slow step on a wheel to 1.
2427
- *
2428
- * - pixel is normalizing the desired scroll delta in pixel units. You'll
2429
- * get the crazy differences between browsers, but at least it'll be in
2430
- * pixels!
2431
- *
2432
- * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
2433
- * should translate to positive value zooming IN, negative zooming OUT.
2434
- * This matches the newer 'wheel' event.
2435
- *
2436
- * Why are there spinX, spinY (or pixels)?
2437
- *
2438
- * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
2439
- * with a mouse. It results in side-scrolling in the browser by default.
2440
- *
2441
- * - spinY is what you expect -- it's the classic axis of a mouse wheel.
2442
- *
2443
- * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
2444
- * probably is by browsers in conjunction with fancy 3D controllers .. but
2445
- * you know.
2446
- *
2447
- * Implementation info:
2448
- *
2449
- * Examples of 'wheel' event if you scroll slowly (down) by one step with an
2450
- * average mouse:
2451
- *
2452
- * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
2453
- * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
2454
- * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
2455
- * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
2456
- * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
2457
- *
2458
- * On the trackpad:
2459
- *
2460
- * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
2461
- * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
2462
- *
2463
- * On other/older browsers.. it's more complicated as there can be multiple and
2464
- * also missing delta values.
2465
- *
2466
- * The 'wheel' event is more standard:
2467
- *
2468
- * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
2469
- *
2470
- * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
2471
- * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
2472
- * backward compatibility with older events. Those other values help us
2473
- * better normalize spin speed. Example of what the browsers provide:
2474
- *
2475
- * | event.wheelDelta | event.detail
2476
- * ------------------+------------------+--------------
2477
- * Safari v5/OS X | -120 | 0
2478
- * Safari v5/Win7 | -120 | 0
2479
- * Chrome v17/OS X | -120 | 0
2480
- * Chrome v17/Win7 | -120 | 0
2481
- * IE9/Win7 | -120 | undefined
2482
- * Firefox v4/OS X | undefined | 1
2483
- * Firefox v4/Win7 | undefined | 3
2484
- *
2485
- */
2486
- function normalizeWheel(/*object*/ event) /*object*/ {
2487
- var sX = 0, sY = 0, // spinX, spinY
2488
- pX = 0, pY = 0; // pixelX, pixelY
2489
-
2490
- // Legacy
2491
- if ('detail' in event) { sY = event.detail; }
2492
- if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }
2493
- if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
2494
- if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
2495
-
2496
- // side scrolling on FF with DOMMouseScroll
2497
- if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
2498
- sX = sY;
2499
- sY = 0;
2500
- }
2501
-
2502
- pX = sX * PIXEL_STEP;
2503
- pY = sY * PIXEL_STEP;
2504
-
2505
- if ('deltaY' in event) { pY = event.deltaY; }
2506
- if ('deltaX' in event) { pX = event.deltaX; }
2507
-
2508
- if ((pX || pY) && event.deltaMode) {
2509
- if (event.deltaMode == 1) { // delta in LINE units
2510
- pX *= LINE_HEIGHT;
2511
- pY *= LINE_HEIGHT;
2512
- } else { // delta in PAGE units
2513
- pX *= PAGE_HEIGHT;
2514
- pY *= PAGE_HEIGHT;
2515
- }
2516
- }
2517
-
2518
- // Fall-back if spin cannot be determined
2519
- if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
2520
- if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
2521
-
2522
- return { spinX : sX,
2523
- spinY : sY,
2524
- pixelX : pX,
2525
- pixelY : pY };
2526
- }
2527
-
2528
-
2529
- /**
2530
- * The best combination if you prefer spinX + spinY normalization. It favors
2531
- * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
2532
- * 'wheel' event, making spin speed determination impossible.
2533
- */
2534
- normalizeWheel.getEventType = function() /*string*/ {
2535
- return (UserAgent_DEPRECATED.firefox())
2536
- ? 'DOMMouseScroll'
2537
- : (isEventSupported('wheel'))
2538
- ? 'wheel'
2539
- : 'mousewheel';
2540
- };
2541
-
2542
- module.exports = normalizeWheel;
2543
-
2544
-
2545
- /***/ }),
2546
-
2547
- /***/ "df7c":
2548
- /***/ (function(module, exports, __webpack_require__) {
2549
-
2550
- /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
2551
- // backported and transplited with Babel, with backwards-compat fixes
2552
-
2553
- // Copyright Joyent, Inc. and other Node contributors.
2554
- //
2555
- // Permission is hereby granted, free of charge, to any person obtaining a
2556
- // copy of this software and associated documentation files (the
2557
- // "Software"), to deal in the Software without restriction, including
2558
- // without limitation the rights to use, copy, modify, merge, publish,
2559
- // distribute, sublicense, and/or sell copies of the Software, and to permit
2560
- // persons to whom the Software is furnished to do so, subject to the
2561
- // following conditions:
2562
- //
2563
- // The above copyright notice and this permission notice shall be included
2564
- // in all copies or substantial portions of the Software.
2565
- //
2566
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2567
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2568
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
2569
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
2570
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
2571
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2572
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
2573
-
2574
- // resolves . and .. elements in a path array with directory names there
2575
- // must be no slashes, empty elements, or device names (c:\) in the array
2576
- // (so also no leading and trailing slashes - it does not distinguish
2577
- // relative and absolute paths)
2578
- function normalizeArray(parts, allowAboveRoot) {
2579
- // if the path tries to go above the root, `up` ends up > 0
2580
- var up = 0;
2581
- for (var i = parts.length - 1; i >= 0; i--) {
2582
- var last = parts[i];
2583
- if (last === '.') {
2584
- parts.splice(i, 1);
2585
- } else if (last === '..') {
2586
- parts.splice(i, 1);
2587
- up++;
2588
- } else if (up) {
2589
- parts.splice(i, 1);
2590
- up--;
2591
- }
2592
- }
2593
-
2594
- // if the path is allowed to go above the root, restore leading ..s
2595
- if (allowAboveRoot) {
2596
- for (; up--; up) {
2597
- parts.unshift('..');
2598
- }
2599
- }
2600
-
2601
- return parts;
2602
- }
2603
-
2604
- // path.resolve([from ...], to)
2605
- // posix version
2606
- exports.resolve = function() {
2607
- var resolvedPath = '',
2608
- resolvedAbsolute = false;
2609
-
2610
- for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
2611
- var path = (i >= 0) ? arguments[i] : process.cwd();
2612
-
2613
- // Skip empty and invalid entries
2614
- if (typeof path !== 'string') {
2615
- throw new TypeError('Arguments to path.resolve must be strings');
2616
- } else if (!path) {
2617
- continue;
2618
- }
2619
-
2620
- resolvedPath = path + '/' + resolvedPath;
2621
- resolvedAbsolute = path.charAt(0) === '/';
2622
- }
2623
-
2624
- // At this point the path should be resolved to a full absolute path, but
2625
- // handle relative paths to be safe (might happen when process.cwd() fails)
2626
-
2627
- // Normalize the path
2628
- resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
2629
- return !!p;
2630
- }), !resolvedAbsolute).join('/');
2631
-
2632
- return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
2633
- };
2634
-
2635
- // path.normalize(path)
2636
- // posix version
2637
- exports.normalize = function(path) {
2638
- var isAbsolute = exports.isAbsolute(path),
2639
- trailingSlash = substr(path, -1) === '/';
2640
-
2641
- // Normalize the path
2642
- path = normalizeArray(filter(path.split('/'), function(p) {
2643
- return !!p;
2644
- }), !isAbsolute).join('/');
2645
-
2646
- if (!path && !isAbsolute) {
2647
- path = '.';
2648
- }
2649
- if (path && trailingSlash) {
2650
- path += '/';
2651
- }
2652
-
2653
- return (isAbsolute ? '/' : '') + path;
2654
- };
2655
-
2656
- // posix version
2657
- exports.isAbsolute = function(path) {
2658
- return path.charAt(0) === '/';
2659
- };
2660
-
2661
- // posix version
2662
- exports.join = function() {
2663
- var paths = Array.prototype.slice.call(arguments, 0);
2664
- return exports.normalize(filter(paths, function(p, index) {
2665
- if (typeof p !== 'string') {
2666
- throw new TypeError('Arguments to path.join must be strings');
2667
- }
2668
- return p;
2669
- }).join('/'));
2670
- };
2671
-
2672
-
2673
- // path.relative(from, to)
2674
- // posix version
2675
- exports.relative = function(from, to) {
2676
- from = exports.resolve(from).substr(1);
2677
- to = exports.resolve(to).substr(1);
2678
-
2679
- function trim(arr) {
2680
- var start = 0;
2681
- for (; start < arr.length; start++) {
2682
- if (arr[start] !== '') break;
2683
- }
2684
-
2685
- var end = arr.length - 1;
2686
- for (; end >= 0; end--) {
2687
- if (arr[end] !== '') break;
2688
- }
2689
-
2690
- if (start > end) return [];
2691
- return arr.slice(start, end - start + 1);
2692
- }
2693
-
2694
- var fromParts = trim(from.split('/'));
2695
- var toParts = trim(to.split('/'));
2696
-
2697
- var length = Math.min(fromParts.length, toParts.length);
2698
- var samePartsLength = length;
2699
- for (var i = 0; i < length; i++) {
2700
- if (fromParts[i] !== toParts[i]) {
2701
- samePartsLength = i;
2702
- break;
2703
- }
2704
- }
2705
-
2706
- var outputParts = [];
2707
- for (var i = samePartsLength; i < fromParts.length; i++) {
2708
- outputParts.push('..');
2709
- }
2710
-
2711
- outputParts = outputParts.concat(toParts.slice(samePartsLength));
2712
-
2713
- return outputParts.join('/');
2714
- };
2715
-
2716
- exports.sep = '/';
2717
- exports.delimiter = ':';
2718
-
2719
- exports.dirname = function (path) {
2720
- if (typeof path !== 'string') path = path + '';
2721
- if (path.length === 0) return '.';
2722
- var code = path.charCodeAt(0);
2723
- var hasRoot = code === 47 /*/*/;
2724
- var end = -1;
2725
- var matchedSlash = true;
2726
- for (var i = path.length - 1; i >= 1; --i) {
2727
- code = path.charCodeAt(i);
2728
- if (code === 47 /*/*/) {
2729
- if (!matchedSlash) {
2730
- end = i;
2731
- break;
2732
- }
2733
- } else {
2734
- // We saw the first non-path separator
2735
- matchedSlash = false;
2736
- }
2737
- }
2738
-
2739
- if (end === -1) return hasRoot ? '/' : '.';
2740
- if (hasRoot && end === 1) {
2741
- // return '//';
2742
- // Backwards-compat fix:
2743
- return '/';
2744
- }
2745
- return path.slice(0, end);
2746
- };
2747
-
2748
- function basename(path) {
2749
- if (typeof path !== 'string') path = path + '';
2750
-
2751
- var start = 0;
2752
- var end = -1;
2753
- var matchedSlash = true;
2754
- var i;
2755
-
2756
- for (i = path.length - 1; i >= 0; --i) {
2757
- if (path.charCodeAt(i) === 47 /*/*/) {
2758
- // If we reached a path separator that was not part of a set of path
2759
- // separators at the end of the string, stop now
2760
- if (!matchedSlash) {
2761
- start = i + 1;
2762
- break;
2763
- }
2764
- } else if (end === -1) {
2765
- // We saw the first non-path separator, mark this as the end of our
2766
- // path component
2767
- matchedSlash = false;
2768
- end = i + 1;
2769
- }
2770
- }
2771
-
2772
- if (end === -1) return '';
2773
- return path.slice(start, end);
2774
- }
2775
-
2776
- // Uses a mixed approach for backwards-compatibility, as ext behavior changed
2777
- // in new Node.js versions, so only basename() above is backported here
2778
- exports.basename = function (path, ext) {
2779
- var f = basename(path);
2780
- if (ext && f.substr(-1 * ext.length) === ext) {
2781
- f = f.substr(0, f.length - ext.length);
2782
- }
2783
- return f;
2784
- };
2785
-
2786
- exports.extname = function (path) {
2787
- if (typeof path !== 'string') path = path + '';
2788
- var startDot = -1;
2789
- var startPart = 0;
2790
- var end = -1;
2791
- var matchedSlash = true;
2792
- // Track the state of characters (if any) we see before our first dot and
2793
- // after any path separator we find
2794
- var preDotState = 0;
2795
- for (var i = path.length - 1; i >= 0; --i) {
2796
- var code = path.charCodeAt(i);
2797
- if (code === 47 /*/*/) {
2798
- // If we reached a path separator that was not part of a set of path
2799
- // separators at the end of the string, stop now
2800
- if (!matchedSlash) {
2801
- startPart = i + 1;
2802
- break;
2803
- }
2804
- continue;
2805
- }
2806
- if (end === -1) {
2807
- // We saw the first non-path separator, mark this as the end of our
2808
- // extension
2809
- matchedSlash = false;
2810
- end = i + 1;
2811
- }
2812
- if (code === 46 /*.*/) {
2813
- // If this is our first dot, mark it as the start of our extension
2814
- if (startDot === -1)
2815
- startDot = i;
2816
- else if (preDotState !== 1)
2817
- preDotState = 1;
2818
- } else if (startDot !== -1) {
2819
- // We saw a non-dot and non-path separator before our dot, so we should
2820
- // have a good chance at having a non-empty extension
2821
- preDotState = -1;
2822
- }
2823
- }
2824
-
2825
- if (startDot === -1 || end === -1 ||
2826
- // We saw a non-dot character immediately before the dot
2827
- preDotState === 0 ||
2828
- // The (right-most) trimmed path component is exactly '..'
2829
- preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
2830
- return '';
2831
- }
2832
- return path.slice(startDot, end);
2833
- };
2834
-
2835
- function filter (xs, f) {
2836
- if (xs.filter) return xs.filter(f);
2837
- var res = [];
2838
- for (var i = 0; i < xs.length; i++) {
2839
- if (f(xs[i], i, xs)) res.push(xs[i]);
2840
- }
2841
- return res;
2842
- }
2843
-
2844
- // String.prototype.substr - negative index don't work in IE8
2845
- var substr = 'ab'.substr(-1) === 'b'
2846
- ? function (str, start, len) { return str.substr(start, len) }
2847
- : function (str, start, len) {
2848
- if (start < 0) start = str.length + start;
2849
- return str.substr(start, len);
2850
- }
2851
- ;
2852
-
2853
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362")))
2854
-
2855
- /***/ }),
2856
-
2857
- /***/ "e507":
2858
- /***/ (function(module, exports, __webpack_require__) {
2859
-
2860
- // 19.1.3.1 Object.assign(target, source)
2861
- var $export = __webpack_require__("512c");
2862
-
2863
- $export($export.S + $export.F, 'Object', { assign: __webpack_require__("072d") });
2864
-
2865
-
2866
- /***/ }),
2867
-
2868
- /***/ "fb15":
2869
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2870
-
2871
- "use strict";
2872
- // ESM COMPAT FLAG
2873
- __webpack_require__.r(__webpack_exports__);
2874
-
2875
- // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
2876
- // This file is imported into lib/wc client bundles.
2877
-
2878
- if (typeof window !== 'undefined') {
2879
- var currentScript = window.document.currentScript
2880
- if (true) {
2881
- var getCurrentScript = __webpack_require__("8875")
2882
- currentScript = getCurrentScript()
2883
-
2884
- // for backward compatibility, because previously we directly included the polyfill
2885
- if (!('currentScript' in document)) {
2886
- Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
2887
- }
2888
- }
2889
-
2890
- var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
2891
- if (src) {
2892
- __webpack_require__.p = src[1] // eslint-disable-line
2893
- }
2894
- }
2895
-
2896
- // Indicate to webpack that this file can be concatenated
2897
- /* harmony default export */ var setPublicPath = (null);
2898
-
2899
- // EXTERNAL MODULE: ./packages/index.js + 180 modules
2900
- var packages_0 = __webpack_require__("3a0d");
2901
-
2902
- // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
2903
-
2904
-
2905
- /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (packages_0["a" /* default */]);
2906
-
2907
-
2908
-
2909
- /***/ })
2910
-
2911
- }]);