@ezuikit/player-theme 2.0.2-beta.2 → 2.0.2-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,17 +1,16 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.0.2-beta.2
3
- * Copyright (c) 2025-12-08 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v2.0.2-beta.4
3
+ * Copyright (c) 2025-12-09 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import EventEmitter from 'eventemitter3';
7
7
  import Picker from '@skax/picker';
8
8
  import delegate from '@skax/delegate';
9
9
  import deepmerge from 'deepmerge';
10
- import require$$1, { isMobile, DateTime, parseEzopenUrl } from '@ezuikit/utils-tools';
10
+ import require$$1, { isMobile, parseEzopenUrl } from '@ezuikit/utils-tools';
11
11
  import screenfull from 'screenfull';
12
12
  import I18n from '@ezuikit/utils-i18n';
13
13
  import Logger from '@ezuikit/utils-logger';
14
- import { DatePicker } from '@ezuikit/control-date-picker';
15
14
  import { MobileTimeLine, TimeLine } from '@ezuikit/control-time-line';
16
15
 
17
16
  /**
@@ -42,8 +41,7 @@ var THEME_PROPS = [
42
41
  'speed',
43
42
  'urlInfo',
44
43
  'videoLevelList',
45
- 'videoLevel',
46
- 'recMonth'
44
+ 'videoLevel'
47
45
  ];
48
46
  /**
49
47
  * 当移动端 picker 控件打开时需要关闭动画(定时器)
@@ -189,9 +187,8 @@ var EVENTS = {
189
187
  /** 全局全屏控件销毁 */ globalFullscreenDestroy: 'Control.globalFullscreenDestroy',
190
188
  /** 日期面板展示隐藏变换 */ datePanelOpenChange: 'Control.datePanelOpenChange',
191
189
  /** 日期改变 */ dateChange: 'Control.dateChange',
192
- /** 日期改变 */ dateMonthChange: 'Control.dateMonthChange',
193
190
  /** 日期销毁 */ dateDestroy: 'Control.datePanelDestroy',
194
- /** 时间轴拖动结束 */ timeLineChange: 'Control.timeLineChange',
191
+ /** 时间轴拖动结束 */ timeLineChange: 'Control.timeLineChange',
195
192
  /** 时间轴图片列表面板 */ timeLinePanelOpenChange: 'Control.timeLinePanelOpenChange',
196
193
  /** 时间轴控件销毁 */ timeLineDestroy: 'Control.timeLineDestroy',
197
194
  /** 主题控件挂载前 切换新的主题也会触发,如果想首次获取需要在 onInitializing 回调中进行监听 */ beforeMountControls: 'Control.beforeMountControls',
@@ -202,7 +199,7 @@ var EVENTS = {
202
199
  /** 加载控件销毁 */ loadingDestroy: 'Control.loadingDestroy',
203
200
  /** 消息控件销毁 */ messageDestroy: 'Control.messageDestroy',
204
201
  /** 播放器内容区域销毁 */ contentDestroy: 'Control.contentDestroy',
205
- /** 播放器内容区域重新渲染 */ contentRerender: 'Control.contentRerender'
202
+ contentRerender: 'Control.contentRerender'
206
203
  },
207
204
  /**
208
205
  * 主题控件相关
@@ -4063,11 +4060,11 @@ function debounce(func, wait) {
4063
4060
  // 对讲
4064
4061
  // =======================================================
4065
4062
  theme.on(EVENTS.talkingChange, function(talking) {
4066
- var _theme_controls, _theme_controls_talkControl, _theme_controls1;
4063
+ var _theme_controls_talkControl, _theme_controls;
4067
4064
  theme._talking = talking;
4068
- if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.talkControl) && talking !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_talkControl = _theme_controls1.talkControl) == null ? void 0 : _theme_controls_talkControl.active)) {
4069
- var _theme_controls_talkControl1, _theme_controls2;
4070
- (_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_talkControl1 = _theme_controls2.talkControl) == null ? void 0 : _theme_controls_talkControl1.emit(EVENTS.talkingChange, talking);
4065
+ if (talking !== ((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_talkControl = _theme_controls.talkControl) == null ? void 0 : _theme_controls_talkControl.active)) {
4066
+ var _theme_controls_talkControl1, _theme_controls1;
4067
+ (_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_talkControl1 = _theme_controls1.talkControl) == null ? void 0 : _theme_controls_talkControl1.emit(EVENTS.talkingChange, talking);
4071
4068
  }
4072
4069
  });
4073
4070
  theme.on(EVENTS.talkVolumeChange, function(value) {
@@ -4097,14 +4094,14 @@ function debounce(func, wait) {
4097
4094
  // 放大
4098
4095
  // =======================================================
4099
4096
  theme.on(EVENTS.zoomingChange, function(zooming) {
4100
- var _theme_controls1, _theme_controls_zoomControl1, _theme_controls2;
4101
- if (((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1.zoomControl) && ((_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl1 = _theme_controls2.zoomControl) == null ? void 0 : _theme_controls_zoomControl1.active) !== zooming) {
4097
+ var _theme_controls_zoomControl1, _theme_controls1;
4098
+ if (((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl1 = _theme_controls1.zoomControl) == null ? void 0 : _theme_controls_zoomControl1.active) !== zooming) {
4102
4099
  theme.controls.zoomControl.active = zooming;
4103
4100
  }
4104
4101
  });
4105
4102
  theme.on(EVENTS.zoomChange, function(zoom) {
4106
- var _theme_controls, _theme_controls_zoomControl, _theme_controls1;
4107
- if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.zoomControl) && ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl = _theme_controls1.zoomControl) == null ? void 0 : _theme_controls_zoomControl.value) !== zoom) {
4103
+ var _theme_controls_zoomControl, _theme_controls;
4104
+ if (((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_zoomControl = _theme_controls.zoomControl) == null ? void 0 : _theme_controls_zoomControl.value) !== zoom) {
4108
4105
  theme.controls.zoomControl.value = zoom;
4109
4106
  }
4110
4107
  });
@@ -4155,11 +4152,6 @@ function debounce(func, wait) {
4155
4152
  (_theme_zoomUtil1 = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform1 = _theme_zoomUtil1.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform1.call(_theme_zoomUtil1, false);
4156
4153
  }
4157
4154
  });
4158
- // 日期选择器
4159
- theme == null ? void 0 : theme.on(EVENTS.control.dateMonthChange, function(dates) {
4160
- var _theme_controls_dateControl_emit, _theme_controls_dateControl, _theme_controls;
4161
- (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_dateControl = _theme_controls.dateControl) == null ? void 0 : (_theme_controls_dateControl_emit = _theme_controls_dateControl.emit) == null ? void 0 : _theme_controls_dateControl_emit.call(_theme_controls_dateControl, EVENTS.control.dateMonthChange, dates);
4162
- });
4163
4155
  }
4164
4156
  /**
4165
4157
  * 控件向主题发现通信消息 control.on -> theme.emit ,仅用来转发控件的事件
@@ -4339,13 +4331,16 @@ function debounce(func, wait) {
4339
4331
  // prettier-ignore
4340
4332
  theme.controls.recControl.on(EVENTS.control.recTypeChange, function(type) {
4341
4333
  if (theme.recType !== type) {
4342
- var _theme__headerMoreControl;
4334
+ var _theme__headerMoreControl, _theme_controls;
4343
4335
  theme.recType = type;
4344
4336
  theme.emit(EVENTS.control.recTypeChange, type);
4345
4337
  // theme.emit(EVENTS.recTypeChange, type);
4346
4338
  if ((_theme__headerMoreControl = theme._headerMoreControl) == null ? void 0 : _theme__headerMoreControl.picker) {
4347
4339
  theme._headerMoreControl.picker.open = false;
4348
4340
  }
4341
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.speedControl) {
4342
+ theme.controls.speedControl.emit(EVENTS.control.recTypeChange, type);
4343
+ }
4349
4344
  }
4350
4345
  });
4351
4346
  theme.controls.recControl.on(EVENTS.control.recDestroy, function() {
@@ -4358,10 +4353,10 @@ function debounce(func, wait) {
4358
4353
  theme.emit(EVENTS.control.timeLineChange, date);
4359
4354
  });
4360
4355
  theme.controls.timeLineControl.on(EVENTS.control.timeLinePanelOpenChange, function(open) {
4361
- var _theme_controls_dateControl, _theme_controls;
4362
- if ((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_dateControl = _theme_controls.dateControl) == null ? void 0 : _theme_controls_dateControl.datePicker) {
4363
- var _theme_controls_dateControl_datePicker, _theme_controls_dateControl1, _theme_controls1;
4364
- (_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_dateControl1 = _theme_controls1.dateControl) == null ? void 0 : (_theme_controls_dateControl_datePicker = _theme_controls_dateControl1.datePicker) == null ? void 0 : _theme_controls_dateControl_datePicker.hide();
4356
+ var _theme_controls_dateControl;
4357
+ if ((_theme_controls_dateControl = theme.controls.dateControl) == null ? void 0 : _theme_controls_dateControl.dataPickerUtil) {
4358
+ var _theme_controls_dateControl_dataPickerUtil, _theme_controls_dateControl1;
4359
+ (_theme_controls_dateControl1 = theme.controls.dateControl) == null ? void 0 : (_theme_controls_dateControl_dataPickerUtil = _theme_controls_dateControl1.dataPickerUtil) == null ? void 0 : _theme_controls_dateControl_dataPickerUtil.hide();
4365
4360
  }
4366
4361
  theme.emit(EVENTS.control.timeLinePanelOpenChange, open);
4367
4362
  });
@@ -4654,12 +4649,12 @@ function getDefaultExportFromCjs (x) {
4654
4649
  * Released under the MIT License.
4655
4650
  */
