cy-element-ui 1.0.72 → 1.0.73

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 (111) hide show
  1. package/lib/alert.js +4 -4
  2. package/lib/aside.js +77 -77
  3. package/lib/autocomplete.js +3940 -159
  4. package/lib/avatar.js +108 -108
  5. package/lib/backtop.js +110 -110
  6. package/lib/badge.js +108 -108
  7. package/lib/breadcrumb-item.js +4 -4
  8. package/lib/breadcrumb.js +4 -4
  9. package/lib/button-group.js +4 -4
  10. package/lib/button.js +4 -4
  11. package/lib/calendar.js +1545 -46
  12. package/lib/card.js +96 -96
  13. package/lib/carousel-item.js +452 -108
  14. package/lib/carousel.js +185 -116
  15. package/lib/cascader-panel.js +2270 -187
  16. package/lib/cascader.js +6452 -275
  17. package/lib/checkbox-button.js +43 -11
  18. package/lib/checkbox-group.js +47 -15
  19. package/lib/checkbox.js +47 -15
  20. package/lib/col.js +2 -2
  21. package/lib/collapse-item.js +815 -110
  22. package/lib/collapse.js +108 -108
  23. package/lib/color-picker.js +3953 -153
  24. package/lib/container.js +88 -88
  25. package/lib/date-picker.js +5231 -420
  26. package/lib/descriptions-item.js +2 -2
  27. package/lib/descriptions.js +63 -8
  28. package/lib/dialog.js +1200 -22
  29. package/lib/directives/repeat-click.js +2 -2
  30. package/lib/divider.js +104 -104
  31. package/lib/drawer.js +875 -105
  32. package/lib/dropdown-item.js +43 -11
  33. package/lib/dropdown-menu.js +2274 -72
  34. package/lib/dropdown.js +1072 -136
  35. package/lib/element-ui.common.js +26229 -13291
  36. package/lib/empty.js +603 -7
  37. package/lib/fileUpload.js +2478 -110
  38. package/lib/footer.js +77 -77
  39. package/lib/form-item.js +418 -28
  40. package/lib/form.js +29 -15
  41. package/lib/header.js +77 -77
  42. package/lib/icon.js +4 -4
  43. package/lib/image.js +1376 -49
  44. package/lib/index.js +1 -1
  45. package/lib/infinite-scroll.js +311 -21
  46. package/lib/input-number.js +1423 -34
  47. package/lib/input.js +507 -37
  48. package/lib/link.js +4 -4
  49. package/lib/loading.js +804 -67
  50. package/lib/locale/format.js +1 -1
  51. package/lib/locale/index.js +1 -1
  52. package/lib/main.js +64 -64
  53. package/lib/menu-item-group.js +4 -4
  54. package/lib/menu-item.js +2925 -41
  55. package/lib/menu.js +745 -54
  56. package/lib/message-box.js +2536 -79
  57. package/lib/message.js +1102 -24
  58. package/lib/mixins/locale.js +1 -1
  59. package/lib/mixins/migrating.js +1 -1
  60. package/lib/notification.js +1102 -25
  61. package/lib/option-group.js +43 -11
  62. package/lib/option.js +394 -18
  63. package/lib/page-header.js +683 -87
  64. package/lib/pagination.js +6078 -139
  65. package/lib/popconfirm.js +3508 -219
  66. package/lib/popover.js +2604 -79
  67. package/lib/progress.js +4 -4
  68. package/lib/radio-button.js +43 -11
  69. package/lib/radio-group.js +43 -11
  70. package/lib/radio.js +47 -15
  71. package/lib/rate.js +756 -113
  72. package/lib/result.js +4 -4
  73. package/lib/row.js +2 -2
  74. package/lib/scrollbar.js +735 -50
  75. package/lib/select.js +4352 -209
  76. package/lib/selectDisplayInput.js +108 -108
  77. package/lib/skeleton-item.js +2 -2
  78. package/lib/skeleton.js +108 -108
  79. package/lib/slider.js +4266 -120
  80. package/lib/spinner.js +4 -4
  81. package/lib/statistic.js +9605 -117
  82. package/lib/step.js +108 -108
  83. package/lib/steps.js +514 -99
  84. package/lib/subTitle.js +91 -91
  85. package/lib/submenu.js +2444 -123
  86. package/lib/switch.js +476 -21
  87. package/lib/tab-pane.js +4 -4
  88. package/lib/tabDialog.js +1544 -18
  89. package/lib/table-column.js +881 -33
  90. package/lib/table.js +4469 -426
  91. package/lib/tabs.js +425 -12
  92. package/lib/tag.js +4 -4
  93. package/lib/time-picker.js +5013 -285
  94. package/lib/time-select.js +4945 -177
  95. package/lib/timeline-item.js +108 -108
  96. package/lib/timeline.js +82 -82
  97. package/lib/tooltip.js +2566 -41
  98. package/lib/transfer.js +2135 -141
  99. package/lib/transitions/collapse-transition.js +1 -1
  100. package/lib/tree.js +1372 -55
  101. package/lib/treeSelect.js +3420 -105
  102. package/lib/upload.js +1047 -28
  103. package/lib/utils/clickoutside.js +1 -1
  104. package/lib/utils/date-util.js +2 -2
  105. package/lib/utils/popup/index.js +2 -2
  106. package/lib/utils/popup/popup-manager.js +1 -1
  107. package/lib/utils/util.js +1 -1
  108. package/lib/utils/vdom.js +1 -1
  109. package/lib/utils/vue-popper.js +1 -1
  110. package/package.json +1 -1
  111. package/src/index.js +1 -1
package/lib/slider.js CHANGED
@@ -85,135 +85,4285 @@ module.exports =
85
85
  /******/ return __webpack_require__(__webpack_require__.s = 67);
86
86
  /******/ })
87
87
  /************************************************************************/
88
- /******/ ({
88
+ /******/ ([
89
+ /* 0 */
90
+ /***/ (function(module, exports) {
91
+
92
+ module.exports = require("vue");
93
+
94
+ /***/ }),
95
+ /* 1 */
96
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
97
+
98
+ "use strict";
99
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
100
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
102
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
103
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
104
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
105
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
106
+ /* unused harmony export setStyle */
107
+ /* unused harmony export isScroll */
108
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
109
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
110
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
111
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
112
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
113
+
114
+ /* istanbul ignore next */
115
+
116
+
117
+
118
+ var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
119
+ var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
120
+ var MOZ_HACK_REGEXP = /^moz([A-Z])/;
121
+ var ieVersion = isServer ? 0 : Number(document.documentMode);
122
+
123
+ /* istanbul ignore next */
124
+ var trim = function trim(string) {
125
+ return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
126
+ };
127
+ /* istanbul ignore next */
128
+ var camelCase = function camelCase(name) {
129
+ return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
130
+ return offset ? letter.toUpperCase() : letter;
131
+ }).replace(MOZ_HACK_REGEXP, 'Moz$1');
132
+ };
133
+
134
+ /* istanbul ignore next */
135
+ var on = function () {
136
+ if (!isServer && document.addEventListener) {
137
+ return function (element, event, handler) {
138
+ if (element && event && handler) {
139
+ element.addEventListener(event, handler, false);
140
+ }
141
+ };
142
+ } else {
143
+ return function (element, event, handler) {
144
+ if (element && event && handler) {
145
+ element.attachEvent('on' + event, handler);
146
+ }
147
+ };
148
+ }
149
+ }();
150
+
151
+ /* istanbul ignore next */
152
+ var off = function () {
153
+ if (!isServer && document.removeEventListener) {
154
+ return function (element, event, handler) {
155
+ if (element && event) {
156
+ element.removeEventListener(event, handler, false);
157
+ }
158
+ };
159
+ } else {
160
+ return function (element, event, handler) {
161
+ if (element && event) {
162
+ element.detachEvent('on' + event, handler);
163
+ }
164
+ };
165
+ }
166
+ }();
167
+
168
+ /* istanbul ignore next */
169
+ var once = function once(el, event, fn) {
170
+ var listener = function listener() {
171
+ if (fn) {
172
+ fn.apply(this, arguments);
173
+ }
174
+ off(el, event, listener);
175
+ };
176
+ on(el, event, listener);
177
+ };
178
+
179
+ /* istanbul ignore next */
180
+ function hasClass(el, cls) {
181
+ if (!el || !cls) return false;
182
+ if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
183
+ if (el.classList) {
184
+ return el.classList.contains(cls);
185
+ } else {
186
+ return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
187
+ }
188
+ };
189
+
190
+ /* istanbul ignore next */
191
+ function addClass(el, cls) {
192
+ if (!el) return;
193
+ var curClass = el.className;
194
+ var classes = (cls || '').split(' ');
195
+
196
+ for (var i = 0, j = classes.length; i < j; i++) {
197
+ var clsName = classes[i];
198
+ if (!clsName) continue;
199
+
200
+ if (el.classList) {
201
+ el.classList.add(clsName);
202
+ } else if (!hasClass(el, clsName)) {
203
+ curClass += ' ' + clsName;
204
+ }
205
+ }
206
+ if (!el.classList) {
207
+ el.setAttribute('class', curClass);
208
+ }
209
+ };
210
+
211
+ /* istanbul ignore next */
212
+ function removeClass(el, cls) {
213
+ if (!el || !cls) return;
214
+ var classes = cls.split(' ');
215
+ var curClass = ' ' + el.className + ' ';
216
+
217
+ for (var i = 0, j = classes.length; i < j; i++) {
218
+ var clsName = classes[i];
219
+ if (!clsName) continue;
220
+
221
+ if (el.classList) {
222
+ el.classList.remove(clsName);
223
+ } else if (hasClass(el, clsName)) {
224
+ curClass = curClass.replace(' ' + clsName + ' ', ' ');
225
+ }
226
+ }
227
+ if (!el.classList) {
228
+ el.setAttribute('class', trim(curClass));
229
+ }
230
+ };
231
+
232
+ /* istanbul ignore next */
233
+ var getStyle = ieVersion < 9 ? function (element, styleName) {
234
+ if (isServer) return;
235
+ if (!element || !styleName) return null;
236
+ styleName = camelCase(styleName);
237
+ if (styleName === 'float') {
238
+ styleName = 'styleFloat';
239
+ }
240
+ try {
241
+ switch (styleName) {
242
+ case 'opacity':
243
+ try {
244
+ return element.filters.item('alpha').opacity / 100;
245
+ } catch (e) {
246
+ return 1.0;
247
+ }
248
+ default:
249
+ return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
250
+ }
251
+ } catch (e) {
252
+ return element.style[styleName];
253
+ }
254
+ } : function (element, styleName) {
255
+ if (isServer) return;
256
+ if (!element || !styleName) return null;
257
+ styleName = camelCase(styleName);
258
+ if (styleName === 'float') {
259
+ styleName = 'cssFloat';
260
+ }
261
+ try {
262
+ var computed = document.defaultView.getComputedStyle(element, '');
263
+ return element.style[styleName] || computed ? computed[styleName] : null;
264
+ } catch (e) {
265
+ return element.style[styleName];
266
+ }
267
+ };
268
+
269
+ /* istanbul ignore next */
270
+ function setStyle(element, styleName, value) {
271
+ if (!element || !styleName) return;
272
+
273
+ if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
274
+ for (var prop in styleName) {
275
+ if (styleName.hasOwnProperty(prop)) {
276
+ setStyle(element, prop, styleName[prop]);
277
+ }
278
+ }
279
+ } else {
280
+ styleName = camelCase(styleName);
281
+ if (styleName === 'opacity' && ieVersion < 9) {
282
+ element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
283
+ } else {
284
+ element.style[styleName] = value;
285
+ }
286
+ }
287
+ };
288
+
289
+ var isScroll = function isScroll(el, vertical) {
290
+ if (isServer) return;
291
+
292
+ var determinedDirection = vertical !== null && vertical !== undefined;
293
+ var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
294
+
295
+ return overflow.match(/(scroll|auto|overlay)/);
296
+ };
297
+
298
+ var getScrollContainer = function getScrollContainer(el, vertical) {
299
+ if (isServer) return;
300
+
301
+ var parent = el;
302
+ while (parent) {
303
+ if ([window, document, document.documentElement].includes(parent)) {
304
+ return window;
305
+ }
306
+ if (isScroll(parent, vertical)) {
307
+ return parent;
308
+ }
309
+ parent = parent.parentNode;
310
+ }
311
+
312
+ return parent;
313
+ };
314
+
315
+ var isInContainer = function isInContainer(el, container) {
316
+ if (isServer || !el || !container) return false;
317
+
318
+ var elRect = el.getBoundingClientRect();
319
+ var containerRect = void 0;
320
+
321
+ if ([window, document, document.documentElement, null, undefined].includes(container)) {
322
+ containerRect = {
323
+ top: 0,
324
+ right: window.innerWidth,
325
+ bottom: window.innerHeight,
326
+ left: 0
327
+ };
328
+ } else {
329
+ containerRect = container.getBoundingClientRect();
330
+ }
331
+
332
+ return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
333
+ };
334
+
335
+ /***/ }),
336
+ /* 2 */
337
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
338
+
339
+ "use strict";
340
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
341
+ /* globals __VUE_SSR_CONTEXT__ */
342
+
343
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
344
+ // This module is a runtime utility for cleaner component module output and will
345
+ // be included in the final webpack user bundle.
346
+
347
+ function normalizeComponent(
348
+ scriptExports,
349
+ render,
350
+ staticRenderFns,
351
+ functionalTemplate,
352
+ injectStyles,
353
+ scopeId,
354
+ moduleIdentifier /* server only */,
355
+ shadowMode /* vue-cli only */
356
+ ) {
357
+ // Vue.extend constructor export interop
358
+ var options =
359
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
360
+
361
+ // render functions
362
+ if (render) {
363
+ options.render = render
364
+ options.staticRenderFns = staticRenderFns
365
+ options._compiled = true
366
+ }
367
+
368
+ // functional template
369
+ if (functionalTemplate) {
370
+ options.functional = true
371
+ }
372
+
373
+ // scopedId
374
+ if (scopeId) {
375
+ options._scopeId = 'data-v-' + scopeId
376
+ }
377
+
378
+ var hook
379
+ if (moduleIdentifier) {
380
+ // server build
381
+ hook = function (context) {
382
+ // 2.3 injection
383
+ context =
384
+ context || // cached call
385
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
386
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
387
+ // 2.2 with runInNewContext: true
388
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
389
+ context = __VUE_SSR_CONTEXT__
390
+ }
391
+ // inject component styles
392
+ if (injectStyles) {
393
+ injectStyles.call(this, context)
394
+ }
395
+ // register component module identifier for async chunk inferrence
396
+ if (context && context._registeredComponents) {
397
+ context._registeredComponents.add(moduleIdentifier)
398
+ }
399
+ }
400
+ // used by ssr in case component is cached and beforeCreate
401
+ // never gets called
402
+ options._ssrRegister = hook
403
+ } else if (injectStyles) {
404
+ hook = shadowMode
405
+ ? function () {
406
+ injectStyles.call(
407
+ this,
408
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
409
+ )
410
+ }
411
+ : injectStyles
412
+ }
413
+
414
+ if (hook) {
415
+ if (options.functional) {
416
+ // for template-only hot-reload because in that case the render fn doesn't
417
+ // go through the normalizer
418
+ options._injectStyles = hook
419
+ // register for functional component in vue file
420
+ var originalRender = options.render
421
+ options.render = function renderWithStyleInjection(h, context) {
422
+ hook.call(context)
423
+ return originalRender(h, context)
424
+ }
425
+ } else {
426
+ // inject component registration as beforeCreate hook
427
+ var existing = options.beforeCreate
428
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
429
+ }
430
+ }
431
+
432
+ return {
433
+ exports: scriptExports,
434
+ options: options
435
+ }
436
+ }
437
+
438
+
439
+ /***/ }),
440
+ /* 3 */
441
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
442
+
443
+ "use strict";
444
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
445
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
446
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
447
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
448
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
449
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
450
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
451
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
452
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
453
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
454
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
455
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
456
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
457
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
458
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
459
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
460
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
461
+ /* unused harmony export looseEqual */
462
+ /* unused harmony export arrayEquals */
463
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
464
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
465
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
466
+ /* unused harmony export objToArray */
467
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
468
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
469
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
470
+ /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
471
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
472
+
473
+
474
+
475
+
476
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
477
+
478
+ function noop() {};
479
+
480
+ function hasOwn(obj, key) {
481
+ return hasOwnProperty.call(obj, key);
482
+ };
483
+
484
+ function extend(to, _from) {
485
+ for (var key in _from) {
486
+ to[key] = _from[key];
487
+ }
488
+ return to;
489
+ };
490
+
491
+ function toObject(arr) {
492
+ var res = {};
493
+ for (var i = 0; i < arr.length; i++) {
494
+ if (arr[i]) {
495
+ extend(res, arr[i]);
496
+ }
497
+ }
498
+ return res;
499
+ };
500
+
501
+ var getValueByPath = function getValueByPath(object, prop) {
502
+ prop = prop || '';
503
+ var paths = prop.split('.');
504
+ var current = object;
505
+ var result = null;
506
+ for (var i = 0, j = paths.length; i < j; i++) {
507
+ var path = paths[i];
508
+ if (!current) break;
509
+
510
+ if (i === j - 1) {
511
+ result = current[path];
512
+ break;
513
+ }
514
+ current = current[path];
515
+ }
516
+ return result;
517
+ };
518
+
519
+ function getPropByPath(obj, path, strict) {
520
+ var tempObj = obj;
521
+ path = path.replace(/\[(\w+)\]/g, '.$1');
522
+ path = path.replace(/^\./, '');
523
+
524
+ var keyArr = path.split('.');
525
+ var i = 0;
526
+ for (var len = keyArr.length; i < len - 1; ++i) {
527
+ if (!tempObj && !strict) break;
528
+ var key = keyArr[i];
529
+ if (key in tempObj) {
530
+ tempObj = tempObj[key];
531
+ } else {
532
+ if (strict) {
533
+ throw new Error('please transfer a valid prop path to form item!');
534
+ }
535
+ break;
536
+ }
537
+ }
538
+ return {
539
+ o: tempObj,
540
+ k: keyArr[i],
541
+ v: tempObj ? tempObj[keyArr[i]] : null
542
+ };
543
+ };
544
+
545
+ var generateId = function generateId() {
546
+ return Math.floor(Math.random() * 10000);
547
+ };
548
+
549
+ var valueEquals = function valueEquals(a, b) {
550
+ // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
551
+ if (a === b) return true;
552
+ if (!(a instanceof Array)) return false;
553
+ if (!(b instanceof Array)) return false;
554
+ if (a.length !== b.length) return false;
555
+ for (var i = 0; i !== a.length; ++i) {
556
+ if (a[i] !== b[i]) return false;
557
+ }
558
+ return true;
559
+ };
560
+
561
+ var escapeRegexpString = function escapeRegexpString() {
562
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
563
+ return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
564
+ };
565
+
566
+ // TODO: use native Array.find, Array.findIndex when IE support is dropped
567
+ var arrayFindIndex = function arrayFindIndex(arr, pred) {
568
+ for (var i = 0; i !== arr.length; ++i) {
569
+ if (pred(arr[i])) {
570
+ return i;
571
+ }
572
+ }
573
+ return -1;
574
+ };
575
+
576
+ var arrayFind = function arrayFind(arr, pred) {
577
+ var idx = arrayFindIndex(arr, pred);
578
+ return idx !== -1 ? arr[idx] : undefined;
579
+ };
580
+
581
+ // coerce truthy value to array
582
+ var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
583
+ if (Array.isArray(val)) {
584
+ return val;
585
+ } else if (val) {
586
+ return [val];
587
+ } else {
588
+ return [];
589
+ }
590
+ };
591
+
592
+ var isIE = function isIE() {
593
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
594
+ };
595
+
596
+ var isEdge = function isEdge() {
597
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
598
+ };
599
+
600
+ var isFirefox = function isFirefox() {
601
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
602
+ };
603
+
604
+ var autoprefixer = function autoprefixer(style) {
605
+ if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
606
+ var rules = ['transform', 'transition', 'animation'];
607
+ var prefixes = ['ms-', 'webkit-'];
608
+ rules.forEach(function (rule) {
609
+ var value = style[rule];
610
+ if (rule && value) {
611
+ prefixes.forEach(function (prefix) {
612
+ style[prefix + rule] = value;
613
+ });
614
+ }
615
+ });
616
+ return style;
617
+ };
618
+
619
+ var kebabCase = function kebabCase(str) {
620
+ var hyphenateRE = /([^-])([A-Z])/g;
621
+ return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
622
+ };
623
+
624
+ var capitalize = function capitalize(str) {
625
+ if (!Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
626
+ return str.charAt(0).toUpperCase() + str.slice(1);
627
+ };
628
+
629
+ var looseEqual = function looseEqual(a, b) {
630
+ var isObjectA = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
631
+ var isObjectB = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
632
+ if (isObjectA && isObjectB) {
633
+ return JSON.stringify(a) === JSON.stringify(b);
634
+ } else if (!isObjectA && !isObjectB) {
635
+ return String(a) === String(b);
636
+ } else {
637
+ return false;
638
+ }
639
+ };
640
+
641
+ var arrayEquals = function arrayEquals(arrayA, arrayB) {
642
+ arrayA = arrayA || [];
643
+ arrayB = arrayB || [];
644
+
645
+ if (arrayA.length !== arrayB.length) {
646
+ return false;
647
+ }
648
+
649
+ for (var i = 0; i < arrayA.length; i++) {
650
+ if (!looseEqual(arrayA[i], arrayB[i])) {
651
+ return false;
652
+ }
653
+ }
654
+
655
+ return true;
656
+ };
657
+
658
+ var isEqual = function isEqual(value1, value2) {
659
+ if (Array.isArray(value1) && Array.isArray(value2)) {
660
+ return arrayEquals(value1, value2);
661
+ }
662
+ return looseEqual(value1, value2);
663
+ };
664
+
665
+ var isEmpty = function isEmpty(val) {
666
+ // null or undefined
667
+ if (val == null) return true;
668
+
669
+ if (typeof val === 'boolean') return false;
670
+
671
+ if (typeof val === 'number') return !val;
672
+
673
+ if (val instanceof Error) return val.message === '';
674
+
675
+ switch (Object.prototype.toString.call(val)) {
676
+ // String or Array
677
+ case '[object String]':
678
+ case '[object Array]':
679
+ return !val.length;
680
+
681
+ // Map or Set or File
682
+ case '[object File]':
683
+ case '[object Map]':
684
+ case '[object Set]':
685
+ {
686
+ return !val.size;
687
+ }
688
+ // Plain Object
689
+ case '[object Object]':
690
+ {
691
+ return !Object.keys(val).length;
692
+ }
693
+ }
694
+
695
+ return false;
696
+ };
697
+
698
+ function rafThrottle(fn) {
699
+ var locked = false;
700
+ return function () {
701
+ var _this = this;
702
+
703
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
704
+ args[_key] = arguments[_key];
705
+ }
706
+
707
+ if (locked) return;
708
+ locked = true;
709
+ window.requestAnimationFrame(function (_) {
710
+ fn.apply(_this, args);
711
+ locked = false;
712
+ });
713
+ };
714
+ }
715
+
716
+ function objToArray(obj) {
717
+ if (Array.isArray(obj)) {
718
+ return obj;
719
+ }
720
+ return isEmpty(obj) ? [] : [obj];
721
+ }
722
+
723
+ var isMac = function isMac() {
724
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
725
+ };
726
+
727
+ /***/ }),
728
+ /* 4 */
729
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
730
+
731
+ "use strict";
732
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
733
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
734
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
735
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
736
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
737
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
738
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
739
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
740
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
741
+
742
+
743
+
744
+ function isString(obj) {
745
+ return Object.prototype.toString.call(obj) === '[object String]';
746
+ }
747
+
748
+ function isObject(obj) {
749
+ return Object.prototype.toString.call(obj) === '[object Object]';
750
+ }
751
+
752
+ function isHtmlElement(node) {
753
+ return node && node.nodeType === Node.ELEMENT_NODE;
754
+ }
755
+
756
+ /**
757
+ * - Inspired:
758
+ * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
759
+ */
760
+ var isFunction = function isFunction(functionToCheck) {
761
+ var getType = {};
762
+ return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
763
+ };
764
+
765
+ if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
766
+ isFunction = function isFunction(obj) {
767
+ return typeof obj === 'function' || false;
768
+ };
769
+ }
770
+
771
+
772
+
773
+ var isUndefined = function isUndefined(val) {
774
+ return val === void 0;
775
+ };
776
+
777
+ var isDefined = function isDefined(val) {
778
+ return val !== undefined && val !== null;
779
+ };
780
+
781
+ /***/ }),
782
+ /* 5 */,
783
+ /* 6 */
784
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
785
+
786
+ "use strict";
787
+ function _broadcast(componentName, eventName, params) {
788
+ this.$children.forEach(function (child) {
789
+ var name = child.$options.componentName;
790
+
791
+ if (name === componentName) {
792
+ child.$emit.apply(child, [eventName].concat(params));
793
+ } else {
794
+ _broadcast.apply(child, [componentName, eventName].concat([params]));
795
+ }
796
+ });
797
+ }
798
+ /* harmony default export */ __webpack_exports__["a"] = ({
799
+ methods: {
800
+ dispatch: function dispatch(componentName, eventName, params) {
801
+ var parent = this.$parent || this.$root;
802
+ var name = parent.$options.componentName;
803
+
804
+ while (parent && (!name || name !== componentName)) {
805
+ parent = parent.$parent;
806
+
807
+ if (parent) {
808
+ name = parent.$options.componentName;
809
+ }
810
+ }
811
+ if (parent) {
812
+ parent.$emit.apply(parent, [eventName].concat(params));
813
+ }
814
+ },
815
+ broadcast: function broadcast(componentName, eventName, params) {
816
+ _broadcast.call(this, componentName, eventName, params);
817
+ }
818
+ }
819
+ });
820
+
821
+ /***/ }),
822
+ /* 7 */
823
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
824
+
825
+ "use strict";
826
+ /* harmony default export */ __webpack_exports__["a"] = (function (target) {
827
+ for (var i = 1, j = arguments.length; i < j; i++) {
828
+ var source = arguments[i] || {};
829
+ for (var prop in source) {
830
+ if (source.hasOwnProperty(prop)) {
831
+ var value = source[prop];
832
+ if (value !== undefined) {
833
+ target[prop] = value;
834
+ }
835
+ }
836
+ }
837
+ }
838
+
839
+ return target;
840
+ });;
841
+
842
+ /***/ }),
843
+ /* 8 */
844
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
845
+
846
+ "use strict";
847
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
848
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
849
+
850
+
851
+ var scrollBarWidth = void 0;
852
+
853
+ /* harmony default export */ __webpack_exports__["a"] = (function () {
854
+ if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
855
+ if (scrollBarWidth !== undefined) return scrollBarWidth;
856
+
857
+ var outer = document.createElement('div');
858
+ outer.className = 'el-scrollbar__wrap';
859
+ outer.style.visibility = 'hidden';
860
+ outer.style.width = '100px';
861
+ outer.style.position = 'absolute';
862
+ outer.style.top = '-9999px';
863
+ document.body.appendChild(outer);
864
+
865
+ var widthNoScroll = outer.offsetWidth;
866
+ outer.style.overflow = 'scroll';
867
+
868
+ var inner = document.createElement('div');
869
+ inner.style.width = '100%';
870
+ outer.appendChild(inner);
871
+
872
+ var widthWithScroll = inner.offsetWidth;
873
+ outer.parentNode.removeChild(outer);
874
+ scrollBarWidth = widthNoScroll - widthWithScroll;
875
+
876
+ return scrollBarWidth;
877
+ });;
878
+
879
+ /***/ }),
880
+ /* 9 */
881
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
882
+
883
+ "use strict";
884
+
885
+ // EXPORTS
886
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
887
+
888
+ // EXTERNAL MODULE: external "vue"
889
+ var external_vue_ = __webpack_require__(0);
890
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
891
+
892
+ // EXTERNAL MODULE: ./src/utils/merge.js
893
+ var merge = __webpack_require__(7);
894
+
895
+ // EXTERNAL MODULE: ./src/utils/dom.js
896
+ var utils_dom = __webpack_require__(1);
897
+
898
+ // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
899
+
900
+
901
+
902
+ var hasModal = false;
903
+ var hasInitZIndex = false;
904
+ var popup_manager_zIndex = void 0;
905
+
906
+ var popup_manager_getModal = function getModal() {
907
+ if (external_vue_default.a.prototype.$isServer) return;
908
+ var modalDom = PopupManager.modalDom;
909
+ if (modalDom) {
910
+ hasModal = true;
911
+ } else {
912
+ hasModal = false;
913
+ modalDom = document.createElement('div');
914
+ PopupManager.modalDom = modalDom;
915
+
916
+ modalDom.addEventListener('touchmove', function (event) {
917
+ event.preventDefault();
918
+ event.stopPropagation();
919
+ });
920
+
921
+ modalDom.addEventListener('click', function () {
922
+ PopupManager.doOnModalClick && PopupManager.doOnModalClick();
923
+ });
924
+ }
925
+
926
+ return modalDom;
927
+ };
928
+
929
+ var instances = {};
930
+
931
+ var PopupManager = {
932
+ modalFade: true,
933
+
934
+ getInstance: function getInstance(id) {
935
+ return instances[id];
936
+ },
937
+
938
+ register: function register(id, instance) {
939
+ if (id && instance) {
940
+ instances[id] = instance;
941
+ }
942
+ },
943
+
944
+ deregister: function deregister(id) {
945
+ if (id) {
946
+ instances[id] = null;
947
+ delete instances[id];
948
+ }
949
+ },
950
+
951
+ nextZIndex: function nextZIndex() {
952
+ return PopupManager.zIndex++;
953
+ },
954
+
955
+ modalStack: [],
956
+
957
+ doOnModalClick: function doOnModalClick() {
958
+ var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
959
+ if (!topItem) return;
960
+
961
+ var instance = PopupManager.getInstance(topItem.id);
962
+ if (instance && instance.closeOnClickModal) {
963
+ instance.close();
964
+ }
965
+ },
966
+
967
+ openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
968
+ if (external_vue_default.a.prototype.$isServer) return;
969
+ if (!id || zIndex === undefined) return;
970
+ this.modalFade = modalFade;
971
+
972
+ var modalStack = this.modalStack;
973
+
974
+ for (var i = 0, j = modalStack.length; i < j; i++) {
975
+ var item = modalStack[i];
976
+ if (item.id === id) {
977
+ return;
978
+ }
979
+ }
980
+
981
+ var modalDom = popup_manager_getModal();
982
+
983
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
984
+ if (this.modalFade && !hasModal) {
985
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
986
+ }
987
+ if (modalClass) {
988
+ var classArr = modalClass.trim().split(/\s+/);
989
+ classArr.forEach(function (item) {
990
+ return Object(utils_dom["a" /* addClass */])(modalDom, item);
991
+ });
992
+ }
993
+ setTimeout(function () {
994
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
995
+ }, 200);
996
+
997
+ if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
998
+ dom.parentNode.appendChild(modalDom);
999
+ } else {
1000
+ document.body.appendChild(modalDom);
1001
+ }
1002
+
1003
+ if (zIndex) {
1004
+ modalDom.style.zIndex = zIndex;
1005
+ }
1006
+ modalDom.tabIndex = 0;
1007
+ modalDom.style.display = '';
1008
+
1009
+ this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
1010
+ },
1011
+
1012
+ closeModal: function closeModal(id) {
1013
+ var modalStack = this.modalStack;
1014
+ var modalDom = popup_manager_getModal();
1015
+
1016
+ if (modalStack.length > 0) {
1017
+ var topItem = modalStack[modalStack.length - 1];
1018
+ if (topItem.id === id) {
1019
+ if (topItem.modalClass) {
1020
+ var classArr = topItem.modalClass.trim().split(/\s+/);
1021
+ classArr.forEach(function (item) {
1022
+ return Object(utils_dom["i" /* removeClass */])(modalDom, item);
1023
+ });
1024
+ }
1025
+
1026
+ modalStack.pop();
1027
+ if (modalStack.length > 0) {
1028
+ modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
1029
+ }
1030
+ } else {
1031
+ for (var i = modalStack.length - 1; i >= 0; i--) {
1032
+ if (modalStack[i].id === id) {
1033
+ modalStack.splice(i, 1);
1034
+ break;
1035
+ }
1036
+ }
1037
+ }
1038
+ }
1039
+
1040
+ if (modalStack.length === 0) {
1041
+ if (this.modalFade) {
1042
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
1043
+ }
1044
+ setTimeout(function () {
1045
+ if (modalStack.length === 0) {
1046
+ if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
1047
+ modalDom.style.display = 'none';
1048
+ PopupManager.modalDom = undefined;
1049
+ }
1050
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
1051
+ }, 200);
1052
+ }
1053
+ }
1054
+ };
1055
+
1056
+ Object.defineProperty(PopupManager, 'zIndex', {
1057
+ configurable: true,
1058
+ get: function get() {
1059
+ if (!hasInitZIndex) {
1060
+ popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
1061
+ hasInitZIndex = true;
1062
+ }
1063
+ return popup_manager_zIndex;
1064
+ },
1065
+ set: function set(value) {
1066
+ popup_manager_zIndex = value;
1067
+ }
1068
+ });
1069
+
1070
+ var popup_manager_getTopPopup = function getTopPopup() {
1071
+ if (external_vue_default.a.prototype.$isServer) return;
1072
+ if (PopupManager.modalStack.length > 0) {
1073
+ var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
1074
+ if (!topPopup) return;
1075
+ var instance = PopupManager.getInstance(topPopup.id);
1076
+
1077
+ return instance;
1078
+ }
1079
+ };
1080
+
1081
+ if (!external_vue_default.a.prototype.$isServer) {
1082
+ // handle `esc` key when the popup is shown
1083
+ window.addEventListener('keydown', function (event) {
1084
+ if (event.keyCode === 27) {
1085
+ var topPopup = popup_manager_getTopPopup();
1086
+
1087
+ if (topPopup && topPopup.closeOnPressEscape) {
1088
+ topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
1089
+ }
1090
+ }
1091
+ });
1092
+ }
1093
+
1094
+ /* harmony default export */ var popup_manager = (PopupManager);
1095
+ // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
1096
+ var scrollbar_width = __webpack_require__(8);
1097
+
1098
+ // CONCATENATED MODULE: ./src/utils/popup/index.js
1099
+
1100
+
1101
+
1102
+
1103
+
1104
+
1105
+ var idSeed = 1;
1106
+
1107
+ var scrollBarWidth = void 0;
1108
+
1109
+ /* harmony default export */ var popup = __webpack_exports__["b"] = ({
1110
+ props: {
1111
+ visible: {
1112
+ type: Boolean,
1113
+ default: false
1114
+ },
1115
+ openDelay: {},
1116
+ closeDelay: {},
1117
+ zIndex: {},
1118
+ modal: {
1119
+ type: Boolean,
1120
+ default: false
1121
+ },
1122
+ modalFade: {
1123
+ type: Boolean,
1124
+ default: true
1125
+ },
1126
+ modalClass: {},
1127
+ modalAppendToBody: {
1128
+ type: Boolean,
1129
+ default: false
1130
+ },
1131
+ lockScroll: {
1132
+ type: Boolean,
1133
+ default: true
1134
+ },
1135
+ closeOnPressEscape: {
1136
+ type: Boolean,
1137
+ default: false
1138
+ },
1139
+ closeOnClickModal: {
1140
+ type: Boolean,
1141
+ default: false
1142
+ }
1143
+ },
1144
+
1145
+ beforeMount: function beforeMount() {
1146
+ this._popupId = 'popup-' + idSeed++;
1147
+ popup_manager.register(this._popupId, this);
1148
+ },
1149
+ beforeDestroy: function beforeDestroy() {
1150
+ popup_manager.deregister(this._popupId);
1151
+ popup_manager.closeModal(this._popupId);
1152
+
1153
+ this.restoreBodyStyle();
1154
+ },
1155
+ data: function data() {
1156
+ return {
1157
+ opened: false,
1158
+ bodyPaddingRight: null,
1159
+ computedBodyPaddingRight: 0,
1160
+ withoutHiddenClass: true,
1161
+ rendered: false
1162
+ };
1163
+ },
1164
+
1165
+
1166
+ watch: {
1167
+ visible: function visible(val) {
1168
+ var _this = this;
1169
+
1170
+ if (val) {
1171
+ if (this._opening) return;
1172
+ if (!this.rendered) {
1173
+ this.rendered = true;
1174
+ external_vue_default.a.nextTick(function () {
1175
+ _this.open();
1176
+ });
1177
+ } else {
1178
+ this.open();
1179
+ }
1180
+ } else {
1181
+ this.close();
1182
+ }
1183
+ }
1184
+ },
1185
+
1186
+ methods: {
1187
+ open: function open(options) {
1188
+ var _this2 = this;
1189
+
1190
+ if (!this.rendered) {
1191
+ this.rendered = true;
1192
+ }
1193
+
1194
+ var props = Object(merge["a" /* default */])({}, this.$props || this, options);
1195
+
1196
+ if (this._closeTimer) {
1197
+ clearTimeout(this._closeTimer);
1198
+ this._closeTimer = null;
1199
+ }
1200
+ clearTimeout(this._openTimer);
1201
+
1202
+ var openDelay = Number(props.openDelay);
1203
+ if (openDelay > 0) {
1204
+ this._openTimer = setTimeout(function () {
1205
+ _this2._openTimer = null;
1206
+ _this2.doOpen(props);
1207
+ }, openDelay);
1208
+ } else {
1209
+ this.doOpen(props);
1210
+ }
1211
+ },
1212
+ doOpen: function doOpen(props) {
1213
+ if (this.$isServer) return;
1214
+ if (this.willOpen && !this.willOpen()) return;
1215
+ if (this.opened) return;
1216
+
1217
+ this._opening = true;
1218
+
1219
+ var dom = this.$el;
1220
+
1221
+ var modal = props.modal;
1222
+
1223
+ var zIndex = props.zIndex;
1224
+ if (zIndex) {
1225
+ popup_manager.zIndex = zIndex;
1226
+ }
1227
+
1228
+ if (modal) {
1229
+ if (this._closing) {
1230
+ popup_manager.closeModal(this._popupId);
1231
+ this._closing = false;
1232
+ }
1233
+ popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
1234
+ if (props.lockScroll) {
1235
+ this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
1236
+ if (this.withoutHiddenClass) {
1237
+ this.bodyPaddingRight = document.body.style.paddingRight;
1238
+ this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
1239
+ }
1240
+ scrollBarWidth = Object(scrollbar_width["a" /* default */])();
1241
+ var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
1242
+ var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
1243
+ if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
1244
+ document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
1245
+ }
1246
+ Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
1247
+ }
1248
+ }
1249
+
1250
+ if (getComputedStyle(dom).position === 'static') {
1251
+ dom.style.position = 'absolute';
1252
+ }
1253
+
1254
+ dom.style.zIndex = popup_manager.nextZIndex();
1255
+ this.opened = true;
1256
+
1257
+ this.onOpen && this.onOpen();
1258
+
1259
+ this.doAfterOpen();
1260
+ },
1261
+ doAfterOpen: function doAfterOpen() {
1262
+ this._opening = false;
1263
+ },
1264
+ close: function close() {
1265
+ var _this3 = this;
1266
+
1267
+ if (this.willClose && !this.willClose()) return;
1268
+
1269
+ if (this._openTimer !== null) {
1270
+ clearTimeout(this._openTimer);
1271
+ this._openTimer = null;
1272
+ }
1273
+ clearTimeout(this._closeTimer);
1274
+
1275
+ var closeDelay = Number(this.closeDelay);
1276
+
1277
+ if (closeDelay > 0) {
1278
+ this._closeTimer = setTimeout(function () {
1279
+ _this3._closeTimer = null;
1280
+ _this3.doClose();
1281
+ }, closeDelay);
1282
+ } else {
1283
+ this.doClose();
1284
+ }
1285
+ },
1286
+ doClose: function doClose() {
1287
+ this._closing = true;
1288
+
1289
+ this.onClose && this.onClose();
1290
+
1291
+ if (this.lockScroll) {
1292
+ setTimeout(this.restoreBodyStyle, 200);
1293
+ }
1294
+
1295
+ this.opened = false;
1296
+
1297
+ this.doAfterClose();
1298
+ },
1299
+ doAfterClose: function doAfterClose() {
1300
+ popup_manager.closeModal(this._popupId);
1301
+ this._closing = false;
1302
+ },
1303
+ restoreBodyStyle: function restoreBodyStyle() {
1304
+ if (this.modal && this.withoutHiddenClass) {
1305
+ document.body.style.paddingRight = this.bodyPaddingRight;
1306
+ Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
1307
+ }
1308
+ this.withoutHiddenClass = true;
1309
+ }
1310
+ }
1311
+ });
1312
+
1313
+
1314
+
1315
+ /***/ }),
1316
+ /* 10 */
1317
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1318
+
1319
+ "use strict";
1320
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1321
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
1322
+ /* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
1323
+
1324
+
1325
+
1326
+ var PopperJS = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer ? function () {} : __webpack_require__(23);
1327
+ var stop = function stop(e) {
1328
+ return e.stopPropagation();
1329
+ };
1330
+
1331
+ /**
1332
+ * @param {HTMLElement} [reference=$refs.reference] - The reference element used to position the popper.
1333
+ * @param {HTMLElement} [popper=$refs.popper] - The HTML element used as popper, or a configuration used to generate the popper.
1334
+ * @param {String} [placement=button] - Placement of the popper accepted values: top(-start, -end), right(-start, -end), bottom(-start, -end), left(-start, -end)
1335
+ * @param {Number} [offset=0] - Amount of pixels the popper will be shifted (can be negative).
1336
+ * @param {Boolean} [visible=false] Visibility of the popup element.
1337
+ * @param {Boolean} [visible-arrow=false] Visibility of the arrow, no style.
1338
+ */
1339
+ /* harmony default export */ __webpack_exports__["a"] = ({
1340
+ props: {
1341
+ transformOrigin: {
1342
+ type: [Boolean, String],
1343
+ default: true
1344
+ },
1345
+ placement: {
1346
+ type: String,
1347
+ default: 'bottom'
1348
+ },
1349
+ boundariesPadding: {
1350
+ type: Number,
1351
+ default: 5
1352
+ },
1353
+ reference: {},
1354
+ popper: {},
1355
+ offset: {
1356
+ default: 0
1357
+ },
1358
+ value: Boolean,
1359
+ visibleArrow: Boolean,
1360
+ arrowOffset: {
1361
+ type: Number,
1362
+ default: 35
1363
+ },
1364
+ appendToBody: {
1365
+ type: Boolean,
1366
+ default: true
1367
+ },
1368
+ popperOptions: {
1369
+ type: Object,
1370
+ default: function _default() {
1371
+ return {
1372
+ gpuAcceleration: false
1373
+ };
1374
+ }
1375
+ }
1376
+ },
1377
+
1378
+ data: function data() {
1379
+ return {
1380
+ showPopper: false,
1381
+ currentPlacement: ''
1382
+ };
1383
+ },
1384
+
1385
+
1386
+ watch: {
1387
+ value: {
1388
+ immediate: true,
1389
+ handler: function handler(val) {
1390
+ this.showPopper = val;
1391
+ this.$emit('input', val);
1392
+ }
1393
+ },
1394
+
1395
+ showPopper: function showPopper(val) {
1396
+ if (this.disabled) return;
1397
+ val ? this.updatePopper() : this.destroyPopper();
1398
+ this.$emit('input', val);
1399
+ }
1400
+ },
1401
+
1402
+ methods: {
1403
+ createPopper: function createPopper() {
1404
+ var _this = this;
1405
+
1406
+ if (this.$isServer) return;
1407
+ this.currentPlacement = this.currentPlacement || this.placement;
1408
+ if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement)) {
1409
+ return;
1410
+ }
1411
+
1412
+ var options = this.popperOptions;
1413
+ var popper = this.popperElm = this.popperElm || this.popper || this.$refs.popper;
1414
+ var reference = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
1415
+
1416
+ if (!reference && this.$slots.reference && this.$slots.reference[0]) {
1417
+ reference = this.referenceElm = this.$slots.reference[0].elm;
1418
+ }
1419
+
1420
+ if (!popper || !reference) return;
1421
+ if (this.visibleArrow) this.appendArrow(popper);
1422
+ if (this.appendToBody) document.body.appendChild(this.popperElm);
1423
+ if (this.popperJS && this.popperJS.destroy) {
1424
+ this.popperJS.destroy();
1425
+ }
1426
+
1427
+ options.placement = this.currentPlacement;
1428
+ options.offset = this.offset;
1429
+ options.arrowOffset = this.arrowOffset;
1430
+ this.popperJS = new PopperJS(reference, popper, options);
1431
+ this.popperJS.onCreate(function (_) {
1432
+ _this.$emit('created', _this);
1433
+ _this.resetTransformOrigin();
1434
+ _this.$nextTick(_this.updatePopper);
1435
+ });
1436
+ if (typeof options.onUpdate === 'function') {
1437
+ this.popperJS.onUpdate(options.onUpdate);
1438
+ }
1439
+ this.popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_1__[/* PopupManager */ "a"].nextZIndex();
1440
+ this.popperElm.addEventListener('click', stop);
1441
+ },
1442
+ updatePopper: function updatePopper() {
1443
+ var popperJS = this.popperJS;
1444
+ if (popperJS) {
1445
+ popperJS.update();
1446
+ if (popperJS._popper) {
1447
+ popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_1__[/* PopupManager */ "a"].nextZIndex();
1448
+ }
1449
+ } else {
1450
+ this.createPopper();
1451
+ }
1452
+ },
1453
+ doDestroy: function doDestroy(forceDestroy) {
1454
+ /* istanbul ignore if */
1455
+ if (!this.popperJS || this.showPopper && !forceDestroy) return;
1456
+ this.popperJS.destroy();
1457
+ this.popperJS = null;
1458
+ },
1459
+ destroyPopper: function destroyPopper() {
1460
+ if (this.popperJS) {
1461
+ this.resetTransformOrigin();
1462
+ }
1463
+ },
1464
+ resetTransformOrigin: function resetTransformOrigin() {
1465
+ if (!this.transformOrigin) return;
1466
+ var placementMap = {
1467
+ top: 'bottom',
1468
+ bottom: 'top',
1469
+ left: 'right',
1470
+ right: 'left'
1471
+ };
1472
+ var placement = this.popperJS._popper.getAttribute('x-placement').split('-')[0];
1473
+ var origin = placementMap[placement];
1474
+ this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin === 'string' ? this.transformOrigin : ['top', 'bottom'].indexOf(placement) > -1 ? 'center ' + origin : origin + ' center';
1475
+ },
1476
+ appendArrow: function appendArrow(element) {
1477
+ var hash = void 0;
1478
+ if (this.appended) {
1479
+ return;
1480
+ }
1481
+
1482
+ this.appended = true;
1483
+
1484
+ for (var item in element.attributes) {
1485
+ if (/^_v-/.test(element.attributes[item].name)) {
1486
+ hash = element.attributes[item].name;
1487
+ break;
1488
+ }
1489
+ }
1490
+
1491
+ var arrow = document.createElement('div');
1492
+
1493
+ if (hash) {
1494
+ arrow.setAttribute(hash, '');
1495
+ }
1496
+ arrow.setAttribute('x-arrow', '');
1497
+ arrow.className = 'popper__arrow';
1498
+ element.appendChild(arrow);
1499
+ }
1500
+ },
1501
+
1502
+ beforeDestroy: function beforeDestroy() {
1503
+ this.doDestroy(true);
1504
+ if (this.popperElm && this.popperElm.parentNode === document.body) {
1505
+ this.popperElm.removeEventListener('click', stop);
1506
+ document.body.removeChild(this.popperElm);
1507
+ }
1508
+ },
1509
+
1510
+
1511
+ // call destroy in keep-alive mode
1512
+ deactivated: function deactivated() {
1513
+ this.$options.beforeDestroy[0].call(this);
1514
+ }
1515
+ });
1516
+
1517
+ /***/ }),
1518
+ /* 11 */,
1519
+ /* 12 */
1520
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1521
+
1522
+ "use strict";
1523
+ /* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
1524
+
1525
+ /**
1526
+ * Show migrating guide in browser console.
1527
+ *
1528
+ * Usage:
1529
+ * import Migrating from 'element-ui/src/mixins/migrating';
1530
+ *
1531
+ * mixins: [Migrating]
1532
+ *
1533
+ * add getMigratingConfig method for your component.
1534
+ * getMigratingConfig() {
1535
+ * return {
1536
+ * props: {
1537
+ * 'allow-no-selection': 'allow-no-selection is removed.',
1538
+ * 'selection-mode': 'selection-mode is removed.'
1539
+ * },
1540
+ * events: {
1541
+ * selectionchange: 'selectionchange is renamed to selection-change.'
1542
+ * }
1543
+ * };
1544
+ * },
1545
+ */
1546
+ /* harmony default export */ __webpack_exports__["a"] = ({
1547
+ mounted: function mounted() {
1548
+ if (true) return;
1549
+ if (!this.$vnode) return;
1550
+
1551
+ var _getMigratingConfig = this.getMigratingConfig(),
1552
+ _getMigratingConfig$p = _getMigratingConfig.props,
1553
+ props = _getMigratingConfig$p === undefined ? {} : _getMigratingConfig$p,
1554
+ _getMigratingConfig$e = _getMigratingConfig.events,
1555
+ events = _getMigratingConfig$e === undefined ? {} : _getMigratingConfig$e;
1556
+
1557
+ var _$vnode = this.$vnode,
1558
+ data = _$vnode.data,
1559
+ componentOptions = _$vnode.componentOptions;
1560
+
1561
+ var definedProps = data.attrs || {};
1562
+ var definedEvents = componentOptions.listeners || {};
1563
+
1564
+ for (var propName in definedProps) {
1565
+ propName = Object(_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(propName); // compatible with camel case
1566
+ if (props[propName]) {
1567
+ console.warn('[Element Migrating][' + this.$options.name + '][Attribute]: ' + props[propName]);
1568
+ }
1569
+ }
1570
+
1571
+ for (var eventName in definedEvents) {
1572
+ eventName = Object(_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(eventName); // compatible with camel case
1573
+ if (events[eventName]) {
1574
+ console.warn('[Element Migrating][' + this.$options.name + '][Event]: ' + events[eventName]);
1575
+ }
1576
+ }
1577
+ },
1578
+
1579
+ methods: {
1580
+ getMigratingConfig: function getMigratingConfig() {
1581
+ return {
1582
+ props: {},
1583
+ events: {}
1584
+ };
1585
+ }
1586
+ }
1587
+ });
1588
+
1589
+ /***/ }),
1590
+ /* 13 */,
1591
+ /* 14 */,
1592
+ /* 15 */,
1593
+ /* 16 */
1594
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1595
+
1596
+ "use strict";
1597
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDef; });
1598
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isKorean; });
1599
+ function isDef(val) {
1600
+ return val !== undefined && val !== null;
1601
+ }
1602
+ function isKorean(text) {
1603
+ var reg = /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi;
1604
+ return reg.test(text);
1605
+ }
1606
+
1607
+ /***/ }),
1608
+ /* 17 */,
1609
+ /* 18 */
1610
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1611
+
1612
+ "use strict";
1613
+ // ESM COMPAT FLAG
1614
+ __webpack_require__.r(__webpack_exports__);
1615
+
1616
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=af7512c8
1617
+ var render = function render() {
1618
+ var _vm = this,
1619
+ _c = _vm._self._c
1620
+ return _c(
1621
+ "div",
1622
+ {
1623
+ class: [
1624
+ _vm.type === "textarea" ? "el-textarea" : "el-input",
1625
+ _vm.inputSize ? "el-input--" + _vm.inputSize : "",
1626
+ {
1627
+ "is-disabled": _vm.inputDisabled,
1628
+ "is-exceed": _vm.inputExceed,
1629
+ "el-input-group": _vm.$slots.prepend || _vm.$slots.append,
1630
+ "el-input-group--append": _vm.$slots.append,
1631
+ "el-input-group--prepend": _vm.$slots.prepend,
1632
+ "el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
1633
+ "el-input--suffix":
1634
+ _vm.$slots.suffix ||
1635
+ _vm.suffixIcon ||
1636
+ _vm.clearable ||
1637
+ _vm.showPassword,
1638
+ },
1639
+ ],
1640
+ on: {
1641
+ mouseenter: function ($event) {
1642
+ _vm.hovering = true
1643
+ },
1644
+ mouseleave: function ($event) {
1645
+ _vm.hovering = false
1646
+ },
1647
+ },
1648
+ },
1649
+ [
1650
+ _vm.type !== "textarea"
1651
+ ? [
1652
+ _vm.$slots.prepend
1653
+ ? _c(
1654
+ "div",
1655
+ { staticClass: "el-input-group__prepend" },
1656
+ [_vm._t("prepend")],
1657
+ 2
1658
+ )
1659
+ : _vm._e(),
1660
+ _vm.type !== "textarea"
1661
+ ? _c(
1662
+ "input",
1663
+ _vm._b(
1664
+ {
1665
+ ref: "input",
1666
+ staticClass: "el-input__inner",
1667
+ attrs: {
1668
+ tabindex: _vm.tabindex,
1669
+ type: _vm.showPassword
1670
+ ? _vm.passwordVisible
1671
+ ? "text"
1672
+ : "password"
1673
+ : _vm.type,
1674
+ disabled: _vm.inputDisabled,
1675
+ readonly: _vm.readonly,
1676
+ autocomplete: _vm.autoComplete || _vm.autocomplete,
1677
+ "aria-label": _vm.label,
1678
+ },
1679
+ on: {
1680
+ compositionstart: _vm.handleCompositionStart,
1681
+ compositionupdate: _vm.handleCompositionUpdate,
1682
+ compositionend: _vm.handleCompositionEnd,
1683
+ input: _vm.handleInput,
1684
+ focus: _vm.handleFocus,
1685
+ blur: _vm.handleBlur,
1686
+ change: _vm.handleChange,
1687
+ },
1688
+ },
1689
+ "input",
1690
+ _vm.$attrs,
1691
+ false
1692
+ )
1693
+ )
1694
+ : _vm._e(),
1695
+ _vm.$slots.prefix || _vm.prefixIcon
1696
+ ? _c(
1697
+ "span",
1698
+ { staticClass: "el-input__prefix" },
1699
+ [
1700
+ _vm._t("prefix"),
1701
+ _vm.prefixIcon
1702
+ ? _c("i", {
1703
+ staticClass: "el-input__icon",
1704
+ class: _vm.prefixIcon,
1705
+ })
1706
+ : _vm._e(),
1707
+ ],
1708
+ 2
1709
+ )
1710
+ : _vm._e(),
1711
+ _vm.getSuffixVisible()
1712
+ ? _c("span", { staticClass: "el-input__suffix" }, [
1713
+ _c(
1714
+ "span",
1715
+ { staticClass: "el-input__suffix-inner" },
1716
+ [
1717
+ !_vm.showClear ||
1718
+ !_vm.showPwdVisible ||
1719
+ !_vm.isWordLimitVisible
1720
+ ? [
1721
+ _vm._t("suffix"),
1722
+ _vm.suffixIcon
1723
+ ? _c("i", {
1724
+ staticClass: "el-input__icon",
1725
+ class: _vm.suffixIcon,
1726
+ })
1727
+ : _vm._e(),
1728
+ ]
1729
+ : _vm._e(),
1730
+ _vm.showClear
1731
+ ? _c("i", {
1732
+ staticClass:
1733
+ "el-input__icon el-icon-circle-close el-input__clear",
1734
+ on: {
1735
+ mousedown: function ($event) {
1736
+ $event.preventDefault()
1737
+ },
1738
+ click: _vm.clear,
1739
+ },
1740
+ })
1741
+ : _vm._e(),
1742
+ _vm.showPwdVisible
1743
+ ? _c("i", {
1744
+ staticClass:
1745
+ "el-input__icon el-icon-view el-input__clear",
1746
+ on: { click: _vm.handlePasswordVisible },
1747
+ })
1748
+ : _vm._e(),
1749
+ _vm.isWordLimitVisible
1750
+ ? _c("span", { staticClass: "el-input__count" }, [
1751
+ _c(
1752
+ "span",
1753
+ { staticClass: "el-input__count-inner" },
1754
+ [
1755
+ _vm._v(
1756
+ "\n\t\t\t\t\t\t" +
1757
+ _vm._s(_vm.textLength) +
1758
+ "/" +
1759
+ _vm._s(_vm.upperLimit) +
1760
+ "\n\t\t\t\t\t"
1761
+ ),
1762
+ ]
1763
+ ),
1764
+ ])
1765
+ : _vm._e(),
1766
+ ],
1767
+ 2
1768
+ ),
1769
+ _vm.validateState
1770
+ ? _c("i", {
1771
+ staticClass: "el-input__icon",
1772
+ class: ["el-input__validateIcon", _vm.validateIcon],
1773
+ })
1774
+ : _vm._e(),
1775
+ ])
1776
+ : _vm._e(),
1777
+ _vm.$slots.append
1778
+ ? _c(
1779
+ "div",
1780
+ { staticClass: "el-input-group__append" },
1781
+ [_vm._t("append")],
1782
+ 2
1783
+ )
1784
+ : _vm._e(),
1785
+ ]
1786
+ : _c(
1787
+ "textarea",
1788
+ _vm._b(
1789
+ {
1790
+ ref: "textarea",
1791
+ staticClass: "el-textarea__inner",
1792
+ style: _vm.textareaStyle,
1793
+ attrs: {
1794
+ tabindex: _vm.tabindex,
1795
+ disabled: _vm.inputDisabled,
1796
+ readonly: _vm.readonly,
1797
+ autocomplete: _vm.autoComplete || _vm.autocomplete,
1798
+ "aria-label": _vm.label,
1799
+ },
1800
+ on: {
1801
+ compositionstart: _vm.handleCompositionStart,
1802
+ compositionupdate: _vm.handleCompositionUpdate,
1803
+ compositionend: _vm.handleCompositionEnd,
1804
+ input: _vm.handleInput,
1805
+ focus: _vm.handleFocus,
1806
+ blur: _vm.handleBlur,
1807
+ change: _vm.handleChange,
1808
+ },
1809
+ },
1810
+ "textarea",
1811
+ _vm.$attrs,
1812
+ false
1813
+ )
1814
+ ),
1815
+ _vm.isWordLimitVisible && _vm.type === "textarea"
1816
+ ? _c("span", { staticClass: "el-input__count" }, [
1817
+ _vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit)),
1818
+ ])
1819
+ : _vm._e(),
1820
+ ],
1821
+ 2
1822
+ )
1823
+ }
1824
+ var staticRenderFns = []
1825
+ render._withStripped = true
1826
+
1827
+
1828
+ // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=af7512c8
1829
+
1830
+ // EXTERNAL MODULE: ./src/mixins/emitter.js
1831
+ var emitter = __webpack_require__(6);
1832
+
1833
+ // EXTERNAL MODULE: ./src/mixins/migrating.js
1834
+ var migrating = __webpack_require__(12);
1835
+
1836
+ // CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
1837
+ var hiddenTextarea = void 0;
1838
+
1839
+ var HIDDEN_STYLE = '\n\theight:0 !important;\n\tvisibility:hidden !important;\n\toverflow:hidden !important;\n\tposition:absolute !important;\n\tz-index:-1000 !important;\n\ttop:0 !important;\n\tright:0 !important\n';
1840
+
1841
+ var CONTEXT_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
1842
+
1843
+ function calculateNodeStyling(targetElement) {
1844
+ var style = window.getComputedStyle(targetElement);
1845
+
1846
+ var boxSizing = style.getPropertyValue('box-sizing');
1847
+
1848
+ var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
1849
+
1850
+ var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
1851
+
1852
+ var contextStyle = CONTEXT_STYLE.map(function (name) {
1853
+ return name + ':' + style.getPropertyValue(name);
1854
+ }).join(';');
1855
+
1856
+ return { contextStyle: contextStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing };
1857
+ }
1858
+
1859
+ function calcTextareaHeight(targetElement) {
1860
+ var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
1861
+ var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
1862
+
1863
+ if (!hiddenTextarea) {
1864
+ hiddenTextarea = document.createElement('textarea');
1865
+ document.body.appendChild(hiddenTextarea);
1866
+ }
1867
+
1868
+ var _calculateNodeStyling = calculateNodeStyling(targetElement),
1869
+ paddingSize = _calculateNodeStyling.paddingSize,
1870
+ borderSize = _calculateNodeStyling.borderSize,
1871
+ boxSizing = _calculateNodeStyling.boxSizing,
1872
+ contextStyle = _calculateNodeStyling.contextStyle;
1873
+
1874
+ hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
1875
+ hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
1876
+
1877
+ var height = hiddenTextarea.scrollHeight;
1878
+ var result = {};
1879
+
1880
+ if (boxSizing === 'border-box') {
1881
+ height = height + borderSize;
1882
+ } else if (boxSizing === 'content-box') {
1883
+ height = height - paddingSize;
1884
+ }
1885
+
1886
+ hiddenTextarea.value = '';
1887
+ var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
1888
+
1889
+ if (minRows !== null) {
1890
+ var minHeight = singleRowHeight * minRows;
1891
+ if (boxSizing === 'border-box') {
1892
+ minHeight = minHeight + paddingSize + borderSize;
1893
+ }
1894
+ height = Math.max(minHeight, height);
1895
+ result.minHeight = minHeight + 'px';
1896
+ }
1897
+ if (maxRows !== null) {
1898
+ var maxHeight = singleRowHeight * maxRows;
1899
+ if (boxSizing === 'border-box') {
1900
+ maxHeight = maxHeight + paddingSize + borderSize;
1901
+ }
1902
+ height = Math.min(maxHeight, height);
1903
+ }
1904
+ result.height = height + 'px';
1905
+ hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
1906
+ hiddenTextarea = null;
1907
+ return result;
1908
+ };
1909
+ // EXTERNAL MODULE: ./src/utils/merge.js
1910
+ var merge = __webpack_require__(7);
1911
+
1912
+ // EXTERNAL MODULE: ./src/utils/shared.js
1913
+ var shared = __webpack_require__(16);
1914
+
1915
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js
1916
+
1917
+
1918
+
1919
+
1920
+
1921
+
1922
+
1923
+ /* harmony default export */ var inputvue_type_script_lang_js = ({
1924
+ name: 'ElInput',
1925
+
1926
+ componentName: 'ElInput',
1927
+
1928
+ mixins: [emitter["a" /* default */], migrating["a" /* default */]],
1929
+
1930
+ inheritAttrs: false,
1931
+
1932
+ inject: {
1933
+ elForm: {
1934
+ default: ''
1935
+ },
1936
+ elFormItem: {
1937
+ default: ''
1938
+ }
1939
+ },
1940
+
1941
+ data: function data() {
1942
+ return {
1943
+ textareaCalcStyle: {},
1944
+ hovering: false,
1945
+ focused: false,
1946
+ isComposing: false,
1947
+ passwordVisible: false
1948
+ };
1949
+ },
1950
+
1951
+
1952
+ props: {
1953
+ value: [String, Number],
1954
+ size: String,
1955
+ resize: String,
1956
+ form: String,
1957
+ disabled: Boolean,
1958
+ readonly: Boolean,
1959
+ type: {
1960
+ type: String,
1961
+ default: 'text'
1962
+ },
1963
+ autosize: {
1964
+ type: [Boolean, Object],
1965
+ default: false
1966
+ },
1967
+ autocomplete: {
1968
+ type: String,
1969
+ default: 'off'
1970
+ },
1971
+ /** @Deprecated in next major version */
1972
+ autoComplete: {
1973
+ type: String,
1974
+ validator: function validator(val) {
1975
+ false && false;
1976
+ return true;
1977
+ }
1978
+ },
1979
+ validateEvent: {
1980
+ type: Boolean,
1981
+ default: true
1982
+ },
1983
+ suffixIcon: String,
1984
+ prefixIcon: String,
1985
+ label: String,
1986
+ clearable: {
1987
+ type: Boolean,
1988
+ default: false
1989
+ },
1990
+ showPassword: {
1991
+ type: Boolean,
1992
+ default: false
1993
+ },
1994
+ showWordLimit: {
1995
+ type: Boolean,
1996
+ default: false
1997
+ },
1998
+ tabindex: String
1999
+ },
2000
+
2001
+ computed: {
2002
+ _elFormItemSize: function _elFormItemSize() {
2003
+ return (this.elFormItem || {}).elFormItemSize;
2004
+ },
2005
+ validateState: function validateState() {
2006
+ return this.elFormItem ? this.elFormItem.validateState : '';
2007
+ },
2008
+ needStatusIcon: function needStatusIcon() {
2009
+ return this.elForm ? this.elForm.statusIcon : false;
2010
+ },
2011
+ validateIcon: function validateIcon() {
2012
+ return {
2013
+ validating: 'el-icon-loading',
2014
+ success: 'el-icon-circle-check',
2015
+ error: 'el-icon-circle-close'
2016
+ }[this.validateState];
2017
+ },
2018
+ textareaStyle: function textareaStyle() {
2019
+ return Object(merge["a" /* default */])({}, this.textareaCalcStyle, { resize: this.resize });
2020
+ },
2021
+ inputSize: function inputSize() {
2022
+ return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
2023
+ },
2024
+ inputDisabled: function inputDisabled() {
2025
+ return this.disabled || (this.elForm || {}).disabled;
2026
+ },
2027
+ nativeInputValue: function nativeInputValue() {
2028
+ return this.value === null || this.value === undefined ? '' : String(this.value);
2029
+ },
2030
+ showClear: function showClear() {
2031
+ return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
2032
+ },
2033
+ showPwdVisible: function showPwdVisible() {
2034
+ return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
2035
+ },
2036
+ isWordLimitVisible: function isWordLimitVisible() {
2037
+ return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
2038
+ },
2039
+ upperLimit: function upperLimit() {
2040
+ return this.$attrs.maxlength;
2041
+ },
2042
+ textLength: function textLength() {
2043
+ if (typeof this.value === 'number') {
2044
+ return String(this.value).length;
2045
+ }
2046
+
2047
+ return (this.value || '').length;
2048
+ },
2049
+ inputExceed: function inputExceed() {
2050
+ // show exceed style if length of initial value greater then maxlength
2051
+ return this.isWordLimitVisible && this.textLength > this.upperLimit;
2052
+ }
2053
+ },
2054
+
2055
+ watch: {
2056
+ value: function value(val) {
2057
+ this.$nextTick(this.resizeTextarea);
2058
+ if (this.validateEvent) {
2059
+ this.dispatch('ElFormItem', 'el.form.change', [val]);
2060
+ }
2061
+ },
2062
+
2063
+ // native input value is set explicitly
2064
+ // do not use v-model / :value in template
2065
+ // see: https://github.com/ElemeFE/element/issues/14521
2066
+ nativeInputValue: function nativeInputValue() {
2067
+ this.setNativeInputValue();
2068
+ },
2069
+
2070
+ // when change between <input> and <textarea>,
2071
+ // update DOM dependent value and styles
2072
+ // https://github.com/ElemeFE/element/issues/14857
2073
+ type: function type() {
2074
+ var _this = this;
2075
+
2076
+ this.$nextTick(function () {
2077
+ _this.setNativeInputValue();
2078
+ _this.resizeTextarea();
2079
+ _this.updateIconOffset();
2080
+ });
2081
+ }
2082
+ },
2083
+
2084
+ methods: {
2085
+ focus: function focus() {
2086
+ this.getInput().focus();
2087
+ },
2088
+ blur: function blur() {
2089
+ this.getInput().blur();
2090
+ },
2091
+ getMigratingConfig: function getMigratingConfig() {
2092
+ return {
2093
+ props: {
2094
+ 'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
2095
+ 'on-icon-click': 'on-icon-click is removed.'
2096
+ },
2097
+ events: {
2098
+ 'click': 'click is removed.'
2099
+ }
2100
+ };
2101
+ },
2102
+ handleBlur: function handleBlur(event) {
2103
+ this.focused = false;
2104
+ this.$emit('blur', event);
2105
+ if (this.validateEvent) {
2106
+ this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
2107
+ }
2108
+ },
2109
+ select: function select() {
2110
+ this.getInput().select();
2111
+ },
2112
+ resizeTextarea: function resizeTextarea() {
2113
+ if (this.$isServer) return;
2114
+ var autosize = this.autosize,
2115
+ type = this.type;
2116
+
2117
+ if (type !== 'textarea') return;
2118
+ if (!autosize) {
2119
+ this.textareaCalcStyle = {
2120
+ minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
2121
+ };
2122
+ return;
2123
+ }
2124
+ var minRows = autosize.minRows;
2125
+ var maxRows = autosize.maxRows;
2126
+
2127
+ this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
2128
+ },
2129
+ setNativeInputValue: function setNativeInputValue() {
2130
+ var input = this.getInput();
2131
+ if (!input) return;
2132
+ if (input.value === this.nativeInputValue) return;
2133
+ input.value = this.nativeInputValue;
2134
+ },
2135
+ handleFocus: function handleFocus(event) {
2136
+ this.focused = true;
2137
+ this.$emit('focus', event);
2138
+ },
2139
+ handleCompositionStart: function handleCompositionStart(event) {
2140
+ this.$emit('compositionstart', event);
2141
+ this.isComposing = true;
2142
+ },
2143
+ handleCompositionUpdate: function handleCompositionUpdate(event) {
2144
+ this.$emit('compositionupdate', event);
2145
+ var text = event.target.value;
2146
+ var lastCharacter = text[text.length - 1] || '';
2147
+ this.isComposing = !Object(shared["b" /* isKorean */])(lastCharacter);
2148
+ },
2149
+ handleCompositionEnd: function handleCompositionEnd(event) {
2150
+ this.$emit('compositionend', event);
2151
+ if (this.isComposing) {
2152
+ this.isComposing = false;
2153
+ this.handleInput(event);
2154
+ }
2155
+ },
2156
+ handleInput: function handleInput(event) {
2157
+ // should not emit input during composition
2158
+ // see: https://github.com/ElemeFE/element/issues/10516
2159
+ if (this.isComposing) return;
2160
+
2161
+ // hack for https://github.com/ElemeFE/element/issues/8548
2162
+ // should remove the following line when we don't support IE
2163
+ if (event.target.value === this.nativeInputValue) return;
2164
+
2165
+ this.$emit('input', event.target.value);
2166
+
2167
+ // ensure native input value is controlled
2168
+ // see: https://github.com/ElemeFE/element/issues/12850
2169
+ this.$nextTick(this.setNativeInputValue);
2170
+ },
2171
+ handleChange: function handleChange(event) {
2172
+ this.$emit('change', event.target.value);
2173
+ },
2174
+ calcIconOffset: function calcIconOffset(place) {
2175
+ var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
2176
+ if (!elList.length) return;
2177
+ var el = null;
2178
+ for (var i = 0; i < elList.length; i++) {
2179
+ if (elList[i].parentNode === this.$el) {
2180
+ el = elList[i];
2181
+ break;
2182
+ }
2183
+ }
2184
+ if (!el) return;
2185
+ var pendantMap = {
2186
+ suffix: 'append',
2187
+ prefix: 'prepend'
2188
+ };
2189
+
2190
+ var pendant = pendantMap[place];
2191
+ if (this.$slots[pendant]) {
2192
+ el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
2193
+ } else {
2194
+ el.removeAttribute('style');
2195
+ }
2196
+ },
2197
+ updateIconOffset: function updateIconOffset() {
2198
+ this.calcIconOffset('prefix');
2199
+ this.calcIconOffset('suffix');
2200
+ },
2201
+ clear: function clear() {
2202
+ this.$emit('input', '');
2203
+ this.$emit('change', '');
2204
+ this.$emit('clear');
2205
+ },
2206
+ handlePasswordVisible: function handlePasswordVisible() {
2207
+ var _this2 = this;
2208
+
2209
+ this.passwordVisible = !this.passwordVisible;
2210
+ this.$nextTick(function () {
2211
+ _this2.focus();
2212
+ });
2213
+ },
2214
+ getInput: function getInput() {
2215
+ return this.$refs.input || this.$refs.textarea;
2216
+ },
2217
+ getSuffixVisible: function getSuffixVisible() {
2218
+ return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
2219
+ }
2220
+ },
2221
+
2222
+ created: function created() {
2223
+ this.$on('inputSelect', this.select);
2224
+ },
2225
+ mounted: function mounted() {
2226
+ this.setNativeInputValue();
2227
+ this.resizeTextarea();
2228
+ this.updateIconOffset();
2229
+ },
2230
+ updated: function updated() {
2231
+ this.$nextTick(this.updateIconOffset);
2232
+ }
2233
+ });
2234
+ // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js
2235
+ /* harmony default export */ var src_inputvue_type_script_lang_js = (inputvue_type_script_lang_js);
2236
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2237
+ var componentNormalizer = __webpack_require__(2);
2238
+
2239
+ // CONCATENATED MODULE: ./packages/input/src/input.vue
2240
+
2241
+
2242
+
2243
+
2244
+
2245
+ /* normalize component */
2246
+
2247
+ var component = Object(componentNormalizer["a" /* default */])(
2248
+ src_inputvue_type_script_lang_js,
2249
+ render,
2250
+ staticRenderFns,
2251
+ false,
2252
+ null,
2253
+ null,
2254
+ null
2255
+
2256
+ )
2257
+
2258
+ /* harmony default export */ var input = (component.exports);
2259
+ // CONCATENATED MODULE: ./packages/input/index.js
2260
+
2261
+
2262
+ /* istanbul ignore next */
2263
+ input.install = function (Vue) {
2264
+ Vue.component(input.name, input);
2265
+ };
2266
+
2267
+ /* harmony default export */ var packages_input = __webpack_exports__["default"] = (input);
2268
+
2269
+ /***/ }),
2270
+ /* 19 */,
2271
+ /* 20 */,
2272
+ /* 21 */,
2273
+ /* 22 */
2274
+ /***/ (function(module, exports) {
2275
+
2276
+ module.exports = require("throttle-debounce/debounce");
2277
+
2278
+ /***/ }),
2279
+ /* 23 */
2280
+ /***/ (function(module, exports, __webpack_require__) {
2281
+
2282
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2283
+
2284
+ /**
2285
+ * @fileOverview Kickass library to create and place poppers near their reference elements.
2286
+ * @version {{version}}
2287
+ * @license
2288
+ * Copyright (c) 2016 Federico Zivolo and contributors
2289
+ *
2290
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
2291
+ * of this software and associated documentation files (the "Software"), to deal
2292
+ * in the Software without restriction, including without limitation the rights
2293
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2294
+ * copies of the Software, and to permit persons to whom the Software is
2295
+ * furnished to do so, subject to the following conditions:
2296
+ *
2297
+ * The above copyright notice and this permission notice shall be included in all
2298
+ * copies or substantial portions of the Software.
2299
+ *
2300
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2301
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2302
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2303
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2304
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2305
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2306
+ * SOFTWARE.
2307
+ */
2308
+
2309
+ //
2310
+ // Cross module loader
2311
+ // Supported: Node, AMD, Browser globals
2312
+ //
2313
+ ;(function (root, factory) {
2314
+ if (true) {
2315
+ // AMD. Register as an anonymous module.
2316
+ !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
2317
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2318
+ (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
2319
+ __WEBPACK_AMD_DEFINE_FACTORY__),
2320
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2321
+ } else {}
2322
+ })(this, function () {
2323
+
2324
+ 'use strict';
2325
+
2326
+ var root = window;
2327
+
2328
+ // default options
2329
+ var DEFAULTS = {
2330
+ // placement of the popper
2331
+ placement: 'bottom',
2332
+
2333
+ gpuAcceleration: true,
2334
+
2335
+ // shift popper from its origin by the given amount of pixels (can be negative)
2336
+ offset: 0,
2337
+
2338
+ // the element which will act as boundary of the popper
2339
+ boundariesElement: 'viewport',
2340
+
2341
+ // amount of pixel used to define a minimum distance between the boundaries and the popper
2342
+ boundariesPadding: 5,
2343
+
2344
+ // popper will try to prevent overflow following this order,
2345
+ // by default, then, it could overflow on the left and on top of the boundariesElement
2346
+ preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
2347
+
2348
+ // the behavior used by flip to change the placement of the popper
2349
+ flipBehavior: 'flip',
2350
+
2351
+ arrowElement: '[x-arrow]',
2352
+
2353
+ arrowOffset: 0,
2354
+
2355
+ // list of functions used to modify the offsets before they are applied to the popper
2356
+ modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
2357
+
2358
+ modifiersIgnored: [],
2359
+
2360
+ forceAbsolute: false
2361
+ };
2362
+
2363
+ /**
2364
+ * Create a new Popper.js instance
2365
+ * @constructor Popper
2366
+ * @param {HTMLElement} reference - The reference element used to position the popper
2367
+ * @param {HTMLElement|Object} popper
2368
+ * The HTML element used as popper, or a configuration used to generate the popper.
2369
+ * @param {String} [popper.tagName='div'] The tag name of the generated popper.
2370
+ * @param {Array} [popper.classNames=['popper']] Array of classes to apply to the generated popper.
2371
+ * @param {Array} [popper.attributes] Array of attributes to apply, specify `attr:value` to assign a value to it.
2372
+ * @param {HTMLElement|String} [popper.parent=window.document.body] The parent element, given as HTMLElement or as query string.
2373
+ * @param {String} [popper.content=''] The content of the popper, it can be text, html, or node; if it is not text, set `contentType` to `html` or `node`.
2374
+ * @param {String} [popper.contentType='text'] If `html`, the `content` will be parsed as HTML. If `node`, it will be appended as-is.
2375
+ * @param {String} [popper.arrowTagName='div'] Same as `popper.tagName` but for the arrow element.
2376
+ * @param {Array} [popper.arrowClassNames='popper__arrow'] Same as `popper.classNames` but for the arrow element.
2377
+ * @param {String} [popper.arrowAttributes=['x-arrow']] Same as `popper.attributes` but for the arrow element.
2378
+ * @param {Object} options
2379
+ * @param {String} [options.placement=bottom]
2380
+ * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -right),
2381
+ * left(-start, -end)`
2382
+ *
2383
+ * @param {HTMLElement|String} [options.arrowElement='[x-arrow]']
2384
+ * The DOM Node used as arrow for the popper, or a CSS selector used to get the DOM node. It must be child of
2385
+ * its parent Popper. Popper.js will apply to the given element the style required to align the arrow with its
2386
+ * reference element.
2387
+ * By default, it will look for a child node of the popper with the `x-arrow` attribute.
2388
+ *
2389
+ * @param {Boolean} [options.gpuAcceleration=true]
2390
+ * When this property is set to true, the popper position will be applied using CSS3 translate3d, allowing the
2391
+ * browser to use the GPU to accelerate the rendering.
2392
+ * If set to false, the popper will be placed using `top` and `left` properties, not using the GPU.
2393
+ *
2394
+ * @param {Number} [options.offset=0]
2395
+ * Amount of pixels the popper will be shifted (can be negative).
2396
+ *
2397
+ * @param {String|Element} [options.boundariesElement='viewport']
2398
+ * The element which will define the boundaries of the popper position, the popper will never be placed outside
2399
+ * of the defined boundaries (except if `keepTogether` is enabled)
2400
+ *
2401
+ * @param {Number} [options.boundariesPadding=5]
2402
+ * Additional padding for the boundaries
2403
+ *
2404
+ * @param {Array} [options.preventOverflowOrder=['left', 'right', 'top', 'bottom']]
2405
+ * Order used when Popper.js tries to avoid overflows from the boundaries, they will be checked in order,
2406
+ * this means that the last ones will never overflow
2407
+ *
2408
+ * @param {String|Array} [options.flipBehavior='flip']
2409
+ * The behavior used by the `flip` modifier to change the placement of the popper when the latter is trying to
2410
+ * overlap its reference element. Defining `flip` as value, the placement will be flipped on
2411
+ * its axis (`right - left`, `top - bottom`).
2412
+ * You can even pass an array of placements (eg: `['right', 'left', 'top']` ) to manually specify
2413
+ * how alter the placement when a flip is needed. (eg. in the above example, it would first flip from right to left,
2414
+ * then, if even in its new placement, the popper is overlapping its reference element, it will be moved to top)
2415
+ *
2416
+ * @param {Array} [options.modifiers=[ 'shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle']]
2417
+ * List of functions used to modify the data before they are applied to the popper, add your custom functions
2418
+ * to this array to edit the offsets and placement.
2419
+ * The function should reflect the @params and @returns of preventOverflow
2420
+ *
2421
+ * @param {Array} [options.modifiersIgnored=[]]
2422
+ * Put here any built-in modifier name you want to exclude from the modifiers list
2423
+ * The function should reflect the @params and @returns of preventOverflow
2424
+ *
2425
+ * @param {Boolean} [options.removeOnDestroy=false]
2426
+ * Set to true if you want to automatically remove the popper when you call the `destroy` method.
2427
+ */
2428
+ function Popper(reference, popper, options) {
2429
+ this._reference = reference.jquery ? reference[0] : reference;
2430
+ this.state = {};
2431
+
2432
+ // if the popper variable is a configuration object, parse it to generate an HTMLElement
2433
+ // generate a default popper if is not defined
2434
+ var isNotDefined = typeof popper === 'undefined' || popper === null;
2435
+ var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
2436
+ if (isNotDefined || isConfig) {
2437
+ this._popper = this.parse(isConfig ? popper : {});
2438
+ }
2439
+ // otherwise, use the given HTMLElement as popper
2440
+ else {
2441
+ this._popper = popper.jquery ? popper[0] : popper;
2442
+ }
2443
+
2444
+ // with {} we create a new object with the options inside it
2445
+ this._options = Object.assign({}, DEFAULTS, options);
2446
+
2447
+ // refactoring modifiers' list
2448
+ this._options.modifiers = this._options.modifiers.map(function (modifier) {
2449
+ // remove ignored modifiers
2450
+ if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
2451
+
2452
+ // set the x-placement attribute before everything else because it could be used to add margins to the popper
2453
+ // margins needs to be calculated to get the correct popper offsets
2454
+ if (modifier === 'applyStyle') {
2455
+ this._popper.setAttribute('x-placement', this._options.placement);
2456
+ }
2457
+
2458
+ // return predefined modifier identified by string or keep the custom one
2459
+ return this.modifiers[modifier] || modifier;
2460
+ }.bind(this));
2461
+
2462
+ // make sure to apply the popper position before any computation
2463
+ this.state.position = this._getPosition(this._popper, this._reference);
2464
+ setStyle(this._popper, { position: this.state.position, top: 0 });
2465
+
2466
+ // fire the first update to position the popper in the right place
2467
+ this.update();
2468
+
2469
+ // setup event listeners, they will take care of update the position in specific situations
2470
+ this._setupEventListeners();
2471
+ return this;
2472
+ }
2473
+
2474
+ //
2475
+ // Methods
2476
+ //
2477
+ /**
2478
+ * Destroy the popper
2479
+ * @method
2480
+ * @memberof Popper
2481
+ */
2482
+ Popper.prototype.destroy = function () {
2483
+ this._popper.removeAttribute('x-placement');
2484
+ this._popper.style.left = '';
2485
+ this._popper.style.position = '';
2486
+ this._popper.style.top = '';
2487
+ this._popper.style[getSupportedPropertyName('transform')] = '';
2488
+ this._removeEventListeners();
2489
+
2490
+ // remove the popper if user explicity asked for the deletion on destroy
2491
+ if (this._options.removeOnDestroy) {
2492
+ this._popper.remove();
2493
+ }
2494
+ return this;
2495
+ };
2496
+
2497
+ /**
2498
+ * Updates the position of the popper, computing the new offsets and applying the new style
2499
+ * @method
2500
+ * @memberof Popper
2501
+ */
2502
+ Popper.prototype.update = function () {
2503
+ var data = { instance: this, styles: {} };
2504
+
2505
+ // store placement inside the data object, modifiers will be able to edit `placement` if needed
2506
+ // and refer to _originalPlacement to know the original value
2507
+ data.placement = this._options.placement;
2508
+ data._originalPlacement = this._options.placement;
2509
+
2510
+ // compute the popper and reference offsets and put them inside data.offsets
2511
+ data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
2512
+
2513
+ // get boundaries
2514
+ data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
2515
+
2516
+ data = this.runModifiers(data, this._options.modifiers);
2517
+
2518
+ if (typeof this.state.updateCallback === 'function') {
2519
+ this.state.updateCallback(data);
2520
+ }
2521
+ };
2522
+
2523
+ /**
2524
+ * If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
2525
+ * @method
2526
+ * @memberof Popper
2527
+ * @param {Function} callback
2528
+ */
2529
+ Popper.prototype.onCreate = function (callback) {
2530
+ // the createCallbacks return as first argument the popper instance
2531
+ callback(this);
2532
+ return this;
2533
+ };
2534
+
2535
+ /**
2536
+ * If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
2537
+ * used to style popper and its arrow.
2538
+ * NOTE: it doesn't get fired on the first call of the `Popper.update()` method inside the `Popper` constructor!
2539
+ * @method
2540
+ * @memberof Popper
2541
+ * @param {Function} callback
2542
+ */
2543
+ Popper.prototype.onUpdate = function (callback) {
2544
+ this.state.updateCallback = callback;
2545
+ return this;
2546
+ };
2547
+
2548
+ /**
2549
+ * Helper used to generate poppers from a configuration file
2550
+ * @method
2551
+ * @memberof Popper
2552
+ * @param config {Object} configuration
2553
+ * @returns {HTMLElement} popper
2554
+ */
2555
+ Popper.prototype.parse = function (config) {
2556
+ var defaultConfig = {
2557
+ tagName: 'div',
2558
+ classNames: ['popper'],
2559
+ attributes: [],
2560
+ parent: root.document.body,
2561
+ content: '',
2562
+ contentType: 'text',
2563
+ arrowTagName: 'div',
2564
+ arrowClassNames: ['popper__arrow'],
2565
+ arrowAttributes: ['x-arrow']
2566
+ };
2567
+ config = Object.assign({}, defaultConfig, config);
2568
+
2569
+ var d = root.document;
2570
+
2571
+ var popper = d.createElement(config.tagName);
2572
+ addClassNames(popper, config.classNames);
2573
+ addAttributes(popper, config.attributes);
2574
+ if (config.contentType === 'node') {
2575
+ popper.appendChild(config.content.jquery ? config.content[0] : config.content);
2576
+ } else if (config.contentType === 'html') {
2577
+ popper.innerHTML = config.content;
2578
+ } else {
2579
+ popper.textContent = config.content;
2580
+ }
2581
+
2582
+ if (config.arrowTagName) {
2583
+ var arrow = d.createElement(config.arrowTagName);
2584
+ addClassNames(arrow, config.arrowClassNames);
2585
+ addAttributes(arrow, config.arrowAttributes);
2586
+ popper.appendChild(arrow);
2587
+ }
2588
+
2589
+ var parent = config.parent.jquery ? config.parent[0] : config.parent;
2590
+
2591
+ // if the given parent is a string, use it to match an element
2592
+ // if more than one element is matched, the first one will be used as parent
2593
+ // if no elements are matched, the script will throw an error
2594
+ if (typeof parent === 'string') {
2595
+ parent = d.querySelectorAll(config.parent);
2596
+ if (parent.length > 1) {
2597
+ console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
2598
+ }
2599
+ if (parent.length === 0) {
2600
+ throw 'ERROR: the given `parent` doesn\'t exists!';
2601
+ }
2602
+ parent = parent[0];
2603
+ }
2604
+ // if the given parent is a DOM nodes list or an array of nodes with more than one element,
2605
+ // the first one will be used as parent
2606
+ if (parent.length > 1 && parent instanceof Element === false) {
2607
+ console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
2608
+ parent = parent[0];
2609
+ }
2610
+
2611
+ // append the generated popper to its parent
2612
+ parent.appendChild(popper);
2613
+
2614
+ return popper;
2615
+
2616
+ /**
2617
+ * Adds class names to the given element
2618
+ * @function
2619
+ * @ignore
2620
+ * @param {HTMLElement} target
2621
+ * @param {Array} classes
2622
+ */
2623
+ function addClassNames(element, classNames) {
2624
+ classNames.forEach(function (className) {
2625
+ element.classList.add(className);
2626
+ });
2627
+ }
2628
+
2629
+ /**
2630
+ * Adds attributes to the given element
2631
+ * @function
2632
+ * @ignore
2633
+ * @param {HTMLElement} target
2634
+ * @param {Array} attributes
2635
+ * @example
2636
+ * addAttributes(element, [ 'data-info:foobar' ]);
2637
+ */
2638
+ function addAttributes(element, attributes) {
2639
+ attributes.forEach(function (attribute) {
2640
+ element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
2641
+ });
2642
+ }
2643
+ };
2644
+
2645
+ /**
2646
+ * Helper used to get the position which will be applied to the popper
2647
+ * @method
2648
+ * @memberof Popper
2649
+ * @param config {HTMLElement} popper element
2650
+ * @param reference {HTMLElement} reference element
2651
+ * @returns {String} position
2652
+ */
2653
+ Popper.prototype._getPosition = function (popper, reference) {
2654
+ var container = getOffsetParent(reference);
2655
+
2656
+ if (this._options.forceAbsolute) {
2657
+ return 'absolute';
2658
+ }
2659
+
2660
+ // Decide if the popper will be fixed
2661
+ // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
2662
+ var isParentFixed = isFixed(reference, container);
2663
+ return isParentFixed ? 'fixed' : 'absolute';
2664
+ };
2665
+
2666
+ /**
2667
+ * Get offsets to the popper
2668
+ * @method
2669
+ * @memberof Popper
2670
+ * @access private
2671
+ * @param {Element} popper - the popper element
2672
+ * @param {Element} reference - the reference element (the popper will be relative to this)
2673
+ * @returns {Object} An object containing the offsets which will be applied to the popper
2674
+ */
2675
+ Popper.prototype._getOffsets = function (popper, reference, placement) {
2676
+ placement = placement.split('-')[0];
2677
+ var popperOffsets = {};
2678
+
2679
+ popperOffsets.position = this.state.position;
2680
+ var isParentFixed = popperOffsets.position === 'fixed';
2681
+
2682
+ //
2683
+ // Get reference element position
2684
+ //
2685
+ var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
2686
+
2687
+ //
2688
+ // Get popper sizes
2689
+ //
2690
+ var popperRect = getOuterSizes(popper);
2691
+
2692
+ //
2693
+ // Compute offsets of popper
2694
+ //
2695
+
2696
+ // depending by the popper placement we have to compute its offsets slightly differently
2697
+ if (['right', 'left'].indexOf(placement) !== -1) {
2698
+ popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
2699
+ if (placement === 'left') {
2700
+ popperOffsets.left = referenceOffsets.left - popperRect.width;
2701
+ } else {
2702
+ popperOffsets.left = referenceOffsets.right;
2703
+ }
2704
+ } else {
2705
+ popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
2706
+ if (placement === 'top') {
2707
+ popperOffsets.top = referenceOffsets.top - popperRect.height;
2708
+ } else {
2709
+ popperOffsets.top = referenceOffsets.bottom;
2710
+ }
2711
+ }
2712
+
2713
+ // Add width and height to our offsets object
2714
+ popperOffsets.width = popperRect.width;
2715
+ popperOffsets.height = popperRect.height;
2716
+
2717
+ return {
2718
+ popper: popperOffsets,
2719
+ reference: referenceOffsets
2720
+ };
2721
+ };
2722
+
2723
+ /**
2724
+ * Setup needed event listeners used to update the popper position
2725
+ * @method
2726
+ * @memberof Popper
2727
+ * @access private
2728
+ */
2729
+ Popper.prototype._setupEventListeners = function () {
2730
+ // NOTE: 1 DOM access here
2731
+ this.state.updateBound = this.update.bind(this);
2732
+ root.addEventListener('resize', this.state.updateBound);
2733
+ // if the boundariesElement is window we don't need to listen for the scroll event
2734
+ if (this._options.boundariesElement !== 'window') {
2735
+ var target = getScrollParent(this._reference);
2736
+ // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
2737
+ if (target === root.document.body || target === root.document.documentElement) {
2738
+ target = root;
2739
+ }
2740
+ target.addEventListener('scroll', this.state.updateBound);
2741
+ this.state.scrollTarget = target;
2742
+ }
2743
+ };
2744
+
2745
+ /**
2746
+ * Remove event listeners used to update the popper position
2747
+ * @method
2748
+ * @memberof Popper
2749
+ * @access private
2750
+ */
2751
+ Popper.prototype._removeEventListeners = function () {
2752
+ // NOTE: 1 DOM access here
2753
+ root.removeEventListener('resize', this.state.updateBound);
2754
+ if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
2755
+ this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
2756
+ this.state.scrollTarget = null;
2757
+ }
2758
+ this.state.updateBound = null;
2759
+ };
2760
+
2761
+ /**
2762
+ * Computed the boundaries limits and return them
2763
+ * @method
2764
+ * @memberof Popper
2765
+ * @access private
2766
+ * @param {Object} data - Object containing the property "offsets" generated by `_getOffsets`
2767
+ * @param {Number} padding - Boundaries padding
2768
+ * @param {Element} boundariesElement - Element used to define the boundaries
2769
+ * @returns {Object} Coordinates of the boundaries
2770
+ */
2771
+ Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
2772
+ // NOTE: 1 DOM access here
2773
+ var boundaries = {};
2774
+ var width, height;
2775
+ if (boundariesElement === 'window') {
2776
+ var body = root.document.body,
2777
+ html = root.document.documentElement;
2778
+
2779
+ height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
2780
+ width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
2781
+
2782
+ boundaries = {
2783
+ top: 0,
2784
+ right: width,
2785
+ bottom: height,
2786
+ left: 0
2787
+ };
2788
+ } else if (boundariesElement === 'viewport') {
2789
+ var offsetParent = getOffsetParent(this._popper);
2790
+ var scrollParent = getScrollParent(this._popper);
2791
+ var offsetParentRect = getOffsetRect(offsetParent);
2792
+
2793
+ // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
2794
+ var getScrollTopValue = function getScrollTopValue(element) {
2795
+ return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
2796
+ };
2797
+ var getScrollLeftValue = function getScrollLeftValue(element) {
2798
+ return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
2799
+ };
2800
+
2801
+ // if the popper is fixed we don't have to substract scrolling from the boundaries
2802
+ var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
2803
+ var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
2804
+
2805
+ boundaries = {
2806
+ top: 0 - (offsetParentRect.top - scrollTop),
2807
+ right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
2808
+ bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
2809
+ left: 0 - (offsetParentRect.left - scrollLeft)
2810
+ };
2811
+ } else {
2812
+ if (getOffsetParent(this._popper) === boundariesElement) {
2813
+ boundaries = {
2814
+ top: 0,
2815
+ left: 0,
2816
+ right: boundariesElement.clientWidth,
2817
+ bottom: boundariesElement.clientHeight
2818
+ };
2819
+ } else {
2820
+ boundaries = getOffsetRect(boundariesElement);
2821
+ }
2822
+ }
2823
+ boundaries.left += padding;
2824
+ boundaries.right -= padding;
2825
+ boundaries.top = boundaries.top + padding;
2826
+ boundaries.bottom = boundaries.bottom - padding;
2827
+ return boundaries;
2828
+ };
2829
+
2830
+ /**
2831
+ * Loop trough the list of modifiers and run them in order, each of them will then edit the data object
2832
+ * @method
2833
+ * @memberof Popper
2834
+ * @access public
2835
+ * @param {Object} data
2836
+ * @param {Array} modifiers
2837
+ * @param {Function} ends
2838
+ */
2839
+ Popper.prototype.runModifiers = function (data, modifiers, ends) {
2840
+ var modifiersToRun = modifiers.slice();
2841
+ if (ends !== undefined) {
2842
+ modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
2843
+ }
2844
+
2845
+ modifiersToRun.forEach(function (modifier) {
2846
+ if (isFunction(modifier)) {
2847
+ data = modifier.call(this, data);
2848
+ }
2849
+ }.bind(this));
2850
+
2851
+ return data;
2852
+ };
2853
+
2854
+ /**
2855
+ * Helper used to know if the given modifier depends from another one.
2856
+ * @method
2857
+ * @memberof Popper
2858
+ * @param {String} requesting - name of requesting modifier
2859
+ * @param {String} requested - name of requested modifier
2860
+ * @returns {Boolean}
2861
+ */
2862
+ Popper.prototype.isModifierRequired = function (requesting, requested) {
2863
+ var index = getArrayKeyIndex(this._options.modifiers, requesting);
2864
+ return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
2865
+ return modifier === requested;
2866
+ }).length;
2867
+ };
2868
+
2869
+ //
2870
+ // Modifiers
2871
+ //
2872
+
2873
+ /**
2874
+ * Modifiers list
2875
+ * @namespace Popper.modifiers
2876
+ * @memberof Popper
2877
+ * @type {Object}
2878
+ */
2879
+ Popper.prototype.modifiers = {};
2880
+
2881
+ /**
2882
+ * Apply the computed styles to the popper element
2883
+ * @method
2884
+ * @memberof Popper.modifiers
2885
+ * @argument {Object} data - The data object generated by `update` method
2886
+ * @returns {Object} The same data object
2887
+ */
2888
+ Popper.prototype.modifiers.applyStyle = function (data) {
2889
+ // apply the final offsets to the popper
2890
+ // NOTE: 1 DOM access here
2891
+ var styles = {
2892
+ position: data.offsets.popper.position
2893
+ };
2894
+
2895
+ // round top and left to avoid blurry text
2896
+ var left = Math.round(data.offsets.popper.left);
2897
+ var top = Math.round(data.offsets.popper.top);
2898
+
2899
+ // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
2900
+ // we automatically use the supported prefixed version if needed
2901
+ var prefixedProperty;
2902
+ if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
2903
+ styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
2904
+ styles.top = 0;
2905
+ styles.left = 0;
2906
+ }
2907
+ // othwerise, we use the standard `left` and `top` properties
2908
+ else {
2909
+ styles.left = left;
2910
+ styles.top = top;
2911
+ }
2912
+
2913
+ // any property present in `data.styles` will be applied to the popper,
2914
+ // in this way we can make the 3rd party modifiers add custom styles to it
2915
+ // Be aware, modifiers could override the properties defined in the previous
2916
+ // lines of this modifier!
2917
+ Object.assign(styles, data.styles);
2918
+
2919
+ setStyle(this._popper, styles);
2920
+
2921
+ // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
2922
+ // NOTE: 1 DOM access here
2923
+ this._popper.setAttribute('x-placement', data.placement);
2924
+
2925
+ // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
2926
+ if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
2927
+ setStyle(data.arrowElement, data.offsets.arrow);
2928
+ }
2929
+
2930
+ return data;
2931
+ };
2932
+
2933
+ /**
2934
+ * Modifier used to shift the popper on the start or end of its reference element side
2935
+ * @method
2936
+ * @memberof Popper.modifiers
2937
+ * @argument {Object} data - The data object generated by `update` method
2938
+ * @returns {Object} The data object, properly modified
2939
+ */
2940
+ Popper.prototype.modifiers.shift = function (data) {
2941
+ var placement = data.placement;
2942
+ var basePlacement = placement.split('-')[0];
2943
+ var shiftVariation = placement.split('-')[1];
2944
+
2945
+ // if shift shiftVariation is specified, run the modifier
2946
+ if (shiftVariation) {
2947
+ var reference = data.offsets.reference;
2948
+ var popper = getPopperClientRect(data.offsets.popper);
2949
+
2950
+ var shiftOffsets = {
2951
+ y: {
2952
+ start: { top: reference.top },
2953
+ end: { top: reference.top + reference.height - popper.height }
2954
+ },
2955
+ x: {
2956
+ start: { left: reference.left },
2957
+ end: { left: reference.left + reference.width - popper.width }
2958
+ }
2959
+ };
2960
+
2961
+ var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
2962
+
2963
+ data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
2964
+ }
2965
+
2966
+ return data;
2967
+ };
2968
+
2969
+ /**
2970
+ * Modifier used to make sure the popper does not overflows from it's boundaries
2971
+ * @method
2972
+ * @memberof Popper.modifiers
2973
+ * @argument {Object} data - The data object generated by `update` method
2974
+ * @returns {Object} The data object, properly modified
2975
+ */
2976
+ Popper.prototype.modifiers.preventOverflow = function (data) {
2977
+ var order = this._options.preventOverflowOrder;
2978
+ var popper = getPopperClientRect(data.offsets.popper);
2979
+
2980
+ var check = {
2981
+ left: function left() {
2982
+ var left = popper.left;
2983
+ if (popper.left < data.boundaries.left) {
2984
+ left = Math.max(popper.left, data.boundaries.left);
2985
+ }
2986
+ return { left: left };
2987
+ },
2988
+ right: function right() {
2989
+ var left = popper.left;
2990
+ if (popper.right > data.boundaries.right) {
2991
+ left = Math.min(popper.left, data.boundaries.right - popper.width);
2992
+ }
2993
+ return { left: left };
2994
+ },
2995
+ top: function top() {
2996
+ var top = popper.top;
2997
+ if (popper.top < data.boundaries.top) {
2998
+ top = Math.max(popper.top, data.boundaries.top);
2999
+ }
3000
+ return { top: top };
3001
+ },
3002
+ bottom: function bottom() {
3003
+ var top = popper.top;
3004
+ if (popper.bottom > data.boundaries.bottom) {
3005
+ top = Math.min(popper.top, data.boundaries.bottom - popper.height);
3006
+ }
3007
+ return { top: top };
3008
+ }
3009
+ };
3010
+
3011
+ order.forEach(function (direction) {
3012
+ data.offsets.popper = Object.assign(popper, check[direction]());
3013
+ });
3014
+
3015
+ return data;
3016
+ };
3017
+
3018
+ /**
3019
+ * Modifier used to make sure the popper is always near its reference
3020
+ * @method
3021
+ * @memberof Popper.modifiers
3022
+ * @argument {Object} data - The data object generated by _update method
3023
+ * @returns {Object} The data object, properly modified
3024
+ */
3025
+ Popper.prototype.modifiers.keepTogether = function (data) {
3026
+ var popper = getPopperClientRect(data.offsets.popper);
3027
+ var reference = data.offsets.reference;
3028
+ var f = Math.floor;
3029
+
3030
+ if (popper.right < f(reference.left)) {
3031
+ data.offsets.popper.left = f(reference.left) - popper.width;
3032
+ }
3033
+ if (popper.left > f(reference.right)) {
3034
+ data.offsets.popper.left = f(reference.right);
3035
+ }
3036
+ if (popper.bottom < f(reference.top)) {
3037
+ data.offsets.popper.top = f(reference.top) - popper.height;
3038
+ }
3039
+ if (popper.top > f(reference.bottom)) {
3040
+ data.offsets.popper.top = f(reference.bottom);
3041
+ }
3042
+
3043
+ return data;
3044
+ };
3045
+
3046
+ /**
3047
+ * Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
3048
+ * Requires the `preventOverflow` modifier before it in order to work.
3049
+ * **NOTE:** This modifier will run all its previous modifiers everytime it tries to flip the popper!
3050
+ * @method
3051
+ * @memberof Popper.modifiers
3052
+ * @argument {Object} data - The data object generated by _update method
3053
+ * @returns {Object} The data object, properly modified
3054
+ */
3055
+ Popper.prototype.modifiers.flip = function (data) {
3056
+ // check if preventOverflow is in the list of modifiers before the flip modifier.
3057
+ // otherwise flip would not work as expected.
3058
+ if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
3059
+ console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
3060
+ return data;
3061
+ }
3062
+
3063
+ if (data.flipped && data.placement === data._originalPlacement) {
3064
+ // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
3065
+ return data;
3066
+ }
3067
+
3068
+ var placement = data.placement.split('-')[0];
3069
+ var placementOpposite = getOppositePlacement(placement);
3070
+ var variation = data.placement.split('-')[1] || '';
3071
+
3072
+ var flipOrder = [];
3073
+ if (this._options.flipBehavior === 'flip') {
3074
+ flipOrder = [placement, placementOpposite];
3075
+ } else {
3076
+ flipOrder = this._options.flipBehavior;
3077
+ }
3078
+
3079
+ flipOrder.forEach(function (step, index) {
3080
+ if (placement !== step || flipOrder.length === index + 1) {
3081
+ return;
3082
+ }
3083
+
3084
+ placement = data.placement.split('-')[0];
3085
+ placementOpposite = getOppositePlacement(placement);
3086
+
3087
+ var popperOffsets = getPopperClientRect(data.offsets.popper);
3088
+
3089
+ // this boolean is used to distinguish right and bottom from top and left
3090
+ // they need different computations to get flipped
3091
+ var a = ['right', 'bottom'].indexOf(placement) !== -1;
3092
+
3093
+ // using Math.floor because the reference offsets may contain decimals we are not going to consider here
3094
+ if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
3095
+ // we'll use this boolean to detect any flip loop
3096
+ data.flipped = true;
3097
+ data.placement = flipOrder[index + 1];
3098
+ if (variation) {
3099
+ data.placement += '-' + variation;
3100
+ }
3101
+ data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
3102
+
3103
+ data = this.runModifiers(data, this._options.modifiers, this._flip);
3104
+ }
3105
+ }.bind(this));
3106
+ return data;
3107
+ };
3108
+
3109
+ /**
3110
+ * Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
3111
+ * The offsets will shift the popper on the side of its reference element.
3112
+ * @method
3113
+ * @memberof Popper.modifiers
3114
+ * @argument {Object} data - The data object generated by _update method
3115
+ * @returns {Object} The data object, properly modified
3116
+ */
3117
+ Popper.prototype.modifiers.offset = function (data) {
3118
+ var offset = this._options.offset;
3119
+ var popper = data.offsets.popper;
3120
+
3121
+ if (data.placement.indexOf('left') !== -1) {
3122
+ popper.top -= offset;
3123
+ } else if (data.placement.indexOf('right') !== -1) {
3124
+ popper.top += offset;
3125
+ } else if (data.placement.indexOf('top') !== -1) {
3126
+ popper.left -= offset;
3127
+ } else if (data.placement.indexOf('bottom') !== -1) {
3128
+ popper.left += offset;
3129
+ }
3130
+ return data;
3131
+ };
3132
+
3133
+ /**
3134
+ * Modifier used to move the arrows on the edge of the popper to make sure them are always between the popper and the reference element
3135
+ * It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
3136
+ * @method
3137
+ * @memberof Popper.modifiers
3138
+ * @argument {Object} data - The data object generated by _update method
3139
+ * @returns {Object} The data object, properly modified
3140
+ */
3141
+ Popper.prototype.modifiers.arrow = function (data) {
3142
+ var arrow = this._options.arrowElement;
3143
+ var arrowOffset = this._options.arrowOffset;
3144
+
3145
+ // if the arrowElement is a string, suppose it's a CSS selector
3146
+ if (typeof arrow === 'string') {
3147
+ arrow = this._popper.querySelector(arrow);
3148
+ }
3149
+
3150
+ // if arrow element is not found, don't run the modifier
3151
+ if (!arrow) {
3152
+ return data;
3153
+ }
3154
+
3155
+ // the arrow element must be child of its popper
3156
+ if (!this._popper.contains(arrow)) {
3157
+ console.warn('WARNING: `arrowElement` must be child of its popper element!');
3158
+ return data;
3159
+ }
3160
+
3161
+ // arrow depends on keepTogether in order to work
3162
+ if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
3163
+ console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
3164
+ return data;
3165
+ }
3166
+
3167
+ var arrowStyle = {};
3168
+ var placement = data.placement.split('-')[0];
3169
+ var popper = getPopperClientRect(data.offsets.popper);
3170
+ var reference = data.offsets.reference;
3171
+ var isVertical = ['left', 'right'].indexOf(placement) !== -1;
3172
+
3173
+ var len = isVertical ? 'height' : 'width';
3174
+ var side = isVertical ? 'top' : 'left';
3175
+ var translate = isVertical ? 'translateY' : 'translateX';
3176
+ var altSide = isVertical ? 'left' : 'top';
3177
+ var opSide = isVertical ? 'bottom' : 'right';
3178
+ var arrowSize = getOuterSizes(arrow)[len];
3179
+
3180
+ //
3181
+ // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
3182
+ //
3183
+
3184
+ // top/left side
3185
+ if (reference[opSide] - arrowSize < popper[side]) {
3186
+ data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
3187
+ }
3188
+ // bottom/right side
3189
+ if (reference[side] + arrowSize > popper[opSide]) {
3190
+ data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
3191
+ }
3192
+
3193
+ // compute center of the popper
3194
+ var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
3195
+
3196
+ var sideValue = center - popper[side];
3197
+
3198
+ // prevent arrow from being placed not contiguously to its popper
3199
+ sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
3200
+ arrowStyle[side] = sideValue;
3201
+ arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
3202
+
3203
+ data.offsets.arrow = arrowStyle;
3204
+ data.arrowElement = arrow;
3205
+
3206
+ return data;
3207
+ };
3208
+
3209
+ //
3210
+ // Helpers
3211
+ //
3212
+
3213
+ /**
3214
+ * Get the outer sizes of the given element (offset size + margins)
3215
+ * @function
3216
+ * @ignore
3217
+ * @argument {Element} element
3218
+ * @returns {Object} object containing width and height properties
3219
+ */
3220
+ function getOuterSizes(element) {
3221
+ // NOTE: 1 DOM access here
3222
+ var _display = element.style.display,
3223
+ _visibility = element.style.visibility;
3224
+ element.style.display = 'block';element.style.visibility = 'hidden';
3225
+ var calcWidthToForceRepaint = element.offsetWidth;
3226
+
3227
+ // original method
3228
+ var styles = root.getComputedStyle(element);
3229
+ var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
3230
+ var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
3231
+ var result = { width: element.offsetWidth + y, height: element.offsetHeight + x };
3232
+
3233
+ // reset element styles
3234
+ element.style.display = _display;element.style.visibility = _visibility;
3235
+ return result;
3236
+ }
3237
+
3238
+ /**
3239
+ * Get the opposite placement of the given one/
3240
+ * @function
3241
+ * @ignore
3242
+ * @argument {String} placement
3243
+ * @returns {String} flipped placement
3244
+ */
3245
+ function getOppositePlacement(placement) {
3246
+ var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
3247
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
3248
+ return hash[matched];
3249
+ });
3250
+ }
3251
+
3252
+ /**
3253
+ * Given the popper offsets, generate an output similar to getBoundingClientRect
3254
+ * @function
3255
+ * @ignore
3256
+ * @argument {Object} popperOffsets
3257
+ * @returns {Object} ClientRect like output
3258
+ */
3259
+ function getPopperClientRect(popperOffsets) {
3260
+ var offsets = Object.assign({}, popperOffsets);
3261
+ offsets.right = offsets.left + offsets.width;
3262
+ offsets.bottom = offsets.top + offsets.height;
3263
+ return offsets;
3264
+ }
3265
+
3266
+ /**
3267
+ * Given an array and the key to find, returns its index
3268
+ * @function
3269
+ * @ignore
3270
+ * @argument {Array} arr
3271
+ * @argument keyToFind
3272
+ * @returns index or null
3273
+ */
3274
+ function getArrayKeyIndex(arr, keyToFind) {
3275
+ var i = 0,
3276
+ key;
3277
+ for (key in arr) {
3278
+ if (arr[key] === keyToFind) {
3279
+ return i;
3280
+ }
3281
+ i++;
3282
+ }
3283
+ return null;
3284
+ }
3285
+
3286
+ /**
3287
+ * Get CSS computed property of the given element
3288
+ * @function
3289
+ * @ignore
3290
+ * @argument {Eement} element
3291
+ * @argument {String} property
3292
+ */
3293
+ function getStyleComputedProperty(element, property) {
3294
+ // NOTE: 1 DOM access here
3295
+ var css = root.getComputedStyle(element, null);
3296
+ return css[property];
3297
+ }
3298
+
3299
+ /**
3300
+ * Returns the offset parent of the given element
3301
+ * @function
3302
+ * @ignore
3303
+ * @argument {Element} element
3304
+ * @returns {Element} offset parent
3305
+ */
3306
+ function getOffsetParent(element) {
3307
+ // NOTE: 1 DOM access here
3308
+ var offsetParent = element.offsetParent;
3309
+ return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
3310
+ }
3311
+
3312
+ /**
3313
+ * Returns the scrolling parent of the given element
3314
+ * @function
3315
+ * @ignore
3316
+ * @argument {Element} element
3317
+ * @returns {Element} offset parent
3318
+ */
3319
+ function getScrollParent(element) {
3320
+ var parent = element.parentNode;
3321
+
3322
+ if (!parent) {
3323
+ return element;
3324
+ }
3325
+
3326
+ if (parent === root.document) {
3327
+ // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
3328
+ // greater than 0 and return the proper element
3329
+ if (root.document.body.scrollTop || root.document.body.scrollLeft) {
3330
+ return root.document.body;
3331
+ } else {
3332
+ return root.document.documentElement;
3333
+ }
3334
+ }
3335
+
3336
+ // Firefox want us to check `-x` and `-y` variations as well
3337
+ if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
3338
+ // If the detected scrollParent is body, we perform an additional check on its parentNode
3339
+ // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
3340
+ // fixes issue #65
3341
+ return parent;
3342
+ }
3343
+ return getScrollParent(element.parentNode);
3344
+ }
3345
+
3346
+ /**
3347
+ * Check if the given element is fixed or is inside a fixed parent
3348
+ * @function
3349
+ * @ignore
3350
+ * @argument {Element} element
3351
+ * @argument {Element} customContainer
3352
+ * @returns {Boolean} answer to "isFixed?"
3353
+ */
3354
+ function isFixed(element) {
3355
+ if (element === root.document.body) {
3356
+ return false;
3357
+ }
3358
+ if (getStyleComputedProperty(element, 'position') === 'fixed') {
3359
+ return true;
3360
+ }
3361
+ return element.parentNode ? isFixed(element.parentNode) : element;
3362
+ }
3363
+
3364
+ /**
3365
+ * Set the style to the given popper
3366
+ * @function
3367
+ * @ignore
3368
+ * @argument {Element} element - Element to apply the style to
3369
+ * @argument {Object} styles - Object with a list of properties and values which will be applied to the element
3370
+ */
3371
+ function setStyle(element, styles) {
3372
+ function is_numeric(n) {
3373
+ return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
3374
+ }
3375
+ Object.keys(styles).forEach(function (prop) {
3376
+ var unit = '';
3377
+ // add unit if the value is numeric and is one of the following
3378
+ if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
3379
+ unit = 'px';
3380
+ }
3381
+ element.style[prop] = styles[prop] + unit;
3382
+ });
3383
+ }
3384
+
3385
+ /**
3386
+ * Check if the given variable is a function
3387
+ * @function
3388
+ * @ignore
3389
+ * @argument {*} functionToCheck - variable to check
3390
+ * @returns {Boolean} answer to: is a function?
3391
+ */
3392
+ function isFunction(functionToCheck) {
3393
+ var getType = {};
3394
+ return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
3395
+ }
3396
+
3397
+ /**
3398
+ * Get the position of the given element, relative to its offset parent
3399
+ * @function
3400
+ * @ignore
3401
+ * @param {Element} element
3402
+ * @return {Object} position - Coordinates of the element and its `scrollTop`
3403
+ */
3404
+ function getOffsetRect(element) {
3405
+ var elementRect = {
3406
+ width: element.offsetWidth,
3407
+ height: element.offsetHeight,
3408
+ left: element.offsetLeft,
3409
+ top: element.offsetTop
3410
+ };
3411
+
3412
+ elementRect.right = elementRect.left + elementRect.width;
3413
+ elementRect.bottom = elementRect.top + elementRect.height;
3414
+
3415
+ // position
3416
+ return elementRect;
3417
+ }
3418
+
3419
+ /**
3420
+ * Get bounding client rect of given element
3421
+ * @function
3422
+ * @ignore
3423
+ * @param {HTMLElement} element
3424
+ * @return {Object} client rect
3425
+ */
3426
+ function getBoundingClientRect(element) {
3427
+ var rect = element.getBoundingClientRect();
3428
+
3429
+ // whether the IE version is lower than 11
3430
+ var isIE = navigator.userAgent.indexOf("MSIE") != -1;
3431
+
3432
+ // fix ie document bounding top always 0 bug
3433
+ var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
3434
+
3435
+ return {
3436
+ left: rect.left,
3437
+ top: rectTop,
3438
+ right: rect.right,
3439
+ bottom: rect.bottom,
3440
+ width: rect.right - rect.left,
3441
+ height: rect.bottom - rectTop
3442
+ };
3443
+ }
3444
+
3445
+ /**
3446
+ * Given an element and one of its parents, return the offset
3447
+ * @function
3448
+ * @ignore
3449
+ * @param {HTMLElement} element
3450
+ * @param {HTMLElement} parent
3451
+ * @return {Object} rect
3452
+ */
3453
+ function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
3454
+ var elementRect = getBoundingClientRect(element);
3455
+ var parentRect = getBoundingClientRect(parent);
3456
+
3457
+ if (fixed) {
3458
+ var scrollParent = getScrollParent(parent);
3459
+ parentRect.top += scrollParent.scrollTop;
3460
+ parentRect.bottom += scrollParent.scrollTop;
3461
+ parentRect.left += scrollParent.scrollLeft;
3462
+ parentRect.right += scrollParent.scrollLeft;
3463
+ }
3464
+
3465
+ var rect = {
3466
+ top: elementRect.top - parentRect.top,
3467
+ left: elementRect.left - parentRect.left,
3468
+ bottom: elementRect.top - parentRect.top + elementRect.height,
3469
+ right: elementRect.left - parentRect.left + elementRect.width,
3470
+ width: elementRect.width,
3471
+ height: elementRect.height
3472
+ };
3473
+ return rect;
3474
+ }
3475
+
3476
+ /**
3477
+ * Get the prefixed supported property name
3478
+ * @function
3479
+ * @ignore
3480
+ * @argument {String} property (camelCase)
3481
+ * @returns {String} prefixed property (camelCase)
3482
+ */
3483
+ function getSupportedPropertyName(property) {
3484
+ var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
3485
+
3486
+ for (var i = 0; i < prefixes.length; i++) {
3487
+ var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
3488
+ if (typeof root.document.body.style[toCheck] !== 'undefined') {
3489
+ return toCheck;
3490
+ }
3491
+ }
3492
+ return null;
3493
+ }
3494
+
3495
+ /**
3496
+ * The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
3497
+ * objects to a target object. It will return the target object.
3498
+ * This polyfill doesn't support symbol properties, since ES5 doesn't have symbols anyway
3499
+ * Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
3500
+ * @function
3501
+ * @ignore
3502
+ */
3503
+ if (!Object.assign) {
3504
+ Object.defineProperty(Object, 'assign', {
3505
+ enumerable: false,
3506
+ configurable: true,
3507
+ writable: true,
3508
+ value: function value(target) {
3509
+ if (target === undefined || target === null) {
3510
+ throw new TypeError('Cannot convert first argument to object');
3511
+ }
3512
+
3513
+ var to = Object(target);
3514
+ for (var i = 1; i < arguments.length; i++) {
3515
+ var nextSource = arguments[i];
3516
+ if (nextSource === undefined || nextSource === null) {
3517
+ continue;
3518
+ }
3519
+ nextSource = Object(nextSource);
3520
+
3521
+ var keysArray = Object.keys(nextSource);
3522
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
3523
+ var nextKey = keysArray[nextIndex];
3524
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
3525
+ if (desc !== undefined && desc.enumerable) {
3526
+ to[nextKey] = nextSource[nextKey];
3527
+ }
3528
+ }
3529
+ }
3530
+ return to;
3531
+ }
3532
+ });
3533
+ }
3534
+
3535
+ return Popper;
3536
+ });
3537
+
3538
+ /***/ }),
3539
+ /* 24 */,
3540
+ /* 25 */,
3541
+ /* 26 */,
3542
+ /* 27 */,
3543
+ /* 28 */,
3544
+ /* 29 */,
3545
+ /* 30 */
3546
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3547
+
3548
+ "use strict";
3549
+ /* harmony default export */ __webpack_exports__["a"] = (function (ref) {
3550
+ return {
3551
+ methods: {
3552
+ focus: function focus() {
3553
+ this.$refs[ref].focus();
3554
+ }
3555
+ }
3556
+ };
3557
+ });;
3558
+
3559
+ /***/ }),
3560
+ /* 31 */,
3561
+ /* 32 */,
3562
+ /* 33 */
3563
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3564
+
3565
+ "use strict";
3566
+ /* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
3567
+ /* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
3568
+
3569
+
3570
+
3571
+ /* harmony default export */ __webpack_exports__["a"] = ({
3572
+ bind: function bind(el, binding, vnode) {
3573
+ var interval = null;
3574
+ var startTime = void 0;
3575
+ var maxIntervals = Object(_utils_util__WEBPACK_IMPORTED_MODULE_1__[/* isMac */ "p"])() ? 100 : 200;
3576
+ var handler = function handler() {
3577
+ return vnode.context[binding.expression].apply();
3578
+ };
3579
+ var clear = function clear() {
3580
+ if (Date.now() - startTime < maxIntervals) {
3581
+ handler();
3582
+ }
3583
+ clearInterval(interval);
3584
+ interval = null;
3585
+ };
3586
+
3587
+ Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* on */ "g"])(el, 'mousedown', function (e) {
3588
+ if (e.button !== 0) return;
3589
+ startTime = Date.now();
3590
+ Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* once */ "h"])(document, 'mouseup', clear);
3591
+ clearInterval(interval);
3592
+ interval = setInterval(handler, maxIntervals);
3593
+ });
3594
+ }
3595
+ });
3596
+
3597
+ /***/ }),
3598
+ /* 34 */,
3599
+ /* 35 */,
3600
+ /* 36 */,
3601
+ /* 37 */
3602
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3603
+
3604
+ "use strict";
3605
+ // ESM COMPAT FLAG
3606
+ __webpack_require__.r(__webpack_exports__);
3607
+
3608
+ // EXTERNAL MODULE: ./src/utils/vue-popper.js
3609
+ var vue_popper = __webpack_require__(10);
3610
+
3611
+ // EXTERNAL MODULE: external "throttle-debounce/debounce"
3612
+ var debounce_ = __webpack_require__(22);
3613
+ var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
3614
+
3615
+ // EXTERNAL MODULE: ./src/utils/dom.js
3616
+ var dom = __webpack_require__(1);
3617
+
3618
+ // EXTERNAL MODULE: ./src/utils/util.js
3619
+ var util = __webpack_require__(3);
3620
+
3621
+ // EXTERNAL MODULE: external "vue"
3622
+ var external_vue_ = __webpack_require__(0);
3623
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
3624
+
3625
+ // CONCATENATED MODULE: ./packages/tooltip/src/main.js
3626
+
3627
+
3628
+
3629
+
3630
+
3631
+
3632
+ /* harmony default export */ var main = ({
3633
+ name: 'ElTooltip',
3634
+
3635
+ mixins: [vue_popper["a" /* default */]],
3636
+
3637
+ props: {
3638
+ openDelay: {
3639
+ type: Number,
3640
+ default: 0
3641
+ },
3642
+ disabled: Boolean,
3643
+ manual: Boolean,
3644
+ effect: {
3645
+ type: String,
3646
+ default: 'dark'
3647
+ },
3648
+ arrowOffset: {
3649
+ type: Number,
3650
+ default: 0
3651
+ },
3652
+ popperClass: String,
3653
+ content: String,
3654
+ visibleArrow: {
3655
+ default: true
3656
+ },
3657
+ transition: {
3658
+ type: String,
3659
+ default: 'el-fade-in-linear'
3660
+ },
3661
+ popperOptions: {
3662
+ default: function _default() {
3663
+ return {
3664
+ boundariesPadding: 10,
3665
+ gpuAcceleration: false
3666
+ };
3667
+ }
3668
+ },
3669
+ enterable: {
3670
+ type: Boolean,
3671
+ default: true
3672
+ },
3673
+ hideAfter: {
3674
+ type: Number,
3675
+ default: 0
3676
+ },
3677
+ tabindex: {
3678
+ type: Number,
3679
+ default: 0
3680
+ }
3681
+ },
3682
+
3683
+ data: function data() {
3684
+ return {
3685
+ tooltipId: 'el-tooltip-' + Object(util["g" /* generateId */])(),
3686
+ timeoutPending: null,
3687
+ focusing: false
3688
+ };
3689
+ },
3690
+ beforeCreate: function beforeCreate() {
3691
+ var _this = this;
3692
+
3693
+ if (this.$isServer) return;
3694
+
3695
+ this.popperVM = new external_vue_default.a({
3696
+ data: { node: '' },
3697
+ render: function render(h) {
3698
+ return this.node;
3699
+ }
3700
+ }).$mount();
3701
+
3702
+ this.debounceClose = debounce_default()(200, function () {
3703
+ return _this.handleClosePopper();
3704
+ });
3705
+ },
3706
+ render: function render(h) {
3707
+ var _this2 = this;
3708
+
3709
+ if (this.popperVM) {
3710
+ this.popperVM.node = h(
3711
+ 'transition',
3712
+ {
3713
+ attrs: {
3714
+ name: this.transition
3715
+ },
3716
+ on: {
3717
+ 'afterLeave': this.doDestroy
3718
+ }
3719
+ },
3720
+ [h(
3721
+ 'div',
3722
+ {
3723
+ on: {
3724
+ 'mouseleave': function mouseleave() {
3725
+ _this2.setExpectedState(false);_this2.debounceClose();
3726
+ },
3727
+ 'mouseenter': function mouseenter() {
3728
+ _this2.setExpectedState(true);
3729
+ }
3730
+ },
3731
+
3732
+ ref: 'popper',
3733
+ attrs: { role: 'tooltip',
3734
+ id: this.tooltipId,
3735
+ 'aria-hidden': this.disabled || !this.showPopper ? 'true' : 'false'
3736
+ },
3737
+ directives: [{
3738
+ name: 'show',
3739
+ value: !this.disabled && this.showPopper
3740
+ }],
3741
+
3742
+ 'class': ['el-tooltip__popper', 'is-' + this.effect, this.popperClass] },
3743
+ [this.$slots.content || this.content]
3744
+ )]
3745
+ );
3746
+ }
3747
+
3748
+ var firstElement = this.getFirstElement();
3749
+ if (!firstElement) return null;
3750
+
3751
+ var data = firstElement.data = firstElement.data || {};
3752
+ data.staticClass = this.addTooltipClass(data.staticClass);
3753
+
3754
+ return firstElement;
3755
+ },
3756
+ mounted: function mounted() {
3757
+ var _this3 = this;
3758
+
3759
+ this.referenceElm = this.$el;
3760
+ if (this.$el.nodeType === 1) {
3761
+ this.$el.setAttribute('aria-describedby', this.tooltipId);
3762
+ this.$el.setAttribute('tabindex', this.tabindex);
3763
+ Object(dom["g" /* on */])(this.referenceElm, 'mouseenter', this.show);
3764
+ Object(dom["g" /* on */])(this.referenceElm, 'mouseleave', this.hide);
3765
+ Object(dom["g" /* on */])(this.referenceElm, 'focus', function () {
3766
+ if (!_this3.$slots.default || !_this3.$slots.default.length) {
3767
+ _this3.handleFocus();
3768
+ return;
3769
+ }
3770
+ var instance = _this3.$slots.default[0].componentInstance;
3771
+ if (instance && instance.focus) {
3772
+ instance.focus();
3773
+ } else {
3774
+ _this3.handleFocus();
3775
+ }
3776
+ });
3777
+ Object(dom["g" /* on */])(this.referenceElm, 'blur', this.handleBlur);
3778
+ Object(dom["g" /* on */])(this.referenceElm, 'click', this.removeFocusing);
3779
+ }
3780
+ // fix issue https://github.com/ElemeFE/element/issues/14424
3781
+ if (this.value && this.popperVM) {
3782
+ this.popperVM.$nextTick(function () {
3783
+ if (_this3.value) {
3784
+ _this3.updatePopper();
3785
+ }
3786
+ });
3787
+ }
3788
+ },
3789
+
3790
+ watch: {
3791
+ focusing: function focusing(val) {
3792
+ if (val) {
3793
+ Object(dom["a" /* addClass */])(this.referenceElm, 'focusing');
3794
+ } else {
3795
+ Object(dom["i" /* removeClass */])(this.referenceElm, 'focusing');
3796
+ }
3797
+ }
3798
+ },
3799
+ methods: {
3800
+ show: function show() {
3801
+ this.setExpectedState(true);
3802
+ this.handleShowPopper();
3803
+ },
3804
+ hide: function hide() {
3805
+ this.setExpectedState(false);
3806
+ this.debounceClose();
3807
+ },
3808
+ handleFocus: function handleFocus() {
3809
+ this.focusing = true;
3810
+ this.show();
3811
+ },
3812
+ handleBlur: function handleBlur() {
3813
+ this.focusing = false;
3814
+ this.hide();
3815
+ },
3816
+ removeFocusing: function removeFocusing() {
3817
+ this.focusing = false;
3818
+ },
3819
+ addTooltipClass: function addTooltipClass(prev) {
3820
+ if (!prev) {
3821
+ return 'el-tooltip';
3822
+ } else {
3823
+ return 'el-tooltip ' + prev.replace('el-tooltip', '');
3824
+ }
3825
+ },
3826
+ handleShowPopper: function handleShowPopper() {
3827
+ var _this4 = this;
3828
+
3829
+ if (!this.expectedState || this.manual) return;
3830
+ clearTimeout(this.timeout);
3831
+ this.timeout = setTimeout(function () {
3832
+ _this4.showPopper = true;
3833
+ }, this.openDelay);
3834
+
3835
+ if (this.hideAfter > 0) {
3836
+ this.timeoutPending = setTimeout(function () {
3837
+ _this4.showPopper = false;
3838
+ }, this.hideAfter);
3839
+ }
3840
+ },
3841
+ handleClosePopper: function handleClosePopper() {
3842
+ if (this.enterable && this.expectedState || this.manual) return;
3843
+ clearTimeout(this.timeout);
3844
+
3845
+ if (this.timeoutPending) {
3846
+ clearTimeout(this.timeoutPending);
3847
+ }
3848
+ this.showPopper = false;
3849
+
3850
+ if (this.disabled) {
3851
+ this.doDestroy();
3852
+ }
3853
+ },
3854
+ setExpectedState: function setExpectedState(expectedState) {
3855
+ if (expectedState === false) {
3856
+ clearTimeout(this.timeoutPending);
3857
+ }
3858
+ this.expectedState = expectedState;
3859
+ },
3860
+ getFirstElement: function getFirstElement() {
3861
+ var slots = this.$slots.default;
3862
+ if (!Array.isArray(slots)) return null;
3863
+ var element = null;
3864
+ for (var index = 0; index < slots.length; index++) {
3865
+ if (slots[index] && slots[index].tag) {
3866
+ element = slots[index];
3867
+ break;
3868
+ };
3869
+ }
3870
+ return element;
3871
+ }
3872
+ },
3873
+
3874
+ beforeDestroy: function beforeDestroy() {
3875
+ this.popperVM && this.popperVM.$destroy();
3876
+ },
3877
+ destroyed: function destroyed() {
3878
+ var reference = this.referenceElm;
3879
+ if (reference.nodeType === 1) {
3880
+ Object(dom["f" /* off */])(reference, 'mouseenter', this.show);
3881
+ Object(dom["f" /* off */])(reference, 'mouseleave', this.hide);
3882
+ Object(dom["f" /* off */])(reference, 'focus', this.handleFocus);
3883
+ Object(dom["f" /* off */])(reference, 'blur', this.handleBlur);
3884
+ Object(dom["f" /* off */])(reference, 'click', this.removeFocusing);
3885
+ }
3886
+ }
3887
+ });
3888
+ // CONCATENATED MODULE: ./packages/tooltip/index.js
89
3889
 
90
- /***/ 0:
3890
+
3891
+ /* istanbul ignore next */
3892
+ main.install = function (Vue) {
3893
+ Vue.component(main.name, main);
3894
+ };
3895
+
3896
+ /* harmony default export */ var tooltip = __webpack_exports__["default"] = (main);
3897
+
3898
+ /***/ }),
3899
+ /* 38 */,
3900
+ /* 39 */,
3901
+ /* 40 */,
3902
+ /* 41 */,
3903
+ /* 42 */,
3904
+ /* 43 */,
3905
+ /* 44 */,
3906
+ /* 45 */,
3907
+ /* 46 */,
3908
+ /* 47 */,
3909
+ /* 48 */,
3910
+ /* 49 */,
3911
+ /* 50 */,
3912
+ /* 51 */,
3913
+ /* 52 */,
3914
+ /* 53 */,
3915
+ /* 54 */
91
3916
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
3917
 
93
3918
  "use strict";
94
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
95
- /* globals __VUE_SSR_CONTEXT__ */
3919
+ // ESM COMPAT FLAG
3920
+ __webpack_require__.r(__webpack_exports__);
96
3921
 
97
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
98
- // This module is a runtime utility for cleaner component module output and will
99
- // be included in the final webpack user bundle.
3922
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=template&id=8439d118
3923
+ var render = function render() {
3924
+ var _vm = this,
3925
+ _c = _vm._self._c
3926
+ return _c(
3927
+ "div",
3928
+ {
3929
+ class: [
3930
+ "el-input-number",
3931
+ _vm.inputNumberSize ? "el-input-number--" + _vm.inputNumberSize : "",
3932
+ { "is-disabled": _vm.inputNumberDisabled },
3933
+ { "is-without-controls": !_vm.showControls },
3934
+ { "is-controls-right": _vm.controlsAtRight },
3935
+ ],
3936
+ on: {
3937
+ dragstart: function ($event) {
3938
+ $event.preventDefault()
3939
+ },
3940
+ },
3941
+ },
3942
+ [
3943
+ _vm.showControls
3944
+ ? _c(
3945
+ "span",
3946
+ {
3947
+ directives: [
3948
+ {
3949
+ name: "repeat-click",
3950
+ rawName: "v-repeat-click",
3951
+ value: _vm.decrease,
3952
+ expression: "decrease",
3953
+ },
3954
+ ],
3955
+ staticClass: "el-input-number__decrease",
3956
+ class: { "is-disabled": _vm.minDisabled },
3957
+ attrs: { role: "button" },
3958
+ on: {
3959
+ keydown: function ($event) {
3960
+ if (
3961
+ !$event.type.indexOf("key") &&
3962
+ _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
3963
+ )
3964
+ return null
3965
+ return _vm.decrease.apply(null, arguments)
3966
+ },
3967
+ },
3968
+ },
3969
+ [
3970
+ _c("i", {
3971
+ class: `el-icon-${
3972
+ _vm.controlsAtRight ? "arrow-down" : "minus"
3973
+ }`,
3974
+ }),
3975
+ ]
3976
+ )
3977
+ : _vm._e(),
3978
+ _vm.showControls
3979
+ ? _c(
3980
+ "span",
3981
+ {
3982
+ directives: [
3983
+ {
3984
+ name: "repeat-click",
3985
+ rawName: "v-repeat-click",
3986
+ value: _vm.increase,
3987
+ expression: "increase",
3988
+ },
3989
+ ],
3990
+ staticClass: "el-input-number__increase",
3991
+ class: { "is-disabled": _vm.maxDisabled },
3992
+ attrs: { role: "button" },
3993
+ on: {
3994
+ keydown: function ($event) {
3995
+ if (
3996
+ !$event.type.indexOf("key") &&
3997
+ _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
3998
+ )
3999
+ return null
4000
+ return _vm.increase.apply(null, arguments)
4001
+ },
4002
+ },
4003
+ },
4004
+ [
4005
+ _c("i", {
4006
+ class: `el-icon-${_vm.controlsAtRight ? "arrow-up" : "plus"}`,
4007
+ }),
4008
+ ]
4009
+ )
4010
+ : _vm._e(),
4011
+ _c("el-input", {
4012
+ ref: "input",
4013
+ attrs: {
4014
+ value: _vm.displayValue,
4015
+ placeholder: _vm.placeholder,
4016
+ disabled: _vm.inputNumberDisabled,
4017
+ size: _vm.inputNumberSize,
4018
+ max: _vm.max,
4019
+ min: _vm.min,
4020
+ name: _vm.name,
4021
+ label: _vm.label,
4022
+ },
4023
+ on: {
4024
+ blur: _vm.handleBlur,
4025
+ focus: _vm.handleFocus,
4026
+ input: _vm.handleInput,
4027
+ change: _vm.handleInputChange,
4028
+ },
4029
+ nativeOn: {
4030
+ keydown: [
4031
+ function ($event) {
4032
+ if (
4033
+ !$event.type.indexOf("key") &&
4034
+ _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])
4035
+ )
4036
+ return null
4037
+ $event.preventDefault()
4038
+ return _vm.increase.apply(null, arguments)
4039
+ },
4040
+ function ($event) {
4041
+ if (
4042
+ !$event.type.indexOf("key") &&
4043
+ _vm._k($event.keyCode, "down", 40, $event.key, [
4044
+ "Down",
4045
+ "ArrowDown",
4046
+ ])
4047
+ )
4048
+ return null
4049
+ $event.preventDefault()
4050
+ return _vm.decrease.apply(null, arguments)
4051
+ },
4052
+ ],
4053
+ },
4054
+ }),
4055
+ ],
4056
+ 1
4057
+ )
4058
+ }
4059
+ var staticRenderFns = []
4060
+ render._withStripped = true
100
4061
 
101
- function normalizeComponent(
102
- scriptExports,
103
- render,
104
- staticRenderFns,
105
- functionalTemplate,
106
- injectStyles,
107
- scopeId,
108
- moduleIdentifier /* server only */,
109
- shadowMode /* vue-cli only */
110
- ) {
111
- // Vue.extend constructor export interop
112
- var options =
113
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
114
4062
 
115
- // render functions
116
- if (render) {
117
- options.render = render
118
- options.staticRenderFns = staticRenderFns
119
- options._compiled = true
120
- }
4063
+ // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=template&id=8439d118
121
4064
 
122
- // functional template
123
- if (functionalTemplate) {
124
- options.functional = true
125
- }
4065
+ // EXTERNAL MODULE: ./packages/input/index.js + 6 modules
4066
+ var input = __webpack_require__(18);
126
4067
 
127
- // scopedId
128
- if (scopeId) {
129
- options._scopeId = 'data-v-' + scopeId
130
- }
4068
+ // EXTERNAL MODULE: ./src/mixins/focus.js
4069
+ var mixins_focus = __webpack_require__(30);
131
4070
 
132
- var hook
133
- if (moduleIdentifier) {
134
- // server build
135
- hook = function (context) {
136
- // 2.3 injection
137
- context =
138
- context || // cached call
139
- (this.$vnode && this.$vnode.ssrContext) || // stateful
140
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
141
- // 2.2 with runInNewContext: true
142
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
143
- context = __VUE_SSR_CONTEXT__
144
- }
145
- // inject component styles
146
- if (injectStyles) {
147
- injectStyles.call(this, context)
148
- }
149
- // register component module identifier for async chunk inferrence
150
- if (context && context._registeredComponents) {
151
- context._registeredComponents.add(moduleIdentifier)
152
- }
153
- }
154
- // used by ssr in case component is cached and beforeCreate
155
- // never gets called
156
- options._ssrRegister = hook
157
- } else if (injectStyles) {
158
- hook = shadowMode
159
- ? function () {
160
- injectStyles.call(
161
- this,
162
- (options.functional ? this.parent : this).$root.$options.shadowRoot
163
- )
164
- }
165
- : injectStyles
166
- }
4071
+ // EXTERNAL MODULE: ./src/directives/repeat-click.js
4072
+ var repeat_click = __webpack_require__(33);
167
4073
 
168
- if (hook) {
169
- if (options.functional) {
170
- // for template-only hot-reload because in that case the render fn doesn't
171
- // go through the normalizer
172
- options._injectStyles = hook
173
- // register for functional component in vue file
174
- var originalRender = options.render
175
- options.render = function renderWithStyleInjection(h, context) {
176
- hook.call(context)
177
- return originalRender(h, context)
178
- }
179
- } else {
180
- // inject component registration as beforeCreate hook
181
- var existing = options.beforeCreate
182
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
183
- }
184
- }
4074
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=script&lang=js
185
4075
 
186
- return {
187
- exports: scriptExports,
188
- options: options
189
- }
190
- }
191
4076
 
192
4077
 
193
- /***/ }),
194
4078
 
195
- /***/ 29:
196
- /***/ (function(module, exports) {
197
4079
 
198
- module.exports = require("cy-element-ui/lib/tooltip");
4080
+ /* harmony default export */ var input_numbervue_type_script_lang_js = ({
4081
+ name: 'ElInputNumber',
4082
+ mixins: [Object(mixins_focus["a" /* default */])('input')],
4083
+ inject: {
4084
+ elForm: {
4085
+ default: ''
4086
+ },
4087
+ elFormItem: {
4088
+ default: ''
4089
+ }
4090
+ },
4091
+ directives: {
4092
+ repeatClick: repeat_click["a" /* default */]
4093
+ },
4094
+ components: {
4095
+ ElInput: input["default"]
4096
+ },
4097
+ props: {
4098
+ step: {
4099
+ type: Number,
4100
+ default: 1
4101
+ },
4102
+ stepStrictly: {
4103
+ type: Boolean,
4104
+ default: false
4105
+ },
4106
+ max: {
4107
+ type: Number,
4108
+ default: Infinity
4109
+ },
4110
+ min: {
4111
+ type: Number,
4112
+ default: -Infinity
4113
+ },
4114
+ value: {},
4115
+ disabled: Boolean,
4116
+ size: String,
4117
+ controls: {
4118
+ type: Boolean,
4119
+ default: true
4120
+ },
4121
+ controlsPosition: {
4122
+ type: String,
4123
+ default: ''
4124
+ },
4125
+ name: String,
4126
+ label: String,
4127
+ placeholder: String,
4128
+ precision: {
4129
+ type: Number,
4130
+ validator: function validator(val) {
4131
+ return val >= 0 && val === parseInt(val, 10);
4132
+ }
4133
+ }
4134
+ },
4135
+ data: function data() {
4136
+ return {
4137
+ currentValue: 0,
4138
+ userInput: null
4139
+ };
4140
+ },
199
4141
 
200
- /***/ }),
4142
+ watch: {
4143
+ value: {
4144
+ immediate: true,
4145
+ handler: function handler(value) {
4146
+ var newVal = value === undefined ? value : Number(value);
4147
+ if (newVal !== undefined) {
4148
+ if (isNaN(newVal)) {
4149
+ return;
4150
+ }
201
4151
 
202
- /***/ 4:
203
- /***/ (function(module, exports) {
4152
+ if (this.stepStrictly) {
4153
+ var stepPrecision = this.getPrecision(this.step);
4154
+ var precisionFactor = Math.pow(10, stepPrecision);
4155
+ newVal = Math.round(newVal / this.step) * precisionFactor * this.step / precisionFactor;
4156
+ }
204
4157
 
205
- module.exports = require("cy-element-ui/lib/mixins/emitter");
4158
+ if (this.precision !== undefined) {
4159
+ newVal = this.toPrecision(newVal, this.precision);
4160
+ }
4161
+ }
4162
+ if (newVal >= this.max) newVal = this.max;
4163
+ if (newVal <= this.min) newVal = this.min;
4164
+ this.currentValue = newVal;
4165
+ this.userInput = null;
4166
+ this.$emit('input', newVal);
4167
+ }
4168
+ }
4169
+ },
4170
+ computed: {
4171
+ minDisabled: function minDisabled() {
4172
+ return this._decrease(this.value, this.step) < this.min;
4173
+ },
4174
+ maxDisabled: function maxDisabled() {
4175
+ return this._increase(this.value, this.step) > this.max;
4176
+ },
4177
+ numPrecision: function numPrecision() {
4178
+ var value = this.value,
4179
+ step = this.step,
4180
+ getPrecision = this.getPrecision,
4181
+ precision = this.precision;
206
4182
 
207
- /***/ }),
4183
+ var stepPrecision = getPrecision(step);
4184
+ if (precision !== undefined) {
4185
+ if (stepPrecision > precision) {
4186
+ console.warn('[Element Warn][InputNumber]precision should not be less than the decimal places of step');
4187
+ }
4188
+ return precision;
4189
+ } else {
4190
+ return Math.max(getPrecision(value), stepPrecision);
4191
+ }
4192
+ },
4193
+ controlsAtRight: function controlsAtRight() {
4194
+ return this.showControls && this.controlsPosition === 'right';
4195
+ },
4196
+ showControls: function showControls() {
4197
+ return this.controls && !this.$attrs['data-unit'];
4198
+ },
4199
+ _elFormItemSize: function _elFormItemSize() {
4200
+ return (this.elFormItem || {}).elFormItemSize;
4201
+ },
4202
+ inputNumberSize: function inputNumberSize() {
4203
+ return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
4204
+ },
4205
+ inputNumberDisabled: function inputNumberDisabled() {
4206
+ return this.disabled || !!(this.elForm || {}).disabled;
4207
+ },
4208
+ displayValue: function displayValue() {
4209
+ if (this.userInput !== null) {
4210
+ return this.userInput;
4211
+ }
208
4212
 
209
- /***/ 51:
210
- /***/ (function(module, exports) {
4213
+ var currentValue = this.currentValue;
4214
+
4215
+ if (typeof currentValue === 'number') {
4216
+ if (this.stepStrictly) {
4217
+ var stepPrecision = this.getPrecision(this.step);
4218
+ var precisionFactor = Math.pow(10, stepPrecision);
4219
+ currentValue = Math.round(currentValue / this.step) * precisionFactor * this.step / precisionFactor;
4220
+ }
211
4221
 
212
- module.exports = require("cy-element-ui/lib/input-number");
4222
+ if (this.precision !== undefined) {
4223
+ currentValue = currentValue.toFixed(this.precision);
4224
+ }
4225
+ }
213
4226
 
214
- /***/ }),
4227
+ return currentValue;
4228
+ }
4229
+ },
4230
+ methods: {
4231
+ toPrecision: function toPrecision(num, precision) {
4232
+ if (precision === undefined) precision = this.numPrecision;
4233
+ return parseFloat(Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision));
4234
+ },
4235
+ getPrecision: function getPrecision(value) {
4236
+ if (value === undefined) return 0;
4237
+ var valueString = value.toString();
4238
+ var dotPosition = valueString.indexOf('.');
4239
+ var precision = 0;
4240
+ if (dotPosition !== -1) {
4241
+ precision = valueString.length - dotPosition - 1;
4242
+ }
4243
+ return precision;
4244
+ },
4245
+ _increase: function _increase(val, step) {
4246
+ if (typeof val !== 'number' && val !== undefined) return this.currentValue;
4247
+
4248
+ var precisionFactor = Math.pow(10, this.numPrecision);
4249
+ // Solve the accuracy problem of JS decimal calculation by converting the value to integer.
4250
+ return this.toPrecision((precisionFactor * val + precisionFactor * step) / precisionFactor);
4251
+ },
4252
+ _decrease: function _decrease(val, step) {
4253
+ if (typeof val !== 'number' && val !== undefined) return this.currentValue;
4254
+
4255
+ var precisionFactor = Math.pow(10, this.numPrecision);
4256
+
4257
+ return this.toPrecision((precisionFactor * val - precisionFactor * step) / precisionFactor);
4258
+ },
4259
+ increase: function increase() {
4260
+ if (this.inputNumberDisabled || this.maxDisabled) return;
4261
+ var value = this.value || 0;
4262
+ var newVal = this._increase(value, this.step);
4263
+ this.setCurrentValue(newVal);
4264
+ },
4265
+ decrease: function decrease() {
4266
+ if (this.inputNumberDisabled || this.minDisabled) return;
4267
+ var value = this.value || 0;
4268
+ var newVal = this._decrease(value, this.step);
4269
+ this.setCurrentValue(newVal);
4270
+ },
4271
+ handleBlur: function handleBlur(event) {
4272
+ this.$emit('blur', event);
4273
+ },
4274
+ handleFocus: function handleFocus(event) {
4275
+ this.$emit('focus', event);
4276
+ },
4277
+ setCurrentValue: function setCurrentValue(newVal) {
4278
+ var oldVal = this.currentValue;
4279
+ if (typeof newVal === 'number' && this.precision !== undefined) {
4280
+ newVal = this.toPrecision(newVal, this.precision);
4281
+ }
4282
+ if (newVal >= this.max) newVal = this.max;
4283
+ if (newVal <= this.min) newVal = this.min;
4284
+ if (oldVal === newVal) return;
4285
+ this.userInput = null;
4286
+ this.$emit('input', newVal);
4287
+ this.$emit('change', newVal, oldVal);
4288
+ this.currentValue = newVal;
4289
+ },
4290
+ handleInput: function handleInput(value) {
4291
+ this.userInput = value;
4292
+ },
4293
+ handleInputChange: function handleInputChange(value) {
4294
+ var newVal = value === '' ? undefined : Number(value);
4295
+ if (!isNaN(newVal) || value === '') {
4296
+ this.setCurrentValue(newVal);
4297
+ }
4298
+ this.userInput = null;
4299
+ },
4300
+ select: function select() {
4301
+ this.$refs.input.select();
4302
+ }
4303
+ },
4304
+ mounted: function mounted() {
4305
+ var innerInput = this.$refs.input.$refs.input;
4306
+ innerInput.setAttribute('role', 'spinbutton');
4307
+ innerInput.setAttribute('aria-valuemax', this.max);
4308
+ innerInput.setAttribute('aria-valuemin', this.min);
4309
+ innerInput.setAttribute('aria-valuenow', this.currentValue);
4310
+ innerInput.setAttribute('aria-disabled', this.inputNumberDisabled);
4311
+ },
4312
+ updated: function updated() {
4313
+ if (!this.$refs || !this.$refs.input) return;
4314
+ var innerInput = this.$refs.input.$refs.input;
4315
+ innerInput.setAttribute('aria-valuenow', this.currentValue);
4316
+ }
4317
+ });
4318
+ // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=script&lang=js
4319
+ /* harmony default export */ var src_input_numbervue_type_script_lang_js = (input_numbervue_type_script_lang_js);
4320
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
4321
+ var componentNormalizer = __webpack_require__(2);
4322
+
4323
+ // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue
4324
+
4325
+
4326
+
4327
+
4328
+
4329
+ /* normalize component */
4330
+
4331
+ var component = Object(componentNormalizer["a" /* default */])(
4332
+ src_input_numbervue_type_script_lang_js,
4333
+ render,
4334
+ staticRenderFns,
4335
+ false,
4336
+ null,
4337
+ null,
4338
+ null
4339
+
4340
+ )
215
4341
 
216
- /***/ 67:
4342
+ /* harmony default export */ var input_number = (component.exports);
4343
+ // CONCATENATED MODULE: ./packages/input-number/index.js
4344
+
4345
+
4346
+ /* istanbul ignore next */
4347
+ input_number.install = function (Vue) {
4348
+ Vue.component(input_number.name, input_number);
4349
+ };
4350
+
4351
+ /* harmony default export */ var packages_input_number = __webpack_exports__["default"] = (input_number);
4352
+
4353
+ /***/ }),
4354
+ /* 55 */,
4355
+ /* 56 */,
4356
+ /* 57 */,
4357
+ /* 58 */,
4358
+ /* 59 */,
4359
+ /* 60 */,
4360
+ /* 61 */,
4361
+ /* 62 */,
4362
+ /* 63 */,
4363
+ /* 64 */,
4364
+ /* 65 */,
4365
+ /* 66 */,
4366
+ /* 67 */
217
4367
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
218
4368
 
219
4369
  "use strict";
@@ -354,9 +4504,8 @@ render._withStripped = true
354
4504
 
355
4505
  // CONCATENATED MODULE: ./packages/slider/src/main.vue?vue&type=template&id=650e2eb8
356
4506
 
357
- // EXTERNAL MODULE: external "cy-element-ui/lib/input-number"
358
- var input_number_ = __webpack_require__(51);
359
- var input_number_default = /*#__PURE__*/__webpack_require__.n(input_number_);
4507
+ // EXTERNAL MODULE: ./packages/input-number/index.js + 5 modules
4508
+ var input_number = __webpack_require__(54);
360
4509
 
361
4510
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider/src/button.vue?vue&type=template&id=c854eedc
362
4511
  var buttonvue_type_template_id_c854eedc_render = function render() {
@@ -457,9 +4606,8 @@ buttonvue_type_template_id_c854eedc_render._withStripped = true
457
4606
 
458
4607
  // CONCATENATED MODULE: ./packages/slider/src/button.vue?vue&type=template&id=c854eedc
459
4608
 
460
- // EXTERNAL MODULE: external "cy-element-ui/lib/tooltip"
461
- var tooltip_ = __webpack_require__(29);
462
- var tooltip_default = /*#__PURE__*/__webpack_require__.n(tooltip_);
4609
+ // EXTERNAL MODULE: ./packages/tooltip/index.js + 1 modules
4610
+ var tooltip = __webpack_require__(37);
463
4611
 
464
4612
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider/src/button.vue?vue&type=script&lang=js
465
4613
 
@@ -469,7 +4617,7 @@ var tooltip_default = /*#__PURE__*/__webpack_require__.n(tooltip_);
469
4617
  name: 'ElSliderButton',
470
4618
 
471
4619
  components: {
472
- ElTooltip: tooltip_default.a
4620
+ ElTooltip: tooltip["default"]
473
4621
  },
474
4622
 
475
4623
  props: {
@@ -662,7 +4810,7 @@ var tooltip_default = /*#__PURE__*/__webpack_require__.n(tooltip_);
662
4810
  // CONCATENATED MODULE: ./packages/slider/src/button.vue?vue&type=script&lang=js
663
4811
  /* harmony default export */ var src_buttonvue_type_script_lang_js = (buttonvue_type_script_lang_js);
664
4812
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
665
- var componentNormalizer = __webpack_require__(0);
4813
+ var componentNormalizer = __webpack_require__(2);
666
4814
 
667
4815
  // CONCATENATED MODULE: ./packages/slider/src/button.vue
668
4816
 
@@ -705,9 +4853,8 @@ var component = Object(componentNormalizer["a" /* default */])(
705
4853
  );
706
4854
  }
707
4855
  });
708
- // EXTERNAL MODULE: external "cy-element-ui/lib/mixins/emitter"
709
- var emitter_ = __webpack_require__(4);
710
- var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
4856
+ // EXTERNAL MODULE: ./src/mixins/emitter.js
4857
+ var emitter = __webpack_require__(6);
711
4858
 
712
4859
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider/src/main.vue?vue&type=script&lang=js
713
4860
 
@@ -719,7 +4866,7 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
719
4866
  /* harmony default export */ var mainvue_type_script_lang_js = ({
720
4867
  name: 'ElSlider',
721
4868
 
722
- mixins: [emitter_default.a],
4869
+ mixins: [emitter["a" /* default */]],
723
4870
 
724
4871
  inject: {
725
4872
  elForm: {
@@ -792,7 +4939,7 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
792
4939
  },
793
4940
 
794
4941
  components: {
795
- ElInputNumber: input_number_default.a,
4942
+ ElInputNumber: input_number["default"],
796
4943
  SliderButton: src_button,
797
4944
  SliderMarker: marker
798
4945
  },
@@ -1081,5 +5228,4 @@ main.install = function (Vue) {
1081
5228
  /* harmony default export */ var slider = __webpack_exports__["default"] = (main);
1082
5229
 
1083
5230
  /***/ })
1084
-
1085
- /******/ });
5231
+ /******/ ]);