@94ai/nf-double-week 5.0.29 → 5.0.36

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.
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const Vue = require("vue");
4
+ const dateUtil = require("element-ui/src/utils/date-util");
4
5
  const vue2RuntimeHelpers = require("@94ai/vue2-runtime-helpers");
6
+ const Locale$1 = require("element-ui/lib/mixins/locale");
5
7
  function _mergeNamespaces(n, m) {
6
8
  for (var i = 0; i < m.length; i++) {
7
9
  const e = m[i];
@@ -135,724 +137,6 @@ const Clickoutside = {
135
137
  delete el[ctx];
136
138
  }
137
139
  };
138
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
139
- function getDefaultExportFromCjs(x) {
140
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
141
- }
142
- function getAugmentedNamespace(n) {
143
- if (n.__esModule)
144
- return n;
145
- var f = n.default;
146
- if (typeof f == "function") {
147
- var a = function a2() {
148
- if (this instanceof a2) {
149
- return Reflect.construct(f, arguments, this.constructor);
150
- }
151
- return f.apply(this, arguments);
152
- };
153
- a.prototype = f.prototype;
154
- } else
155
- a = {};
156
- Object.defineProperty(a, "__esModule", {
157
- value: true
158
- });
159
- Object.keys(n).forEach(function(k) {
160
- var d = Object.getOwnPropertyDescriptor(n, k);
161
- Object.defineProperty(a, k, d.get ? d : {
162
- enumerable: true,
163
- get: function() {
164
- return n[k];
165
- }
166
- });
167
- });
168
- return a;
169
- }
170
- var date = { exports: {} };
171
- (function(module2) {
172
- (function(main) {
173
- var fecha2 = {};
174
- var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
175
- var twoDigits = "\\d\\d?";
176
- var threeDigits = "\\d{3}";
177
- var fourDigits = "\\d{4}";
178
- var word = "[^\\s]+";
179
- var literal = /\[([^]*?)\]/gm;
180
- var noop2 = function() {
181
- };
182
- function regexEscape(str) {
183
- return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&");
184
- }
185
- function shorten(arr, sLen) {
186
- var newArr = [];
187
- for (var i = 0, len = arr.length; i < len; i++) {
188
- newArr.push(arr[i].substr(0, sLen));
189
- }
190
- return newArr;
191
- }
192
- function monthUpdate(arrName) {
193
- return function(d, v, i18n3) {
194
- var index = i18n3[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());
195
- if (~index) {
196
- d.month = index;
197
- }
198
- };
199
- }
200
- function pad(val, len) {
201
- val = String(val);
202
- len = len || 2;
203
- while (val.length < len) {
204
- val = "0" + val;
205
- }
206
- return val;
207
- }
208
- var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
209
- var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
210
- var monthNamesShort = shorten(monthNames, 3);
211
- var dayNamesShort = shorten(dayNames, 3);
212
- fecha2.i18n = {
213
- dayNamesShort,
214
- dayNames,
215
- monthNamesShort,
216
- monthNames,
217
- amPm: ["am", "pm"],
218
- DoFn: function DoFn(D) {
219
- return D + ["th", "st", "nd", "rd"][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
220
- }
221
- };
222
- var formatFlags = {
223
- D: function(dateObj) {
224
- return dateObj.getDay();
225
- },
226
- DD: function(dateObj) {
227
- return pad(dateObj.getDay());
228
- },
229
- Do: function(dateObj, i18n3) {
230
- return i18n3.DoFn(dateObj.getDate());
231
- },
232
- d: function(dateObj) {
233
- return dateObj.getDate();
234
- },
235
- dd: function(dateObj) {
236
- return pad(dateObj.getDate());
237
- },
238
- ddd: function(dateObj, i18n3) {
239
- return i18n3.dayNamesShort[dateObj.getDay()];
240
- },
241
- dddd: function(dateObj, i18n3) {
242
- return i18n3.dayNames[dateObj.getDay()];
243
- },
244
- M: function(dateObj) {
245
- return dateObj.getMonth() + 1;
246
- },
247
- MM: function(dateObj) {
248
- return pad(dateObj.getMonth() + 1);
249
- },
250
- MMM: function(dateObj, i18n3) {
251
- return i18n3.monthNamesShort[dateObj.getMonth()];
252
- },
253
- MMMM: function(dateObj, i18n3) {
254
- return i18n3.monthNames[dateObj.getMonth()];
255
- },
256
- yy: function(dateObj) {
257
- return pad(String(dateObj.getFullYear()), 4).substr(2);
258
- },
259
- yyyy: function(dateObj) {
260
- return pad(dateObj.getFullYear(), 4);
261
- },
262
- h: function(dateObj) {
263
- return dateObj.getHours() % 12 || 12;
264
- },
265
- hh: function(dateObj) {
266
- return pad(dateObj.getHours() % 12 || 12);
267
- },
268
- H: function(dateObj) {
269
- return dateObj.getHours();
270
- },
271
- HH: function(dateObj) {
272
- return pad(dateObj.getHours());
273
- },
274
- m: function(dateObj) {
275
- return dateObj.getMinutes();
276
- },
277
- mm: function(dateObj) {
278
- return pad(dateObj.getMinutes());
279
- },
280
- s: function(dateObj) {
281
- return dateObj.getSeconds();
282
- },
283
- ss: function(dateObj) {
284
- return pad(dateObj.getSeconds());
285
- },
286
- S: function(dateObj) {
287
- return Math.round(dateObj.getMilliseconds() / 100);
288
- },
289
- SS: function(dateObj) {
290
- return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
291
- },
292
- SSS: function(dateObj) {
293
- return pad(dateObj.getMilliseconds(), 3);
294
- },
295
- a: function(dateObj, i18n3) {
296
- return dateObj.getHours() < 12 ? i18n3.amPm[0] : i18n3.amPm[1];
297
- },
298
- A: function(dateObj, i18n3) {
299
- return dateObj.getHours() < 12 ? i18n3.amPm[0].toUpperCase() : i18n3.amPm[1].toUpperCase();
300
- },
301
- ZZ: function(dateObj) {
302
- var o = dateObj.getTimezoneOffset();
303
- return (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
304
- }
305
- };
306
- var parseFlags = {
307
- d: [twoDigits, function(d, v) {
308
- d.day = v;
309
- }],
310
- Do: [twoDigits + word, function(d, v) {
311
- d.day = parseInt(v, 10);
312
- }],
313
- M: [twoDigits, function(d, v) {
314
- d.month = v - 1;
315
- }],
316
- yy: [twoDigits, function(d, v) {
317
- var da = /* @__PURE__ */ new Date(), cent = +("" + da.getFullYear()).substr(0, 2);
318
- d.year = "" + (v > 68 ? cent - 1 : cent) + v;
319
- }],
320
- h: [twoDigits, function(d, v) {
321
- d.hour = v;
322
- }],
323
- m: [twoDigits, function(d, v) {
324
- d.minute = v;
325
- }],
326
- s: [twoDigits, function(d, v) {
327
- d.second = v;
328
- }],
329
- yyyy: [fourDigits, function(d, v) {
330
- d.year = v;
331
- }],
332
- S: ["\\d", function(d, v) {
333
- d.millisecond = v * 100;
334
- }],
335
- SS: ["\\d{2}", function(d, v) {
336
- d.millisecond = v * 10;
337
- }],
338
- SSS: [threeDigits, function(d, v) {
339
- d.millisecond = v;
340
- }],
341
- D: [twoDigits, noop2],
342
- ddd: [word, noop2],
343
- MMM: [word, monthUpdate("monthNamesShort")],
344
- MMMM: [word, monthUpdate("monthNames")],
345
- a: [word, function(d, v, i18n3) {
346
- var val = v.toLowerCase();
347
- if (val === i18n3.amPm[0]) {
348
- d.isPm = false;
349
- } else if (val === i18n3.amPm[1]) {
350
- d.isPm = true;
351
- }
352
- }],
353
- ZZ: ["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z", function(d, v) {
354
- var parts = (v + "").match(/([+-]|\d\d)/gi), minutes;
355
- if (parts) {
356
- minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
357
- d.timezoneOffset = parts[0] === "+" ? minutes : -minutes;
358
- }
359
- }]
360
- };
361
- parseFlags.dd = parseFlags.d;
362
- parseFlags.dddd = parseFlags.ddd;
363
- parseFlags.DD = parseFlags.D;
364
- parseFlags.mm = parseFlags.m;
365
- parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
366
- parseFlags.MM = parseFlags.M;
367
- parseFlags.ss = parseFlags.s;
368
- parseFlags.A = parseFlags.a;
369
- fecha2.masks = {
370
- default: "ddd MMM dd yyyy HH:mm:ss",
371
- shortDate: "M/D/yy",
372
- mediumDate: "MMM d, yyyy",
373
- longDate: "MMMM d, yyyy",
374
- fullDate: "dddd, MMMM d, yyyy",
375
- shortTime: "HH:mm",
376
- mediumTime: "HH:mm:ss",
377
- longTime: "HH:mm:ss.SSS"
378
- };
379
- fecha2.format = function(dateObj, mask, i18nSettings) {
380
- var i18n3 = i18nSettings || fecha2.i18n;
381
- if (typeof dateObj === "number") {
382
- dateObj = new Date(dateObj);
383
- }
384
- if (Object.prototype.toString.call(dateObj) !== "[object Date]" || isNaN(dateObj.getTime())) {
385
- throw new Error("Invalid Date in fecha.format");
386
- }
387
- mask = fecha2.masks[mask] || mask || fecha2.masks["default"];
388
- var literals = [];
389
- mask = mask.replace(literal, function($0, $1) {
390
- literals.push($1);
391
- return "@@@";
392
- });
393
- mask = mask.replace(token, function($0) {
394
- return $0 in formatFlags ? formatFlags[$0](dateObj, i18n3) : $0.slice(1, $0.length - 1);
395
- });
396
- return mask.replace(/@@@/g, function() {
397
- return literals.shift();
398
- });
399
- };
400
- fecha2.parse = function(dateStr, format2, i18nSettings) {
401
- var i18n3 = i18nSettings || fecha2.i18n;
402
- if (typeof format2 !== "string") {
403
- throw new Error("Invalid format in fecha.parse");
404
- }
405
- format2 = fecha2.masks[format2] || format2;
406
- if (dateStr.length > 1e3) {
407
- return null;
408
- }
409
- var dateInfo = {};
410
- var parseInfo = [];
411
- var literals = [];
412
- format2 = format2.replace(literal, function($0, $1) {
413
- literals.push($1);
414
- return "@@@";
415
- });
416
- var newFormat = regexEscape(format2).replace(token, function($0) {
417
- if (parseFlags[$0]) {
418
- var info = parseFlags[$0];
419
- parseInfo.push(info[1]);
420
- return "(" + info[0] + ")";
421
- }
422
- return $0;
423
- });
424
- newFormat = newFormat.replace(/@@@/g, function() {
425
- return literals.shift();
426
- });
427
- var matches = dateStr.match(new RegExp(newFormat, "i"));
428
- if (!matches) {
429
- return null;
430
- }
431
- for (var i = 1; i < matches.length; i++) {
432
- parseInfo[i - 1](dateInfo, matches[i], i18n3);
433
- }
434
- var today = /* @__PURE__ */ new Date();
435
- if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
436
- dateInfo.hour = +dateInfo.hour + 12;
437
- } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
438
- dateInfo.hour = 0;
439
- }
440
- var date2;
441
- if (dateInfo.timezoneOffset != null) {
442
- dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
443
- date2 = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
444
- } else {
445
- date2 = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
446
- }
447
- return date2;
448
- };
449
- if (module2.exports) {
450
- module2.exports = fecha2;
451
- } else {
452
- main.fecha = fecha2;
453
- }
454
- })(commonjsGlobal);
455
- })(date);
456
- var dateExports = date.exports;
457
- const fecha = /* @__PURE__ */ getDefaultExportFromCjs(dateExports);
458
- const defaultLang = {
459
- el: {
460
- colorpicker: {
461
- confirm: "确定",
462
- clear: "清空"
463
- },
464
- datepicker: {
465
- now: "此刻",
466
- today: "今天",
467
- cancel: "取消",
468
- clear: "清空",
469
- confirm: "确定",
470
- selectDate: "选择日期",
471
- selectTime: "选择时间",
472
- startDate: "开始日期",
473
- startTime: "开始时间",
474
- endDate: "结束日期",
475
- endTime: "结束时间",
476
- prevYear: "前一年",
477
- nextYear: "后一年",
478
- prevMonth: "上个月",
479
- nextMonth: "下个月",
480
- year: "年",
481
- month1: "1 月",
482
- month2: "2 月",
483
- month3: "3 月",
484
- month4: "4 月",
485
- month5: "5 月",
486
- month6: "6 月",
487
- month7: "7 月",
488
- month8: "8 月",
489
- month9: "9 月",
490
- month10: "10 月",
491
- month11: "11 月",
492
- month12: "12 月",
493
- // week: '周次',
494
- weeks: {
495
- sun: "日",
496
- mon: "一",
497
- tue: "二",
498
- wed: "三",
499
- thu: "四",
500
- fri: "五",
501
- sat: "六"
502
- },
503
- months: {
504
- jan: "一月",
505
- feb: "二月",
506
- mar: "三月",
507
- apr: "四月",
508
- may: "五月",
509
- jun: "六月",
510
- jul: "七月",
511
- aug: "八月",
512
- sep: "九月",
513
- oct: "十月",
514
- nov: "十一月",
515
- dec: "十二月"
516
- }
517
- },
518
- select: {
519
- loading: "加载中",
520
- noMatch: "无匹配数据",
521
- noData: "无数据",
522
- placeholder: "请选择"
523
- },
524
- cascader: {
525
- noMatch: "无匹配数据",
526
- loading: "加载中",
527
- placeholder: "请选择",
528
- noData: "暂无数据"
529
- },
530
- pagination: {
531
- goto: "前往",
532
- pagesize: "条/页",
533
- total: "共 {total} 条",
534
- pageClassifier: "页"
535
- },
536
- messagebox: {
537
- title: "提示",
538
- confirm: "确定",
539
- cancel: "取消",
540
- error: "输入的数据不合法!"
541
- },
542
- upload: {
543
- deleteTip: "按 delete 键可删除",
544
- delete: "删除",
545
- preview: "查看图片",
546
- continue: "继续上传"
547
- },
548
- table: {
549
- emptyText: "暂无数据",
550
- confirmFilter: "筛选",
551
- resetFilter: "重置",
552
- clearFilter: "全部",
553
- sumText: "合计"
554
- },
555
- tree: {
556
- emptyText: "暂无数据"
557
- },
558
- transfer: {
559
- noMatch: "无匹配数据",
560
- noData: "无数据",
561
- titles: ["列表 1", "列表 2"],
562
- filterPlaceholder: "请输入搜索内容",
563
- noCheckedFormat: "共 {total} 项",
564
- hasCheckedFormat: "已选 {checked}/{total} 项"
565
- },
566
- image: {
567
- error: "加载失败"
568
- },
569
- pageHeader: {
570
- title: "返回"
571
- },
572
- popconfirm: {
573
- confirmButtonText: "确定",
574
- cancelButtonText: "取消"
575
- }
576
- }
577
- };
578
- var isMergeableObject = function isMergeableObject2(value) {
579
- return isNonNullObject(value) && !isSpecial(value);
580
- };
581
- function isNonNullObject(value) {
582
- return !!value && typeof value === "object";
583
- }
584
- function isSpecial(value) {
585
- var stringValue = Object.prototype.toString.call(value);
586
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
587
- }
588
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
589
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
590
- function isReactElement(value) {
591
- return value.$$typeof === REACT_ELEMENT_TYPE;
592
- }
593
- function emptyTarget(val) {
594
- return Array.isArray(val) ? [] : {};
595
- }
596
- function cloneIfNecessary(value, optionsArgument) {
597
- var clone = optionsArgument && optionsArgument.clone === true;
598
- return clone && isMergeableObject(value) ? deepmerge(emptyTarget(value), value, optionsArgument) : value;
599
- }
600
- function defaultArrayMerge(target, source, optionsArgument) {
601
- var destination = target.slice();
602
- source.forEach(function(e, i) {
603
- if (typeof destination[i] === "undefined") {
604
- destination[i] = cloneIfNecessary(e, optionsArgument);
605
- } else if (isMergeableObject(e)) {
606
- destination[i] = deepmerge(target[i], e, optionsArgument);
607
- } else if (target.indexOf(e) === -1) {
608
- destination.push(cloneIfNecessary(e, optionsArgument));
609
- }
610
- });
611
- return destination;
612
- }
613
- function mergeObject(target, source, optionsArgument) {
614
- var destination = {};
615
- if (isMergeableObject(target)) {
616
- Object.keys(target).forEach(function(key) {
617
- destination[key] = cloneIfNecessary(target[key], optionsArgument);
618
- });
619
- }
620
- Object.keys(source).forEach(function(key) {
621
- if (!isMergeableObject(source[key]) || !target[key]) {
622
- destination[key] = cloneIfNecessary(source[key], optionsArgument);
623
- } else {
624
- destination[key] = deepmerge(target[key], source[key], optionsArgument);
625
- }
626
- });
627
- return destination;
628
- }
629
- function deepmerge(target, source, optionsArgument) {
630
- var sourceIsArray = Array.isArray(source);
631
- var targetIsArray = Array.isArray(target);
632
- var options = optionsArgument || {
633
- arrayMerge: defaultArrayMerge
634
- };
635
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
636
- if (!sourceAndTargetTypesMatch) {
637
- return cloneIfNecessary(source, optionsArgument);
638
- } else if (sourceIsArray) {
639
- var arrayMerge = options.arrayMerge || defaultArrayMerge;
640
- return arrayMerge(target, source, optionsArgument);
641
- } else {
642
- return mergeObject(target, source, optionsArgument);
643
- }
644
- }
645
- deepmerge.all = function deepmergeAll(array, optionsArgument) {
646
- if (!Array.isArray(array) || array.length < 2) {
647
- throw new Error("first argument should be an array with at least two elements");
648
- }
649
- return array.reduce(function(prev, next) {
650
- return deepmerge(prev, next, optionsArgument);
651
- });
652
- };
653
- var deepmerge_1 = deepmerge;
654
- const es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
655
- __proto__: null,
656
- default: deepmerge_1
657
- }, Symbol.toStringTag, { value: "Module" }));
658
- const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
659
- function hasOwn$1(obj, key) {
660
- return hasOwnProperty$1.call(obj, key);
661
- }
662
- const arrayFindIndex$1 = function(arr, pred) {
663
- for (let i = 0; i !== arr.length; ++i) {
664
- if (pred(arr[i])) {
665
- return i;
666
- }
667
- }
668
- return -1;
669
- };
670
- const arrayFind = function(arr, pred) {
671
- const idx = arrayFindIndex$1(arr, pred);
672
- return idx !== -1 ? arr[idx] : void 0;
673
- };
674
- const coerceTruthyValueToArray = function(val) {
675
- if (Array.isArray(val)) {
676
- return val;
677
- } else if (val) {
678
- return [val];
679
- } else {
680
- return [];
681
- }
682
- };
683
- const RE_NARGS$1 = /(%|)\{([0-9a-zA-Z_]+)\}/g;
684
- function Format(Vue2) {
685
- function template(string, ...args) {
686
- if (args.length === 1 && typeof args[0] === "object") {
687
- args = args[0];
688
- }
689
- if (!args || !args.hasOwnProperty) {
690
- args = {};
691
- }
692
- return string.replace(RE_NARGS$1, (match, prefix, i, index) => {
693
- let result;
694
- if (string[index - 1] === "{" && string[index + match.length] === "}") {
695
- return i;
696
- } else {
697
- result = hasOwn$1(args, i) ? args[i] : null;
698
- if (result === null || result === void 0) {
699
- return "";
700
- }
701
- return result;
702
- }
703
- });
704
- }
705
- return template;
706
- }
707
- const format$2 = Format();
708
- let lang$1 = defaultLang;
709
- let merged$1 = false;
710
- let i18nHandler$1 = function() {
711
- const vuei18n = Object.getPrototypeOf(this || Vue).$t;
712
- if (typeof vuei18n === "function" && !!Vue.locale) {
713
- if (!merged$1) {
714
- merged$1 = true;
715
- Vue.locale(Vue.config.lang, deepmerge_1(lang$1, Vue.locale(Vue.config.lang) || {}, {
716
- clone: true
717
- }));
718
- }
719
- return vuei18n.apply(this, arguments);
720
- }
721
- };
722
- const t$1 = function(path, options) {
723
- let value = i18nHandler$1.apply(this, arguments);
724
- if (value !== null && value !== void 0)
725
- return value;
726
- const array = path.split(".");
727
- let current = lang$1;
728
- for (let i = 0, j = array.length; i < j; i++) {
729
- const property = array[i];
730
- value = current[property];
731
- if (i === j - 1)
732
- return format$2(value, options);
733
- if (!value)
734
- return "";
735
- current = value;
736
- }
737
- return "";
738
- };
739
- const weeks = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
740
- const months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
741
- const getI18nSettings = () => {
742
- return {
743
- dayNamesShort: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
744
- dayNames: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
745
- monthNamesShort: months.map((month) => t$1(`el.datepicker.months.${month}`)),
746
- monthNames: months.map((month, index) => t$1(`el.datepicker.month${index + 1}`)),
747
- amPm: ["am", "pm"]
748
- };
749
- };
750
- const toDate = function(date2) {
751
- return isDate(date2) ? new Date(date2) : null;
752
- };
753
- const isDate = function(date2) {
754
- if (date2 === null || date2 === void 0)
755
- return false;
756
- if (isNaN(new Date(date2).getTime()))
757
- return false;
758
- if (Array.isArray(date2))
759
- return false;
760
- return true;
761
- };
762
- const isDateObject = function(val) {
763
- return val instanceof Date;
764
- };
765
- const formatDate = function(date2, format2) {
766
- date2 = toDate(date2);
767
- if (!date2)
768
- return "";
769
- return fecha.format(date2, format2 || "yyyy-MM-dd", getI18nSettings());
770
- };
771
- const parseDate = function(string, format2) {
772
- return fecha.parse(string, format2 || "yyyy-MM-dd", getI18nSettings());
773
- };
774
- const getDayCountOfMonth = function(year, month) {
775
- if (month === 3 || month === 5 || month === 8 || month === 10) {
776
- return 30;
777
- }
778
- if (month === 1) {
779
- if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
780
- return 29;
781
- } else {
782
- return 28;
783
- }
784
- }
785
- return 31;
786
- };
787
- const getFirstDayOfMonth = function(date2) {
788
- const temp = new Date(date2.getTime());
789
- temp.setDate(1);
790
- return temp.getDay();
791
- };
792
- const prevDate = function(date2, amount = 1) {
793
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() - amount);
794
- };
795
- const nextDate = function(date2, amount = 1) {
796
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() + amount);
797
- };
798
- const getStartDateOfMonth = function(year, month) {
799
- const result = new Date(year, month, 1);
800
- const day = result.getDay();
801
- if (day === 0) {
802
- return prevDate(result, 7);
803
- } else {
804
- return prevDate(result, day);
805
- }
806
- };
807
- const getWeekNumber = function(src) {
808
- if (!isDate(src))
809
- return null;
810
- const date2 = new Date(src.getTime());
811
- date2.setHours(0, 0, 0, 0);
812
- date2.setDate(date2.getDate() + 3 - (date2.getDay() + 6) % 7);
813
- const week1 = new Date(date2.getFullYear(), 0, 4);
814
- return 1 + Math.round(((date2.getTime() - week1.getTime()) / 864e5 - 3 + (week1.getDay() + 6) % 7) / 7);
815
- };
816
- const modifyDate = function(date2, y, m, d) {
817
- return new Date(y, m, d, date2.getHours(), date2.getMinutes(), date2.getSeconds(), date2.getMilliseconds());
818
- };
819
- const modifyTime = function(date2, h, m, s) {
820
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), h, m, s, date2.getMilliseconds());
821
- };
822
- const modifyWithTimeString = (date2, time) => {
823
- if (date2 == null || !time) {
824
- return date2;
825
- }
826
- time = parseDate(time, "HH:mm:ss");
827
- return modifyTime(date2, time.getHours(), time.getMinutes(), time.getSeconds());
828
- };
829
- const clearTime = function(date2) {
830
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
831
- };
832
- const changeYearMonthAndClampDate = function(date2, year, month) {
833
- const monthDate = Math.min(date2.getDate(), getDayCountOfMonth(year, month));
834
- return modifyDate(date2, year, month, monthDate);
835
- };
836
- const prevMonth = function(date2) {
837
- const year = date2.getFullYear();
838
- const month = date2.getMonth();
839
- return month === 0 ? changeYearMonthAndClampDate(date2, year - 1, 11) : changeYearMonthAndClampDate(date2, year, month - 1);
840
- };
841
- const nextMonth = function(date2) {
842
- const year = date2.getFullYear();
843
- const month = date2.getMonth();
844
- return month === 11 ? changeYearMonthAndClampDate(date2, year + 1, 0) : changeYearMonthAndClampDate(date2, year, month + 1);
845
- };
846
- const prevYear = function(date2, amount = 1) {
847
- const year = date2.getFullYear();
848
- const month = date2.getMonth();
849
- return changeYearMonthAndClampDate(date2, year - amount, month);
850
- };
851
- const nextYear = function(date2, amount = 1) {
852
- const year = date2.getFullYear();
853
- const month = date2.getMonth();
854
- return changeYearMonthAndClampDate(date2, year + amount, month);
855
- };
856
140
  function merge(target) {
857
141
  for (let i = 1, j = arguments.length; i < j; i++) {
858
142
  let source = arguments[i] || {};
@@ -1034,6 +318,10 @@ if (!Vue.prototype.$isServer) {
1034
318
  }
1035
319
  });
1036
320
  }
321
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
322
+ function getDefaultExportFromCjs(x) {
323
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
324
+ }
1037
325
  var popper$1 = { exports: {} };
1038
326
  /**
1039
327
  * @fileOverview Kickass library to create and place poppers near their reference elements.
@@ -1322,7 +610,7 @@ var popper$1 = { exports: {} };
1322
610
  modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
1323
611
  }
1324
612
  modifiersToRun.forEach((function(modifier) {
1325
- if (isFunction2(modifier)) {
613
+ if (isFunction(modifier)) {
1326
614
  data = modifier.call(this, data);
1327
615
  }
1328
616
  }).bind(this));
@@ -1634,7 +922,7 @@ var popper$1 = { exports: {} };
1634
922
  element.style[prop] = styles[prop] + unit;
1635
923
  });
1636
924
  }
1637
- function isFunction2(functionToCheck) {
925
+ function isFunction(functionToCheck) {
1638
926
  var getType = {};
1639
927
  return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
1640
928
  }
@@ -1651,8 +939,8 @@ var popper$1 = { exports: {} };
1651
939
  }
1652
940
  function getBoundingClientRect(element) {
1653
941
  var rect = element.getBoundingClientRect();
1654
- var isIE2 = navigator.userAgent.indexOf("MSIE") != -1;
1655
- var rectTop = isIE2 && element.tagName === "HTML" ? -element.scrollTop : rect.top;
942
+ var isIE = navigator.userAgent.indexOf("MSIE") != -1;
943
+ var rectTop = isIE && element.tagName === "HTML" ? -element.scrollTop : rect.top;
1656
944
  return {
1657
945
  left: rect.left,
1658
946
  top: rectTop,
@@ -1950,7 +1238,7 @@ const DEFAULT_FORMATS = {
1950
1238
  const DATE_PARSER = function(text, format2) {
1951
1239
  if (format2 === "timestamp")
1952
1240
  return new Date(Number(text));
1953
- return parseDate(text, format2);
1241
+ return dateUtil.parseDate(text, format2);
1954
1242
  };
1955
1243
  const RANGE_PARSER = function(array, format2) {
1956
1244
  if (array.length === 2) {
@@ -1979,10 +1267,10 @@ const TYPE_VALUE_RESOLVER_MAP = {
1979
1267
  function isLeapYear(year) {
1980
1268
  return year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
1981
1269
  }
1982
- function getDays(date3) {
1983
- const year = date3.getFullYear();
1984
- const month2 = date3.getMonth() + 1;
1985
- const day = date3.getDate();
1270
+ function getDays(date2) {
1271
+ const year = date2.getFullYear();
1272
+ const month2 = date2.getMonth() + 1;
1273
+ const day = date2.getDate();
1986
1274
  let days2 = day;
1987
1275
  const monthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
1988
1276
  for (let i = 0; i < month2 - 1; i++) {
@@ -1999,19 +1287,19 @@ const TYPE_VALUE_RESOLVER_MAP = {
1999
1287
  const y = value2.getFullYear();
2000
1288
  const yearOneDateSun = (/* @__PURE__ */ new Date(y + "-01-01")).getDay() || 7;
2001
1289
  const days = getDays(value2);
2002
- const week = getWeekNumber(value2);
1290
+ const week = dateUtil.getWeekNumber(value2);
2003
1291
  const month = value2.getMonth();
2004
1292
  const trueDate = new Date(value2);
2005
1293
  if (week === 1 && month === 11) {
2006
1294
  trueDate.setHours(0, 0, 0, 0);
2007
1295
  trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
2008
1296
  }
2009
- let date2 = formatDate(trueDate, format2);
1297
+ let date = dateUtil.formatDate(trueDate, format2);
2010
1298
  if (7 - yearOneDateSun < 4 && 7 - yearOneDateSun >= days) {
2011
- date2 = date2.replace(new RegExp(y, "ig"), y - 1);
1299
+ date = date.replace(new RegExp(y, "ig"), y - 1);
2012
1300
  }
2013
- date2 = /WW/.test(date2) ? date2.replace(/WW/, week < 10 ? "0" + week : week) : date2.replace(/W/, week);
2014
- return date2;
1301
+ date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? "0" + week : week) : date.replace(/W/, week);
1302
+ return date;
2015
1303
  }
2016
1304
  if (!Array.isArray(value)) {
2017
1305
  return getDate(value);
@@ -2069,11 +1357,11 @@ const valueEquals = function(a, b) {
2069
1357
  }
2070
1358
  return false;
2071
1359
  };
2072
- const isString$1 = function(val) {
1360
+ const isString = function(val) {
2073
1361
  return typeof val === "string" || val instanceof String;
2074
1362
  };
2075
1363
  const validator = function(val) {
2076
- return val === null || val === void 0 || isString$1(val) || Array.isArray(val) && val.length === 2 && val.every(isString$1);
1364
+ return val === null || val === void 0 || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
2077
1365
  };
2078
1366
  const _sfc_main$4 = {
2079
1367
  directives: {
@@ -2206,7 +1494,7 @@ const _sfc_main$4 = {
2206
1494
  var _a;
2207
1495
  if (!this.value)
2208
1496
  return this.value;
2209
- const valueIsDateObject = isDateObject(this.value) || Array.isArray(this.value) && this.value.every(isDateObject);
1497
+ const valueIsDateObject = dateUtil.isDateObject(this.value) || Array.isArray(this.value) && this.value.every(dateUtil.isDateObject);
2210
1498
  if (valueIsDateObject) {
2211
1499
  return this.value;
2212
1500
  }
@@ -2304,19 +1592,19 @@ const _sfc_main$4 = {
2304
1592
  },
2305
1593
  // {parse, formatTo} Value deals maps component value with internal Date
2306
1594
  parseValue(value) {
2307
- const isParsed = isDateObject(value) || Array.isArray(value) && value.every(isDateObject);
1595
+ const isParsed = dateUtil.isDateObject(value) || Array.isArray(value) && value.every(dateUtil.isDateObject);
2308
1596
  if (this.valueFormat && !isParsed) {
2309
1597
  return parseAsFormatAndType(value, this.valueFormat, this.type) || value;
2310
1598
  } else {
2311
1599
  return value;
2312
1600
  }
2313
1601
  },
2314
- formatToValue(date2) {
2315
- const isFormattable = isDateObject(date2) || Array.isArray(date2) && date2.every(isDateObject);
1602
+ formatToValue(date) {
1603
+ const isFormattable = dateUtil.isDateObject(date) || Array.isArray(date) && date.every(dateUtil.isDateObject);
2316
1604
  if (this.valueFormat && isFormattable) {
2317
- return formatAsFormatAndType(date2, this.valueFormat);
1605
+ return formatAsFormatAndType(date, this.valueFormat);
2318
1606
  } else {
2319
- return date2;
1607
+ return date;
2320
1608
  }
2321
1609
  },
2322
1610
  // {parse, formatTo} String deals with user input
@@ -2486,10 +1774,10 @@ const _sfc_main$4 = {
2486
1774
  this.$el.appendChild(this.picker.$el);
2487
1775
  this.picker.resetView && this.picker.resetView();
2488
1776
  this.picker.$on("dodestroy", this.doDestroy);
2489
- this.picker.$on("pick", (date2 = "", visible = false) => {
1777
+ this.picker.$on("pick", (date = "", visible = false) => {
2490
1778
  this.userInput = null;
2491
1779
  this.pickerVisible = this.picker.visible = visible;
2492
- this.emitInput(date2);
1780
+ this.emitInput(date);
2493
1781
  this.picker.resetView && this.picker.resetView();
2494
1782
  });
2495
1783
  this.picker.$on("select-range", (start, end, pos) => {
@@ -2607,10 +1895,7 @@ var _sfc_render$4 = function render() {
2607
1895
  var _sfc_staticRenderFns$4 = [];
2608
1896
  var __component__$4 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main$4, _sfc_render$4, _sfc_staticRenderFns$4, false, null, null, null, null);
2609
1897
  const Picker = __component__$4.exports;
2610
- var locale = {};
2611
- var zhCN = {};
2612
- zhCN.__esModule = true;
2613
- zhCN.default = {
1898
+ const defaultLang = {
2614
1899
  el: {
2615
1900
  colorpicker: {
2616
1901
  confirm: "确定",
@@ -2730,152 +2015,99 @@ zhCN.default = {
2730
2015
  }
2731
2016
  }
2732
2017
  };
2733
- const require$$2 = /* @__PURE__ */ getAugmentedNamespace(es);
2734
- var format$1 = {};
2735
- var util = {};
2736
- var types = {};
2737
- types.__esModule = true;
2738
- types.isString = isString;
2739
- types.isObject = isObject;
2740
- types.isHtmlElement = isHtmlElement;
2741
- function isString(obj) {
2742
- return Object.prototype.toString.call(obj) === "[object String]";
2743
- }
2744
- function isObject(obj) {
2745
- return Object.prototype.toString.call(obj) === "[object Object]";
2746
- }
2747
- function isHtmlElement(node) {
2748
- return node && node.nodeType === Node.ELEMENT_NODE;
2749
- }
2750
- types.isFunction = function isFunction(functionToCheck) {
2751
- var getType = {};
2752
- return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
2753
- };
2754
- types.isUndefined = function isUndefined(val) {
2755
- return val === void 0;
2756
- };
2757
- types.isDefined = function isDefined(val) {
2758
- return val !== void 0 && val !== null;
2759
- };
2760
- util.__esModule = true;
2761
- util.isEmpty = util.isEqual = util.arrayEquals = util.looseEqual = util.capitalize = util.kebabCase = util.autoprefixer = util.isFirefox = util.isEdge = util.isIE = util.coerceTruthyValueToArray = util.arrayFind = util.arrayFindIndex = util.escapeRegexpString = util.valueEquals = util.generateId = util.getValueByPath = void 0;
2762
- var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
2763
- return typeof obj;
2764
- } : function(obj) {
2765
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2018
+ var isMergeableObject = function isMergeableObject2(value) {
2019
+ return isNonNullObject(value) && !isSpecial(value);
2766
2020
  };
2767
- util.noop = noop;
2768
- util.hasOwn = hasOwn;
2769
- util.toObject = toObject;
2770
- util.getPropByPath = getPropByPath;
2771
- util.rafThrottle = rafThrottle;
2772
- util.objToArray = objToArray;
2773
- var _vue$1 = Vue;
2774
- var _vue2$1 = _interopRequireDefault$1(_vue$1);
2775
- var _types = types;
2776
- function _interopRequireDefault$1(obj) {
2777
- return obj && obj.__esModule ? obj : {
2778
- default: obj
2779
- };
2021
+ function isNonNullObject(value) {
2022
+ return !!value && typeof value === "object";
2780
2023
  }
2781
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2782
- function noop() {
2024
+ function isSpecial(value) {
2025
+ var stringValue = Object.prototype.toString.call(value);
2026
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
2783
2027
  }
2784
- function hasOwn(obj, key) {
2785
- return hasOwnProperty.call(obj, key);
2028
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
2029
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
2030
+ function isReactElement(value) {
2031
+ return value.$$typeof === REACT_ELEMENT_TYPE;
2786
2032
  }
2787
- function extend(to, _from) {
2788
- for (var key in _from) {
2789
- to[key] = _from[key];
2790
- }
2791
- return to;
2033
+ function emptyTarget(val) {
2034
+ return Array.isArray(val) ? [] : {};
2792
2035
  }
2793
- function toObject(arr) {
2794
- var res = {};
2795
- for (var i = 0; i < arr.length; i++) {
2796
- if (arr[i]) {
2797
- extend(res, arr[i]);
2798
- }
2799
- }
2800
- return res;
2036
+ function cloneIfNecessary(value, optionsArgument) {
2037
+ var clone = optionsArgument && optionsArgument.clone === true;
2038
+ return clone && isMergeableObject(value) ? deepmerge(emptyTarget(value), value, optionsArgument) : value;
2801
2039
  }
2802
- util.getValueByPath = function getValueByPath(object, prop) {
2803
- prop = prop || "";
2804
- var paths = prop.split(".");
2805
- var current = object;
2806
- var result = null;
2807
- for (var i = 0, j = paths.length; i < j; i++) {
2808
- var path = paths[i];
2809
- if (!current)
2810
- break;
2811
- if (i === j - 1) {
2812
- result = current[path];
2813
- break;
2040
+ function defaultArrayMerge(target, source, optionsArgument) {
2041
+ var destination = target.slice();
2042
+ source.forEach(function(e, i) {
2043
+ if (typeof destination[i] === "undefined") {
2044
+ destination[i] = cloneIfNecessary(e, optionsArgument);
2045
+ } else if (isMergeableObject(e)) {
2046
+ destination[i] = deepmerge(target[i], e, optionsArgument);
2047
+ } else if (target.indexOf(e) === -1) {
2048
+ destination.push(cloneIfNecessary(e, optionsArgument));
2814
2049
  }
2815
- current = current[path];
2050
+ });
2051
+ return destination;
2052
+ }
2053
+ function mergeObject(target, source, optionsArgument) {
2054
+ var destination = {};
2055
+ if (isMergeableObject(target)) {
2056
+ Object.keys(target).forEach(function(key) {
2057
+ destination[key] = cloneIfNecessary(target[key], optionsArgument);
2058
+ });
2816
2059
  }
2817
- return result;
2818
- };
2819
- function getPropByPath(obj, path, strict) {
2820
- var tempObj = obj;
2821
- path = path.replace(/\[(\w+)\]/g, ".$1");
2822
- path = path.replace(/^\./, "");
2823
- var keyArr = path.split(".");
2824
- var i = 0;
2825
- for (var len = keyArr.length; i < len - 1; ++i) {
2826
- if (!tempObj && !strict)
2827
- break;
2828
- var key = keyArr[i];
2829
- if (key in tempObj) {
2830
- tempObj = tempObj[key];
2060
+ Object.keys(source).forEach(function(key) {
2061
+ if (!isMergeableObject(source[key]) || !target[key]) {
2062
+ destination[key] = cloneIfNecessary(source[key], optionsArgument);
2831
2063
  } else {
2832
- if (strict) {
2833
- throw new Error("please transfer a valid prop path to form item!");
2834
- }
2835
- break;
2064
+ destination[key] = deepmerge(target[key], source[key], optionsArgument);
2836
2065
  }
2837
- }
2838
- return {
2839
- o: tempObj,
2840
- k: keyArr[i],
2841
- v: tempObj ? tempObj[keyArr[i]] : null
2066
+ });
2067
+ return destination;
2068
+ }
2069
+ function deepmerge(target, source, optionsArgument) {
2070
+ var sourceIsArray = Array.isArray(source);
2071
+ var targetIsArray = Array.isArray(target);
2072
+ var options = optionsArgument || {
2073
+ arrayMerge: defaultArrayMerge
2842
2074
  };
2075
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
2076
+ if (!sourceAndTargetTypesMatch) {
2077
+ return cloneIfNecessary(source, optionsArgument);
2078
+ } else if (sourceIsArray) {
2079
+ var arrayMerge = options.arrayMerge || defaultArrayMerge;
2080
+ return arrayMerge(target, source, optionsArgument);
2081
+ } else {
2082
+ return mergeObject(target, source, optionsArgument);
2083
+ }
2843
2084
  }
2844
- util.generateId = function generateId() {
2845
- return Math.floor(Math.random() * 1e4);
2846
- };
2847
- util.valueEquals = function valueEquals2(a, b) {
2848
- if (a === b)
2849
- return true;
2850
- if (!(a instanceof Array))
2851
- return false;
2852
- if (!(b instanceof Array))
2853
- return false;
2854
- if (a.length !== b.length)
2855
- return false;
2856
- for (var i = 0; i !== a.length; ++i) {
2857
- if (a[i] !== b[i])
2858
- return false;
2085
+ deepmerge.all = function deepmergeAll(array, optionsArgument) {
2086
+ if (!Array.isArray(array) || array.length < 2) {
2087
+ throw new Error("first argument should be an array with at least two elements");
2859
2088
  }
2860
- return true;
2861
- };
2862
- util.escapeRegexpString = function escapeRegexpString() {
2863
- var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
2864
- return String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
2089
+ return array.reduce(function(prev, next) {
2090
+ return deepmerge(prev, next, optionsArgument);
2091
+ });
2865
2092
  };
2866
- var arrayFindIndex = util.arrayFindIndex = function arrayFindIndex2(arr, pred) {
2867
- for (var i = 0; i !== arr.length; ++i) {
2093
+ var deepmerge_1 = deepmerge;
2094
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
2095
+ function hasOwn(obj, key) {
2096
+ return hasOwnProperty.call(obj, key);
2097
+ }
2098
+ const arrayFindIndex = function(arr, pred) {
2099
+ for (let i = 0; i !== arr.length; ++i) {
2868
2100
  if (pred(arr[i])) {
2869
2101
  return i;
2870
2102
  }
2871
2103
  }
2872
2104
  return -1;
2873
2105
  };
2874
- util.arrayFind = function arrayFind2(arr, pred) {
2875
- var idx = arrayFindIndex(arr, pred);
2106
+ const arrayFind = function(arr, pred) {
2107
+ const idx = arrayFindIndex(arr, pred);
2876
2108
  return idx !== -1 ? arr[idx] : void 0;
2877
2109
  };
2878
- util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
2110
+ const coerceTruthyValueToArray = function(val) {
2879
2111
  if (Array.isArray(val)) {
2880
2112
  return val;
2881
2113
  } else if (val) {
@@ -2884,138 +2116,21 @@ util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
2884
2116
  return [];
2885
2117
  }
2886
2118
  };
2887
- util.isIE = function isIE() {
2888
- return !_vue2$1.default.prototype.$isServer && !isNaN(Number(document.documentMode));
2889
- };
2890
- util.isEdge = function isEdge() {
2891
- return !_vue2$1.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
2892
- };
2893
- util.isFirefox = function isFirefox() {
2894
- return !_vue2$1.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
2895
- };
2896
- util.autoprefixer = function autoprefixer(style) {
2897
- if ((typeof style === "undefined" ? "undefined" : _typeof$1(style)) !== "object")
2898
- return style;
2899
- var rules = ["transform", "transition", "animation"];
2900
- var prefixes = ["ms-", "webkit-"];
2901
- rules.forEach(function(rule) {
2902
- var value = style[rule];
2903
- if (rule && value) {
2904
- prefixes.forEach(function(prefix) {
2905
- style[prefix + rule] = value;
2906
- });
2907
- }
2908
- });
2909
- return style;
2910
- };
2911
- util.kebabCase = function kebabCase(str) {
2912
- var hyphenateRE = /([^-])([A-Z])/g;
2913
- return str.replace(hyphenateRE, "$1-$2").replace(hyphenateRE, "$1-$2").toLowerCase();
2914
- };
2915
- util.capitalize = function capitalize(str) {
2916
- if (!(0, _types.isString)(str))
2917
- return str;
2918
- return str.charAt(0).toUpperCase() + str.slice(1);
2919
- };
2920
- var looseEqual = util.looseEqual = function looseEqual2(a, b) {
2921
- var isObjectA = (0, _types.isObject)(a);
2922
- var isObjectB = (0, _types.isObject)(b);
2923
- if (isObjectA && isObjectB) {
2924
- return JSON.stringify(a) === JSON.stringify(b);
2925
- } else if (!isObjectA && !isObjectB) {
2926
- return String(a) === String(b);
2927
- } else {
2928
- return false;
2929
- }
2930
- };
2931
- var arrayEquals = util.arrayEquals = function arrayEquals2(arrayA, arrayB) {
2932
- arrayA = arrayA || [];
2933
- arrayB = arrayB || [];
2934
- if (arrayA.length !== arrayB.length) {
2935
- return false;
2936
- }
2937
- for (var i = 0; i < arrayA.length; i++) {
2938
- if (!looseEqual(arrayA[i], arrayB[i])) {
2939
- return false;
2940
- }
2941
- }
2942
- return true;
2943
- };
2944
- util.isEqual = function isEqual(value1, value2) {
2945
- if (Array.isArray(value1) && Array.isArray(value2)) {
2946
- return arrayEquals(value1, value2);
2947
- }
2948
- return looseEqual(value1, value2);
2949
- };
2950
- var isEmpty = util.isEmpty = function isEmpty2(val) {
2951
- if (val == null)
2952
- return true;
2953
- if (typeof val === "boolean")
2954
- return false;
2955
- if (typeof val === "number")
2956
- return !val;
2957
- if (val instanceof Error)
2958
- return val.message === "";
2959
- switch (Object.prototype.toString.call(val)) {
2960
- case "[object String]":
2961
- case "[object Array]":
2962
- return !val.length;
2963
- case "[object File]":
2964
- case "[object Map]":
2965
- case "[object Set]": {
2966
- return !val.size;
2967
- }
2968
- case "[object Object]": {
2969
- return !Object.keys(val).length;
2970
- }
2971
- }
2972
- return false;
2973
- };
2974
- function rafThrottle(fn) {
2975
- var locked = false;
2976
- return function() {
2977
- var _this = this;
2978
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
2979
- args[_key] = arguments[_key];
2980
- }
2981
- if (locked)
2982
- return;
2983
- locked = true;
2984
- window.requestAnimationFrame(function(_) {
2985
- fn.apply(_this, args);
2986
- locked = false;
2987
- });
2988
- };
2989
- }
2990
- function objToArray(obj) {
2991
- if (Array.isArray(obj)) {
2992
- return obj;
2993
- }
2994
- return isEmpty(obj) ? [] : [obj];
2995
- }
2996
- format$1.__esModule = true;
2997
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
2998
- return typeof obj;
2999
- } : function(obj) {
3000
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
3001
- };
3002
- format$1.default = function(Vue2) {
3003
- function template(string) {
3004
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
3005
- args[_key - 1] = arguments[_key];
3006
- }
3007
- if (args.length === 1 && _typeof(args[0]) === "object") {
2119
+ const RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
2120
+ function Format(Vue2) {
2121
+ function template(string, ...args) {
2122
+ if (args.length === 1 && typeof args[0] === "object") {
3008
2123
  args = args[0];
3009
2124
  }
3010
2125
  if (!args || !args.hasOwnProperty) {
3011
2126
  args = {};
3012
2127
  }
3013
- return string.replace(RE_NARGS, function(match, prefix, i, index) {
3014
- var result = void 0;
2128
+ return string.replace(RE_NARGS, (match, prefix, i, index) => {
2129
+ let result;
3015
2130
  if (string[index - 1] === "{" && string[index + match.length] === "}") {
3016
2131
  return i;
3017
2132
  } else {
3018
- result = (0, _util.hasOwn)(args, i) ? args[i] : null;
2133
+ result = hasOwn(args, i) ? args[i] : null;
3019
2134
  if (result === null || result === void 0) {
3020
2135
  return "";
3021
2136
  }
@@ -3024,47 +2139,30 @@ format$1.default = function(Vue2) {
3024
2139
  });
3025
2140
  }
3026
2141
  return template;
3027
- };
3028
- var _util = util;
3029
- var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
3030
- locale.__esModule = true;
3031
- locale.i18n = locale.use = locale.t = void 0;
3032
- var _zhCN = zhCN;
3033
- var _zhCN2 = _interopRequireDefault(_zhCN);
3034
- var _vue = Vue;
3035
- var _vue2 = _interopRequireDefault(_vue);
3036
- var _deepmerge = require$$2;
3037
- var _deepmerge2 = _interopRequireDefault(_deepmerge);
3038
- var _format = format$1;
3039
- var _format2 = _interopRequireDefault(_format);
3040
- function _interopRequireDefault(obj) {
3041
- return obj && obj.__esModule ? obj : {
3042
- default: obj
3043
- };
3044
2142
  }
3045
- var format = (0, _format2.default)(_vue2.default);
3046
- var lang = _zhCN2.default;
3047
- var merged = false;
3048
- var i18nHandler = function i18nHandler2() {
3049
- var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;
3050
- if (typeof vuei18n === "function" && !!_vue2.default.locale) {
2143
+ const format = Format();
2144
+ let lang = defaultLang;
2145
+ let merged = false;
2146
+ let i18nHandler = function() {
2147
+ const vuei18n = Object.getPrototypeOf(this || Vue).$t;
2148
+ if (typeof vuei18n === "function" && !!Vue.locale) {
3051
2149
  if (!merged) {
3052
2150
  merged = true;
3053
- _vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, {
2151
+ Vue.locale(Vue.config.lang, deepmerge_1(lang, Vue.locale(Vue.config.lang) || {}, {
3054
2152
  clone: true
3055
2153
  }));
3056
2154
  }
3057
2155
  return vuei18n.apply(this, arguments);
3058
2156
  }
3059
2157
  };
3060
- var t = locale.t = function t2(path, options) {
3061
- var value = i18nHandler.apply(this, arguments);
2158
+ const t = function(path, options) {
2159
+ let value = i18nHandler.apply(this, arguments);
3062
2160
  if (value !== null && value !== void 0)
3063
2161
  return value;
3064
- var array = path.split(".");
3065
- var current = lang;
3066
- for (var i = 0, j = array.length; i < j; i++) {
3067
- var property = array[i];
2162
+ const array = path.split(".");
2163
+ let current = lang;
2164
+ for (let i = 0, j = array.length; i < j; i++) {
2165
+ const property = array[i];
3068
2166
  value = current[property];
3069
2167
  if (i === j - 1)
3070
2168
  return format(value, options);
@@ -3074,47 +2172,25 @@ var t = locale.t = function t2(path, options) {
3074
2172
  }
3075
2173
  return "";
3076
2174
  };
3077
- var use = locale.use = function use2(l) {
3078
- lang = l || lang;
3079
- };
3080
- var i18n = locale.i18n = function i18n2(fn) {
3081
- i18nHandler = fn || i18nHandler;
3082
- };
3083
- locale.default = {
3084
- use,
3085
- t,
3086
- i18n
3087
- };
3088
- var _locale = locale;
3089
- var _default = {
3090
- methods: {
3091
- t: function t3() {
3092
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
3093
- args[_key] = arguments[_key];
3094
- }
3095
- return _locale.t.apply(this, args);
3096
- }
3097
- }
3098
- };
3099
2175
  const Locale = {
3100
2176
  methods: {
3101
2177
  t(...args) {
3102
- return t$1.apply(this, args);
2178
+ return t.apply(this, args);
3103
2179
  }
3104
2180
  }
3105
2181
  };
3106
2182
  const WEEKS = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
3107
2183
  const getDateTimestamp$1 = function(time) {
3108
2184
  if (typeof time === "number" || typeof time === "string") {
3109
- return clearTime(new Date(time)).getTime();
2185
+ return dateUtil.clearTime(new Date(time)).getTime();
3110
2186
  } else if (time instanceof Date) {
3111
- return clearTime(time).getTime();
2187
+ return dateUtil.clearTime(time).getTime();
3112
2188
  } else {
3113
2189
  return NaN;
3114
2190
  }
3115
2191
  };
3116
2192
  const removeFromArray = function(arr, pred) {
3117
- const idx = typeof pred === "function" ? arrayFindIndex$1(arr, pred) : arr.indexOf(pred);
2193
+ const idx = typeof pred === "function" ? arrayFindIndex(arr, pred) : arr.indexOf(pred);
3118
2194
  return idx >= 0 ? [...arr.slice(0, idx), ...arr.slice(idx + 1)] : arr;
3119
2195
  };
3120
2196
  const _sfc_main$3 = {
@@ -3128,7 +2204,7 @@ const _sfc_main$3 = {
3128
2204
  value: {},
3129
2205
  defaultValue: {
3130
2206
  validator(val) {
3131
- return val === null || isDate(val) || Array.isArray(val) && val.every(isDate);
2207
+ return val === null || dateUtil.isDate(val) || Array.isArray(val) && val.every(dateUtil.isDate);
3132
2208
  }
3133
2209
  },
3134
2210
  date: {},
@@ -3168,13 +2244,13 @@ const _sfc_main$3 = {
3168
2244
  return this.date.getMonth();
3169
2245
  },
3170
2246
  startDate() {
3171
- return getStartDateOfMonth(this.year, this.month);
2247
+ return dateUtil.getStartDateOfMonth(this.year, this.month);
3172
2248
  },
3173
2249
  rows() {
3174
- const date2 = new Date(this.year, this.month, 1);
3175
- let day = getFirstDayOfMonth(date2);
3176
- const dateCountOfMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth());
3177
- const dateCountOfLastMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth() === 0 ? 11 : date2.getMonth() - 1);
2250
+ const date = new Date(this.year, this.month, 1);
2251
+ let day = dateUtil.getFirstDayOfMonth(date);
2252
+ const dateCountOfMonth = dateUtil.getDayCountOfMonth(date.getFullYear(), date.getMonth());
2253
+ const dateCountOfLastMonth = dateUtil.getDayCountOfMonth(date.getFullYear(), date.getMonth() === 0 ? 11 : date.getMonth() - 1);
3178
2254
  day = day === 0 ? 7 : day;
3179
2255
  const offset = this.offsetDay;
3180
2256
  const rows = this.tableRows;
@@ -3190,7 +2266,7 @@ const _sfc_main$3 = {
3190
2266
  if (!row[0]) {
3191
2267
  row[0] = {
3192
2268
  type: "week",
3193
- text: getWeekNumber(nextDate(startDate, i * 7 + 1))
2269
+ text: dateUtil.getWeekNumber(dateUtil.nextDate(startDate, i * 7 + 1))
3194
2270
  };
3195
2271
  }
3196
2272
  }
@@ -3208,7 +2284,7 @@ const _sfc_main$3 = {
3208
2284
  }
3209
2285
  cell.type = "normal";
3210
2286
  const index = i * 7 + j;
3211
- const time = nextDate(startDate, index - offset).getTime();
2287
+ const time = dateUtil.nextDate(startDate, index - offset).getTime();
3212
2288
  cell.inRange = time >= getDateTimestamp$1(this.minDate) && time <= getDateTimestamp$1(this.maxDate);
3213
2289
  cell.start = this.minDate && time === getDateTimestamp$1(this.minDate);
3214
2290
  cell.end = this.maxDate && time === getDateTimestamp$1(this.maxDate);
@@ -3234,7 +2310,7 @@ const _sfc_main$3 = {
3234
2310
  }
3235
2311
  let cellDate = new Date(time);
3236
2312
  cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
3237
- cell.selected = arrayFind(selectedDate, (date3) => date3.getTime() === cellDate.getTime());
2313
+ cell.selected = arrayFind(selectedDate, (date2) => date2.getTime() === cellDate.getTime());
3238
2314
  cell.customClass = typeof cellClassName === "function" && cellClassName(cellDate);
3239
2315
  this.$set(row, this.showWeekNumber ? j + 1 : j, cell);
3240
2316
  }
@@ -3274,8 +2350,8 @@ const _sfc_main$3 = {
3274
2350
  };
3275
2351
  },
3276
2352
  methods: {
3277
- cellMatchesDate(cell, date2) {
3278
- const value = new Date(date2);
2353
+ cellMatchesDate(cell, date) {
2354
+ const value = new Date(date);
3279
2355
  return this.year === value.getFullYear() && this.month === value.getMonth() && Number(cell.text) === value.getDate();
3280
2356
  },
3281
2357
  getCellClasses(cell) {
@@ -3290,7 +2366,7 @@ const _sfc_main$3 = {
3290
2366
  } else {
3291
2367
  classes.push(cell.type);
3292
2368
  }
3293
- if (cell.type === "normal" && defaultValue.some((date2) => this.cellMatchesDate(cell, date2))) {
2369
+ if (cell.type === "normal" && defaultValue.some((date) => this.cellMatchesDate(cell, date))) {
3294
2370
  classes.push("default");
3295
2371
  }
3296
2372
  if (selectionMode === "day" && (cell.type === "normal" || cell.type === "today") && this.cellMatchesDate(cell, this.value)) {
@@ -3318,7 +2394,7 @@ const _sfc_main$3 = {
3318
2394
  },
3319
2395
  getDateOfCell(row, column) {
3320
2396
  const offsetFromStart = row * 7 + (column - (this.showWeekNumber ? 1 : 0)) - this.offsetDay;
3321
- return nextDate(this.startDate, offsetFromStart);
2397
+ return dateUtil.nextDate(this.startDate, offsetFromStart);
3322
2398
  },
3323
2399
  isWeekActive(cell) {
3324
2400
  if (this.selectionMode !== "week")
@@ -3335,9 +2411,9 @@ const _sfc_main$3 = {
3335
2411
  newDate.setFullYear(month === 11 ? year + 1 : year);
3336
2412
  }
3337
2413
  newDate.setDate(parseInt(cell.text, 10));
3338
- if (isDate(this.value)) {
2414
+ if (dateUtil.isDate(this.value)) {
3339
2415
  const dayOffset = (this.value.getDay() - this.firstDayOfWeek + 7) % 7 - 1;
3340
- const weekDate = prevDate(this.value, dayOffset);
2416
+ const weekDate = dateUtil.prevDate(this.value, dayOffset);
3341
2417
  return weekDate.getTime() === newDate.getTime();
3342
2418
  }
3343
2419
  return false;
@@ -3355,7 +2431,7 @@ const _sfc_main$3 = {
3355
2431
  continue;
3356
2432
  const cell = row[j];
3357
2433
  const index = i * 7 + j + (this.showWeekNumber ? -1 : 0);
3358
- const time = nextDate(startDate, index - this.offsetDay).getTime();
2434
+ const time = dateUtil.nextDate(startDate, index - this.offsetDay).getTime();
3359
2435
  cell.inRange = minDate && time >= minDate && time <= maxDate;
3360
2436
  cell.start = minDate && time === minDate;
3361
2437
  cell.end = maxDate && time === maxDate;
@@ -3431,7 +2507,7 @@ const _sfc_main$3 = {
3431
2507
  } else if (this.selectionMode === "day") {
3432
2508
  this.$emit("pick", newDate);
3433
2509
  } else if (this.selectionMode === "week") {
3434
- const weekNumber = getWeekNumber(newDate);
2510
+ const weekNumber = dateUtil.getWeekNumber(newDate);
3435
2511
  const value = newDate.getFullYear() + "w" + weekNumber;
3436
2512
  this.$emit("pick", {
3437
2513
  year: newDate.getFullYear(),
@@ -3441,7 +2517,7 @@ const _sfc_main$3 = {
3441
2517
  });
3442
2518
  } else if (this.selectionMode === "dates") {
3443
2519
  const value = this.value || [];
3444
- const newValue = cell.selected ? removeFromArray(value, (date2) => date2.getTime() === newDate.getTime()) : [...value, newDate];
2520
+ const newValue = cell.selected ? removeFromArray(value, (date) => date.getTime() === newDate.getTime()) : [...value, newDate];
3445
2521
  this.$emit("pick", newValue);
3446
2522
  }
3447
2523
  }
@@ -3486,9 +2562,9 @@ var __component__$3 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc
3486
2562
  const DateTable = __component__$3.exports;
3487
2563
  const getDateTimestamp = function(time) {
3488
2564
  if (typeof time === "number" || typeof time === "string") {
3489
- return clearTime(new Date(time)).getTime();
2565
+ return dateUtil.clearTime(new Date(time)).getTime();
3490
2566
  } else if (time instanceof Date) {
3491
- return clearTime(time).getTime();
2567
+ return dateUtil.clearTime(time).getTime();
3492
2568
  } else {
3493
2569
  return NaN;
3494
2570
  }
@@ -3503,10 +2579,10 @@ const _sfc_main$2 = {
3503
2579
  return getDateTimestamp(this.maxDate);
3504
2580
  },
3505
2581
  rows() {
3506
- const date2 = new Date(this.year, this.month, 1);
3507
- let day = getFirstDayOfMonth(date2);
3508
- const dateCountOfMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth());
3509
- const dateCountOfLastMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth() === 0 ? 11 : date2.getMonth() - 1);
2582
+ const date = new Date(this.year, this.month, 1);
2583
+ let day = dateUtil.getFirstDayOfMonth(date);
2584
+ const dateCountOfMonth = dateUtil.getDayCountOfMonth(date.getFullYear(), date.getMonth());
2585
+ const dateCountOfLastMonth = dateUtil.getDayCountOfMonth(date.getFullYear(), date.getMonth() === 0 ? 11 : date.getMonth() - 1);
3510
2586
  day = day === 0 ? 7 : day;
3511
2587
  const offset = this.offsetDay;
3512
2588
  const rows = this.tableRows;
@@ -3522,7 +2598,7 @@ const _sfc_main$2 = {
3522
2598
  if (!row[0]) {
3523
2599
  row[0] = {
3524
2600
  type: "week",
3525
- text: getWeekNumber(nextDate(startDate, i * 7 + 1))
2601
+ text: dateUtil.getWeekNumber(dateUtil.nextDate(startDate, i * 7 + 1))
3526
2602
  };
3527
2603
  }
3528
2604
  }
@@ -3540,7 +2616,7 @@ const _sfc_main$2 = {
3540
2616
  }
3541
2617
  cell.type = "normal";
3542
2618
  const index = i * 7 + j;
3543
- const time = nextDate(startDate, index - offset).getTime();
2619
+ const time = dateUtil.nextDate(startDate, index - offset).getTime();
3544
2620
  cell.inRange = time >= this.minDateTimestamp && time <= this.maxDateTimestamp;
3545
2621
  cell.start = this.minDate && time === this.minDateTimestamp;
3546
2622
  cell.end = this.maxDate && time === this.maxDateTimestamp;
@@ -3566,7 +2642,7 @@ const _sfc_main$2 = {
3566
2642
  }
3567
2643
  const cellDate = new Date(time);
3568
2644
  cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
3569
- cell.selected = arrayFind(selectedDate, (date3) => date3.getTime() === cellDate.getTime());
2645
+ cell.selected = arrayFind(selectedDate, (date2) => date2.getTime() === cellDate.getTime());
3570
2646
  cell.customClass = typeof cellClassName === "function" && cellClassName(cellDate);
3571
2647
  this.$set(row, this.showWeekNumber ? j + 1 : j, cell);
3572
2648
  }
@@ -3586,11 +2662,11 @@ const _sfc_main$2 = {
3586
2662
  } else {
3587
2663
  classes.push(cell.type);
3588
2664
  }
3589
- if (cell.type === "normal" && defaultValue.some((date2) => this.cellMatchesDate(cell, date2))) {
2665
+ if (cell.type === "normal" && defaultValue.some((date) => this.cellMatchesDate(cell, date))) {
3590
2666
  classes.push("default");
3591
2667
  }
3592
2668
  if (cell.inRange && (cell.type === "normal" || cell.type === "today")) {
3593
- if (isDate(this.minDate) && isDate(this.maxDate) || this.rangeState.selecting) {
2669
+ if (dateUtil.isDate(this.minDate) && dateUtil.isDate(this.maxDate) || this.rangeState.selecting) {
3594
2670
  classes.push("in-range");
3595
2671
  }
3596
2672
  if (cell.start) {
@@ -3623,9 +2699,9 @@ const _sfc_main$2 = {
3623
2699
  newDate.setFullYear(month === 11 ? year + 1 : year);
3624
2700
  }
3625
2701
  newDate.setDate(parseInt(cell.text, 10));
3626
- if (isDate(this.value)) {
2702
+ if (dateUtil.isDate(this.value)) {
3627
2703
  const dayOffset = (this.value.getDay() - this.firstDayOfWeek + 7) % 7 - 1;
3628
- const weekDate = prevDate(this.value, dayOffset);
2704
+ const weekDate = dateUtil.prevDate(this.value, dayOffset);
3629
2705
  return weekDate.getTime() === newDate.getTime();
3630
2706
  }
3631
2707
  return false;
@@ -3756,9 +2832,9 @@ const calcDefaultValue = (defaultValue) => {
3756
2832
  if (Array.isArray(defaultValue)) {
3757
2833
  return [new Date(defaultValue[0]), new Date(defaultValue[1])];
3758
2834
  } else if (defaultValue) {
3759
- return [new Date(defaultValue), nextDate(new Date(defaultValue), 1)];
2835
+ return [new Date(defaultValue), dateUtil.nextDate(new Date(defaultValue), 1)];
3760
2836
  } else {
3761
- return [/* @__PURE__ */ new Date(), nextDate(/* @__PURE__ */ new Date(), 1)];
2837
+ return [/* @__PURE__ */ new Date(), dateUtil.nextDate(/* @__PURE__ */ new Date(), 1)];
3762
2838
  }
3763
2839
  };
3764
2840
  const _sfc_main$1 = {
@@ -3768,7 +2844,7 @@ const _sfc_main$1 = {
3768
2844
  components: {
3769
2845
  WeekTable
3770
2846
  },
3771
- mixins: [_default],
2847
+ mixins: [Locale$1],
3772
2848
  data() {
3773
2849
  return {
3774
2850
  popperClass: "",
@@ -3778,7 +2854,7 @@ const _sfc_main$1 = {
3778
2854
  minDate: "",
3779
2855
  maxDate: "",
3780
2856
  leftDate: /* @__PURE__ */ new Date(),
3781
- rightDate: nextMonth(/* @__PURE__ */ new Date()),
2857
+ rightDate: dateUtil.nextMonth(/* @__PURE__ */ new Date()),
3782
2858
  rangeState: {
3783
2859
  endDate: null,
3784
2860
  selecting: false,
@@ -3823,9 +2899,9 @@ const _sfc_main$1 = {
3823
2899
  return this.rightDate.getMonth();
3824
2900
  },
3825
2901
  enableMonthArrow() {
3826
- const nextMonth2 = (this.leftMonth + 1) % 12;
2902
+ const nextMonth = (this.leftMonth + 1) % 12;
3827
2903
  const yearOffset = this.leftMonth + 1 >= 12 ? 1 : 0;
3828
- return this.unlinkPanels && new Date(this.leftYear + yearOffset, nextMonth2) < new Date(this.rightYear, this.rightMonth);
2904
+ return this.unlinkPanels && new Date(this.leftYear + yearOffset, nextMonth) < new Date(this.rightYear, this.rightMonth);
3829
2905
  },
3830
2906
  enableYearArrow() {
3831
2907
  return this.unlinkPanels && this.rightYear * 12 + this.rightMonth - (this.leftYear * 12 + this.leftMonth + 1) >= 12;
@@ -3838,7 +2914,7 @@ const _sfc_main$1 = {
3838
2914
  this.$nextTick(() => {
3839
2915
  if (this.$refs.maxTimePicker && this.maxDate && this.maxDate < this.minDate) {
3840
2916
  const format2 = "HH:mm:ss";
3841
- this.$refs.maxTimePicker.selectableRange = [[parseDate(formatDate(this.minDate, format2), format2), parseDate("23:59:59", format2)]];
2917
+ this.$refs.maxTimePicker.selectableRange = [[dateUtil.parseDate(dateUtil.formatDate(this.minDate, format2), format2), dateUtil.parseDate("23:59:59", format2)]];
3842
2918
  }
3843
2919
  });
3844
2920
  },
@@ -3858,8 +2934,8 @@ const _sfc_main$1 = {
3858
2934
  if ((newVal == null ? void 0 : newVal.length) < 2) {
3859
2935
  return;
3860
2936
  }
3861
- this.minDate = isDate(newVal[0]) ? new Date(newVal[0]) : null;
3862
- this.maxDate = isDate(newVal[1]) ? new Date(newVal[1]) : null;
2937
+ this.minDate = dateUtil.isDate(newVal[0]) ? new Date(newVal[0]) : null;
2938
+ this.maxDate = dateUtil.isDate(newVal[1]) ? new Date(newVal[1]) : null;
3863
2939
  if (this.minDate && this.maxDate) {
3864
2940
  if (this.minDate.getTime() > this.maxDate.getTime()) {
3865
2941
  const maxDate = this.minDate;
@@ -3879,13 +2955,13 @@ const _sfc_main$1 = {
3879
2955
  const minDateMonth = this.minDate.getMonth();
3880
2956
  const maxDateYear = this.maxDate.getFullYear();
3881
2957
  const maxDateMonth = this.maxDate.getMonth();
3882
- this.rightDate = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? nextMonth(this.maxDate) : this.maxDate;
2958
+ this.rightDate = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? dateUtil.nextMonth(this.maxDate) : this.maxDate;
3883
2959
  } else {
3884
- this.rightDate = nextMonth(this.leftDate);
2960
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
3885
2961
  }
3886
2962
  } else {
3887
2963
  this.leftDate = calcDefaultValue(this.defaultValue)[0];
3888
- this.rightDate = nextMonth(this.leftDate);
2964
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
3889
2965
  }
3890
2966
  }
3891
2967
  },
@@ -3893,7 +2969,7 @@ const _sfc_main$1 = {
3893
2969
  if (!Array.isArray(this.value)) {
3894
2970
  const [left, right] = calcDefaultValue(val);
3895
2971
  this.leftDate = left;
3896
- this.rightDate = val && val[1] && this.unlinkPanels ? right : nextMonth(this.leftDate);
2972
+ this.rightDate = val && val[1] && this.unlinkPanels ? right : dateUtil.nextMonth(this.leftDate);
3897
2973
  }
3898
2974
  }
3899
2975
  },
@@ -3918,8 +2994,8 @@ const _sfc_main$1 = {
3918
2994
  },
3919
2995
  handleRangePick(val, close = true) {
3920
2996
  const defaultTime = this.defaultTime || [];
3921
- const minDate = modifyWithTimeString(val.minDate, defaultTime[0]);
3922
- const maxDate = modifyWithTimeString(val.maxDate, defaultTime[1]);
2997
+ const minDate = dateUtil.modifyWithTimeString(val.minDate, defaultTime[0]);
2998
+ const maxDate = dateUtil.modifyWithTimeString(val.maxDate, defaultTime[1]);
3923
2999
  if (this.maxDate === maxDate && this.minDate === minDate) {
3924
3000
  return;
3925
3001
  }
@@ -3943,45 +3019,45 @@ const _sfc_main$1 = {
3943
3019
  },
3944
3020
  // leftPrev*, rightNext* need to take care of `unlinkPanels`
3945
3021
  leftPrevYear() {
3946
- this.leftDate = prevYear(this.leftDate);
3022
+ this.leftDate = dateUtil.prevYear(this.leftDate);
3947
3023
  if (!this.unlinkPanels) {
3948
- this.rightDate = nextMonth(this.leftDate);
3024
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
3949
3025
  }
3950
3026
  },
3951
3027
  leftPrevMonth() {
3952
- this.leftDate = prevMonth(this.leftDate);
3028
+ this.leftDate = dateUtil.prevMonth(this.leftDate);
3953
3029
  if (!this.unlinkPanels) {
3954
- this.rightDate = nextMonth(this.leftDate);
3030
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
3955
3031
  }
3956
3032
  },
3957
3033
  rightNextYear() {
3958
3034
  if (!this.unlinkPanels) {
3959
- this.leftDate = nextYear(this.leftDate);
3960
- this.rightDate = nextMonth(this.leftDate);
3035
+ this.leftDate = dateUtil.nextYear(this.leftDate);
3036
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
3961
3037
  } else {
3962
- this.rightDate = nextYear(this.rightDate);
3038
+ this.rightDate = dateUtil.nextYear(this.rightDate);
3963
3039
  }
3964
3040
  },
3965
3041
  rightNextMonth() {
3966
3042
  if (!this.unlinkPanels) {
3967
- this.leftDate = nextMonth(this.leftDate);
3968
- this.rightDate = nextMonth(this.leftDate);
3043
+ this.leftDate = dateUtil.nextMonth(this.leftDate);
3044
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
3969
3045
  } else {
3970
- this.rightDate = nextMonth(this.rightDate);
3046
+ this.rightDate = dateUtil.nextMonth(this.rightDate);
3971
3047
  }
3972
3048
  },
3973
3049
  // leftNext*, rightPrev* are called when `unlinkPanels` is true
3974
3050
  leftNextYear() {
3975
- this.leftDate = nextYear(this.leftDate);
3051
+ this.leftDate = dateUtil.nextYear(this.leftDate);
3976
3052
  },
3977
3053
  leftNextMonth() {
3978
- this.leftDate = nextMonth(this.leftDate);
3054
+ this.leftDate = dateUtil.nextMonth(this.leftDate);
3979
3055
  },
3980
3056
  rightPrevYear() {
3981
- this.rightDate = prevYear(this.rightDate);
3057
+ this.rightDate = dateUtil.prevYear(this.rightDate);
3982
3058
  },
3983
3059
  rightPrevMonth() {
3984
- this.rightDate = prevMonth(this.rightDate);
3060
+ this.rightDate = dateUtil.prevMonth(this.rightDate);
3985
3061
  },
3986
3062
  handleConfirm(visible = false) {
3987
3063
  if (this.isValidValue([this.minDate, this.maxDate])) {
@@ -3989,13 +3065,13 @@ const _sfc_main$1 = {
3989
3065
  }
3990
3066
  },
3991
3067
  isValidValue(value) {
3992
- return Array.isArray(value) && value && value[0] && value[1] && isDate(value[0]) && isDate(value[1]) && value[0].getTime() <= value[1].getTime() && (typeof this.disabledDate === "function" ? !this.disabledDate(value[0]) && !this.disabledDate(value[1]) : true);
3068
+ return Array.isArray(value) && value && value[0] && value[1] && dateUtil.isDate(value[0]) && dateUtil.isDate(value[1]) && value[0].getTime() <= value[1].getTime() && (typeof this.disabledDate === "function" ? !this.disabledDate(value[0]) && !this.disabledDate(value[1]) : true);
3993
3069
  },
3994
3070
  resetView() {
3995
3071
  if (this.minDate && this.maxDate == null)
3996
3072
  this.rangeState.selecting = false;
3997
- this.minDate = this.value && isDate(this.value[0]) ? new Date(this.value[0]) : null;
3998
- this.maxDate = this.value && isDate(this.value[0]) ? new Date(this.value[1]) : null;
3073
+ this.minDate = this.value && dateUtil.isDate(this.value[0]) ? new Date(this.value[0]) : null;
3074
+ this.maxDate = this.value && dateUtil.isDate(this.value[0]) ? new Date(this.value[1]) : null;
3999
3075
  this.handleMinMaxDateWeek();
4000
3076
  }
4001
3077
  }