4656
4651
 
4657
- var dist$1;
4658
- var hasRequiredDist$1;
4652
+ var dist$2;
4653
+ var hasRequiredDist$2;
4659
4654
 
4660
- function requireDist$1 () {
4661
- if (hasRequiredDist$1) return dist$1;
4662
- hasRequiredDist$1 = 1;
4655
+ function requireDist$2 () {
4656
+ if (hasRequiredDist$2) return dist$2;
4657
+ hasRequiredDist$2 = 1;
4663
4658
 
4664
4659
  /**
4665
4660
  * Zoom position
@@ -5366,12 +5361,12 @@ function requireDist$1 () {
5366
5361
  }();
5367
5362
  Zoom.VERSION = '0.0.2';
5368
5363
 
5369
- dist$1 = Zoom;
5370
- return dist$1;
5364
+ dist$2 = Zoom;
5365
+ return dist$2;
5371
5366
  }
5372
5367
 
5373
- var distExports$1 = requireDist$1();
5374
- var Zoom = /*@__PURE__*/getDefaultExportFromCjs(distExports$1);
5368
+ var distExports$2 = requireDist$2();
5369
+ var Zoom = /*@__PURE__*/getDefaultExportFromCjs(distExports$2);
5375
5370
 
5376
5371
  function _extends$h() {
5377
5372
  _extends$h = Object.assign || function(target) {
@@ -6446,7 +6441,7 @@ function _set_prototype_of$d(o, p) {
6446
6441
  return CapturePicture;
6447
6442
  }(Control);
6448
6443
 
6449
- var dist = {};
6444
+ var dist$1 = {};
6450
6445
 
6451
6446
  /*
6452
6447
  * @ezuikit/control-ptz v0.0.1
@@ -6454,11 +6449,11 @@ var dist = {};
6454
6449
  * Released under the MIT License.
6455
6450
  */
6456
6451
 
6457
- var hasRequiredDist;
6452
+ var hasRequiredDist$1;
6458
6453
 
6459
- function requireDist () {
6460
- if (hasRequiredDist) return dist;
6461
- hasRequiredDist = 1;
6454
+ function requireDist$1 () {
6455
+ if (hasRequiredDist$1) return dist$1;
6456
+ hasRequiredDist$1 = 1;
6462
6457
 
6463
6458
  var deepmerge$1 = deepmerge;
6464
6459
  var utilsTools = require$$1;
@@ -7381,13 +7376,13 @@ function requireDist () {
7381
7376
  return Ptz;
7382
7377
  }(BasePtz);
7383
7378
 
7384
- dist.BasePtz = BasePtz;
7385
- dist.MobilePtz = MobilePtz;
7386
- dist.Ptz = Ptz;
7387
- return dist;
7379
+ dist$1.BasePtz = BasePtz;
7380
+ dist$1.MobilePtz = MobilePtz;
7381
+ dist$1.Ptz = Ptz;
7382
+ return dist$1;
7388
7383
  }
7389
7384
 
7390
- var distExports = requireDist();
7385
+ var distExports$1 = requireDist$1();
7391
7386
 
7392
7387
  function _defineProperties$4(target, props) {
7393
7388
  for(var i = 0; i < props.length; i++){
@@ -7486,7 +7481,7 @@ function _set_prototype_of$c(o, p) {
7486
7481
  this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
7487
7482
  this.$panel.appendChild(this.$turntable);
7488
7483
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7489
- this._ptzControl = new distExports.Ptz(this.$turntable, _extends$b({}, this._options, {
7484
+ this._ptzControl = new distExports$1.Ptz(this.$turntable, _extends$b({}, this._options, {
7490
7485
  onSpeedChange: this._onSpeedChange.bind(this),
7491
7486
  onDirection: this._onDirection.bind(this)
7492
7487
  }));
@@ -7495,7 +7490,7 @@ function _set_prototype_of$c(o, p) {
7495
7490
  };
7496
7491
  _proto.renderMobileExtend = function renderMobileExtend($container) {
7497
7492
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7498
- if (!this._ptzControl1) this._ptzControl1 = new distExports.MobilePtz($container, _extends$b({}, this._options, {
7493
+ if (!this._ptzControl1) this._ptzControl1 = new distExports$1.MobilePtz($container, _extends$b({}, this._options, {
7499
7494
  onSpeedChange: this._onSpeedChange.bind(this),
7500
7495
  onDirection: this._onDirection.bind(this)
7501
7496
  }));
@@ -8538,7 +8533,9 @@ var SUPPORT_SPEED = [
8538
8533
  0.5,
8539
8534
  1,
8540
8535
  2,
8541
- 4
8536
+ 4,
8537
+ 8,
8538
+ 16
8542
8539
  ]; // 8, 16
8543
8540
  var SPEED_DEFAULT_OPTIONS = {
8544
8541
  /**
@@ -8588,6 +8585,21 @@ var SPEED_DEFAULT_OPTIONS = {
8588
8585
  _this.on(EVENTS.speedChange, function(speed) {
8589
8586
  if (_this.value !== speed + '') _this.value = speed + '';
8590
8587
  });
8588
+ _this.on(EVENTS.control.recTypeChange, function(type) {
8589
+ if (!(options == null ? void 0 : options.list)) {
8590
+ // 非用户自定义
8591
+ if (type === 'rec') {
8592
+ // 本地回放 不支持 8 16 32 倍速
8593
+ var list = _this.list.filter(function(item) {
8594
+ return (item == null ? void 0 : item.value) && +item.value < 8;
8595
+ });
8596
+ _this.updateOptions(list);
8597
+ } else {
8598
+ // 云端回放 支持 8 16 32 倍速
8599
+ _this.updateOptions(SPEED_DEFAULT_OPTIONS.list);
8600
+ }
8601
+ }
8602
+ });
8591
8603
  return _this;
8592
8604
  }
8593
8605
  var _proto = Speed.prototype;
@@ -8598,6 +8610,541 @@ var SPEED_DEFAULT_OPTIONS = {
8598
8610
  return Speed;
8599
8611
  }(Select);
8600
8612
 
8613
+ /*
8614
+ * @ezuikit/control-date-picker v0.0.1-alpha.2
8615
+ * Copyright (c) 2025-11-12 Ezviz-OpenBiz
8616
+ * Released under the MIT License.
8617
+ */
8618
+
8619
+ var dist;
8620
+ var hasRequiredDist;
8621
+
8622
+ function requireDist () {
8623
+ if (hasRequiredDist) return dist;
8624
+ hasRequiredDist = 1;
8625
+
8626
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
8627
+ try {
8628
+ var info = gen[key](arg);
8629
+ var value = info.value;
8630
+ } catch (error) {
8631
+ reject(error);
8632
+ return;
8633
+ }
8634
+ if (info.done) {
8635
+ resolve(value);
8636
+ } else {
8637
+ Promise.resolve(value).then(_next, _throw);
8638
+ }
8639
+ }
8640
+ function _async_to_generator(fn) {
8641
+ return function() {
8642
+ var self = this, args = arguments;
8643
+ return new Promise(function(resolve, reject) {
8644
+ var gen = fn.apply(self, args);
8645
+ function _next(value) {
8646
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
8647
+ }
8648
+ function _throw(err) {
8649
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
8650
+ }
8651
+ _next(undefined);
8652
+ });
8653
+ };
8654
+ }
8655
+ function _ts_generator(thisArg, body) {
8656
+ var f, y, t, _ = {
8657
+ label: 0,
8658
+ sent: function() {
8659
+ if (t[0] & 1) throw t[1];
8660
+ return t[1];
8661
+ },
8662
+ trys: [],
8663
+ ops: []
8664
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
8665
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
8666
+ return this;
8667
+ }), g;
8668
+ function verb(n) {
8669
+ return function(v) {
8670
+ return step([
8671
+ n,
8672
+ v
8673
+ ]);
8674
+ };
8675
+ }
8676
+ function step(op) {
8677
+ if (f) throw new TypeError("Generator is already executing.");
8678
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
8679
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
8680
+ if (y = 0, t) op = [
8681
+ op[0] & 2,
8682
+ t.value
8683
+ ];
8684
+ switch(op[0]){
8685
+ case 0:
8686
+ case 1:
8687
+ t = op;
8688
+ break;
8689
+ case 4:
8690
+ _.label++;
8691
+ return {
8692
+ value: op[1],
8693
+ done: false
8694
+ };
8695
+ case 5:
8696
+ _.label++;
8697
+ y = op[1];
8698
+ op = [
8699
+ 0
8700
+ ];
8701
+ continue;
8702
+ case 7:
8703
+ op = _.ops.pop();
8704
+ _.trys.pop();
8705
+ continue;
8706
+ default:
8707
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
8708
+ _ = 0;
8709
+ continue;
8710
+ }
8711
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
8712
+ _.label = op[1];
8713
+ break;
8714
+ }
8715
+ if (op[0] === 6 && _.label < t[1]) {
8716
+ _.label = t[1];
8717
+ t = op;
8718
+ break;
8719
+ }
8720
+ if (t && _.label < t[2]) {
8721
+ _.label = t[2];
8722
+ _.ops.push(op);
8723
+ break;
8724
+ }
8725
+ if (t[2]) _.ops.pop();
8726
+ _.trys.pop();
8727
+ continue;
8728
+ }
8729
+ op = body.call(thisArg, _);
8730
+ } catch (e) {
8731
+ op = [
8732
+ 6,
8733
+ e
8734
+ ];
8735
+ y = 0;
8736
+ } finally{
8737
+ f = t = 0;
8738
+ }
8739
+ if (op[0] & 5) throw op[1];
8740
+ return {
8741
+ value: op[0] ? op[1] : void 0,
8742
+ done: true
8743
+ };
8744
+ }
8745
+ }
8746
+ var AppendJS = /*#__PURE__*/ function() {
8747
+ function AppendJS() {}
8748
+ AppendJS.loadScript = function loadScript(src) {
8749
+ return _async_to_generator(function() {
8750
+ return _ts_generator(this, function(_state) {
8751
+ switch(_state.label){
8752
+ case 0:
8753
+ return [
8754
+ 4,
8755
+ new Promise(function(resolve, reject) {
8756
+ if (AppendJS.LoadedScr.includes(src)) {
8757
+ return resolve(src);
8758
+ }
8759
+ if (AppendJS.LoadingScrQueue[src]) {
8760
+ return AppendJS.LoadingScrQueue[src].push(resolve);
8761
+ } else {
8762
+ AppendJS.LoadingScrQueue[src] = [
8763
+ resolve
8764
+ ];
8765
+ }
8766
+ var link;
8767
+ if (src.includes('.js')) {
8768
+ link = document.createElement('script');
8769
+ link.src = src;
8770
+ link.async = true;
8771
+ } else if (src.includes('.css')) {
8772
+ link = document.createElement('link');
8773
+ link.rel = 'stylesheet';
8774
+ link.href = src;
8775
+ }
8776
+ link.onload = function() {
8777
+ AppendJS.LoadedScr.push(src);
8778
+ AppendJS.LoadingScrQueue[src].forEach(function(resolve) {
8779
+ return resolve(src);
8780
+ });
8781
+ AppendJS.LoadingScrQueue[src] = [];
8782
+ };
8783
+ link.onerror = function() {
8784
+ return reject(new Error('Failed to load ' + src));
8785
+ };
8786
+ document.head.appendChild(link);
8787
+ })
8788
+ ];
8789
+ case 1:
8790
+ return [
8791
+ 2,
8792
+ _state.sent()
8793
+ ];
8794
+ }
8795
+ });
8796
+ })();
8797
+ };
8798
+ AppendJS.loadScriptsBatch = function loadScriptsBatch(srcArr) {
8799
+ return _async_to_generator(function() {
8800
+ return _ts_generator(this, function(_state) {
8801
+ switch(_state.label){
8802
+ case 0:
8803
+ return [
8804
+ 4,
8805
+ Promise.all(srcArr.map(AppendJS.loadScript))
8806
+ ];
8807
+ case 1:
8808
+ return [
8809
+ 2,
8810
+ _state.sent()
8811
+ ];
8812
+ }
8813
+ });
8814
+ })();
8815
+ };
8816
+ AppendJS.remove = function remove(src) {
8817
+ src.forEach(function(item) {
8818
+ var link = document.querySelector('script[src="' + item + '"]') || document.querySelector('link[href="' + item + '"]');
8819
+ if (link) {
8820
+ link.remove();
8821
+ }
8822
+ });
8823
+ };
8824
+ AppendJS.clear = function clear() {
8825
+ AppendJS.remove(AppendJS.LoadedScr);
8826
+ };
8827
+ return AppendJS;
8828
+ }();
8829
+ /** 已经加载完的js/css */ AppendJS.LoadedScr = [];
8830
+ /** 正在加载的js/css */ AppendJS.LoadingScrQueue = {};
8831
+
8832
+ function _defineProperties(target, props) {
8833
+ for(var i = 0; i < props.length; i++){
8834
+ var descriptor = props[i];
8835
+ descriptor.enumerable = descriptor.enumerable || false;
8836
+ descriptor.configurable = true;
8837
+ if ("value" in descriptor) descriptor.writable = true;
8838
+ Object.defineProperty(target, descriptor.key, descriptor);
8839
+ }
8840
+ }
8841
+ function _create_class(Constructor, protoProps, staticProps) {
8842
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
8843
+ return Constructor;
8844
+ }
8845
+ var DEFAULT_OPTIONS = {
8846
+ staticPath: '.',
8847
+ place: 'top-right',
8848
+ language: 'zh-CN',
8849
+ current: new Date(),
8850
+ maxDate: new Date()
8851
+ };
8852
+ /**
8853
+ * 日期选择器
8854
+ */ var DatePicker = /*#__PURE__*/ function() {
8855
+ function DatePicker(container, options) {
8856
+ var _this = this;
8857
+ this._open = false;
8858
+ this._change = true;
8859
+ this.$container = container;
8860
+ this.options = Object.assign({}, DEFAULT_OPTIONS, options);
8861
+ this.options.staticPath = (this.options.staticPath || '').replace(/\/$/, '');
8862
+ if (this.options.current) {
8863
+ this._date = this.options.current;
8864
+ }
8865
+ this._init();
8866
+ this.$container.addEventListener('click', function() {
8867
+ if (_this._open) _this.hide();
8868
+ else _this.show();
8869
+ });
8870
+ document.body.addEventListener('click', function(e) {
8871
+ if (!_this.$container.contains(e.target)) {
8872
+ _this.hide();
8873
+ }
8874
+ });
8875
+ }
8876
+ var _proto = DatePicker.prototype;
8877
+ _proto._init = function _init() {
8878
+ var _this = this;
8879
+ // 因为挂载在行内,需要父标签设置 position: relative;
8880
+ this.$container.style.cssText += ";position: relative;";
8881
+ this.$container.classList.add("datepicker-inline-" + this.options.place);
8882
+ AppendJS.loadScriptsBatch([
8883
+ "" + this.options.staticPath + "/rec/jquery.min.js",
8884
+ "" + this.options.staticPath + "/rec/datepicker.min.css"
8885
+ ]).then(function() {
8886
+ AppendJS.loadScriptsBatch([
8887
+ "" + _this.options.staticPath + "/rec/datepicker.js"
8888
+ ]).then(function() {
8889
+ AppendJS.loadScriptsBatch([
8890
+ "" + _this.options.staticPath + "/rec/datepicker.zh-CN.js",
8891
+ "" + _this.options.staticPath + "/rec/datepicker.en-US.js"
8892
+ ]).then(function() {
8893
+ window.$(_this.$container).datepicker({
8894
+ date: _this.options.current,
8895
+ language: _this.options.language,
8896
+ endDate: _this.options.maxDate,
8897
+ inline: true
8898
+ });
8899
+ _this.hide();
8900
+ window.$(_this.$container).on('pick.datepicker', function(e) {
8901
+ var _this__date, _this__date1, _this__date2, _this__date3, _this__date4, _this__date5;
8902
+ if (e.view === 'year' && ((_this__date = _this._date) == null ? void 0 : _this__date.getFullYear()) !== e.date.getFullYear()) {
8903
+ _this.options.onYearChange == null ? void 0 : _this.options.onYearChange.call(_this.options, e.date);
8904
+ } else if (e.view === 'month' && (((_this__date1 = _this._date) == null ? void 0 : _this__date1.getMonth()) !== e.date.getMonth() || ((_this__date2 = _this._date) == null ? void 0 : _this__date2.getFullYear()) !== e.date.getFullYear())) {
8905
+ _this.options.onMonthChange == null ? void 0 : _this.options.onMonthChange.call(_this.options, e.date);
8906
+ } else if ([
8907
+ 'day',
8908
+ 'pick'
8909
+ ].includes(e.view || e.type) && (((_this__date3 = _this._date) == null ? void 0 : _this__date3.getDate()) !== e.date.getDate() || ((_this__date4 = _this._date) == null ? void 0 : _this__date4.getMonth()) !== e.date.getMonth() || ((_this__date5 = _this._date) == null ? void 0 : _this__date5.getFullYear()) !== e.date.getFullYear())) {
8910
+ if (_this._change) {
8911
+ _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, e.date);
8912
+ }
8913
+ _this._date = new Date(e.date.getTime());
8914
+ }
8915
+ if (e.view === 'day') _this.hide();
8916
+ _this._change = true;
8917
+ });
8918
+ });
8919
+ });
8920
+ });
8921
+ };
8922
+ /**
8923
+ * 设置日期, change = true 时触发 onChange 事件
8924
+ *
8925
+ * @param date 设置的日期
8926
+ * @param change 是否触发 onChange 事件
8927
+ */ _proto.setDate = function setDate(date, change) {
8928
+ if (change === void 0) change = true;
8929
+ var $datepicker = this.$container.querySelector(".datepicker-inline");
8930
+ if ($datepicker) {
8931
+ this._change = change;
8932
+ window.$(this.$container).datepicker('setDate', date);
8933
+ }
8934
+ };
8935
+ /**
8936
+ * 隐藏面板, 会触发 onPanelChange 事件
8937
+ */ _proto.hide = function hide() {
8938
+ var $datepicker = this.$container.querySelector(".datepicker-inline");
8939
+ if ($datepicker) {
8940
+ if (this._open) {
8941
+ this._open = false;
8942
+ this.options.onPanelChange == null ? void 0 : this.options.onPanelChange.call(this.options, false, this._date);
8943
+ }
8944
+ $datepicker.classList.add('datepicker-hide');
8945
+ }
8946
+ };
8947
+ /**
8948
+ * 显示面板, 会触发 onPanelChange 事件
8949
+ */ _proto.show = function show() {
8950
+ var $datepicker = this.$container.querySelector(".datepicker-inline");
8951
+ if ($datepicker) {
8952
+ var _window_$_datepicker, _window_$;
8953
+ if (!this._open) {
8954
+ this._open = true;
8955
+ this.options.onPanelChange == null ? void 0 : this.options.onPanelChange.call(this.options, true, this._date);
8956
+ }
8957
+ if (this._date) this.setDate(this._date, false);
8958
+ (_window_$_datepicker = (_window_$ = window.$(this.$container)).datepicker) == null ? void 0 : _window_$_datepicker.call(_window_$, 'showView');
8959
+ if (this.options.place === 'bottom-left') {
8960
+ $datepicker.style.cssText += "top: " + (this.$container.clientHeight + 10) + "px; bottom: auto; right: auto; left: 0px";
8961
+ } else {
8962
+ $datepicker.style.cssText += "bottom: " + (this.$container.clientHeight + 10) + "px; top: auto";
8963
+ }
8964
+ $datepicker.classList.remove('datepicker-hide');
8965
+ }
8966
+ };
8967
+ /**
8968
+ * 销毁
8969
+ */ _proto.destroy = function destroy() {
8970
+ this.hide();
8971
+ this._date = undefined;
8972
+ window.$(this.$container).datepicker('destroy');
8973
+ // AppendJS.remove([
8974
+ // `${this.options.staticPath}/rec/jquery.min.js`,
8975
+ // `${this.options.staticPath}/rec/datepicker.min.css`,
8976
+ // `${this.options.staticPath}/rec/datepicker.js`,
8977
+ // `${this.options.staticPath}/rec/datepicker.zh-CN.js`,
8978
+ // `${this.options.staticPath}/rec/datepicker.en-US.js`,
8979
+ // ]);
8980
+ };
8981
+ _create_class(DatePicker, [
8982
+ {
8983
+ key: "date",
8984
+ get: /**
8985
+ * 获取日期
8986
+ */ function get() {
8987
+ return this._date;
8988
+ }
8989
+ }
8990
+ ]);
8991
+ return DatePicker;
8992
+ }();
8993
+
8994
+ dist = DatePicker;
8995
+ return dist;
8996
+ }
8997
+
8998
+ var distExports = requireDist();
8999
+ var DatePickerUtil = /*@__PURE__*/getDefaultExportFromCjs(distExports);
9000
+
9001
+ /**
9002
+ * @description 时间操作
9003
+ */ var DateTime = /*#__PURE__*/ function() {
9004
+ function DateTime() {}
9005
+ /**
9006
+ * @description 时间格式化
9007
+ * @param {Date | number | string} date
9008
+ * @param {string} formatType 格式 'YYYY-MM-DD hh:mm:ss' 或 'YYYYMMDDhhmmss' 或 'YYYY/MM/DD hh:mm:ss' 或 'hh:mm:ss' 或 'YYYYMMDDThhmmssZ'
9009
+ * @param {number} timeZone 时区偏移量 默认 0
9010
+ */ DateTime.formate = function formate(date, formatType, timeZone) {
9011
+ if (timeZone === void 0) timeZone = 0;
9012
+ var dateTime = date;
9013
+ if (typeof date === 'string') {
9014
+ dateTime = DateTime.strToDate(date);
9015
+ } else if (typeof date === 'number') {
9016
+ dateTime = new Date(date);
9017
+ }
9018
+ dateTime = new Date(dateTime.getTime() - timeZone * 3600 * 1000);
9019
+ var year = dateTime.getFullYear();
9020
+ var month = String(dateTime.getMonth() + 1).padStart(2, '0');
9021
+ var day = String(dateTime.getDate()).padStart(2, '0');
9022
+ var hours = String(dateTime.getHours()).padStart(2, '0');
9023
+ var minutes = String(dateTime.getMinutes()).padStart(2, '0');
9024
+ var seconds = String(dateTime.getSeconds()).padStart(2, '0');
9025
+ switch(formatType){
9026
+ case 'YYYY-MM-DD hh:mm:ss':
9027
+ return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
9028
+ case 'YYYYMMDDhhmmss':
9029
+ return "" + year + month + day + hours + minutes + seconds;
9030
+ case 'YYYY/MM/DD hh:mm:ss':
9031
+ return year + "/" + month + "/" + day + " " + hours + ":" + minutes + ":" + seconds;
9032
+ case 'YYYYMMDDThhmmssZ':
9033
+ return "" + year + month + day + "T" + hours + minutes + seconds + "Z";
9034
+ case 'YYYY/MM/DD':
9035
+ return year + "/" + month + "/" + day;
9036
+ case 'YYYYMMDD':
9037
+ return "" + year + month + day;
9038
+ case 'YYYY-MM-DD':
9039
+ return year + "-" + month + "-" + day;
9040
+ case 'YYYY':
9041
+ return "" + year;
9042
+ case 'MM':
9043
+ return "" + month;
9044
+ case 'DD':
9045
+ return "" + day;
9046
+ case 'hh:mm:ss':
9047
+ return hours + ":" + minutes + ":" + seconds;
9048
+ case 'hh':
9049
+ return "" + hours;
9050
+ case 'mm':
9051
+ return "" + minutes;
9052
+ case 'ss':
9053
+ return "" + seconds;
9054
+ default:
9055
+ throw new Error('Unsupported format type');
9056
+ }
9057
+ };
9058
+ /**
9059
+ * @description 对比两个时间的差值
9060
+ * @param {Date | string | number} date1
9061
+ * @param {Date | string | number} date2
9062
+ * @param {"year" | "month" | "day" | "hour" | "minute" | "second"} diffType
9063
+ */ DateTime.diff = function diff(date1, date2, diffType) {
9064
+ /** @type {Date} */ var dateTime1 = date1;
9065
+ if (typeof date1 === 'string') {
9066
+ dateTime1 = DateTime.strToDate(date1);
9067
+ } else if (typeof date1 === 'number') {
9068
+ dateTime1 = new Date(date1);
9069
+ }
9070
+ /** @type {Date} */ var dateTime2 = date2;
9071
+ if (typeof date2 === 'string') {
9072
+ dateTime1 = DateTime.strToDate(date2);
9073
+ } else if (typeof date2 === 'number') {
9074
+ dateTime1 = new Date(date2);
9075
+ }
9076
+ var diffSecond = dateTime1.getTime() - dateTime2.getTime();
9077
+ // diff
9078
+ switch(diffType){
9079
+ case 'year':
9080
+ return dateTime1.getFullYear() - dateTime2.getFullYear();
9081
+ case 'month':
9082
+ // 计算总月份差
9083
+ // eslint-disable-next-line no-case-declarations
9084
+ var months = (dateTime1.getFullYear() - dateTime2.getFullYear()) * 12 + (dateTime1.getMonth() - dateTime2.getMonth());
9085
+ // 如果结束日的日期小于开始日的日期,则减去一个月
9086
+ if (dateTime1.getDate() < dateTime2.getDate()) {
9087
+ months--;
9088
+ }
9089
+ return months;
9090
+ case 'day':
9091
+ return diffSecond / 60 / 60 / 24;
9092
+ case 'hour':
9093
+ return diffSecond / 60 / 60;
9094
+ case 'minute':
9095
+ return diffSecond / 60;
9096
+ case 'second':
9097
+ return diffSecond;
9098
+ default:
9099
+ throw new Error('Unsupported diff type');
9100
+ }
9101
+ };
9102
+ DateTime.now = function now() {
9103
+ return Date.now();
9104
+ };
9105
+ /**
9106
+ *
9107
+ * @param {string} str 日期, 2025-04-10 10:10:10 或 2025/04/10 10:10:10 或 20250410101010 或 20250410T101010Z 或 秒 或 毫秒
9108
+ * @example
9109
+ * DateTime.strToDate("2025/04/10 10:10:10") // Date
9110
+ * DateTime.strToDate("2025-04-10 10:10:10") // Date
9111
+ * DateTime.strToDate("20250410101010") // Date
9112
+ * DateTime.strToDate("20250410T101010Z") // Date
9113
+ */ DateTime.strToDate = function strToDate(str) {
9114
+ var time = (str + '').replace(/-/gi, '').replace(/:/gi, '').replace(/\//gi, '').replace(/ /gi, '').replace(/T|Z/gi, '');
9115
+ // 兼容
9116
+ if ((str + '').length === 10) {
9117
+ // 时间戳 秒
9118
+ return new Date(+str);
9119
+ } else if ((str + '').length === 13) {
9120
+ // 时间戳 毫秒
9121
+ return new Date(+str);
9122
+ }
9123
+ var year = time.slice(0, 4);
9124
+ var month = time.slice(4, 6);
9125
+ var day = time.slice(6, 8);
9126
+ var hour = time.slice(8, 10);
9127
+ var minute = time.slice(10, 12);
9128
+ var second = time.slice(12, 14);
9129
+ return new Date(year + '/' + month + '/' + day + ' ' + hour + ':' + minute + ':' + second);
9130
+ };
9131
+ /**
9132
+ * @description 补充十位
9133
+ * @param {number} num
9134
+ * @returns {string}
9135
+ * @example
9136
+ * DateTime.padStart(1) // "01"
9137
+ * DateTime.padStart(33) // "33"
9138
+ */ DateTime.padStart = function padStart(num) {
9139
+ if (num < 10) {
9140
+ return '0' + num;
9141
+ } else {
9142
+ return num + '';
9143
+ }
9144
+ };
9145
+ return DateTime;
9146
+ }();
9147
+
8601
9148
  function _extends$5() {
8602
9149
  _extends$5 = Object.assign || function(target) {
8603
9150
  for(var i = 1; i < arguments.length; i++){
@@ -8640,29 +9187,20 @@ function _set_prototype_of$6(o, p) {
8640
9187
  function DatePickerControl(options) {
8641
9188
  var _this;
8642
9189
  var _this_options_props_urlInfo_searchParams, _this_options_props_urlInfo, _this_options_props;
8643
- _this = Control.call(this, _extends$5({
8644
- maxDate: new Date()
8645
- }, options, {
9190
+ _this = Control.call(this, _extends$5({}, options, {
8646
9191
  tagName: 'span',
8647
9192
  controlType: 'button',
8648
9193
  classNameSuffix: 'date'
8649
9194
  })) || this;
8650
9195
  _this.options = options;
8651
- _this._value = DateTime.format(((_this_options_props = _this.options.props) == null ? void 0 : (_this_options_props_urlInfo = _this_options_props.urlInfo) == null ? void 0 : (_this_options_props_urlInfo_searchParams = _this_options_props_urlInfo.searchParams) == null ? void 0 : _this_options_props_urlInfo_searchParams.begin) || new Date(), 'YYYY-MM-DD');
9196
+ _this._value = DateTime.formate(((_this_options_props = _this.options.props) == null ? void 0 : (_this_options_props_urlInfo = _this_options_props.urlInfo) == null ? void 0 : (_this_options_props_urlInfo_searchParams = _this_options_props_urlInfo.searchParams) == null ? void 0 : _this_options_props_urlInfo_searchParams.begin) || new Date(), 'YYYY-MM-DD');
8652
9197
  _this._render();
8653
- // 日期上的点
8654
- _this.on(EVENTS.control.dateMonthChange, function(dates) {
8655
- var _this_datePicker_updateBadges, _this_datePicker;
8656
- (_this_datePicker = _this.datePicker) == null ? void 0 : (_this_datePicker_updateBadges = _this_datePicker.updateBadges) == null ? void 0 : _this_datePicker_updateBadges.call(_this_datePicker, dates);
8657
- });
8658
9198
  return _this;
8659
9199
  }
8660
9200
  var _proto = DatePickerControl.prototype;
8661
9201
  _proto._render = function _render() {
8662
9202
  var _this = this;
8663
- var _this_options_props;
8664
- var isMobile1 = isMobile();
8665
- if (isMobile1) {
9203
+ if (isMobile()) {
8666
9204
  var _this_locale;
8667
9205
  this.$container.innerHTML = '\n <span class="' + PREFIX_CLASS + '-mobile-date-filter" title="' + (((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_CALENDAR) || '') + '">\n <span class="' + PREFIX_CLASS + '-mobile-date-filter-value">' + this._getDateStr() + "</span>\n " + IconComponents.filter() + "\n <span>";
8668
9206
  } else {
@@ -8671,45 +9209,25 @@ function _set_prototype_of$6(o, p) {
8671
9209
  title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_CALENDAR
8672
9210
  });
8673
9211
  }
8674
- this.datePicker = new DatePicker(this.$container, {
8675
- isMobile: isMobile1,
8676
- getPopupContainer: function() {
8677
- return _this.$container;
8678
- },
8679
- mode: 'date',
8680
- offset: [
8681
- 0,
8682
- -10
8683
- ],
8684
- badges: ((_this_options_props = this.options.props) == null ? void 0 : _this_options_props.recMonth) || [],
8685
- language: this.options.language === 'zh' ? 'zh' : 'en',
9212
+ this.dataPickerUtil = new DatePickerUtil(this.$container, {
9213
+ staticPath: this.options.staticPath,
9214
+ language: this.options.language === 'zh' ? 'zh-CN' : 'en-US',
8686
9215
  current: new Date(this._value + ' 00:00:00'),
8687
- placement: 'tr',
8688
- triggerClose: true,
8689
- disabledDate: function(date) {
8690
- return date.getTime() > (_this.options.maxDate || new Date()).getTime();
8691
- },
8692
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
8693
- onOk: function(date, _mode) {
8694
- if (date && _this._value !== DateTime.format(date, 'YYYY-MM-DD') && isMobile1) {
8695
- _this._value = DateTime.format(date, 'YYYY-MM-DD');
8696
- _this.options.onOk == null ? void 0 : _this.options.onOk.call(_this.options, date);
9216
+ maxDate: this.options.maxDate || new Date(),
9217
+ place: isMobile() ? 'bottom-left' : 'top-right',
9218
+ onChange: function(date) {
9219
+ if (date && _this._value !== DateTime.formate(date, 'YYYY-MM-DD')) {
9220
+ _this._value = DateTime.formate(date, 'YYYY-MM-DD');
9221
+ _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, date);
8697
9222
  _this.emit(EVENTS.control.dateChange, date);
8698
9223
  if (date && _this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
8699
9224
  _this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value").innerHTML = _this._getDateStr();
8700
9225
  }
8701
9226
  }
8702
9227
  },
8703
- onChange: function(date, mode) {
8704
- if (date && _this._value !== DateTime.format(date, 'YYYY-MM-DD') && !isMobile1 && mode === 'date') {
8705
- _this._value = DateTime.format(date, 'YYYY-MM-DD');
8706
- _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, date);
8707
- _this.emit(EVENTS.control.dateChange, date);
8708
- }
8709
- },
8710
- onOpenChange: function(open) {
8711
- _this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, _this.datePicker.current);
8712
- _this.emit(EVENTS.control.datePanelOpenChange, open, _this.datePicker.current);
9228
+ onPanelChange: function(open, date) {
9229
+ _this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, date);
9230
+ _this.emit(EVENTS.control.datePanelOpenChange, open, date);
8713
9231
  }
8714
9232
  });
8715
9233
  };
@@ -8719,27 +9237,28 @@ function _set_prototype_of$6(o, p) {
8719
9237
  * @param change 是否触发 onChange 事件
8720
9238
  */ _proto.setDate = function setDate(date, change) {
8721
9239
  if (change === void 0) change = true;
8722
- var _this_datePicker;
8723
- (_this_datePicker = this.datePicker) == null ? void 0 : _this_datePicker.setCurrent(date, change);
8724
- if (date && !change && this._value !== DateTime.format(date, 'YYYY-MM-DD')) {
8725
- this._value = DateTime.format(date, 'YYYY-MM-DD');
9240
+ var _this_dataPickerUtil;
9241
+ (_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.setDate(date, change);
9242
+ if (date && !change && this._value !== DateTime.formate(date, 'YYYY-MM-DD')) {
9243
+ this._value = DateTime.formate(date, 'YYYY-MM-DD');
8726
9244
  if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
8727
9245
  this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value").innerHTML = this._getDateStr();
8728
9246
  }
8729
9247
  }
8730
9248
  };
8731
9249
  _proto.reset = function reset() {
8732
- if (this.datePicker) this.datePicker.open = false;
9250
+ var _this_dataPickerUtil;
9251
+ (_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.hide();
8733
9252
  Control.prototype.reset.call(this);
8734
9253
  };
8735
9254
  /**
8736
9255
  * 销毁控件
8737
9256
  * @override
8738
9257
  */ _proto.destroy = function destroy() {
8739
- if (this.datePicker) {
8740
- this.datePicker.destroy();
9258
+ if (this.dataPickerUtil) {
9259
+ this.dataPickerUtil.destroy();
8741
9260
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8742
- this.datePicker = null;
9261
+ this.dataPickerUtil = null;
8743
9262
  }
8744
9263
  Control.prototype.destroy.call(this);
8745
9264
  };
@@ -8749,7 +9268,6 @@ function _set_prototype_of$6(o, p) {
8749
9268
  };
8750
9269
  /**
8751
9270
  * 点击 Control 会触发
8752
- * @overload super._onControlClick(e: Event)
8753
9271
  */ _proto._onControlClick = function _onControlClick(e) {
8754
9272
  Control.prototype._onControlClick.call(this, e);
8755
9273
  };
@@ -9822,7 +10340,8 @@ var _renderDatePicker = function(theme, container, props) {
9822
10340
  return container;
9823
10341
  },
9824
10342
  language: theme.options.language,
9825
- locales: theme.i18n.translations
10343
+ locales: theme.i18n.translations,
10344
+ staticPath: theme.options.staticPath
9826
10345
  }, ((_theme_options = theme.options) == null ? void 0 : _theme_options["dateOptions"]) || {}, {
9827
10346
  props: props
9828
10347
  }));
@@ -10121,18 +10640,7 @@ var THEME_DEFAULT_OPTIONS = {
10121
10640
  */ _this._footerMoreControl = null, /** 头部控件 @since 0.0.1 @private */ _this._header = null, /** 低部控件 @since 0.0.1 @private */ _this._footer = null, /** 回放底部时间轴 @since 0.0.1 @private */ _this._recFooter = null, /**
10122
10641
  * 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
10123
10642
  * @private
10124
- */ _this._mobileExtend = null, /** @since 0.0.1 @private */ _this._interactiveResult = null, /** @since 0.0.1 @private */ _this._themeData = null, _this._fullscreen = null, _this.zoomUtil = null, /** 清除屏幕旋转 */ _this._cleanupOrientation = null, /** resizeObserver 监听销毁 */ _this._cleanUpResizeObserver = null, /** 容器的宽 */ _this._width = 0, /** 容器的高 */ _this._height = 0, /** 当前容器的全屏状态 true: 全屏, false: 非全屏 */ _this._isCurrentFullscreen = false, /** 屏幕旋转角度 0 | 90 | 180 | 270 */ _this._orientationAngle = 0, /** 是否播放中 @private */ _this._playing = false, /** 加载中 */ _this._loading = false, /** 音量 */ _this._volume = 0, /** 静音 */ _this._muted = false, /** 电子放大倍数 @private */ _this._zoom = 1, /** 放大中 true: 可缩放状态,false: 禁止缩放状态(不能缩放) @private */ _this._zooming = false, /** 录制中 @private */ _this._recording = false, /** 对讲中 @private */ _this._talking = false, /** 倍速 @private */ _this._speed = 1, /** 自定清晰度 @private */ _this._videoLevelAuto = false, /** 清晰度列表 */ _this.videoLevelList = [], /** 回放片段列表 */ _this.recordList = [], /** 窗口尺寸变化时,设置窗口超出隐藏,防止出现滚动条 */ _this._resizeOverflowTimer = null, // /**
10125
- // * 记录回放的月份
10126
- // *
10127
- // * key: {序列号}_{通道号}_{rec | cloud | cloudRecord} 比如:BC7799091_1_rec BC7799091_1_cloud BC7799091_1_cloudRecord
10128
- // *
10129
- // * value: 月份列表 比如 ["2025-12-01", "2025-12-02"]
10130
- // * @private
10131
- // */
10132
- // _recMonthObj: Record<string, string[]> = {};
10133
- /**
10134
- * 录像回放的月份列表 @private
10135
- */ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, /** 播放地址信息 */ _this.urlInfo = null, _this.scaleMode = 0;
10643
+ */ _this._mobileExtend = null, /** @since 0.0.1 @private */ _this._interactiveResult = null, /** @since 0.0.1 @private */ _this._themeData = null, _this._fullscreen = null, _this.zoomUtil = null, /** 清除屏幕旋转 */ _this._cleanupOrientation = null, /** resizeObserver 监听销毁 */ _this._cleanUpResizeObserver = null, /** 容器的宽 */ _this._width = 0, /** 容器的高 */ _this._height = 0, /** 当前容器的全屏状态 true: 全屏, false: 非全屏 */ _this._isCurrentFullscreen = false, /** 屏幕旋转角度 0 | 90 | 180 | 270 */ _this._orientationAngle = 0, /** 是否播放中 @private */ _this._playing = false, /** 加载中 */ _this._loading = false, /** 音量 */ _this._volume = 0, /** 静音 */ _this._muted = false, /** 电子放大倍数 @private */ _this._zoom = 1, /** 放大中 true: 可缩放状态,false: 禁止缩放状态(不能缩放) @private */ _this._zooming = false, /** 录制中 @private */ _this._recording = false, /** 对讲中 @private */ _this._talking = false, /** 倍速 @private */ _this._speed = 1, /** 自定清晰度 @private */ _this._videoLevelAuto = false, /** 清晰度列表 */ _this.videoLevelList = [], /** 回放片段列表 */ _this.recordList = [], /** 窗口尺寸变化时,设置窗口超出隐藏,防止出现滚动条 */ _this._resizeOverflowTimer = null, /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, /** 播放地址信息 */ _this.urlInfo = null, _this.scaleMode = 0;
10136
10644
  _this._initOptions(options);
10137
10645
  if (_this.options.type === 'ezopen') {
10138
10646
  var _this_urlInfo_searchParams, _this_urlInfo;
@@ -10142,7 +10650,7 @@ var THEME_DEFAULT_OPTIONS = {
10142
10650
  }
10143
10651
  if (_this.urlInfo.type === 'rec') {
10144
10652
  var _this_urlInfo_searchParams1, _this_urlInfo1, _this_urlInfo_searchParams2, _this_urlInfo2;
10145
- _this._seekDate = ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.begin) ? DateTime.toDate((_this_urlInfo2 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams2 = _this_urlInfo2.searchParams) == null ? void 0 : _this_urlInfo_searchParams2.begin) : DateTime.toDate(DateTime.format(new Date(), 'YYYY/MM/DD') + ' 00:00:00');
10653
+ _this._seekDate = ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.begin) ? DateTime.strToDate((_this_urlInfo2 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams2 = _this_urlInfo2.searchParams) == null ? void 0 : _this_urlInfo_searchParams2.begin) : DateTime.strToDate(DateTime.formate(new Date(), 'YYYY/MM/DD') + ' 00:00:00');
10146
10654
  }
10147
10655
  }
10148
10656
  _this._getRecType(_this.options.url);
@@ -11354,6 +11862,6 @@ var THEME_DEFAULT_OPTIONS = {
11354
11862
  zh: zh,
11355
11863
  en: en
11356
11864
  };
11357
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.2';
11865
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.4';
11358
11866
 
11359
11867
  export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };