@94ai/nf-timezone-picker 5.0.32 → 5.0.37

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.
@@ -13,7 +13,9 @@
13
13
  "use strict";
14
14
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
15
15
  const Vue = require("vue");
16
+ const dateUtil = require("element-ui/src/utils/date-util");
16
17
  const vue2RuntimeHelpers = require("@94ai/vue2-runtime-helpers");
18
+ const Locale = require("element-ui/lib/mixins/locale");
17
19
  require("fs");
18
20
  require("path");
19
21
  require("vue-demi");
@@ -174,788 +176,6 @@ const Clickoutside = {
174
176
  delete el[ctx];
175
177
  }
176
178
  };
177
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
178
- function getDefaultExportFromCjs(x) {
179
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
180
- }
181
- var date = { exports: {} };
182
- (function(module2) {
183
- (function(main) {
184
- var fecha2 = {};
185
- var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
186
- var twoDigits = "\\d\\d?";
187
- var threeDigits = "\\d{3}";
188
- var fourDigits = "\\d{4}";
189
- var word = "[^\\s]+";
190
- var literal = /\[([^]*?)\]/gm;
191
- var noop2 = function() {
192
- };
193
- function regexEscape(str) {
194
- return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&");
195
- }
196
- function shorten(arr, sLen) {
197
- var newArr = [];
198
- for (var i = 0, len = arr.length; i < len; i++) {
199
- newArr.push(arr[i].substr(0, sLen));
200
- }
201
- return newArr;
202
- }
203
- function monthUpdate(arrName) {
204
- return function(d, v, i18n3) {
205
- var index = i18n3[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());
206
- if (~index) {
207
- d.month = index;
208
- }
209
- };
210
- }
211
- function pad(val, len) {
212
- val = String(val);
213
- len = len || 2;
214
- while (val.length < len) {
215
- val = "0" + val;
216
- }
217
- return val;
218
- }
219
- var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
220
- var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
221
- var monthNamesShort = shorten(monthNames, 3);
222
- var dayNamesShort = shorten(dayNames, 3);
223
- fecha2.i18n = {
224
- dayNamesShort,
225
- dayNames,
226
- monthNamesShort,
227
- monthNames,
228
- amPm: ["am", "pm"],
229
- DoFn: function DoFn(D) {
230
- return D + ["th", "st", "nd", "rd"][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
231
- }
232
- };
233
- var formatFlags = {
234
- D: function(dateObj) {
235
- return dateObj.getDay();
236
- },
237
- DD: function(dateObj) {
238
- return pad(dateObj.getDay());
239
- },
240
- Do: function(dateObj, i18n3) {
241
- return i18n3.DoFn(dateObj.getDate());
242
- },
243
- d: function(dateObj) {
244
- return dateObj.getDate();
245
- },
246
- dd: function(dateObj) {
247
- return pad(dateObj.getDate());
248
- },
249
- ddd: function(dateObj, i18n3) {
250
- return i18n3.dayNamesShort[dateObj.getDay()];
251
- },
252
- dddd: function(dateObj, i18n3) {
253
- return i18n3.dayNames[dateObj.getDay()];
254
- },
255
- M: function(dateObj) {
256
- return dateObj.getMonth() + 1;
257
- },
258
- MM: function(dateObj) {
259
- return pad(dateObj.getMonth() + 1);
260
- },
261
- MMM: function(dateObj, i18n3) {
262
- return i18n3.monthNamesShort[dateObj.getMonth()];
263
- },
264
- MMMM: function(dateObj, i18n3) {
265
- return i18n3.monthNames[dateObj.getMonth()];
266
- },
267
- yy: function(dateObj) {
268
- return pad(String(dateObj.getFullYear()), 4).substr(2);
269
- },
270
- yyyy: function(dateObj) {
271
- return pad(dateObj.getFullYear(), 4);
272
- },
273
- h: function(dateObj) {
274
- return dateObj.getHours() % 12 || 12;
275
- },
276
- hh: function(dateObj) {
277
- return pad(dateObj.getHours() % 12 || 12);
278
- },
279
- H: function(dateObj) {
280
- return dateObj.getHours();
281
- },
282
- HH: function(dateObj) {
283
- return pad(dateObj.getHours());
284
- },
285
- m: function(dateObj) {
286
- return dateObj.getMinutes();
287
- },
288
- mm: function(dateObj) {
289
- return pad(dateObj.getMinutes());
290
- },
291
- s: function(dateObj) {
292
- return dateObj.getSeconds();
293
- },
294
- ss: function(dateObj) {
295
- return pad(dateObj.getSeconds());
296
- },
297
- S: function(dateObj) {
298
- return Math.round(dateObj.getMilliseconds() / 100);
299
- },
300
- SS: function(dateObj) {
301
- return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
302
- },
303
- SSS: function(dateObj) {
304
- return pad(dateObj.getMilliseconds(), 3);
305
- },
306
- a: function(dateObj, i18n3) {
307
- return dateObj.getHours() < 12 ? i18n3.amPm[0] : i18n3.amPm[1];
308
- },
309
- A: function(dateObj, i18n3) {
310
- return dateObj.getHours() < 12 ? i18n3.amPm[0].toUpperCase() : i18n3.amPm[1].toUpperCase();
311
- },
312
- ZZ: function(dateObj) {
313
- var o = dateObj.getTimezoneOffset();
314
- return (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
315
- }
316
- };
317
- var parseFlags = {
318
- d: [twoDigits, function(d, v) {
319
- d.day = v;
320
- }],
321
- Do: [twoDigits + word, function(d, v) {
322
- d.day = parseInt(v, 10);
323
- }],
324
- M: [twoDigits, function(d, v) {
325
- d.month = v - 1;
326
- }],
327
- yy: [twoDigits, function(d, v) {
328
- var da = /* @__PURE__ */ new Date(), cent = +("" + da.getFullYear()).substr(0, 2);
329
- d.year = "" + (v > 68 ? cent - 1 : cent) + v;
330
- }],
331
- h: [twoDigits, function(d, v) {
332
- d.hour = v;
333
- }],
334
- m: [twoDigits, function(d, v) {
335
- d.minute = v;
336
- }],
337
- s: [twoDigits, function(d, v) {
338
- d.second = v;
339
- }],
340
- yyyy: [fourDigits, function(d, v) {
341
- d.year = v;
342
- }],
343
- S: ["\\d", function(d, v) {
344
- d.millisecond = v * 100;
345
- }],
346
- SS: ["\\d{2}", function(d, v) {
347
- d.millisecond = v * 10;
348
- }],
349
- SSS: [threeDigits, function(d, v) {
350
- d.millisecond = v;
351
- }],
352
- D: [twoDigits, noop2],
353
- ddd: [word, noop2],
354
- MMM: [word, monthUpdate("monthNamesShort")],
355
- MMMM: [word, monthUpdate("monthNames")],
356
- a: [word, function(d, v, i18n3) {
357
- var val = v.toLowerCase();
358
- if (val === i18n3.amPm[0]) {
359
- d.isPm = false;
360
- } else if (val === i18n3.amPm[1]) {
361
- d.isPm = true;
362
- }
363
- }],
364
- ZZ: ["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z", function(d, v) {
365
- var parts = (v + "").match(/([+-]|\d\d)/gi), minutes;
366
- if (parts) {
367
- minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
368
- d.timezoneOffset = parts[0] === "+" ? minutes : -minutes;
369
- }
370
- }]
371
- };
372
- parseFlags.dd = parseFlags.d;
373
- parseFlags.dddd = parseFlags.ddd;
374
- parseFlags.DD = parseFlags.D;
375
- parseFlags.mm = parseFlags.m;
376
- parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
377
- parseFlags.MM = parseFlags.M;
378
- parseFlags.ss = parseFlags.s;
379
- parseFlags.A = parseFlags.a;
380
- fecha2.masks = {
381
- default: "ddd MMM dd yyyy HH:mm:ss",
382
- shortDate: "M/D/yy",
383
- mediumDate: "MMM d, yyyy",
384
- longDate: "MMMM d, yyyy",
385
- fullDate: "dddd, MMMM d, yyyy",
386
- shortTime: "HH:mm",
387
- mediumTime: "HH:mm:ss",
388
- longTime: "HH:mm:ss.SSS"
389
- };
390
- fecha2.format = function(dateObj, mask, i18nSettings) {
391
- var i18n3 = i18nSettings || fecha2.i18n;
392
- if (typeof dateObj === "number") {
393
- dateObj = new Date(dateObj);
394
- }
395
- if (Object.prototype.toString.call(dateObj) !== "[object Date]" || isNaN(dateObj.getTime())) {
396
- throw new Error("Invalid Date in fecha.format");
397
- }
398
- mask = fecha2.masks[mask] || mask || fecha2.masks["default"];
399
- var literals = [];
400
- mask = mask.replace(literal, function($0, $1) {
401
- literals.push($1);
402
- return "@@@";
403
- });
404
- mask = mask.replace(token, function($0) {
405
- return $0 in formatFlags ? formatFlags[$0](dateObj, i18n3) : $0.slice(1, $0.length - 1);
406
- });
407
- return mask.replace(/@@@/g, function() {
408
- return literals.shift();
409
- });
410
- };
411
- fecha2.parse = function(dateStr, format2, i18nSettings) {
412
- var i18n3 = i18nSettings || fecha2.i18n;
413
- if (typeof format2 !== "string") {
414
- throw new Error("Invalid format in fecha.parse");
415
- }
416
- format2 = fecha2.masks[format2] || format2;
417
- if (dateStr.length > 1e3) {
418
- return null;
419
- }
420
- var dateInfo = {};
421
- var parseInfo = [];
422
- var literals = [];
423
- format2 = format2.replace(literal, function($0, $1) {
424
- literals.push($1);
425
- return "@@@";
426
- });
427
- var newFormat = regexEscape(format2).replace(token, function($0) {
428
- if (parseFlags[$0]) {
429
- var info = parseFlags[$0];
430
- parseInfo.push(info[1]);
431
- return "(" + info[0] + ")";
432
- }
433
- return $0;
434
- });
435
- newFormat = newFormat.replace(/@@@/g, function() {
436
- return literals.shift();
437
- });
438
- var matches = dateStr.match(new RegExp(newFormat, "i"));
439
- if (!matches) {
440
- return null;
441
- }
442
- for (var i = 1; i < matches.length; i++) {
443
- parseInfo[i - 1](dateInfo, matches[i], i18n3);
444
- }
445
- var today = /* @__PURE__ */ new Date();
446
- if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
447
- dateInfo.hour = +dateInfo.hour + 12;
448
- } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
449
- dateInfo.hour = 0;
450
- }
451
- var date2;
452
- if (dateInfo.timezoneOffset != null) {
453
- dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
454
- 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));
455
- } else {
456
- 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);
457
- }
458
- return date2;
459
- };
460
- if (module2.exports) {
461
- module2.exports = fecha2;
462
- } else {
463
- main.fecha = fecha2;
464
- }
465
- })(commonjsGlobal);
466
- })(date);
467
- var dateExports = date.exports;
468
- const fecha = /* @__PURE__ */ getDefaultExportFromCjs(dateExports);
469
- const defaultLang = {
470
- el: {
471
- colorpicker: {
472
- confirm: "确定",
473
- clear: "清空"
474
- },
475
- datepicker: {
476
- now: "此刻",
477
- today: "今天",
478
- cancel: "取消",
479
- clear: "清空",
480
- confirm: "确定",
481
- selectDate: "选择日期",
482
- selectTime: "选择时间",
483
- startDate: "开始日期",
484
- startTime: "开始时间",
485
- endDate: "结束日期",
486
- endTime: "结束时间",
487
- prevYear: "前一年",
488
- nextYear: "后一年",
489
- prevMonth: "上个月",
490
- nextMonth: "下个月",
491
- year: "年",
492
- month1: "1 月",
493
- month2: "2 月",
494
- month3: "3 月",
495
- month4: "4 月",
496
- month5: "5 月",
497
- month6: "6 月",
498
- month7: "7 月",
499
- month8: "8 月",
500
- month9: "9 月",
501
- month10: "10 月",
502
- month11: "11 月",
503
- month12: "12 月",
504
- // week: '周次',
505
- weeks: {
506
- sun: "日",
507
- mon: "一",
508
- tue: "二",
509
- wed: "三",
510
- thu: "四",
511
- fri: "五",
512
- sat: "六"
513
- },
514
- months: {
515
- jan: "一月",
516
- feb: "二月",
517
- mar: "三月",
518
- apr: "四月",
519
- may: "五月",
520
- jun: "六月",
521
- jul: "七月",
522
- aug: "八月",
523
- sep: "九月",
524
- oct: "十月",
525
- nov: "十一月",
526
- dec: "十二月"
527
- }
528
- },
529
- select: {
530
- loading: "加载中",
531
- noMatch: "无匹配数据",
532
- noData: "无数据",
533
- placeholder: "请选择"
534
- },
535
- cascader: {
536
- noMatch: "无匹配数据",
537
- loading: "加载中",
538
- placeholder: "请选择",
539
- noData: "暂无数据"
540
- },
541
- pagination: {
542
- goto: "前往",
543
- pagesize: "条/页",
544
- total: "共 {total} 条",
545
- pageClassifier: "页"
546
- },
547
- messagebox: {
548
- title: "提示",
549
- confirm: "确定",
550
- cancel: "取消",
551
- error: "输入的数据不合法!"
552
- },
553
- upload: {
554
- deleteTip: "按 delete 键可删除",
555
- delete: "删除",
556
- preview: "查看图片",
557
- continue: "继续上传"
558
- },
559
- table: {
560
- emptyText: "暂无数据",
561
- confirmFilter: "筛选",
562
- resetFilter: "重置",
563
- clearFilter: "全部",
564
- sumText: "合计"
565
- },
566
- tree: {
567
- emptyText: "暂无数据"
568
- },
569
- transfer: {
570
- noMatch: "无匹配数据",
571
- noData: "无数据",
572
- titles: ["列表 1", "列表 2"],
573
- filterPlaceholder: "请输入搜索内容",
574
- noCheckedFormat: "共 {total} 项",
575
- hasCheckedFormat: "已选 {checked}/{total} 项"
576
- },
577
- image: {
578
- error: "加载失败"
579
- },
580
- pageHeader: {
581
- title: "返回"
582
- },
583
- popconfirm: {
584
- confirmButtonText: "确定",
585
- cancelButtonText: "取消"
586
- }
587
- }
588
- };
589
- var isMergeableObject = function isMergeableObject2(value) {
590
- return isNonNullObject(value) && !isSpecial(value);
591
- };
592
- function isNonNullObject(value) {
593
- return !!value && typeof value === "object";
594
- }
595
- function isSpecial(value) {
596
- var stringValue = Object.prototype.toString.call(value);
597
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
598
- }
599
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
600
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
601
- function isReactElement(value) {
602
- return value.$$typeof === REACT_ELEMENT_TYPE;
603
- }
604
- function emptyTarget(val) {
605
- return Array.isArray(val) ? [] : {};
606
- }
607
- function cloneIfNecessary(value, optionsArgument) {
608
- var clone = optionsArgument && optionsArgument.clone === true;
609
- return clone && isMergeableObject(value) ? deepmerge(emptyTarget(value), value, optionsArgument) : value;
610
- }
611
- function defaultArrayMerge(target, source, optionsArgument) {
612
- var destination = target.slice();
613
- source.forEach(function(e, i) {
614
- if (typeof destination[i] === "undefined") {
615
- destination[i] = cloneIfNecessary(e, optionsArgument);
616
- } else if (isMergeableObject(e)) {
617
- destination[i] = deepmerge(target[i], e, optionsArgument);
618
- } else if (target.indexOf(e) === -1) {
619
- destination.push(cloneIfNecessary(e, optionsArgument));
620
- }
621
- });
622
- return destination;
623
- }
624
- function mergeObject(target, source, optionsArgument) {
625
- var destination = {};
626
- if (isMergeableObject(target)) {
627
- Object.keys(target).forEach(function(key) {
628
- destination[key] = cloneIfNecessary(target[key], optionsArgument);
629
- });
630
- }
631
- Object.keys(source).forEach(function(key) {
632
- if (!isMergeableObject(source[key]) || !target[key]) {
633
- destination[key] = cloneIfNecessary(source[key], optionsArgument);
634
- } else {
635
- destination[key] = deepmerge(target[key], source[key], optionsArgument);
636
- }
637
- });
638
- return destination;
639
- }
640
- function deepmerge(target, source, optionsArgument) {
641
- var sourceIsArray = Array.isArray(source);
642
- var targetIsArray = Array.isArray(target);
643
- var options = optionsArgument || {
644
- arrayMerge: defaultArrayMerge
645
- };
646
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
647
- if (!sourceAndTargetTypesMatch) {
648
- return cloneIfNecessary(source, optionsArgument);
649
- } else if (sourceIsArray) {
650
- var arrayMerge = options.arrayMerge || defaultArrayMerge;
651
- return arrayMerge(target, source, optionsArgument);
652
- } else {
653
- return mergeObject(target, source, optionsArgument);
654
- }
655
- }
656
- deepmerge.all = function deepmergeAll(array, optionsArgument) {
657
- if (!Array.isArray(array) || array.length < 2) {
658
- throw new Error("first argument should be an array with at least two elements");
659
- }
660
- return array.reduce(function(prev, next) {
661
- return deepmerge(prev, next, optionsArgument);
662
- });
663
- };
664
- var deepmerge_1 = deepmerge;
665
- var cjs = deepmerge_1;
666
- const deepmerge$1 = /* @__PURE__ */ getDefaultExportFromCjs(cjs);
667
- const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
668
- function hasOwn$1(obj, key) {
669
- return hasOwnProperty$1.call(obj, key);
670
- }
671
- const arrayFindIndex$1 = function(arr, pred) {
672
- for (let i = 0; i !== arr.length; ++i) {
673
- if (pred(arr[i])) {
674
- return i;
675
- }
676
- }
677
- return -1;
678
- };
679
- const arrayFind = function(arr, pred) {
680
- const idx = arrayFindIndex$1(arr, pred);
681
- return idx !== -1 ? arr[idx] : void 0;
682
- };
683
- const coerceTruthyValueToArray = function(val) {
684
- if (Array.isArray(val)) {
685
- return val;
686
- } else if (val) {
687
- return [val];
688
- } else {
689
- return [];
690
- }
691
- };
692
- const RE_NARGS$1 = /(%|)\{([0-9a-zA-Z_]+)\}/g;
693
- function Format(Vue2) {
694
- function template(string, ...args) {
695
- if (args.length === 1 && typeof args[0] === "object") {
696
- args = args[0];
697
- }
698
- if (!args || !args.hasOwnProperty) {
699
- args = {};
700
- }
701
- return string.replace(RE_NARGS$1, (match, prefix, i, index) => {
702
- let result;
703
- if (string[index - 1] === "{" && string[index + match.length] === "}") {
704
- return i;
705
- } else {
706
- result = hasOwn$1(args, i) ? args[i] : null;
707
- if (result === null || result === void 0) {
708
- return "";
709
- }
710
- return result;
711
- }
712
- });
713
- }
714
- return template;
715
- }
716
- const format$2 = Format();
717
- let lang$1 = defaultLang;
718
- let merged$1 = false;
719
- let i18nHandler$1 = function() {
720
- const vuei18n = Object.getPrototypeOf(this || Vue).$t;
721
- if (typeof vuei18n === "function" && !!Vue.locale) {
722
- if (!merged$1) {
723
- merged$1 = true;
724
- Vue.locale(Vue.config.lang, deepmerge$1(lang$1, Vue.locale(Vue.config.lang) || {}, {
725
- clone: true
726
- }));
727
- }
728
- return vuei18n.apply(this, arguments);
729
- }
730
- };
731
- const t$1 = function(path, options) {
732
- let value = i18nHandler$1.apply(this, arguments);
733
- if (value !== null && value !== void 0)
734
- return value;
735
- const array = path.split(".");
736
- let current = lang$1;
737
- for (let i = 0, j = array.length; i < j; i++) {
738
- const property = array[i];
739
- value = current[property];
740
- if (i === j - 1)
741
- return format$2(value, options);
742
- if (!value)
743
- return "";
744
- current = value;
745
- }
746
- return "";
747
- };
748
- const weeks = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
749
- const months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
750
- const newArray = function(start, end) {
751
- let result = [];
752
- for (let i = start; i <= end; i++) {
753
- result.push(i);
754
- }
755
- return result;
756
- };
757
- const getI18nSettings = () => {
758
- return {
759
- dayNamesShort: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
760
- dayNames: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
761
- monthNamesShort: months.map((month) => t$1(`el.datepicker.months.${month}`)),
762
- monthNames: months.map((month, index) => t$1(`el.datepicker.month${index + 1}`)),
763
- amPm: ["am", "pm"]
764
- };
765
- };
766
- const toDate = function(date2) {
767
- return isDate(date2) ? new Date(date2) : null;
768
- };
769
- const isDate = function(date2) {
770
- if (date2 === null || date2 === void 0)
771
- return false;
772
- if (isNaN(new Date(date2).getTime()))
773
- return false;
774
- if (Array.isArray(date2))
775
- return false;
776
- return true;
777
- };
778
- const isDateObject = function(val) {
779
- return val instanceof Date;
780
- };
781
- const formatDate = function(date2, format2) {
782
- date2 = toDate(date2);
783
- if (!date2)
784
- return "";
785
- return fecha.format(date2, format2 || "yyyy-MM-dd", getI18nSettings());
786
- };
787
- const parseDate = function(string, format2) {
788
- return fecha.parse(string, format2 || "yyyy-MM-dd", getI18nSettings());
789
- };
790
- const getDayCountOfMonth = function(year, month) {
791
- if (month === 3 || month === 5 || month === 8 || month === 10) {
792
- return 30;
793
- }
794
- if (month === 1) {
795
- if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
796
- return 29;
797
- } else {
798
- return 28;
799
- }
800
- }
801
- return 31;
802
- };
803
- const getDayCountOfYear = function(year) {
804
- const isLeapYear = year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
805
- return isLeapYear ? 366 : 365;
806
- };
807
- const getFirstDayOfMonth = function(date2) {
808
- const temp = new Date(date2.getTime());
809
- temp.setDate(1);
810
- return temp.getDay();
811
- };
812
- const prevDate = function(date2, amount = 1) {
813
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() - amount);
814
- };
815
- const nextDate = function(date2, amount = 1) {
816
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() + amount);
817
- };
818
- const getStartDateOfMonth = function(year, month) {
819
- const result = new Date(year, month, 1);
820
- const day = result.getDay();
821
- if (day === 0) {
822
- return prevDate(result, 7);
823
- } else {
824
- return prevDate(result, day);
825
- }
826
- };
827
- const getWeekNumber = function(src) {
828
- if (!isDate(src))
829
- return null;
830
- const date2 = new Date(src.getTime());
831
- date2.setHours(0, 0, 0, 0);
832
- date2.setDate(date2.getDate() + 3 - (date2.getDay() + 6) % 7);
833
- const week1 = new Date(date2.getFullYear(), 0, 4);
834
- return 1 + Math.round(((date2.getTime() - week1.getTime()) / 864e5 - 3 + (week1.getDay() + 6) % 7) / 7);
835
- };
836
- const getRangeHours = function(ranges) {
837
- const hours = [];
838
- let disabledHours = [];
839
- (ranges || []).forEach((range2) => {
840
- const value = range2.map((date2) => date2.getHours());
841
- disabledHours = disabledHours.concat(newArray(value[0], value[1]));
842
- });
843
- if (disabledHours.length) {
844
- for (let i = 0; i < 24; i++) {
845
- hours[i] = disabledHours.indexOf(i) === -1;
846
- }
847
- } else {
848
- for (let i = 0; i < 24; i++) {
849
- hours[i] = false;
850
- }
851
- }
852
- return hours;
853
- };
854
- function setRangeData(arr, start, end, value) {
855
- for (let i = start; i < end; i++) {
856
- arr[i] = value;
857
- }
858
- }
859
- const getRangeMinutes = function(ranges, hour) {
860
- const minutes = new Array(60);
861
- if (ranges.length > 0) {
862
- ranges.forEach((range2) => {
863
- const start = range2[0];
864
- const end = range2[1];
865
- const startHour = start.getHours();
866
- const startMinute = start.getMinutes();
867
- const endHour = end.getHours();
868
- const endMinute = end.getMinutes();
869
- if (startHour === hour && endHour !== hour) {
870
- setRangeData(minutes, startMinute, 60, true);
871
- } else if (startHour === hour && endHour === hour) {
872
- setRangeData(minutes, startMinute, endMinute + 1, true);
873
- } else if (startHour !== hour && endHour === hour) {
874
- setRangeData(minutes, 0, endMinute + 1, true);
875
- } else if (startHour < hour && endHour > hour) {
876
- setRangeData(minutes, 0, 60, true);
877
- }
878
- });
879
- } else {
880
- setRangeData(minutes, 0, 60, true);
881
- }
882
- return minutes;
883
- };
884
- const range = function(n) {
885
- return Array.apply(null, {
886
- length: n
887
- }).map((_, n2) => n2);
888
- };
889
- const modifyDate = function(date2, y, m, d) {
890
- return new Date(y, m, d, date2.getHours(), date2.getMinutes(), date2.getSeconds(), date2.getMilliseconds());
891
- };
892
- const modifyTime = function(date2, h, m, s) {
893
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), h, m, s, date2.getMilliseconds());
894
- };
895
- const modifyWithTimeString = (date2, time) => {
896
- if (date2 == null || !time) {
897
- return date2;
898
- }
899
- time = parseDate(time, "HH:mm:ss");
900
- return modifyTime(date2, time.getHours(), time.getMinutes(), time.getSeconds());
901
- };
902
- const clearTime = function(date2) {
903
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
904
- };
905
- const clearMilliseconds = function(date2) {
906
- return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes(), date2.getSeconds(), 0);
907
- };
908
- const limitTimeRange = function(date2, ranges, format2 = "HH:mm:ss") {
909
- if (ranges.length === 0)
910
- return date2;
911
- const normalizeDate = (date3) => fecha.parse(fecha.format(date3, format2), format2);
912
- const ndate = normalizeDate(date2);
913
- const nranges = ranges.map((range2) => range2.map(normalizeDate));
914
- if (nranges.some((nrange) => ndate >= nrange[0] && ndate <= nrange[1]))
915
- return date2;
916
- let minDate = nranges[0][0];
917
- let maxDate = nranges[0][0];
918
- nranges.forEach((nrange) => {
919
- minDate = new Date(Math.min(nrange[0], minDate));
920
- maxDate = new Date(Math.max(nrange[1], minDate));
921
- });
922
- const ret = ndate < minDate ? minDate : maxDate;
923
- return modifyDate(ret, date2.getFullYear(), date2.getMonth(), date2.getDate());
924
- };
925
- const timeWithinRange = function(date2, selectableRange, format2) {
926
- const limitedDate = limitTimeRange(date2, selectableRange, format2);
927
- return limitedDate.getTime() === date2.getTime();
928
- };
929
- const changeYearMonthAndClampDate = function(date2, year, month) {
930
- const monthDate = Math.min(date2.getDate(), getDayCountOfMonth(year, month));
931
- return modifyDate(date2, year, month, monthDate);
932
- };
933
- const prevMonth = function(date2) {
934
- const year = date2.getFullYear();
935
- const month = date2.getMonth();
936
- return month === 0 ? changeYearMonthAndClampDate(date2, year - 1, 11) : changeYearMonthAndClampDate(date2, year, month - 1);
937
- };
938
- const nextMonth = function(date2) {
939
- const year = date2.getFullYear();
940
- const month = date2.getMonth();
941
- return month === 11 ? changeYearMonthAndClampDate(date2, year + 1, 0) : changeYearMonthAndClampDate(date2, year, month + 1);
942
- };
943
- const prevYear = function(date2, amount = 1) {
944
- const year = date2.getFullYear();
945
- const month = date2.getMonth();
946
- return changeYearMonthAndClampDate(date2, year - amount, month);
947
- };
948
- const nextYear = function(date2, amount = 1) {
949
- const year = date2.getFullYear();
950
- const month = date2.getMonth();
951
- return changeYearMonthAndClampDate(date2, year + amount, month);
952
- };
953
- const extractDateFormat = function(format2) {
954
- return format2.replace(/\W?m{1,2}|\W?ZZ/g, "").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, "").trim();
955
- };
956
- const extractTimeFormat = function(format2) {
957
- return format2.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, "").trim();
958
- };
959
179
  function merge(target) {
960
180
  for (let i = 1, j = arguments.length; i < j; i++) {
961
181
  let source = arguments[i] || {};
@@ -1137,6 +357,10 @@ if (!Vue.prototype.$isServer) {
1137
357
  }
1138
358
  });
1139
359
  }
360
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
361
+ function getDefaultExportFromCjs(x) {
362
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
363
+ }
1140
364
  var popper$1 = { exports: {} };
1141
365
  /**
1142
366
  * @fileOverview Kickass library to create and place poppers near their reference elements.
@@ -1425,7 +649,7 @@ var popper$1 = { exports: {} };
1425
649
  modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
1426
650
  }
1427
651
  modifiersToRun.forEach((function(modifier) {
1428
- if (isFunction2(modifier)) {
652
+ if (isFunction(modifier)) {
1429
653
  data = modifier.call(this, data);
1430
654
  }
1431
655
  }).bind(this));
@@ -1737,7 +961,7 @@ var popper$1 = { exports: {} };
1737
961
  element.style[prop] = styles[prop] + unit;
1738
962
  });
1739
963
  }
1740
- function isFunction2(functionToCheck) {
964
+ function isFunction(functionToCheck) {
1741
965
  var getType = {};
1742
966
  return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
1743
967
  }
@@ -1754,8 +978,8 @@ var popper$1 = { exports: {} };
1754
978
  }
1755
979
  function getBoundingClientRect(element) {
1756
980
  var rect = element.getBoundingClientRect();
1757
- var isIE2 = navigator.userAgent.indexOf("MSIE") != -1;
1758
- var rectTop = isIE2 && element.tagName === "HTML" ? -element.scrollTop : rect.top;
981
+ var isIE = navigator.userAgent.indexOf("MSIE") != -1;
982
+ var rectTop = isIE && element.tagName === "HTML" ? -element.scrollTop : rect.top;
1759
983
  return {
1760
984
  left: rect.left,
1761
985
  top: rectTop,
@@ -2059,34 +1283,34 @@ const DEFAULT_FORMATS = {
2059
1283
  year: "yyyy"
2060
1284
  };
2061
1285
  const HAVE_TRIGGER_TYPES = ["date", "datetime", "time", "time-select", "week", "month", "year", "daterange", "monthrange", "timerange", "datetimerange", "dates"];
2062
- const DATE_FORMATTER = function(value, format2) {
2063
- if (format2 === "timestamp")
1286
+ const DATE_FORMATTER = function(value, format) {
1287
+ if (format === "timestamp")
2064
1288
  return value.getTime();
2065
- return formatDate(value, format2);
1289
+ return dateUtil.formatDate(value, format);
2066
1290
  };
2067
- const DATE_PARSER = function(text, format2) {
2068
- if (format2 === "timestamp")
1291
+ const DATE_PARSER = function(text, format) {
1292
+ if (format === "timestamp")
2069
1293
  return new Date(Number(text));
2070
- return parseDate(text, format2);
1294
+ return dateUtil.parseDate(text, format);
2071
1295
  };
2072
- const RANGE_FORMATTER = function(value, format2) {
1296
+ const RANGE_FORMATTER = function(value, format) {
2073
1297
  if (Array.isArray(value) && value.length === 2) {
2074
1298
  const start = value[0];
2075
1299
  const end = value[1];
2076
1300
  if (start && end) {
2077
- return [DATE_FORMATTER(start, format2), DATE_FORMATTER(end, format2)];
1301
+ return [DATE_FORMATTER(start, format), DATE_FORMATTER(end, format)];
2078
1302
  }
2079
1303
  }
2080
1304
  return "";
2081
1305
  };
2082
- const RANGE_PARSER = function(array, format2, separator) {
1306
+ const RANGE_PARSER = function(array, format, separator) {
2083
1307
  if (!Array.isArray(array)) {
2084
1308
  array = array.split(separator);
2085
1309
  }
2086
1310
  if (array.length === 2) {
2087
1311
  const range1 = array[0];
2088
1312
  const range2 = array[1];
2089
- return [DATE_PARSER(range1, format2), DATE_PARSER(range2, format2)];
1313
+ return [DATE_PARSER(range1, format), DATE_PARSER(range2, format)];
2090
1314
  }
2091
1315
  return [];
2092
1316
  };
@@ -2104,20 +1328,20 @@ const TYPE_VALUE_RESOLVER_MAP = {
2104
1328
  }
2105
1329
  },
2106
1330
  week: {
2107
- formatter(value, format2) {
2108
- const week = getWeekNumber(value);
1331
+ formatter(value, format) {
1332
+ const week = dateUtil.getWeekNumber(value);
2109
1333
  const month = value.getMonth();
2110
1334
  const trueDate = new Date(value);
2111
1335
  if (week === 1 && month === 11) {
2112
1336
  trueDate.setHours(0, 0, 0, 0);
2113
1337
  trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
2114
1338
  }
2115
- let date2 = formatDate(trueDate, format2);
2116
- date2 = /WW/.test(date2) ? date2.replace(/WW/, week < 10 ? "0" + week : week) : date2.replace(/W/, week);
2117
- return date2;
1339
+ let date = dateUtil.formatDate(trueDate, format);
1340
+ date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? "0" + week : week) : date.replace(/W/, week);
1341
+ return date;
2118
1342
  },
2119
- parser(text, format2) {
2120
- return TYPE_VALUE_RESOLVER_MAP.date.parser(text, format2);
1343
+ parser(text, format) {
1344
+ return TYPE_VALUE_RESOLVER_MAP.date.parser(text, format);
2121
1345
  }
2122
1346
  },
2123
1347
  date: {
@@ -2172,11 +1396,11 @@ const TYPE_VALUE_RESOLVER_MAP = {
2172
1396
  }
2173
1397
  },
2174
1398
  dates: {
2175
- formatter(value, format2) {
2176
- return value.map((date2) => DATE_FORMATTER(date2, format2));
1399
+ formatter(value, format) {
1400
+ return value.map((date) => DATE_FORMATTER(date, format));
2177
1401
  },
2178
- parser(value, format2) {
2179
- return (typeof value === "string" ? value.split(", ") : value).map((date2) => date2 instanceof Date ? date2 : DATE_PARSER(date2, format2));
1402
+ parser(value, format) {
1403
+ return (typeof value === "string" ? value.split(", ") : value).map((date) => date instanceof Date ? date : DATE_PARSER(date, format));
2180
1404
  }
2181
1405
  }
2182
1406
  };
@@ -2189,15 +1413,15 @@ const parseAsFormatAndType = (value, customFormat, type, rangeSeparator = "-") =
2189
1413
  if (!value)
2190
1414
  return null;
2191
1415
  const parser = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP["default"]).parser;
2192
- const format2 = customFormat || DEFAULT_FORMATS[type];
2193
- return parser(value, format2, rangeSeparator);
1416
+ const format = customFormat || DEFAULT_FORMATS[type];
1417
+ return parser(value, format, rangeSeparator);
2194
1418
  };
2195
1419
  const formatAsFormatAndType = (value, customFormat, type) => {
2196
1420
  if (!value)
2197
1421
  return null;
2198
1422
  const formatter = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP["default"]).formatter;
2199
- const format2 = customFormat || DEFAULT_FORMATS[type];
2200
- return formatter(value, format2);
1423
+ const format = customFormat || DEFAULT_FORMATS[type];
1424
+ return formatter(value, format);
2201
1425
  };
2202
1426
  const valueEquals = function(a, b) {
2203
1427
  const dateEquals = function(a2, b2) {
@@ -2224,11 +1448,11 @@ const valueEquals = function(a, b) {
2224
1448
  }
2225
1449
  return false;
2226
1450
  };
2227
- const isString$1 = function(val) {
1451
+ const isString = function(val) {
2228
1452
  return typeof val === "string" || val instanceof String;
2229
1453
  };
2230
1454
  const validator = function(val) {
2231
- return val === null || val === void 0 || isString$1(val) || Array.isArray(val) && val.length === 2 && val.every(isString$1);
1455
+ return val === null || val === void 0 || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
2232
1456
  };
2233
1457
  const _sfc_main$9 = {
2234
1458
  directives: {
@@ -2374,7 +1598,7 @@ const _sfc_main$9 = {
2374
1598
  return this.value;
2375
1599
  if (this.type === "time-select")
2376
1600
  return this.value;
2377
- const valueIsDateObject = isDateObject(this.value) || Array.isArray(this.value) && this.value.every(isDateObject);
1601
+ const valueIsDateObject = dateUtil.isDateObject(this.value) || Array.isArray(this.value) && this.value.every(dateUtil.isDateObject);
2378
1602
  if (valueIsDateObject) {
2379
1603
  return this.value;
2380
1604
  }
@@ -2473,19 +1697,19 @@ const _sfc_main$9 = {
2473
1697
  },
2474
1698
  // {parse, formatTo} Value deals maps component value with internal Date
2475
1699
  parseValue(value) {
2476
- const isParsed = isDateObject(value) || Array.isArray(value) && value.every(isDateObject);
1700
+ const isParsed = dateUtil.isDateObject(value) || Array.isArray(value) && value.every(dateUtil.isDateObject);
2477
1701
  if (this.valueFormat && !isParsed) {
2478
1702
  return parseAsFormatAndType(value, this.valueFormat, this.type, this.rangeSeparator) || value;
2479
1703
  } else {
2480
1704
  return value;
2481
1705
  }
2482
1706
  },
2483
- formatToValue(date2) {
2484
- const isFormattable = isDateObject(date2) || Array.isArray(date2) && date2.every(isDateObject);
1707
+ formatToValue(date) {
1708
+ const isFormattable = dateUtil.isDateObject(date) || Array.isArray(date) && date.every(dateUtil.isDateObject);
2485
1709
  if (this.valueFormat && isFormattable) {
2486
- return formatAsFormatAndType(date2, this.valueFormat, this.type, this.rangeSeparator);
1710
+ return formatAsFormatAndType(date, this.valueFormat, this.type, this.rangeSeparator);
2487
1711
  } else {
2488
- return date2;
1712
+ return date;
2489
1713
  }
2490
1714
  },
2491
1715
  // {parse, formatTo} String deals with user input
@@ -2682,17 +1906,17 @@ const _sfc_main$9 = {
2682
1906
  this.picker.selectionMode = this.selectionMode;
2683
1907
  this.picker.unlinkPanels = this.unlinkPanels;
2684
1908
  this.picker.arrowControl = this.arrowControl || this.timeArrowControl || false;
2685
- this.$watch("format", (format2) => {
2686
- this.picker.format = format2;
1909
+ this.$watch("format", (format) => {
1910
+ this.picker.format = format;
2687
1911
  });
2688
1912
  const updateOptions = () => {
2689
1913
  const options = this.pickerOptions;
2690
1914
  if (options && options.selectableRange) {
2691
1915
  let ranges = options.selectableRange;
2692
1916
  const parser = TYPE_VALUE_RESOLVER_MAP.datetimerange.parser;
2693
- const format2 = DEFAULT_FORMATS.timerange;
1917
+ const format = DEFAULT_FORMATS.timerange;
2694
1918
  ranges = Array.isArray(ranges) ? ranges : [ranges];
2695
- this.picker.selectableRange = ranges.map((range2) => parser(range2, format2, this.rangeSeparator));
1919
+ this.picker.selectableRange = ranges.map((range) => parser(range, format, this.rangeSeparator));
2696
1920
  }
2697
1921
  for (const option in options) {
2698
1922
  if (options.hasOwnProperty(option) && // 忽略 time-picker 的该配置项
@@ -2711,10 +1935,10 @@ const _sfc_main$9 = {
2711
1935
  this.$el.appendChild(this.picker.$el);
2712
1936
  this.picker.resetView && this.picker.resetView();
2713
1937
  this.picker.$on("dodestroy", this.doDestroy);
2714
- this.picker.$on("pick", (date2 = "", visible = false) => {
1938
+ this.picker.$on("pick", (date = "", visible = false) => {
2715
1939
  this.userInput = null;
2716
1940
  this.pickerVisible = this.picker.visible = visible;
2717
- this.emitInput(date2);
1941
+ this.emitInput(date);
2718
1942
  this.picker.resetView && this.picker.resetView();
2719
1943
  });
2720
1944
  this.picker.$on("select-range", (start, end, pos) => {
@@ -2892,494 +2116,6 @@ var _sfc_render$9 = function render() {
2892
2116
  var _sfc_staticRenderFns$9 = [];
2893
2117
  var __component__$9 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main$9, _sfc_render$9, _sfc_staticRenderFns$9, false, null, null, null, null);
2894
2118
  const Picker = __component__$9.exports;
2895
- var locale = {};
2896
- var zhCN = {};
2897
- zhCN.__esModule = true;
2898
- zhCN.default = {
2899
- el: {
2900
- colorpicker: {
2901
- confirm: "确定",
2902
- clear: "清空"
2903
- },
2904
- datepicker: {
2905
- now: "此刻",
2906
- today: "今天",
2907
- cancel: "取消",
2908
- clear: "清空",
2909
- confirm: "确定",
2910
- selectDate: "选择日期",
2911
- selectTime: "选择时间",
2912
- startDate: "开始日期",
2913
- startTime: "开始时间",
2914
- endDate: "结束日期",
2915
- endTime: "结束时间",
2916
- prevYear: "前一年",
2917
- nextYear: "后一年",
2918
- prevMonth: "上个月",
2919
- nextMonth: "下个月",
2920
- year: "年",
2921
- month1: "1 月",
2922
- month2: "2 月",
2923
- month3: "3 月",
2924
- month4: "4 月",
2925
- month5: "5 月",
2926
- month6: "6 月",
2927
- month7: "7 月",
2928
- month8: "8 月",
2929
- month9: "9 月",
2930
- month10: "10 月",
2931
- month11: "11 月",
2932
- month12: "12 月",
2933
- // week: '周次',
2934
- weeks: {
2935
- sun: "日",
2936
- mon: "一",
2937
- tue: "二",
2938
- wed: "三",
2939
- thu: "四",
2940
- fri: "五",
2941
- sat: "六"
2942
- },
2943
- months: {
2944
- jan: "一月",
2945
- feb: "二月",
2946
- mar: "三月",
2947
- apr: "四月",
2948
- may: "五月",
2949
- jun: "六月",
2950
- jul: "七月",
2951
- aug: "八月",
2952
- sep: "九月",
2953
- oct: "十月",
2954
- nov: "十一月",
2955
- dec: "十二月"
2956
- }
2957
- },
2958
- select: {
2959
- loading: "加载中",
2960
- noMatch: "无匹配数据",
2961
- noData: "无数据",
2962
- placeholder: "请选择"
2963
- },
2964
- cascader: {
2965
- noMatch: "无匹配数据",
2966
- loading: "加载中",
2967
- placeholder: "请选择",
2968
- noData: "暂无数据"
2969
- },
2970
- pagination: {
2971
- goto: "前往",
2972
- pagesize: "条/页",
2973
- total: "共 {total} 条",
2974
- pageClassifier: "页"
2975
- },
2976
- messagebox: {
2977
- title: "提示",
2978
- confirm: "确定",
2979
- cancel: "取消",
2980
- error: "输入的数据不合法!"
2981
- },
2982
- upload: {
2983
- deleteTip: "按 delete 键可删除",
2984
- delete: "删除",
2985
- preview: "查看图片",
2986
- continue: "继续上传"
2987
- },
2988
- table: {
2989
- emptyText: "暂无数据",
2990
- confirmFilter: "筛选",
2991
- resetFilter: "重置",
2992
- clearFilter: "全部",
2993
- sumText: "合计"
2994
- },
2995
- tree: {
2996
- emptyText: "暂无数据"
2997
- },
2998
- transfer: {
2999
- noMatch: "无匹配数据",
3000
- noData: "无数据",
3001
- titles: ["列表 1", "列表 2"],
3002
- filterPlaceholder: "请输入搜索内容",
3003
- noCheckedFormat: "共 {total} 项",
3004
- hasCheckedFormat: "已选 {checked}/{total} 项"
3005
- },
3006
- image: {
3007
- error: "加载失败"
3008
- },
3009
- pageHeader: {
3010
- title: "返回"
3011
- },
3012
- popconfirm: {
3013
- confirmButtonText: "确定",
3014
- cancelButtonText: "取消"
3015
- }
3016
- }
3017
- };
3018
- var format$1 = {};
3019
- var util = {};
3020
- var types = {};
3021
- types.__esModule = true;
3022
- types.isString = isString;
3023
- types.isObject = isObject;
3024
- types.isHtmlElement = isHtmlElement;
3025
- function isString(obj) {
3026
- return Object.prototype.toString.call(obj) === "[object String]";
3027
- }
3028
- function isObject(obj) {
3029
- return Object.prototype.toString.call(obj) === "[object Object]";
3030
- }
3031
- function isHtmlElement(node) {
3032
- return node && node.nodeType === Node.ELEMENT_NODE;
3033
- }
3034
- types.isFunction = function isFunction(functionToCheck) {
3035
- var getType = {};
3036
- return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
3037
- };
3038
- types.isUndefined = function isUndefined(val) {
3039
- return val === void 0;
3040
- };
3041
- types.isDefined = function isDefined(val) {
3042
- return val !== void 0 && val !== null;
3043
- };
3044
- util.__esModule = true;
3045
- 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;
3046
- var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
3047
- return typeof obj;
3048
- } : function(obj) {
3049
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
3050
- };
3051
- util.noop = noop;
3052
- util.hasOwn = hasOwn;
3053
- util.toObject = toObject;
3054
- util.getPropByPath = getPropByPath;
3055
- util.rafThrottle = rafThrottle;
3056
- util.objToArray = objToArray;
3057
- var _vue$1 = Vue;
3058
- var _vue2$1 = _interopRequireDefault$1(_vue$1);
3059
- var _types = types;
3060
- function _interopRequireDefault$1(obj) {
3061
- return obj && obj.__esModule ? obj : {
3062
- default: obj
3063
- };
3064
- }
3065
- var hasOwnProperty = Object.prototype.hasOwnProperty;
3066
- function noop() {
3067
- }
3068
- function hasOwn(obj, key) {
3069
- return hasOwnProperty.call(obj, key);
3070
- }
3071
- function extend(to, _from) {
3072
- for (var key in _from) {
3073
- to[key] = _from[key];
3074
- }
3075
- return to;
3076
- }
3077
- function toObject(arr) {
3078
- var res = {};
3079
- for (var i = 0; i < arr.length; i++) {
3080
- if (arr[i]) {
3081
- extend(res, arr[i]);
3082
- }
3083
- }
3084
- return res;
3085
- }
3086
- util.getValueByPath = function getValueByPath(object, prop) {
3087
- prop = prop || "";
3088
- var paths = prop.split(".");
3089
- var current = object;
3090
- var result = null;
3091
- for (var i = 0, j = paths.length; i < j; i++) {
3092
- var path = paths[i];
3093
- if (!current)
3094
- break;
3095
- if (i === j - 1) {
3096
- result = current[path];
3097
- break;
3098
- }
3099
- current = current[path];
3100
- }
3101
- return result;
3102
- };
3103
- function getPropByPath(obj, path, strict) {
3104
- var tempObj = obj;
3105
- path = path.replace(/\[(\w+)\]/g, ".$1");
3106
- path = path.replace(/^\./, "");
3107
- var keyArr = path.split(".");
3108
- var i = 0;
3109
- for (var len = keyArr.length; i < len - 1; ++i) {
3110
- if (!tempObj && !strict)
3111
- break;
3112
- var key = keyArr[i];
3113
- if (key in tempObj) {
3114
- tempObj = tempObj[key];
3115
- } else {
3116
- if (strict) {
3117
- throw new Error("please transfer a valid prop path to form item!");
3118
- }
3119
- break;
3120
- }
3121
- }
3122
- return {
3123
- o: tempObj,
3124
- k: keyArr[i],
3125
- v: tempObj ? tempObj[keyArr[i]] : null
3126
- };
3127
- }
3128
- util.generateId = function generateId() {
3129
- return Math.floor(Math.random() * 1e4);
3130
- };
3131
- util.valueEquals = function valueEquals2(a, b) {
3132
- if (a === b)
3133
- return true;
3134
- if (!(a instanceof Array))
3135
- return false;
3136
- if (!(b instanceof Array))
3137
- return false;
3138
- if (a.length !== b.length)
3139
- return false;
3140
- for (var i = 0; i !== a.length; ++i) {
3141
- if (a[i] !== b[i])
3142
- return false;
3143
- }
3144
- return true;
3145
- };
3146
- util.escapeRegexpString = function escapeRegexpString() {
3147
- var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
3148
- return String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
3149
- };
3150
- var arrayFindIndex = util.arrayFindIndex = function arrayFindIndex2(arr, pred) {
3151
- for (var i = 0; i !== arr.length; ++i) {
3152
- if (pred(arr[i])) {
3153
- return i;
3154
- }
3155
- }
3156
- return -1;
3157
- };
3158
- util.arrayFind = function arrayFind2(arr, pred) {
3159
- var idx = arrayFindIndex(arr, pred);
3160
- return idx !== -1 ? arr[idx] : void 0;
3161
- };
3162
- util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
3163
- if (Array.isArray(val)) {
3164
- return val;
3165
- } else if (val) {
3166
- return [val];
3167
- } else {
3168
- return [];
3169
- }
3170
- };
3171
- util.isIE = function isIE() {
3172
- return !_vue2$1.default.prototype.$isServer && !isNaN(Number(document.documentMode));
3173
- };
3174
- util.isEdge = function isEdge() {
3175
- return !_vue2$1.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
3176
- };
3177
- util.isFirefox = function isFirefox() {
3178
- return !_vue2$1.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
3179
- };
3180
- util.autoprefixer = function autoprefixer(style) {
3181
- if ((typeof style === "undefined" ? "undefined" : _typeof$1(style)) !== "object")
3182
- return style;
3183
- var rules = ["transform", "transition", "animation"];
3184
- var prefixes = ["ms-", "webkit-"];
3185
- rules.forEach(function(rule) {
3186
- var value = style[rule];
3187
- if (rule && value) {
3188
- prefixes.forEach(function(prefix) {
3189
- style[prefix + rule] = value;
3190
- });
3191
- }
3192
- });
3193
- return style;
3194
- };
3195
- util.kebabCase = function kebabCase(str) {
3196
- var hyphenateRE = /([^-])([A-Z])/g;
3197
- return str.replace(hyphenateRE, "$1-$2").replace(hyphenateRE, "$1-$2").toLowerCase();
3198
- };
3199
- util.capitalize = function capitalize(str) {
3200
- if (!(0, _types.isString)(str))
3201
- return str;
3202
- return str.charAt(0).toUpperCase() + str.slice(1);
3203
- };
3204
- var looseEqual = util.looseEqual = function looseEqual2(a, b) {
3205
- var isObjectA = (0, _types.isObject)(a);
3206
- var isObjectB = (0, _types.isObject)(b);
3207
- if (isObjectA && isObjectB) {
3208
- return JSON.stringify(a) === JSON.stringify(b);
3209
- } else if (!isObjectA && !isObjectB) {
3210
- return String(a) === String(b);
3211
- } else {
3212
- return false;
3213
- }
3214
- };
3215
- var arrayEquals = util.arrayEquals = function arrayEquals2(arrayA, arrayB) {
3216
- arrayA = arrayA || [];
3217
- arrayB = arrayB || [];
3218
- if (arrayA.length !== arrayB.length) {
3219
- return false;
3220
- }
3221
- for (var i = 0; i < arrayA.length; i++) {
3222
- if (!looseEqual(arrayA[i], arrayB[i])) {
3223
- return false;
3224
- }
3225
- }
3226
- return true;
3227
- };
3228
- util.isEqual = function isEqual(value1, value2) {
3229
- if (Array.isArray(value1) && Array.isArray(value2)) {
3230
- return arrayEquals(value1, value2);
3231
- }
3232
- return looseEqual(value1, value2);
3233
- };
3234
- var isEmpty = util.isEmpty = function isEmpty2(val) {
3235
- if (val == null)
3236
- return true;
3237
- if (typeof val === "boolean")
3238
- return false;
3239
- if (typeof val === "number")
3240
- return !val;
3241
- if (val instanceof Error)
3242
- return val.message === "";
3243
- switch (Object.prototype.toString.call(val)) {
3244
- case "[object String]":
3245
- case "[object Array]":
3246
- return !val.length;
3247
- case "[object File]":
3248
- case "[object Map]":
3249
- case "[object Set]": {
3250
- return !val.size;
3251
- }
3252
- case "[object Object]": {
3253
- return !Object.keys(val).length;
3254
- }
3255
- }
3256
- return false;
3257
- };
3258
- function rafThrottle(fn) {
3259
- var locked = false;
3260
- return function() {
3261
- var _this = this;
3262
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
3263
- args[_key] = arguments[_key];
3264
- }
3265
- if (locked)
3266
- return;
3267
- locked = true;
3268
- window.requestAnimationFrame(function(_) {
3269
- fn.apply(_this, args);
3270
- locked = false;
3271
- });
3272
- };
3273
- }
3274
- function objToArray(obj) {
3275
- if (Array.isArray(obj)) {
3276
- return obj;
3277
- }
3278
- return isEmpty(obj) ? [] : [obj];
3279
- }
3280
- format$1.__esModule = true;
3281
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
3282
- return typeof obj;
3283
- } : function(obj) {
3284
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
3285
- };
3286
- format$1.default = function(Vue2) {
3287
- function template(string) {
3288
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
3289
- args[_key - 1] = arguments[_key];
3290
- }
3291
- if (args.length === 1 && _typeof(args[0]) === "object") {
3292
- args = args[0];
3293
- }
3294
- if (!args || !args.hasOwnProperty) {
3295
- args = {};
3296
- }
3297
- return string.replace(RE_NARGS, function(match, prefix, i, index) {
3298
- var result = void 0;
3299
- if (string[index - 1] === "{" && string[index + match.length] === "}") {
3300
- return i;
3301
- } else {
3302
- result = (0, _util.hasOwn)(args, i) ? args[i] : null;
3303
- if (result === null || result === void 0) {
3304
- return "";
3305
- }
3306
- return result;
3307
- }
3308
- });
3309
- }
3310
- return template;
3311
- };
3312
- var _util = util;
3313
- var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
3314
- locale.__esModule = true;
3315
- locale.i18n = locale.use = locale.t = void 0;
3316
- var _zhCN = zhCN;
3317
- var _zhCN2 = _interopRequireDefault(_zhCN);
3318
- var _vue = Vue;
3319
- var _vue2 = _interopRequireDefault(_vue);
3320
- var _deepmerge = cjs;
3321
- var _deepmerge2 = _interopRequireDefault(_deepmerge);
3322
- var _format = format$1;
3323
- var _format2 = _interopRequireDefault(_format);
3324
- function _interopRequireDefault(obj) {
3325
- return obj && obj.__esModule ? obj : {
3326
- default: obj
3327
- };
3328
- }
3329
- var format = (0, _format2.default)(_vue2.default);
3330
- var lang = _zhCN2.default;
3331
- var merged = false;
3332
- var i18nHandler = function i18nHandler2() {
3333
- var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;
3334
- if (typeof vuei18n === "function" && !!_vue2.default.locale) {
3335
- if (!merged) {
3336
- merged = true;
3337
- _vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, {
3338
- clone: true
3339
- }));
3340
- }
3341
- return vuei18n.apply(this, arguments);
3342
- }
3343
- };
3344
- var t = locale.t = function t2(path, options) {
3345
- var value = i18nHandler.apply(this, arguments);
3346
- if (value !== null && value !== void 0)
3347
- return value;
3348
- var array = path.split(".");
3349
- var current = lang;
3350
- for (var i = 0, j = array.length; i < j; i++) {
3351
- var property = array[i];
3352
- value = current[property];
3353
- if (i === j - 1)
3354
- return format(value, options);
3355
- if (!value)
3356
- return "";
3357
- current = value;
3358
- }
3359
- return "";
3360
- };
3361
- var use = locale.use = function use2(l) {
3362
- lang = l || lang;
3363
- };
3364
- var i18n = locale.i18n = function i18n2(fn) {
3365
- i18nHandler = fn || i18nHandler;
3366
- };
3367
- locale.default = {
3368
- use,
3369
- t,
3370
- i18n
3371
- };
3372
- var _locale = locale;
3373
- var _default = {
3374
- methods: {
3375
- t: function t3() {
3376
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
3377
- args[_key] = arguments[_key];
3378
- }
3379
- return _locale.t.apply(this, args);
3380
- }
3381
- }
3382
- };
3383
2119
  const RepeatClick = {
3384
2120
  bind(el, binding, vnode) {
3385
2121
  let interval = null;
@@ -3439,10 +2175,10 @@ const _sfc_main$8 = {
3439
2175
  return this.date.getSeconds();
3440
2176
  },
3441
2177
  hoursList() {
3442
- return getRangeHours(this.selectableRange);
2178
+ return dateUtil.getRangeHours(this.selectableRange);
3443
2179
  },
3444
2180
  minutesList() {
3445
- return getRangeMinutes(this.selectableRange, this.hours);
2181
+ return dateUtil.getRangeMinutes(this.selectableRange, this.hours);
3446
2182
  },
3447
2183
  arrowHourList() {
3448
2184
  const hours = this.hours;
@@ -3472,13 +2208,13 @@ const _sfc_main$8 = {
3472
2208
  modifyDateField(type, value) {
3473
2209
  switch (type) {
3474
2210
  case "hours":
3475
- this.$emit("change", modifyTime(this.date, value, this.minutes, this.seconds));
2211
+ this.$emit("change", dateUtil.modifyTime(this.date, value, this.minutes, this.seconds));
3476
2212
  break;
3477
2213
  case "minutes":
3478
- this.$emit("change", modifyTime(this.date, this.hours, value, this.seconds));
2214
+ this.$emit("change", dateUtil.modifyTime(this.date, this.hours, value, this.seconds));
3479
2215
  break;
3480
2216
  case "seconds":
3481
- this.$emit("change", modifyTime(this.date, this.hours, this.minutes, value));
2217
+ this.$emit("change", dateUtil.modifyTime(this.date, this.hours, this.minutes, value));
3482
2218
  break;
3483
2219
  }
3484
2220
  },
@@ -3806,7 +2542,7 @@ const _sfc_main$7 = {
3806
2542
  components: {
3807
2543
  TimeSpinner
3808
2544
  },
3809
- mixins: [_default],
2545
+ mixins: [Locale],
3810
2546
  props: {
3811
2547
  visible: Boolean,
3812
2548
  timeArrowControl: Boolean
@@ -3851,13 +2587,13 @@ const _sfc_main$7 = {
3851
2587
  }
3852
2588
  },
3853
2589
  value(newVal) {
3854
- let date2;
2590
+ let date;
3855
2591
  if (newVal instanceof Date) {
3856
- date2 = limitTimeRange(newVal, this.selectableRange, this.format);
2592
+ date = dateUtil.limitTimeRange(newVal, this.selectableRange, this.format);
3857
2593
  } else if (!newVal) {
3858
- date2 = this.defaultValue ? new Date(this.defaultValue) : /* @__PURE__ */ new Date();
2594
+ date = this.defaultValue ? new Date(this.defaultValue) : /* @__PURE__ */ new Date();
3859
2595
  }
3860
- this.date = date2;
2596
+ this.date = date;
3861
2597
  if (this.visible && this.needInitAdjust) {
3862
2598
  this.$nextTick((_) => this.adjustSpinners());
3863
2599
  this.needInitAdjust = false;
@@ -3867,7 +2603,7 @@ const _sfc_main$7 = {
3867
2603
  this.$refs.spinner.selectableRange = val;
3868
2604
  },
3869
2605
  defaultValue(val) {
3870
- if (!isDate(this.value)) {
2606
+ if (!dateUtil.isDate(this.value)) {
3871
2607
  this.date = val ? new Date(val) : /* @__PURE__ */ new Date();
3872
2608
  }
3873
2609
  }
@@ -3880,9 +2616,9 @@ const _sfc_main$7 = {
3880
2616
  handleCancel() {
3881
2617
  this.$emit("pick", this.oldValue, false);
3882
2618
  },
3883
- handleChange(date2) {
2619
+ handleChange(date) {
3884
2620
  if (this.visible) {
3885
- this.date = clearMilliseconds(date2);
2621
+ this.date = dateUtil.clearMilliseconds(date);
3886
2622
  if (this.isValidValue(this.date)) {
3887
2623
  this.$emit("pick", this.date, true);
3888
2624
  }
@@ -3895,8 +2631,8 @@ const _sfc_main$7 = {
3895
2631
  handleConfirm(visible = false, first) {
3896
2632
  if (first)
3897
2633
  return;
3898
- const date2 = clearMilliseconds(limitTimeRange(this.date, this.selectableRange, this.format));
3899
- this.$emit("pick", date2, visible, first);
2634
+ const date = dateUtil.clearMilliseconds(dateUtil.limitTimeRange(this.date, this.selectableRange, this.format));
2635
+ this.$emit("pick", date, visible, first);
3900
2636
  },
3901
2637
  handleKeydown(event) {
3902
2638
  const keyCode = event.keyCode;
@@ -3919,8 +2655,8 @@ const _sfc_main$7 = {
3919
2655
  return;
3920
2656
  }
3921
2657
  },
3922
- isValidValue(date2) {
3923
- return timeWithinRange(date2, this.selectableRange, this.format);
2658
+ isValidValue(date) {
2659
+ return dateUtil.timeWithinRange(date, this.selectableRange, this.format);
3924
2660
  },
3925
2661
  adjustSpinners() {
3926
2662
  return this.$refs.spinner.adjustSpinners();
@@ -3999,10 +2735,31 @@ var _sfc_render$7 = function render3() {
3999
2735
  var _sfc_staticRenderFns$7 = [];
4000
2736
  var __component__$7 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main$7, _sfc_render$7, _sfc_staticRenderFns$7, false, null, null, null, null);
4001
2737
  const TimePicker = __component__$7.exports;
2738
+ const arrayFindIndex = function(arr, pred) {
2739
+ for (let i = 0; i !== arr.length; ++i) {
2740
+ if (pred(arr[i])) {
2741
+ return i;
2742
+ }
2743
+ }
2744
+ return -1;
2745
+ };
2746
+ const arrayFind = function(arr, pred) {
2747
+ const idx = arrayFindIndex(arr, pred);
2748
+ return idx !== -1 ? arr[idx] : void 0;
2749
+ };
2750
+ const coerceTruthyValueToArray = function(val) {
2751
+ if (Array.isArray(val)) {
2752
+ return val;
2753
+ } else if (val) {
2754
+ return [val];
2755
+ } else {
2756
+ return [];
2757
+ }
2758
+ };
4002
2759
  const datesInYear = (year) => {
4003
- const numOfDays = getDayCountOfYear(year);
2760
+ const numOfDays = dateUtil.getDayCountOfYear(year);
4004
2761
  const firstDay = new Date(year, 0, 1);
4005
- return range(numOfDays).map((n) => nextDate(firstDay, n));
2762
+ return dateUtil.range(numOfDays).map((n) => dateUtil.nextDate(firstDay, n));
4006
2763
  };
4007
2764
  const _sfc_main$6 = {
4008
2765
  props: {
@@ -4010,7 +2767,7 @@ const _sfc_main$6 = {
4010
2767
  value: {},
4011
2768
  defaultValue: {
4012
2769
  validator(val) {
4013
- return val === null || val instanceof Date && isDate(val);
2770
+ return val === null || val instanceof Date && dateUtil.isDate(val);
4014
2771
  }
4015
2772
  },
4016
2773
  date: {}
@@ -4025,7 +2782,7 @@ const _sfc_main$6 = {
4025
2782
  const style = {};
4026
2783
  const today = /* @__PURE__ */ new Date();
4027
2784
  style.disabled = typeof this.disabledDate === "function" ? datesInYear(year).every(this.disabledDate) : false;
4028
- style.current = arrayFindIndex$1(coerceTruthyValueToArray(this.value), (date2) => date2.getFullYear() === year) >= 0;
2785
+ style.current = arrayFindIndex(coerceTruthyValueToArray(this.value), (date) => date.getFullYear() === year) >= 0;
4029
2786
  style.today = today.getFullYear() === year;
4030
2787
  style.default = this.defaultValue && this.defaultValue.getFullYear() === year;
4031
2788
  return style;
@@ -4104,12 +2861,12 @@ var _sfc_staticRenderFns$6 = [];
4104
2861
  var __component__$6 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main$6, _sfc_render$6, _sfc_staticRenderFns$6, false, null, null, null, null);
4105
2862
  const YearTable = __component__$6.exports;
4106
2863
  const datesInMonth = (year, month) => {
4107
- const numOfDays = getDayCountOfMonth(year, month);
2864
+ const numOfDays = dateUtil.getDayCountOfMonth(year, month);
4108
2865
  const firstDay = new Date(year, month, 1);
4109
- return range(numOfDays).map((n) => nextDate(firstDay, n));
2866
+ return dateUtil.range(numOfDays).map((n) => dateUtil.nextDate(firstDay, n));
4110
2867
  };
4111
- const clearDate = (date2) => {
4112
- return new Date(date2.getFullYear(), date2.getMonth());
2868
+ const clearDate = (date) => {
2869
+ return new Date(date.getFullYear(), date.getMonth());
4113
2870
  };
4114
2871
  const getMonthTimestamp = function(time) {
4115
2872
  if (typeof time === "number" || typeof time === "string") {
@@ -4121,7 +2878,7 @@ const getMonthTimestamp = function(time) {
4121
2878
  }
4122
2879
  };
4123
2880
  const _sfc_main$5 = {
4124
- mixins: [_default],
2881
+ mixins: [Locale],
4125
2882
  props: {
4126
2883
  disabledDate: {},
4127
2884
  value: {},
@@ -4132,7 +2889,7 @@ const _sfc_main$5 = {
4132
2889
  maxDate: {},
4133
2890
  defaultValue: {
4134
2891
  validator(val) {
4135
- return val === null || isDate(val) || Array.isArray(val) && val.every(isDate);
2892
+ return val === null || dateUtil.isDate(val) || Array.isArray(val) && val.every(dateUtil.isDate);
4136
2893
  }
4137
2894
  },
4138
2895
  date: {},
@@ -4186,7 +2943,7 @@ const _sfc_main$5 = {
4186
2943
  cell.text = index;
4187
2944
  const cellDate = new Date(time);
4188
2945
  cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
4189
- cell.selected = arrayFind(selectedDate, (date2) => date2.getTime() === cellDate.getTime());
2946
+ cell.selected = arrayFind(selectedDate, (date) => date.getTime() === cellDate.getTime());
4190
2947
  this.$set(row, j, cell);
4191
2948
  }
4192
2949
  }
@@ -4209,8 +2966,8 @@ const _sfc_main$5 = {
4209
2966
  }
4210
2967
  },
4211
2968
  methods: {
4212
- cellMatchesDate(cell, date2) {
4213
- const value = new Date(date2);
2969
+ cellMatchesDate(cell, date) {
2970
+ const value = new Date(date);
4214
2971
  return this.date.getFullYear() === value.getFullYear() && Number(cell.text) === value.getMonth();
4215
2972
  },
4216
2973
  getCellStyle(cell) {
@@ -4220,9 +2977,9 @@ const _sfc_main$5 = {
4220
2977
  const month = cell.text;
4221
2978
  const defaultValue = this.defaultValue ? Array.isArray(this.defaultValue) ? this.defaultValue : [this.defaultValue] : [];
4222
2979
  style.disabled = typeof this.disabledDate === "function" ? datesInMonth(year, month).every(this.disabledDate) : false;
4223
- style.current = arrayFindIndex$1(coerceTruthyValueToArray(this.value), (date2) => date2.getFullYear() === year && date2.getMonth() === month) >= 0;
2980
+ style.current = arrayFindIndex(coerceTruthyValueToArray(this.value), (date) => date.getFullYear() === year && date.getMonth() === month) >= 0;
4224
2981
  style.today = today.getFullYear() === year && today.getMonth() === month;
4225
- style.default = defaultValue.some((date2) => this.cellMatchesDate(cell, date2));
2982
+ style.default = defaultValue.some((date) => this.cellMatchesDate(cell, date));
4226
2983
  if (cell.inRange) {
4227
2984
  style["in-range"] = true;
4228
2985
  if (cell.start) {
@@ -4376,10 +3133,10 @@ const mul = (arg1, arg2) => {
4376
3133
  };
4377
3134
  const div = (arg1, arg2) => {
4378
3135
  const t1 = (arg1.toString().split(".")[1] || "").length;
4379
- const t22 = (arg2.toString().split(".")[1] || "").length;
3136
+ const t2 = (arg2.toString().split(".")[1] || "").length;
4380
3137
  const r1 = Number(arg1.toString().replace(".", ""));
4381
3138
  const r2 = Number(arg2.toString().replace(".", ""));
4382
- return r1 / r2 * Math.pow(10, t22 - t1);
3139
+ return r1 / r2 * Math.pow(10, t2 - t1);
4383
3140
  };
4384
3141
  function getLocalTime(i) {
4385
3142
  let time = i;
@@ -4402,19 +3159,19 @@ function getLocalTime(i) {
4402
3159
  const WEEKS = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
4403
3160
  const getDateTimestamp = function(time) {
4404
3161
  if (typeof time === "number" || typeof time === "string") {
4405
- return clearTime(new Date(time)).getTime();
3162
+ return dateUtil.clearTime(new Date(time)).getTime();
4406
3163
  } else if (time instanceof Date) {
4407
- return clearTime(time).getTime();
3164
+ return dateUtil.clearTime(time).getTime();
4408
3165
  } else {
4409
3166
  return NaN;
4410
3167
  }
4411
3168
  };
4412
3169
  const removeFromArray = function(arr, pred) {
4413
- const idx = typeof pred === "function" ? arrayFindIndex$1(arr, pred) : arr.indexOf(pred);
3170
+ const idx = typeof pred === "function" ? arrayFindIndex(arr, pred) : arr.indexOf(pred);
4414
3171
  return idx >= 0 ? [...arr.slice(0, idx), ...arr.slice(idx + 1)] : arr;
4415
3172
  };
4416
3173
  const _sfc_main$4 = {
4417
- mixins: [_default],
3174
+ mixins: [Locale],
4418
3175
  props: {
4419
3176
  firstDayOfWeek: {
4420
3177
  default: 7,
@@ -4424,7 +3181,7 @@ const _sfc_main$4 = {
4424
3181
  value: {},
4425
3182
  defaultValue: {
4426
3183
  validator(val) {
4427
- return val === null || isDate(val) || Array.isArray(val) && val.every(isDate);
3184
+ return val === null || dateUtil.isDate(val) || Array.isArray(val) && val.every(dateUtil.isDate);
4428
3185
  }
4429
3186
  },
4430
3187
  date: {},
@@ -4476,13 +3233,13 @@ const _sfc_main$4 = {
4476
3233
  return this.date.getMonth();
4477
3234
  },
4478
3235
  startDate() {
4479
- return getStartDateOfMonth(this.year, this.month);
3236
+ return dateUtil.getStartDateOfMonth(this.year, this.month);
4480
3237
  },
4481
3238
  rows() {
4482
- const date2 = new Date(this.year, this.month, 1);
4483
- let day = getFirstDayOfMonth(date2);
4484
- const dateCountOfMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth());
4485
- const dateCountOfLastMonth = getDayCountOfMonth(date2.getFullYear(), date2.getMonth() === 0 ? 11 : date2.getMonth() - 1);
3239
+ const date = new Date(this.year, this.month, 1);
3240
+ let day = dateUtil.getFirstDayOfMonth(date);
3241
+ const dateCountOfMonth = dateUtil.getDayCountOfMonth(date.getFullYear(), date.getMonth());
3242
+ const dateCountOfLastMonth = dateUtil.getDayCountOfMonth(date.getFullYear(), date.getMonth() === 0 ? 11 : date.getMonth() - 1);
4486
3243
  day = day === 0 ? 7 : day;
4487
3244
  const offset = this.offsetDay;
4488
3245
  const rows = this.tableRows;
@@ -4498,7 +3255,7 @@ const _sfc_main$4 = {
4498
3255
  if (!row[0]) {
4499
3256
  row[0] = {
4500
3257
  type: "week",
4501
- text: getWeekNumber(nextDate(startDate, i * 7 + 1))
3258
+ text: dateUtil.getWeekNumber(dateUtil.nextDate(startDate, i * 7 + 1))
4502
3259
  };
4503
3260
  }
4504
3261
  }
@@ -4516,7 +3273,7 @@ const _sfc_main$4 = {
4516
3273
  }
4517
3274
  cell.type = "normal";
4518
3275
  const index = i * 7 + j;
4519
- const time = nextDate(startDate, index - offset).getTime();
3276
+ const time = dateUtil.nextDate(startDate, index - offset).getTime();
4520
3277
  cell.inRange = time >= getDateTimestamp(this.minDate) && time <= getDateTimestamp(this.maxDate);
4521
3278
  cell.start = this.minDate && time === getDateTimestamp(this.minDate);
4522
3279
  cell.end = this.maxDate && time === getDateTimestamp(this.maxDate);
@@ -4542,7 +3299,7 @@ const _sfc_main$4 = {
4542
3299
  }
4543
3300
  const cellDate = new Date(time);
4544
3301
  cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
4545
- cell.selected = arrayFind(selectedDate, (date3) => date3.getTime() === cellDate.getTime());
3302
+ cell.selected = arrayFind(selectedDate, (date2) => date2.getTime() === cellDate.getTime());
4546
3303
  cell.customClass = typeof cellClassName === "function" && cellClassName(cellDate);
4547
3304
  this.$set(row, this.showWeekNumber ? j + 1 : j, cell);
4548
3305
  }
@@ -4575,8 +3332,8 @@ const _sfc_main$4 = {
4575
3332
  }
4576
3333
  },
4577
3334
  methods: {
4578
- cellMatchesDate(cell, date2) {
4579
- const value = new Date(date2);
3335
+ cellMatchesDate(cell, date) {
3336
+ const value = new Date(date);
4580
3337
  return this.year === value.getFullYear() && this.month === value.getMonth() && Number(cell.text) === value.getDate();
4581
3338
  },
4582
3339
  getCellClasses(cell) {
@@ -4591,7 +3348,7 @@ const _sfc_main$4 = {
4591
3348
  } else {
4592
3349
  classes.push(cell.type);
4593
3350
  }
4594
- if (cell.type === "normal" && defaultValue.some((date2) => this.cellMatchesDate(cell, date2))) {
3351
+ if (cell.type === "normal" && defaultValue.some((date) => this.cellMatchesDate(cell, date))) {
4595
3352
  classes.push("default");
4596
3353
  }
4597
3354
  if (selectionMode === "day" && (cell.type === "normal" || cell.type === "today") && this.cellMatchesDate(cell, this.value)) {
@@ -4619,7 +3376,7 @@ const _sfc_main$4 = {
4619
3376
  },
4620
3377
  getDateOfCell(row, column) {
4621
3378
  const offsetFromStart = row * 7 + (column - (this.showWeekNumber ? 1 : 0)) - this.offsetDay;
4622
- return nextDate(this.startDate, offsetFromStart);
3379
+ return dateUtil.nextDate(this.startDate, offsetFromStart);
4623
3380
  },
4624
3381
  isWeekActive(cell) {
4625
3382
  if (this.selectionMode !== "week")
@@ -4636,9 +3393,9 @@ const _sfc_main$4 = {
4636
3393
  newDate.setFullYear(month === 11 ? year + 1 : year);
4637
3394
  }
4638
3395
  newDate.setDate(parseInt(cell.text, 10));
4639
- if (isDate(this.value)) {
3396
+ if (dateUtil.isDate(this.value)) {
4640
3397
  const dayOffset = (this.value.getDay() - this.firstDayOfWeek + 7) % 7 - 1;
4641
- const weekDate = prevDate(this.value, dayOffset);
3398
+ const weekDate = dateUtil.prevDate(this.value, dayOffset);
4642
3399
  return weekDate.getTime() === newDate.getTime();
4643
3400
  }
4644
3401
  return false;
@@ -4656,7 +3413,7 @@ const _sfc_main$4 = {
4656
3413
  continue;
4657
3414
  const cell = row[j];
4658
3415
  const index = i * 7 + j + (this.showWeekNumber ? -1 : 0);
4659
- const time = nextDate(startDate, index - this.offsetDay).getTime();
3416
+ const time = dateUtil.nextDate(startDate, index - this.offsetDay).getTime();
4660
3417
  cell.inRange = minDate && time >= minDate && time <= maxDate;
4661
3418
  cell.start = minDate && time === minDate;
4662
3419
  cell.end = maxDate && time === maxDate;
@@ -4732,7 +3489,7 @@ const _sfc_main$4 = {
4732
3489
  } else if (this.selectionMode === "day") {
4733
3490
  this.$emit("pick", newDate);
4734
3491
  } else if (this.selectionMode === "week") {
4735
- const weekNumber = getWeekNumber(newDate);
3492
+ const weekNumber = dateUtil.getWeekNumber(newDate);
4736
3493
  const value = newDate.getFullYear() + "w" + weekNumber;
4737
3494
  this.$emit("pick", {
4738
3495
  year: newDate.getFullYear(),
@@ -4742,7 +3499,7 @@ const _sfc_main$4 = {
4742
3499
  });
4743
3500
  } else if (this.selectionMode === "dates") {
4744
3501
  const value = this.value || [];
4745
- const newValue = cell.selected ? removeFromArray(value, (date2) => date2.getTime() === newDate.getTime()) : [...value, newDate];
3502
+ const newValue = cell.selected ? removeFromArray(value, (date) => date.getTime() === newDate.getTime()) : [...value, newDate];
4746
3503
  this.$emit("pick", newValue);
4747
3504
  }
4748
3505
  }
@@ -4795,7 +3552,7 @@ const _sfc_main$3 = {
4795
3552
  MonthTable,
4796
3553
  DateTable
4797
3554
  },
4798
- mixins: [_default],
3555
+ mixins: [Locale],
4799
3556
  data() {
4800
3557
  return {
4801
3558
  timezone: "",
@@ -4830,7 +3587,7 @@ const _sfc_main$3 = {
4830
3587
  return this.date.getMonth();
4831
3588
  },
4832
3589
  week() {
4833
- return getWeekNumber(this.date);
3590
+ return dateUtil.getWeekNumber(this.date);
4834
3591
  },
4835
3592
  monthDate() {
4836
3593
  return this.date.getDate();
@@ -4842,14 +3599,14 @@ const _sfc_main$3 = {
4842
3599
  if (this.userInputTime !== null) {
4843
3600
  return this.userInputTime;
4844
3601
  } else {
4845
- return formatDate(this.value || this.defaultValue, this.timeFormat);
3602
+ return dateUtil.formatDate(this.value || this.defaultValue, this.timeFormat);
4846
3603
  }
4847
3604
  },
4848
3605
  visibleDate() {
4849
3606
  if (this.userInputDate !== null) {
4850
3607
  return this.userInputDate;
4851
3608
  } else {
4852
- return formatDate(this.value || this.defaultValue, this.dateFormat);
3609
+ return dateUtil.formatDate(this.value || this.defaultValue, this.dateFormat);
4853
3610
  }
4854
3611
  },
4855
3612
  yearLabel() {
@@ -4865,14 +3622,14 @@ const _sfc_main$3 = {
4865
3622
  },
4866
3623
  timeFormat() {
4867
3624
  if (this.format) {
4868
- return extractTimeFormat(this.format);
3625
+ return dateUtil.extractTimeFormat(this.format);
4869
3626
  } else {
4870
3627
  return "HH:mm:ss";
4871
3628
  }
4872
3629
  },
4873
3630
  dateFormat() {
4874
3631
  if (this.format) {
4875
- return extractDateFormat(this.format);
3632
+ return dateUtil.extractDateFormat(this.format);
4876
3633
  } else {
4877
3634
  return "yyyy-MM-dd";
4878
3635
  }
@@ -4892,14 +3649,14 @@ const _sfc_main$3 = {
4892
3649
  value(val) {
4893
3650
  if (this.selectionMode === "dates" && this.value)
4894
3651
  return;
4895
- if (isDate(val)) {
3652
+ if (dateUtil.isDate(val)) {
4896
3653
  this.date = new Date(val);
4897
3654
  } else {
4898
3655
  this.date = this.getDefaultValue();
4899
3656
  }
4900
3657
  },
4901
3658
  defaultValue(val) {
4902
- if (!isDate(this.value)) {
3659
+ if (!dateUtil.isDate(this.value)) {
4903
3660
  this.date = val ? new Date(val) : /* @__PURE__ */ new Date();
4904
3661
  }
4905
3662
  },
@@ -4919,24 +3676,24 @@ const _sfc_main$3 = {
4919
3676
  },
4920
3677
  methods: {
4921
3678
  proxyTimePickerDataProperties() {
4922
- const format2 = (timeFormat) => {
3679
+ const format = (timeFormat) => {
4923
3680
  this.$refs.timepicker.format = timeFormat;
4924
3681
  };
4925
3682
  const value = (value2) => {
4926
3683
  this.$refs.timepicker.value = value2;
4927
3684
  };
4928
- const date2 = (date3) => {
4929
- this.$refs.timepicker.date = date3;
3685
+ const date = (date2) => {
3686
+ this.$refs.timepicker.date = date2;
4930
3687
  };
4931
3688
  const selectableRange = (selectableRange2) => {
4932
3689
  this.$refs.timepicker.selectableRange = selectableRange2;
4933
3690
  };
4934
3691
  this.$watch("value", value);
4935
- this.$watch("date", date2);
3692
+ this.$watch("date", date);
4936
3693
  this.$watch("selectableRange", selectableRange);
4937
- format2(this.timeFormat);
3694
+ format(this.timeFormat);
4938
3695
  value(this.value);
4939
- date2(this.date);
3696
+ date(this.date);
4940
3697
  selectableRange(this.selectableRange);
4941
3698
  },
4942
3699
  handleClear() {
@@ -4947,10 +3704,10 @@ const _sfc_main$3 = {
4947
3704
  if (!value) {
4948
3705
  this.$emit("pick", value, ...args);
4949
3706
  } else if (Array.isArray(value)) {
4950
- const dates = value.map((date2) => this.showTime ? clearMilliseconds(date2) : clearTime(date2));
3707
+ const dates = value.map((date) => this.showTime ? dateUtil.clearMilliseconds(date) : dateUtil.clearTime(date));
4951
3708
  this.$emit("pick", dates, ...args);
4952
3709
  } else {
4953
- this.$emit("pick", this.showTime ? clearMilliseconds(value) : clearTime(value), ...args);
3710
+ this.$emit("pick", this.showTime ? dateUtil.clearMilliseconds(value) : dateUtil.clearTime(value), ...args);
4954
3711
  }
4955
3712
  this.userInputDate = null;
4956
3713
  this.userInputTime = null;
@@ -4973,23 +3730,23 @@ const _sfc_main$3 = {
4973
3730
  // }
4974
3731
  // },
4975
3732
  prevMonth() {
4976
- this.date = prevMonth(this.date);
3733
+ this.date = dateUtil.prevMonth(this.date);
4977
3734
  },
4978
3735
  nextMonth() {
4979
- this.date = nextMonth(this.date);
3736
+ this.date = dateUtil.nextMonth(this.date);
4980
3737
  },
4981
3738
  prevYear() {
4982
3739
  if (this.currentView === "year") {
4983
- this.date = prevYear(this.date, 10);
3740
+ this.date = dateUtil.prevYear(this.date, 10);
4984
3741
  } else {
4985
- this.date = prevYear(this.date);
3742
+ this.date = dateUtil.prevYear(this.date);
4986
3743
  }
4987
3744
  },
4988
3745
  nextYear() {
4989
3746
  if (this.currentView === "year") {
4990
- this.date = nextYear(this.date, 10);
3747
+ this.date = dateUtil.nextYear(this.date, 10);
4991
3748
  } else {
4992
- this.date = nextYear(this.date);
3749
+ this.date = dateUtil.nextYear(this.date);
4993
3750
  }
4994
3751
  },
4995
3752
  handleShortcutClick(shortcut) {
@@ -4998,8 +3755,8 @@ const _sfc_main$3 = {
4998
3755
  }
4999
3756
  },
5000
3757
  handleTimePick(value, visible, first) {
5001
- if (isDate(value)) {
5002
- const newDate = this.value ? modifyTime(this.value, value.getHours(), value.getMinutes(), value.getSeconds()) : modifyWithTimeString(this.getDefaultValue(), this.defaultTime);
3758
+ if (dateUtil.isDate(value)) {
3759
+ const newDate = this.value ? dateUtil.modifyTime(this.value, value.getHours(), value.getMinutes(), value.getSeconds()) : dateUtil.modifyWithTimeString(this.getDefaultValue(), this.defaultTime);
5003
3760
  this.date = newDate;
5004
3761
  this.emit(this.date, true);
5005
3762
  } else {
@@ -5014,18 +3771,18 @@ const _sfc_main$3 = {
5014
3771
  },
5015
3772
  handleMonthPick(month) {
5016
3773
  if (this.selectionMode === "month") {
5017
- this.date = modifyDate(this.date, this.year, month, 1);
3774
+ this.date = dateUtil.modifyDate(this.date, this.year, month, 1);
5018
3775
  this.emit(this.date);
5019
3776
  } else {
5020
- this.date = changeYearMonthAndClampDate(this.date, this.year, month);
3777
+ this.date = dateUtil.changeYearMonthAndClampDate(this.date, this.year, month);
5021
3778
  this.currentView = "date";
5022
3779
  }
5023
3780
  },
5024
3781
  handleDatePick(value) {
5025
3782
  if (this.selectionMode === "day") {
5026
- let newDate = this.value ? modifyDate(this.value, value.getFullYear(), value.getMonth(), value.getDate()) : modifyWithTimeString(value, this.defaultTime);
3783
+ let newDate = this.value ? dateUtil.modifyDate(this.value, value.getFullYear(), value.getMonth(), value.getDate()) : dateUtil.modifyWithTimeString(value, this.defaultTime);
5027
3784
  if (!this.checkDateWithinRange(newDate)) {
5028
- newDate = modifyDate(this.selectableRange[0][0], value.getFullYear(), value.getMonth(), value.getDate());
3785
+ newDate = dateUtil.modifyDate(this.selectableRange[0][0], value.getFullYear(), value.getMonth(), value.getDate());
5029
3786
  }
5030
3787
  this.date = newDate;
5031
3788
  this.emit(this.date, this.showTime);
@@ -5037,10 +3794,10 @@ const _sfc_main$3 = {
5037
3794
  },
5038
3795
  handleYearPick(year) {
5039
3796
  if (this.selectionMode === "year") {
5040
- this.date = modifyDate(this.date, year, 0, 1);
3797
+ this.date = dateUtil.modifyDate(this.date, year, 0, 1);
5041
3798
  this.emit(this.date);
5042
3799
  } else {
5043
- this.date = changeYearMonthAndClampDate(this.date, year, this.month);
3800
+ this.date = dateUtil.changeYearMonthAndClampDate(this.date, year, this.month);
5044
3801
  this.currentView = "month";
5045
3802
  }
5046
3803
  },
@@ -5054,7 +3811,7 @@ const _sfc_main$3 = {
5054
3811
  if (this.selectionMode === "dates") {
5055
3812
  this.emit(this.value);
5056
3813
  } else {
5057
- const value = this.value ? this.value : modifyWithTimeString(this.getDefaultValue(), this.defaultTime);
3814
+ const value = this.value ? this.value : dateUtil.modifyWithTimeString(this.getDefaultValue(), this.defaultTime);
5058
3815
  this.date = new Date(value);
5059
3816
  this.emit(value);
5060
3817
  }
@@ -5096,28 +3853,28 @@ const _sfc_main$3 = {
5096
3853
  40: 4,
5097
3854
  37: -1,
5098
3855
  39: 1,
5099
- offset: (date2, step) => date2.setFullYear(date2.getFullYear() + step)
3856
+ offset: (date, step) => date.setFullYear(date.getFullYear() + step)
5100
3857
  },
5101
3858
  "month": {
5102
3859
  38: -4,
5103
3860
  40: 4,
5104
3861
  37: -1,
5105
3862
  39: 1,
5106
- offset: (date2, step) => date2.setMonth(date2.getMonth() + step)
3863
+ offset: (date, step) => date.setMonth(date.getMonth() + step)
5107
3864
  },
5108
3865
  "week": {
5109
3866
  38: -1,
5110
3867
  40: 1,
5111
3868
  37: -1,
5112
3869
  39: 1,
5113
- offset: (date2, step) => date2.setDate(date2.getDate() + step * 7)
3870
+ offset: (date, step) => date.setDate(date.getDate() + step * 7)
5114
3871
  },
5115
3872
  "day": {
5116
3873
  38: -7,
5117
3874
  40: 7,
5118
3875
  37: -1,
5119
3876
  39: 1,
5120
- offset: (date2, step) => date2.setDate(date2.getDate() + step)
3877
+ offset: (date, step) => date.setDate(date.getDate() + step)
5121
3878
  }
5122
3879
  };
5123
3880
  const mode = this.selectionMode;
@@ -5136,9 +3893,9 @@ const _sfc_main$3 = {
5136
3893
  }
5137
3894
  },
5138
3895
  handleVisibleTimeChange(value) {
5139
- const time = parseDate(value, this.timeFormat);
3896
+ const time = dateUtil.parseDate(value, this.timeFormat);
5140
3897
  if (time && this.checkDateWithinRange(time)) {
5141
- this.date = modifyDate(time, this.year, this.month, this.monthDate);
3898
+ this.date = dateUtil.modifyDate(time, this.year, this.month, this.monthDate);
5142
3899
  this.userInputTime = null;
5143
3900
  this.$refs.timepicker.value = this.date;
5144
3901
  this.timePickerVisible = false;
@@ -5146,12 +3903,12 @@ const _sfc_main$3 = {
5146
3903
  }
5147
3904
  },
5148
3905
  handleVisibleDateChange(value) {
5149
- const date2 = parseDate(value, this.dateFormat);
5150
- if (date2) {
5151
- if (typeof this.disabledDate === "function" && this.disabledDate(date2)) {
3906
+ const date = dateUtil.parseDate(value, this.dateFormat);
3907
+ if (date) {
3908
+ if (typeof this.disabledDate === "function" && this.disabledDate(date)) {
5152
3909
  return;
5153
3910
  }
5154
- this.date = modifyTime(date2, this.date.getHours(), this.date.getMinutes(), this.date.getSeconds());
3911
+ this.date = dateUtil.modifyTime(date, this.date.getHours(), this.date.getMinutes(), this.date.getSeconds());
5155
3912
  this.userInputDate = null;
5156
3913
  this.resetView();
5157
3914
  this.emit(this.date, true);
@@ -5163,8 +3920,8 @@ const _sfc_main$3 = {
5163
3920
  getDefaultValue() {
5164
3921
  return this.defaultValue ? new Date(this.defaultValue) : /* @__PURE__ */ new Date();
5165
3922
  },
5166
- checkDateWithinRange(date2) {
5167
- return this.selectableRange.length > 0 ? timeWithinRange(date2, this.selectableRange, this.format || "HH:mm:ss") : true;
3923
+ checkDateWithinRange(date) {
3924
+ return this.selectableRange.length > 0 ? dateUtil.timeWithinRange(date, this.selectableRange, this.format || "HH:mm:ss") : true;
5168
3925
  }
5169
3926
  }
5170
3927
  };
@@ -5435,9 +4192,9 @@ const calcDefaultValue$1 = (defaultValue) => {
5435
4192
  if (Array.isArray(defaultValue)) {
5436
4193
  return [new Date(defaultValue[0]), new Date(defaultValue[1])];
5437
4194
  } else if (defaultValue) {
5438
- return [new Date(defaultValue), nextDate(new Date(defaultValue), 1)];
4195
+ return [new Date(defaultValue), dateUtil.nextDate(new Date(defaultValue), 1)];
5439
4196
  } else {
5440
- return [/* @__PURE__ */ new Date(), nextDate(/* @__PURE__ */ new Date(), 1)];
4197
+ return [/* @__PURE__ */ new Date(), dateUtil.nextDate(/* @__PURE__ */ new Date(), 1)];
5441
4198
  }
5442
4199
  };
5443
4200
  const _sfc_main$2 = {
@@ -5448,7 +4205,7 @@ const _sfc_main$2 = {
5448
4205
  TimePicker,
5449
4206
  DateTable
5450
4207
  },
5451
- mixins: [_default],
4208
+ mixins: [Locale],
5452
4209
  data() {
5453
4210
  return {
5454
4211
  timezone: "",
@@ -5459,7 +4216,7 @@ const _sfc_main$2 = {
5459
4216
  minDate: "",
5460
4217
  maxDate: "",
5461
4218
  leftDate: /* @__PURE__ */ new Date(),
5462
- rightDate: nextMonth(/* @__PURE__ */ new Date()),
4219
+ rightDate: dateUtil.nextMonth(/* @__PURE__ */ new Date()),
5463
4220
  rangeState: {
5464
4221
  endDate: null,
5465
4222
  selecting: false,
@@ -5519,48 +4276,48 @@ const _sfc_main$2 = {
5519
4276
  if (this.dateUserInput.min !== null)
5520
4277
  return this.dateUserInput.min;
5521
4278
  if (this.minDate)
5522
- return formatDate(this.minDate, this.dateFormat);
4279
+ return dateUtil.formatDate(this.minDate, this.dateFormat);
5523
4280
  return "";
5524
4281
  },
5525
4282
  maxVisibleDate() {
5526
4283
  if (this.dateUserInput.max !== null)
5527
4284
  return this.dateUserInput.max;
5528
4285
  if (this.maxDate || this.minDate)
5529
- return formatDate(this.maxDate || this.minDate, this.dateFormat);
4286
+ return dateUtil.formatDate(this.maxDate || this.minDate, this.dateFormat);
5530
4287
  return "";
5531
4288
  },
5532
4289
  minVisibleTime() {
5533
4290
  if (this.timeUserInput.min !== null)
5534
4291
  return this.timeUserInput.min;
5535
4292
  if (this.minDate)
5536
- return formatDate(this.minDate, this.timeFormat);
4293
+ return dateUtil.formatDate(this.minDate, this.timeFormat);
5537
4294
  return "";
5538
4295
  },
5539
4296
  maxVisibleTime() {
5540
4297
  if (this.timeUserInput.max !== null)
5541
4298
  return this.timeUserInput.max;
5542
4299
  if (this.maxDate || this.minDate)
5543
- return formatDate(this.maxDate || this.minDate, this.timeFormat);
4300
+ return dateUtil.formatDate(this.maxDate || this.minDate, this.timeFormat);
5544
4301
  return "";
5545
4302
  },
5546
4303
  timeFormat() {
5547
4304
  if (this.format) {
5548
- return extractTimeFormat(this.format);
4305
+ return dateUtil.extractTimeFormat(this.format);
5549
4306
  } else {
5550
4307
  return "HH:mm:ss";
5551
4308
  }
5552
4309
  },
5553
4310
  dateFormat() {
5554
4311
  if (this.format) {
5555
- return extractDateFormat(this.format);
4312
+ return dateUtil.extractDateFormat(this.format);
5556
4313
  } else {
5557
4314
  return "yyyy-MM-dd";
5558
4315
  }
5559
4316
  },
5560
4317
  enableMonthArrow() {
5561
- const nextMonth2 = (this.leftMonth + 1) % 12;
4318
+ const nextMonth = (this.leftMonth + 1) % 12;
5562
4319
  const yearOffset = this.leftMonth + 1 >= 12 ? 1 : 0;
5563
- return this.unlinkPanels && new Date(this.leftYear + yearOffset, nextMonth2) < new Date(this.rightYear, this.rightMonth);
4320
+ return this.unlinkPanels && new Date(this.leftYear + yearOffset, nextMonth) < new Date(this.rightYear, this.rightMonth);
5564
4321
  },
5565
4322
  enableYearArrow() {
5566
4323
  return this.unlinkPanels && this.rightYear * 12 + this.rightMonth - (this.leftYear * 12 + this.leftMonth + 1) >= 12;
@@ -5572,8 +4329,8 @@ const _sfc_main$2 = {
5572
4329
  this.timeUserInput.min = null;
5573
4330
  this.$nextTick(() => {
5574
4331
  if (this.$refs.maxTimePicker && this.maxDate && this.maxDate < this.minDate) {
5575
- const format2 = "HH:mm:ss";
5576
- this.$refs.maxTimePicker.selectableRange = [[parseDate(formatDate(this.minDate, format2), format2), parseDate("23:59:59", format2)]];
4332
+ const format = "HH:mm:ss";
4333
+ this.$refs.maxTimePicker.selectableRange = [[dateUtil.parseDate(dateUtil.formatDate(this.minDate, format), format), dateUtil.parseDate("23:59:59", format)]];
5577
4334
  }
5578
4335
  });
5579
4336
  if (val && this.$refs.minTimePicker) {
@@ -5612,8 +4369,8 @@ const _sfc_main$2 = {
5612
4369
  this.minDate = null;
5613
4370
  this.maxDate = null;
5614
4371
  } else if (Array.isArray(newVal)) {
5615
- this.minDate = isDate(newVal[0]) ? new Date(newVal[0]) : null;
5616
- this.maxDate = isDate(newVal[1]) ? new Date(newVal[1]) : null;
4372
+ this.minDate = dateUtil.isDate(newVal[0]) ? new Date(newVal[0]) : null;
4373
+ this.maxDate = dateUtil.isDate(newVal[1]) ? new Date(newVal[1]) : null;
5617
4374
  if (this.minDate) {
5618
4375
  this.leftDate = this.minDate;
5619
4376
  if (this.unlinkPanels && this.maxDate) {
@@ -5621,13 +4378,13 @@ const _sfc_main$2 = {
5621
4378
  const minDateMonth = this.minDate.getMonth();
5622
4379
  const maxDateYear = this.maxDate.getFullYear();
5623
4380
  const maxDateMonth = this.maxDate.getMonth();
5624
- this.rightDate = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? nextMonth(this.maxDate) : this.maxDate;
4381
+ this.rightDate = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? dateUtil.nextMonth(this.maxDate) : this.maxDate;
5625
4382
  } else {
5626
- this.rightDate = nextMonth(this.leftDate);
4383
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
5627
4384
  }
5628
4385
  } else {
5629
4386
  this.leftDate = calcDefaultValue$1(this.defaultValue)[0];
5630
- this.rightDate = nextMonth(this.leftDate);
4387
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
5631
4388
  }
5632
4389
  }
5633
4390
  },
@@ -5635,7 +4392,7 @@ const _sfc_main$2 = {
5635
4392
  if (!Array.isArray(this.value)) {
5636
4393
  const [left, right] = calcDefaultValue$1(val);
5637
4394
  this.leftDate = left;
5638
- this.rightDate = val && val[1] && this.unlinkPanels ? right : nextMonth(this.leftDate);
4395
+ this.rightDate = val && val[1] && this.unlinkPanels ? right : dateUtil.nextMonth(this.leftDate);
5639
4396
  }
5640
4397
  }
5641
4398
  },
@@ -5644,7 +4401,7 @@ const _sfc_main$2 = {
5644
4401
  this.minDate = null;
5645
4402
  this.maxDate = null;
5646
4403
  this.leftDate = calcDefaultValue$1(this.defaultValue)[0];
5647
- this.rightDate = nextMonth(this.leftDate);
4404
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
5648
4405
  this.$emit("pick", null);
5649
4406
  },
5650
4407
  handleChangeRange(val) {
@@ -5656,36 +4413,36 @@ const _sfc_main$2 = {
5656
4413
  this.dateUserInput[type] = value;
5657
4414
  if (value.length !== this.dateFormat.length)
5658
4415
  return;
5659
- const parsedValue = parseDate(value, this.dateFormat);
4416
+ const parsedValue = dateUtil.parseDate(value, this.dateFormat);
5660
4417
  if (parsedValue) {
5661
4418
  if (typeof this.disabledDate === "function" && this.disabledDate(new Date(parsedValue))) {
5662
4419
  return;
5663
4420
  }
5664
4421
  if (type === "min") {
5665
- this.minDate = modifyDate(this.minDate || /* @__PURE__ */ new Date(), parsedValue.getFullYear(), parsedValue.getMonth(), parsedValue.getDate());
4422
+ this.minDate = dateUtil.modifyDate(this.minDate || /* @__PURE__ */ new Date(), parsedValue.getFullYear(), parsedValue.getMonth(), parsedValue.getDate());
5666
4423
  this.leftDate = new Date(parsedValue);
5667
4424
  if (!this.unlinkPanels) {
5668
- this.rightDate = nextMonth(this.leftDate);
4425
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
5669
4426
  }
5670
4427
  } else {
5671
- this.maxDate = modifyDate(this.maxDate || /* @__PURE__ */ new Date(), parsedValue.getFullYear(), parsedValue.getMonth(), parsedValue.getDate());
4428
+ this.maxDate = dateUtil.modifyDate(this.maxDate || /* @__PURE__ */ new Date(), parsedValue.getFullYear(), parsedValue.getMonth(), parsedValue.getDate());
5672
4429
  this.rightDate = new Date(parsedValue);
5673
4430
  if (!this.unlinkPanels) {
5674
- this.leftDate = prevMonth(parsedValue);
4431
+ this.leftDate = dateUtil.prevMonth(parsedValue);
5675
4432
  }
5676
4433
  }
5677
4434
  }
5678
4435
  },
5679
4436
  handleDateChange(value, type) {
5680
- const parsedValue = parseDate(value, this.dateFormat);
4437
+ const parsedValue = dateUtil.parseDate(value, this.dateFormat);
5681
4438
  if (parsedValue) {
5682
4439
  if (type === "min") {
5683
- this.minDate = modifyDate(this.minDate, parsedValue.getFullYear(), parsedValue.getMonth(), parsedValue.getDate());
4440
+ this.minDate = dateUtil.modifyDate(this.minDate, parsedValue.getFullYear(), parsedValue.getMonth(), parsedValue.getDate());
5684
4441
  if (this.minDate > this.maxDate) {
5685
4442
  this.maxDate = this.minDate;
5686
4443
  }
5687
4444
  } else {
5688
- this.maxDate = modifyDate(this.maxDate, parsedValue.getFullYear(), parsedValue.getMonth(), parsedValue.getDate());
4445
+ this.maxDate = dateUtil.modifyDate(this.maxDate, parsedValue.getFullYear(), parsedValue.getMonth(), parsedValue.getDate());
5689
4446
  if (this.maxDate < this.minDate) {
5690
4447
  this.minDate = this.maxDate;
5691
4448
  }
@@ -5696,29 +4453,29 @@ const _sfc_main$2 = {
5696
4453
  this.timeUserInput[type] = value;
5697
4454
  if (value.length !== this.timeFormat.length)
5698
4455
  return;
5699
- const parsedValue = parseDate(value, this.timeFormat);
4456
+ const parsedValue = dateUtil.parseDate(value, this.timeFormat);
5700
4457
  if (parsedValue) {
5701
4458
  if (type === "min") {
5702
- this.minDate = modifyTime(this.minDate, parsedValue.getHours(), parsedValue.getMinutes(), parsedValue.getSeconds());
4459
+ this.minDate = dateUtil.modifyTime(this.minDate, parsedValue.getHours(), parsedValue.getMinutes(), parsedValue.getSeconds());
5703
4460
  this.$nextTick((_) => this.$refs.minTimePicker.adjustSpinners());
5704
4461
  } else {
5705
- this.maxDate = modifyTime(this.maxDate, parsedValue.getHours(), parsedValue.getMinutes(), parsedValue.getSeconds());
4462
+ this.maxDate = dateUtil.modifyTime(this.maxDate, parsedValue.getHours(), parsedValue.getMinutes(), parsedValue.getSeconds());
5706
4463
  this.$nextTick((_) => this.$refs.maxTimePicker.adjustSpinners());
5707
4464
  }
5708
4465
  }
5709
4466
  },
5710
4467
  handleTimeChange(value, type) {
5711
- const parsedValue = parseDate(value, this.timeFormat);
4468
+ const parsedValue = dateUtil.parseDate(value, this.timeFormat);
5712
4469
  if (parsedValue) {
5713
4470
  if (type === "min") {
5714
- this.minDate = modifyTime(this.minDate, parsedValue.getHours(), parsedValue.getMinutes(), parsedValue.getSeconds());
4471
+ this.minDate = dateUtil.modifyTime(this.minDate, parsedValue.getHours(), parsedValue.getMinutes(), parsedValue.getSeconds());
5715
4472
  if (this.minDate > this.maxDate) {
5716
4473
  this.maxDate = this.minDate;
5717
4474
  }
5718
4475
  this.$refs.minTimePicker.value = this.minDate;
5719
4476
  this.minTimePickerVisible = false;
5720
4477
  } else {
5721
- this.maxDate = modifyTime(this.maxDate, parsedValue.getHours(), parsedValue.getMinutes(), parsedValue.getSeconds());
4478
+ this.maxDate = dateUtil.modifyTime(this.maxDate, parsedValue.getHours(), parsedValue.getMinutes(), parsedValue.getSeconds());
5722
4479
  if (this.maxDate < this.minDate) {
5723
4480
  this.minDate = this.maxDate;
5724
4481
  }
@@ -5729,8 +4486,8 @@ const _sfc_main$2 = {
5729
4486
  },
5730
4487
  handleRangePick(val, close = true) {
5731
4488
  const defaultTime = this.defaultTime || [];
5732
- const minDate = modifyWithTimeString(val.minDate, defaultTime[0]);
5733
- const maxDate = modifyWithTimeString(val.maxDate, defaultTime[1]);
4489
+ const minDate = dateUtil.modifyWithTimeString(val.minDate, defaultTime[0]);
4490
+ const maxDate = dateUtil.modifyWithTimeString(val.maxDate, defaultTime[1]);
5734
4491
  if (this.maxDate === maxDate && this.minDate === minDate) {
5735
4492
  return;
5736
4493
  }
@@ -5753,7 +4510,7 @@ const _sfc_main$2 = {
5753
4510
  handleMinTimePick(value, visible, first) {
5754
4511
  this.minDate = this.minDate || /* @__PURE__ */ new Date();
5755
4512
  if (value) {
5756
- this.minDate = modifyTime(this.minDate, value.getHours(), value.getMinutes(), value.getSeconds());
4513
+ this.minDate = dateUtil.modifyTime(this.minDate, value.getHours(), value.getMinutes(), value.getSeconds());
5757
4514
  }
5758
4515
  if (!first) {
5759
4516
  this.minTimePickerVisible = visible;
@@ -5767,7 +4524,7 @@ const _sfc_main$2 = {
5767
4524
  },
5768
4525
  handleMaxTimePick(value, visible, first) {
5769
4526
  if (this.maxDate && value) {
5770
- this.maxDate = modifyTime(this.maxDate, value.getHours(), value.getMinutes(), value.getSeconds());
4527
+ this.maxDate = dateUtil.modifyTime(this.maxDate, value.getHours(), value.getMinutes(), value.getSeconds());
5771
4528
  }
5772
4529
  if (!first) {
5773
4530
  this.maxTimePickerVisible = visible;
@@ -5781,45 +4538,45 @@ const _sfc_main$2 = {
5781
4538
  },
5782
4539
  // leftPrev*, rightNext* need to take care of `unlinkPanels`
5783
4540
  leftPrevYear() {
5784
- this.leftDate = prevYear(this.leftDate);
4541
+ this.leftDate = dateUtil.prevYear(this.leftDate);
5785
4542
  if (!this.unlinkPanels) {
5786
- this.rightDate = nextMonth(this.leftDate);
4543
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
5787
4544
  }
5788
4545
  },
5789
4546
  leftPrevMonth() {
5790
- this.leftDate = prevMonth(this.leftDate);
4547
+ this.leftDate = dateUtil.prevMonth(this.leftDate);
5791
4548
  if (!this.unlinkPanels) {
5792
- this.rightDate = nextMonth(this.leftDate);
4549
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
5793
4550
  }
5794
4551
  },
5795
4552
  rightNextYear() {
5796
4553
  if (!this.unlinkPanels) {
5797
- this.leftDate = nextYear(this.leftDate);
5798
- this.rightDate = nextMonth(this.leftDate);
4554
+ this.leftDate = dateUtil.nextYear(this.leftDate);
4555
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
5799
4556
  } else {
5800
- this.rightDate = nextYear(this.rightDate);
4557
+ this.rightDate = dateUtil.nextYear(this.rightDate);
5801
4558
  }
5802
4559
  },
5803
4560
  rightNextMonth() {
5804
4561
  if (!this.unlinkPanels) {
5805
- this.leftDate = nextMonth(this.leftDate);
5806
- this.rightDate = nextMonth(this.leftDate);
4562
+ this.leftDate = dateUtil.nextMonth(this.leftDate);
4563
+ this.rightDate = dateUtil.nextMonth(this.leftDate);
5807
4564
  } else {
5808
- this.rightDate = nextMonth(this.rightDate);
4565
+ this.rightDate = dateUtil.nextMonth(this.rightDate);
5809
4566
  }
5810
4567
  },
5811
4568
  // leftNext*, rightPrev* are called when `unlinkPanels` is true
5812
4569
  leftNextYear() {
5813
- this.leftDate = nextYear(this.leftDate);
4570
+ this.leftDate = dateUtil.nextYear(this.leftDate);
5814
4571
  },
5815
4572
  leftNextMonth() {
5816
- this.leftDate = nextMonth(this.leftDate);
4573
+ this.leftDate = dateUtil.nextMonth(this.leftDate);
5817
4574
  },
5818
4575
  rightPrevYear() {
5819
- this.rightDate = prevYear(this.rightDate);
4576
+ this.rightDate = dateUtil.prevYear(this.rightDate);
5820
4577
  },
5821
4578
  rightPrevMonth() {
5822
- this.rightDate = prevMonth(this.rightDate);
4579
+ this.rightDate = dateUtil.prevMonth(this.rightDate);
5823
4580
  },
5824
4581
  handleConfirm(visible = false) {
5825
4582
  if (this.isValidValue([this.minDate, this.maxDate])) {
@@ -5827,13 +4584,13 @@ const _sfc_main$2 = {
5827
4584
  }
5828
4585
  },
5829
4586
  isValidValue(value) {
5830
- 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);
4587
+ 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);
5831
4588
  },
5832
4589
  resetView() {
5833
4590
  if (this.minDate && this.maxDate == null)
5834
4591
  this.rangeState.selecting = false;
5835
- this.minDate = this.value && isDate(this.value[0]) ? new Date(this.value[0]) : null;
5836
- this.maxDate = this.value && isDate(this.value[0]) ? new Date(this.value[1]) : null;
4592
+ this.minDate = this.value && dateUtil.isDate(this.value[0]) ? new Date(this.value[0]) : null;
4593
+ this.maxDate = this.value && dateUtil.isDate(this.value[0]) ? new Date(this.value[1]) : null;
5837
4594
  }
5838
4595
  }
5839
4596
  };
@@ -6142,9 +4899,9 @@ const calcDefaultValue = (defaultValue) => {
6142
4899
  if (Array.isArray(defaultValue)) {
6143
4900
  return [new Date(defaultValue[0]), new Date(defaultValue[1])];
6144
4901
  } else if (defaultValue) {
6145
- return [new Date(defaultValue), nextMonth(new Date(defaultValue))];
4902
+ return [new Date(defaultValue), dateUtil.nextMonth(new Date(defaultValue))];
6146
4903
  } else {
6147
- return [/* @__PURE__ */ new Date(), nextMonth(/* @__PURE__ */ new Date())];
4904
+ return [/* @__PURE__ */ new Date(), dateUtil.nextMonth(/* @__PURE__ */ new Date())];
6148
4905
  }
6149
4906
  };
6150
4907
  const _sfc_main$1 = {
@@ -6154,7 +4911,7 @@ const _sfc_main$1 = {
6154
4911
  components: {
6155
4912
  MonthTable
6156
4913
  },
6157
- mixins: [_default],
4914
+ mixins: [Locale],
6158
4915
  data() {
6159
4916
  return {
6160
4917
  popperClass: "",
@@ -6164,7 +4921,7 @@ const _sfc_main$1 = {
6164
4921
  minDate: "",
6165
4922
  maxDate: "",
6166
4923
  leftDate: /* @__PURE__ */ new Date(),
6167
- rightDate: nextYear(/* @__PURE__ */ new Date()),
4924
+ rightDate: dateUtil.nextYear(/* @__PURE__ */ new Date()),
6168
4925
  rangeState: {
6169
4926
  endDate: null,
6170
4927
  selecting: false,
@@ -6205,20 +4962,20 @@ const _sfc_main$1 = {
6205
4962
  this.minDate = null;
6206
4963
  this.maxDate = null;
6207
4964
  } else if (Array.isArray(newVal)) {
6208
- this.minDate = isDate(newVal[0]) ? new Date(newVal[0]) : null;
6209
- this.maxDate = isDate(newVal[1]) ? new Date(newVal[1]) : null;
4965
+ this.minDate = dateUtil.isDate(newVal[0]) ? new Date(newVal[0]) : null;
4966
+ this.maxDate = dateUtil.isDate(newVal[1]) ? new Date(newVal[1]) : null;
6210
4967
  if (this.minDate) {
6211
4968
  this.leftDate = this.minDate;
6212
4969
  if (this.unlinkPanels && this.maxDate) {
6213
4970
  const minDateYear = this.minDate.getFullYear();
6214
4971
  const maxDateYear = this.maxDate.getFullYear();
6215
- this.rightDate = minDateYear === maxDateYear ? nextYear(this.maxDate) : this.maxDate;
4972
+ this.rightDate = minDateYear === maxDateYear ? dateUtil.nextYear(this.maxDate) : this.maxDate;
6216
4973
  } else {
6217
- this.rightDate = nextYear(this.leftDate);
4974
+ this.rightDate = dateUtil.nextYear(this.leftDate);
6218
4975
  }
6219
4976
  } else {
6220
4977
  this.leftDate = calcDefaultValue(this.defaultValue)[0];
6221
- this.rightDate = nextYear(this.leftDate);
4978
+ this.rightDate = dateUtil.nextYear(this.leftDate);
6222
4979
  }
6223
4980
  }
6224
4981
  },
@@ -6226,7 +4983,7 @@ const _sfc_main$1 = {
6226
4983
  if (!Array.isArray(this.value)) {
6227
4984
  const [left, right] = calcDefaultValue(val);
6228
4985
  this.leftDate = left;
6229
- this.rightDate = val && val[1] && left.getFullYear() !== right.getFullYear() && this.unlinkPanels ? right : nextYear(this.leftDate);
4986
+ this.rightDate = val && val[1] && left.getFullYear() !== right.getFullYear() && this.unlinkPanels ? right : dateUtil.nextYear(this.leftDate);
6230
4987
  }
6231
4988
  }
6232
4989
  },
@@ -6235,7 +4992,7 @@ const _sfc_main$1 = {
6235
4992
  this.minDate = null;
6236
4993
  this.maxDate = null;
6237
4994
  this.leftDate = calcDefaultValue(this.defaultValue)[0];
6238
- this.rightDate = nextYear(this.leftDate);
4995
+ this.rightDate = dateUtil.nextYear(this.leftDate);
6239
4996
  this.$emit("pick", null);
6240
4997
  },
6241
4998
  handleChangeRange(val) {
@@ -6245,8 +5002,8 @@ const _sfc_main$1 = {
6245
5002
  },
6246
5003
  handleRangePick(val, close = true) {
6247
5004
  const defaultTime = this.defaultTime || [];
6248
- const minDate = modifyWithTimeString(val.minDate, defaultTime[0]);
6249
- const maxDate = modifyWithTimeString(val.maxDate, defaultTime[1]);
5005
+ const minDate = dateUtil.modifyWithTimeString(val.minDate, defaultTime[0]);
5006
+ const maxDate = dateUtil.modifyWithTimeString(val.maxDate, defaultTime[1]);
6250
5007
  if (this.maxDate === maxDate && this.minDate === minDate) {
6251
5008
  return;
6252
5009
  }
@@ -6268,23 +5025,23 @@ const _sfc_main$1 = {
6268
5025
  },
6269
5026
  // leftPrev*, rightNext* need to take care of `unlinkPanels`
6270
5027
  leftPrevYear() {
6271
- this.leftDate = prevYear(this.leftDate);
5028
+ this.leftDate = dateUtil.prevYear(this.leftDate);
6272
5029
  if (!this.unlinkPanels) {
6273
- this.rightDate = prevYear(this.rightDate);
5030
+ this.rightDate = dateUtil.prevYear(this.rightDate);
6274
5031
  }
6275
5032
  },
6276
5033
  rightNextYear() {
6277
5034
  if (!this.unlinkPanels) {
6278
- this.leftDate = nextYear(this.leftDate);
5035
+ this.leftDate = dateUtil.nextYear(this.leftDate);
6279
5036
  }
6280
- this.rightDate = nextYear(this.rightDate);
5037
+ this.rightDate = dateUtil.nextYear(this.rightDate);
6281
5038
  },
6282
5039
  // leftNext*, rightPrev* are called when `unlinkPanels` is true
6283
5040
  leftNextYear() {
6284
- this.leftDate = nextYear(this.leftDate);
5041
+ this.leftDate = dateUtil.nextYear(this.leftDate);
6285
5042
  },
6286
5043
  rightPrevYear() {
6287
- this.rightDate = prevYear(this.rightDate);
5044
+ this.rightDate = dateUtil.prevYear(this.rightDate);
6288
5045
  },
6289
5046
  handleConfirm(visible = false) {
6290
5047
  if (this.isValidValue([this.minDate, this.maxDate])) {
@@ -6292,11 +5049,11 @@ const _sfc_main$1 = {
6292
5049
  }
6293
5050
  },
6294
5051
  isValidValue(value) {
6295
- 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);
5052
+ 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);
6296
5053
  },
6297
5054
  resetView() {
6298
- this.minDate = this.value && isDate(this.value[0]) ? new Date(this.value[0]) : null;
6299
- this.maxDate = this.value && isDate(this.value[0]) ? new Date(this.value[1]) : null;
5055
+ this.minDate = this.value && dateUtil.isDate(this.value[0]) ? new Date(this.value[0]) : null;
5056
+ this.maxDate = this.value && dateUtil.isDate(this.value[0]) ? new Date(this.value[1]) : null;
6300
5057
  }
6301
5058
  }
6302
5059
  };