@ezuikit/player-theme 3.1.0-beta.2 → 3.1.0-beta.3

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.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v3.1.0-beta.2
3
- * Copyright (c) 2026-06-26 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v3.1.0-beta.3
3
+ * Copyright (c) 2026-07-03 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  (function (global, factory) {
@@ -15,13 +15,13 @@
15
15
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
16
16
  }
17
17
 
18
- var eventemitter3 = {exports: {}};
18
+ var eventemitter3$1 = {exports: {}};
19
19
 
20
- var hasRequiredEventemitter3;
20
+ var hasRequiredEventemitter3$1;
21
21
 
22
- function requireEventemitter3 () {
23
- if (hasRequiredEventemitter3) return eventemitter3.exports;
24
- hasRequiredEventemitter3 = 1;
22
+ function requireEventemitter3$1 () {
23
+ if (hasRequiredEventemitter3$1) return eventemitter3$1.exports;
24
+ hasRequiredEventemitter3$1 = 1;
25
25
  (function (module) {
26
26
 
27
27
  var has = Object.prototype.hasOwnProperty
@@ -358,12 +358,12 @@
358
358
  {
359
359
  module.exports = EventEmitter;
360
360
  }
361
- } (eventemitter3));
362
- return eventemitter3.exports;
361
+ } (eventemitter3$1));
362
+ return eventemitter3$1.exports;
363
363
  }
364
364
 
365
- var eventemitter3Exports = requireEventemitter3();
366
- var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
365
+ var eventemitter3Exports$1 = requireEventemitter3$1();
366
+ var EventEmitter$1 = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports$1);
367
367
 
368
368
  /**
369
369
  * 播放器的类名前缀
@@ -460,7 +460,7 @@
460
460
  * ```
461
461
  *
462
462
  */ // 事件命名不要超过两层
463
- var EVENTS = {
463
+ var EVENTS$2 = {
464
464
  loading: 'loading',
465
465
  /** 播放 */ play: 'play',
466
466
  /** 截图 */ capturePicture: 'capturePicture',
@@ -493,6 +493,7 @@
493
493
  /** AI对话框状态变化 */ aichatChange: 'aichatChange',
494
494
  /** 直播模式切换 */ liveChange: 'liveChange',
495
495
  /** 回放下拉选择变化 */ recDropdownChange: 'recDropdownChange',
496
+ /** 录像列表面板状态变化 */ recListChange: 'recListChange',
496
497
  /** 告警消息面板状态变化 */ alarmMessageChange: 'alarmMessageChange',
497
498
  /** 动态切换日志配置 */ setLoggerOptions: 'setLoggerOptions',
498
499
  records: 'records',
@@ -545,6 +546,9 @@
545
546
  /** 直播控件销毁 */ liveDestroy: 'Control.liveDestroy',
546
547
  /** 回放下拉选择变化 */ recDropdownChange: 'Control.recDropdownChange',
547
548
  /** 回放下拉控件销毁 */ recDropdownDestroy: 'Control.recDropdownDestroy',
549
+ /** 录像列表面板状态变化 */ recListChange: 'Control.recListChange',
550
+ recListCardClick: 'Control.recListCardClick',
551
+ /** 录像列表控件销毁 */ recListDestroy: 'Control.recListDestroy',
548
552
  /** 告警消息面板开关 */ alarmMessageChange: 'Control.alarmMessageChange',
549
553
  /** 告警消息面板销毁 */ alarmMessageDestroy: 'Control.alarmMessageDestroy',
550
554
  /** 缩放比例改变 */ zoomChange: 'Control.zoomChange',
@@ -596,11 +600,11 @@
596
600
  Object.defineProperty(target, descriptor.key, descriptor);
597
601
  }
598
602
  }
599
- function _create_class$h(Constructor, protoProps, staticProps) {
603
+ function _create_class$k(Constructor, protoProps, staticProps) {
600
604
  if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
601
605
  return Constructor;
602
606
  }
603
- function _inherits$x(subClass, superClass) {
607
+ function _inherits$y(subClass, superClass) {
604
608
  if (typeof superClass !== "function" && superClass !== null) {
605
609
  throw new TypeError("Super expression must either be null or a function");
606
610
  }
@@ -611,14 +615,14 @@
611
615
  configurable: true
612
616
  }
613
617
  });
614
- if (superClass) _set_prototype_of$A(subClass, superClass);
618
+ if (superClass) _set_prototype_of$C(subClass, superClass);
615
619
  }
616
- function _set_prototype_of$A(o, p) {
617
- _set_prototype_of$A = Object.setPrototypeOf || function setPrototypeOf(o, p) {
620
+ function _set_prototype_of$C(o, p) {
621
+ _set_prototype_of$C = Object.setPrototypeOf || function setPrototypeOf(o, p) {
618
622
  o.__proto__ = p;
619
623
  return o;
620
624
  };
621
- return _set_prototype_of$A(o, p);
625
+ return _set_prototype_of$C(o, p);
622
626
  }
623
627
  /**
624
628
  * 控件基类
@@ -632,7 +636,7 @@
632
636
  * const myControl = new MyControl({})
633
637
  * ```
634
638
  */ var Control = /*#__PURE__*/ function(EventEmitter) {
635
- _inherits$x(Control, EventEmitter);
639
+ _inherits$y(Control, EventEmitter);
636
640
  function Control(options) {
637
641
  var _this;
638
642
  var _this___options;
@@ -774,7 +778,7 @@
774
778
  // 这是一个空函数, 子类可以实现重新改方法
775
779
  this.__options.onClick == null ? void 0 : this.__options.onClick.call(this.__options, e);
776
780
  };
777
- _create_class$h(Control, [
781
+ _create_class$k(Control, [
778
782
  {
779
783
  key: "active",
780
784
  get: /**
@@ -805,10 +809,10 @@
805
809
  }
806
810
  ]);
807
811
  return Control;
808
- }(EventEmitter);
812
+ }(EventEmitter$1);
809
813
 
810
- function _extends$y() {
811
- _extends$y = Object.assign || function(target) {
814
+ function _extends$A() {
815
+ _extends$A = Object.assign || function(target) {
812
816
  for(var i = 1; i < arguments.length; i++){
813
817
  var source = arguments[i];
814
818
  for(var key in source){
@@ -819,9 +823,9 @@
819
823
  }
820
824
  return target;
821
825
  };
822
- return _extends$y.apply(this, arguments);
826
+ return _extends$A.apply(this, arguments);
823
827
  }
824
- function _inherits$w(subClass, superClass) {
828
+ function _inherits$x(subClass, superClass) {
825
829
  if (typeof superClass !== "function" && superClass !== null) {
826
830
  throw new TypeError("Super expression must either be null or a function");
827
831
  }
@@ -832,25 +836,25 @@
832
836
  configurable: true
833
837
  }
834
838
  });
835
- if (superClass) _set_prototype_of$z(subClass, superClass);
839
+ if (superClass) _set_prototype_of$B(subClass, superClass);
836
840
  }
837
- function _set_prototype_of$z(o, p) {
838
- _set_prototype_of$z = Object.setPrototypeOf || function setPrototypeOf(o, p) {
841
+ function _set_prototype_of$B(o, p) {
842
+ _set_prototype_of$B = Object.setPrototypeOf || function setPrototypeOf(o, p) {
839
843
  o.__proto__ = p;
840
844
  return o;
841
845
  };
842
- return _set_prototype_of$z(o, p);
846
+ return _set_prototype_of$B(o, p);
843
847
  }
844
848
  var LOADING_DEFAULT_OPTIONS = {};
845
849
  /**
846
850
  * 加载动画控件
847
851
  * @category Control
848
852
  */ var Loading = /*#__PURE__*/ function(Control) {
849
- _inherits$w(Loading, Control);
853
+ _inherits$x(Loading, Control);
850
854
  function Loading(options) {
851
855
  if (options === void 0) options = {};
852
856
  var _this;
853
- _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$y({}, options, {
857
+ _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$A({}, options, {
854
858
  tagName: 'div',
855
859
  controlType: 'block',
856
860
  classNameSuffix: 'loading'
@@ -888,8 +892,8 @@
888
892
  return Loading;
889
893
  }(Control);
890
894
 
891
- function _extends$x() {
892
- _extends$x = Object.assign || function(target) {
895
+ function _extends$z() {
896
+ _extends$z = Object.assign || function(target) {
893
897
  for(var i = 1; i < arguments.length; i++){
894
898
  var source = arguments[i];
895
899
  for(var key in source){
@@ -900,9 +904,9 @@
900
904
  }
901
905
  return target;
902
906
  };
903
- return _extends$x.apply(this, arguments);
907
+ return _extends$z.apply(this, arguments);
904
908
  }
905
- function _inherits$v(subClass, superClass) {
909
+ function _inherits$w(subClass, superClass) {
906
910
  if (typeof superClass !== "function" && superClass !== null) {
907
911
  throw new TypeError("Super expression must either be null or a function");
908
912
  }
@@ -913,14 +917,14 @@
913
917
  configurable: true
914
918
  }
915
919
  });
916
- if (superClass) _set_prototype_of$y(subClass, superClass);
920
+ if (superClass) _set_prototype_of$A(subClass, superClass);
917
921
  }
918
- function _set_prototype_of$y(o, p) {
919
- _set_prototype_of$y = Object.setPrototypeOf || function setPrototypeOf(o, p) {
922
+ function _set_prototype_of$A(o, p) {
923
+ _set_prototype_of$A = Object.setPrototypeOf || function setPrototypeOf(o, p) {
920
924
  o.__proto__ = p;
921
925
  return o;
922
926
  };
923
- return _set_prototype_of$y(o, p);
927
+ return _set_prototype_of$A(o, p);
924
928
  }
925
929
  // 不放在服务器上 是因为有可能http加载失败
926
930
  // prettier-ignore
@@ -932,11 +936,11 @@
932
936
  * 封面控件
933
937
  * @category Control
934
938
  */ var Poster = /*#__PURE__*/ function(Control) {
935
- _inherits$v(Poster, Control);
939
+ _inherits$w(Poster, Control);
936
940
  function Poster(options) {
937
941
  if (options === void 0) options = {};
938
942
  var _this;
939
- _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$x({}, options, {
943
+ _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$z({}, options, {
940
944
  tagName: 'div',
941
945
  controlType: 'block',
942
946
  classNameSuffix: 'poster'
@@ -1043,10 +1047,11 @@
1043
1047
  date: '<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="date">\n <g>\n <path d="m13.35,5.9c-0.3,0 -0.5,-0.2 -0.5,-0.5l0,-3.3c0,-0.3 0.2,-0.5 0.5,-0.5s0.5,0.2 0.5,0.5l0,3.3c0,0.3 -0.3,0.5 -0.5,0.5z" />\n <path d="m6.65,5.9c-0.3,0 -0.5,-0.2 -0.5,-0.5l0,-3.3c0,-0.3 0.2,-0.5 0.5,-0.5s0.5,0.2 0.5,0.5l0,3.3c0,0.3 -0.2,0.5 -0.5,0.5z" />\n <path d="m17.45,8.4l-15,0c-0.3,0 -0.5,-0.2 -0.5,-0.5s0.2,-0.5 0.5,-0.5l15,0c0.3,0 0.5,0.2 0.5,0.5s-0.2,0.5 -0.5,0.5z" />\n <path d="m15.85,18.4l-11.7,0c-1.2,0 -2.2,-1 -2.2,-2.2l0,-10.8c0,-1.2 1,-2.2 2.2,-2.2l11.7,0c1.2,0 2.2,1 2.2,2.2l0,10.8c-0.1,1.3 -1,2.2 -2.2,2.2zm-11.7,-14.1c-0.6,0 -1.2,0.5 -1.2,1.2l0,10.8c0,0.6 0.5,1.2 1.2,1.2l11.7,0c0.6,0 1.2,-0.5 1.2,-1.2l0,-10.9c0,-0.6 -0.5,-1.2 -1.2,-1.2l-11.7,0l0,0.1z" />\n <path d="m9.95,12c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5s0.3,-0.2 0.5,-0.2l0,0l0,0c0.4,0 0.7,0.3 0.7,0.7s-0.3,0.7 -0.7,0.7z" />\n <path d="m14.15,12c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5c0.1,-0.1 0.3,-0.2 0.5,-0.2c0.4,0 0.7,0.3 0.7,0.7s-0.3,0.7 -0.7,0.7zm0,-1c-0.2,0 -0.3,0.1 -0.3,0.3c0,0.2 0.3,0.4 0.5,0.2c0.1,-0.1 0.1,-0.1 0.1,-0.2c0,-0.2 -0.1,-0.3 -0.3,-0.3z" />\n <path d="m5.85,15.3c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5c0.1,-0.1 0.3,-0.2 0.5,-0.2l0,0l0,0c0.4,0 0.7,0.3 0.7,0.7c0,0.4 -0.3,0.7 -0.7,0.7z" />\n <path d="m9.95,15.3c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5c0.1,-0.1 0.3,-0.2 0.5,-0.2l0,0l0,0c0.4,0 0.7,0.3 0.7,0.7c0.1,0.4 -0.3,0.7 -0.7,0.7z" />\n </g>\n </svg>',
1044
1048
  add: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="add">\n <path d="M10.5859 2.96875L9.41406 2.96875C9.3099 2.96875 9.25781 3.02083 9.25781 3.125L9.25781 9.25781L3.4375 9.25781C3.38542 9.25781 3.34635 9.27083 3.32031 9.29688C3.29427 9.32292 3.28125 9.36198 3.28125 9.41406L3.28125 10.5859C3.28125 10.6901 3.33333 10.7422 3.4375 10.7422L9.25781 10.7422L9.25781 16.875C9.25781 16.9792 9.3099 17.0312 9.41406 17.0312L10.5859 17.0312C10.6901 17.0312 10.7422 16.9792 10.7422 16.875L10.7422 10.7422L16.5625 10.7422C16.6667 10.7422 16.7188 10.6901 16.7188 10.5859L16.7188 9.41406C16.7188 9.3099 16.6667 9.25781 16.5625 9.25781L10.7422 9.25781L10.7422 3.125C10.7422 3.07292 10.7292 3.03385 10.7031 3.00781C10.6771 2.98177 10.638 2.96875 10.5859 2.96875Z" fill-rule="evenodd" /></svg>',
1045
1049
  reduce: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="reduce">\n <path d="M3.4375 9.25781L16.5625 9.25781C16.6667 9.25781 16.7188 9.3099 16.7188 9.41406L16.7188 10.5859C16.7188 10.6901 16.6667 10.7422 16.5625 10.7422L3.4375 10.7422C3.33333 10.7422 3.28125 10.6901 3.28125 10.5859L3.28125 9.41406C3.28125 9.3099 3.33333 9.25781 3.4375 9.25781Z" fill-rule="evenodd" />\n </svg>',
1046
- /** 直播 */ live: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="live">\n <rect width="18" height="13" x="3" y="7" rx="1.6" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M8.26636 4.8L10.466 7" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M15.996 4.8L13.796 7" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M9.8 17L15.4 13.354L9.8 10L9.8 17Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>',
1047
- /** 回放 */ recDropdown: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="rec-dropdown">\n <path d="M9.168 2.556C9.168 2.556 12.51 4.445 12 4.445C7.306 4.445 3.5 8.251 3.5 12.945C3.5 17.64 7.306 21.445 12 21.445C16.695 21.445 20.5 17.64 20.5 12.945C20.5 10.622 19.568 8.517 18.058 6.982" stroke-linecap="round" stroke-width="1.5"/>\n <path d="M11.61 9.829L11.61 13.731L16.064 13.731" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>',
1048
- /** 消息/告警 */ alarmMessage: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="alarm-message">\n <path d="M9.708 18.344L9.708 18.709C9.708 19.974 10.734 21 12 21C13.266 21 14.292 19.974 14.292 18.709L14.292 18.343" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M13.833 5.751L13.833 4.833C13.833 3.821 13.013 3 12 3C10.987 3 10.167 3.821 10.167 4.833L10.167 5.751" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M6.563 10.189C6.563 7.686 8.592 5.657 11.094 5.657L12.907 5.657C15.41 5.657 17.438 7.686 17.438 10.189L17.438 12.986C17.438 13.516 17.649 14.025 18.024 14.4L18.665 15.04C19.04 15.416 19.251 15.925 19.251 16.455C19.251 17.499 18.405 18.345 17.361 18.345L6.64 18.345C5.596 18.345 4.75 17.499 4.75 16.455C4.75 15.925 4.961 15.416 5.336 15.04L5.977 14.4C6.352 14.025 6.563 13.516 6.563 12.986L6.563 10.189Z" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>',
1049
- time: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="time">\n <path d="M10 1.66504C14.6026 1.66521 18.333 5.39635 18.333 9.99902C18.3328 14.6015 14.6025 18.3319 10 18.332C5.39733 18.332 1.66619 14.6017 1.66602 9.99902C1.66602 5.39624 5.39722 1.66504 10 1.66504ZM10 2.91504C6.08758 2.91504 2.91602 6.0866 2.91602 9.99902C2.91619 13.9113 6.08769 17.082 10 17.082C13.9122 17.0819 17.0828 13.9112 17.083 9.99902C17.083 6.08671 13.9123 2.91521 10 2.91504ZM10 6.875C10.3451 6.87508 10.625 7.1549 10.625 7.5V9.59863L10.71 9.63672C12.71 10.5481 13.253 10.796 13.6406 10.9727L13.7217 11.0098L13.8008 11.0459C13.8799 11.082 13.9609 11.1179 14.0557 11.1611C14.3697 11.3043 14.5083 11.6752 14.3652 11.9893C14.2221 12.3034 13.8512 12.442 13.5371 12.2988C13.4108 12.2412 13.3093 12.1949 13.2031 12.1465L13.1221 12.1094C12.7068 11.9201 12.1127 11.6495 9.74023 10.5684C9.51771 10.4667 9.375 10.2447 9.375 10V7.5C9.37504 7.15485 9.65485 6.875 10 6.875Z"/>\n </svg>'
1050
+ /** 直播 */ live: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="live">\n <rect width="18" height="13" x="3" y="7" rx="1.6" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M8.26636 4.8L10.466 7" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M15.996 4.8L13.796 7" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M9.8 17L15.4 13.354L9.8 10L9.8 17Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>',
1051
+ /** 回放 */ recDropdown: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="rec-dropdown">\n <path d="M9.168 2.556C9.168 2.556 12.51 4.445 12 4.445C7.306 4.445 3.5 8.251 3.5 12.945C3.5 17.64 7.306 21.445 12 21.445C16.695 21.445 20.5 17.64 20.5 12.945C20.5 10.622 19.568 8.517 18.058 6.982" stroke-linecap="round" stroke-width="1.5"/>\n <path d="M11.61 9.829L11.61 13.731L16.064 13.731" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>',
1052
+ /** 消息/告警 */ alarmMessage: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="alarm-message">\n <path d="M9.708 18.344L9.708 18.709C9.708 19.974 10.734 21 12 21C13.266 21 14.292 19.974 14.292 18.709L14.292 18.343" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M13.833 5.751L13.833 4.833C13.833 3.821 13.013 3 12 3C10.987 3 10.167 3.821 10.167 4.833L10.167 5.751" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M6.563 10.189C6.563 7.686 8.592 5.657 11.094 5.657L12.907 5.657C15.41 5.657 17.438 7.686 17.438 10.189L17.438 12.986C17.438 13.516 17.649 14.025 18.024 14.4L18.665 15.04C19.04 15.416 19.251 15.925 19.251 16.455C19.251 17.499 18.405 18.345 17.361 18.345L6.64 18.345C5.596 18.345 4.75 17.499 4.75 16.455C4.75 15.925 4.961 15.416 5.336 15.04L5.977 14.4C6.352 14.025 6.563 13.516 6.563 12.986L6.563 10.189Z" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>',
1053
+ time: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="time">\n <path d="M10 1.66504C14.6026 1.66521 18.333 5.39635 18.333 9.99902C18.3328 14.6015 14.6025 18.3319 10 18.332C5.39733 18.332 1.66619 14.6017 1.66602 9.99902C1.66602 5.39624 5.39722 1.66504 10 1.66504ZM10 2.91504C6.08758 2.91504 2.91602 6.0866 2.91602 9.99902C2.91619 13.9113 6.08769 17.082 10 17.082C13.9122 17.0819 17.0828 13.9112 17.083 9.99902C17.083 6.08671 13.9123 2.91521 10 2.91504ZM10 6.875C10.3451 6.87508 10.625 7.1549 10.625 7.5V9.59863L10.71 9.63672C12.71 10.5481 13.253 10.796 13.6406 10.9727L13.7217 11.0098L13.8008 11.0459C13.8799 11.082 13.9609 11.1179 14.0557 11.1611C14.3697 11.3043 14.5083 11.6752 14.3652 11.9893C14.2221 12.3034 13.8512 12.442 13.5371 12.2988C13.4108 12.2412 13.3093 12.1949 13.2031 12.1465L13.1221 12.1094C12.7068 11.9201 12.1127 11.6495 9.74023 10.5684C9.51771 10.4667 9.375 10.2447 9.375 10V7.5C9.37504 7.15485 9.65485 6.875 10 6.875Z"/>\n </svg>',
1054
+ list: '<svg stroke="currentColor" fill="none" width="1em" height="1em" viewBox="0 0 24 24" focusable="false" aria-hidden="true" data-icon="list">\n <path d="M10.9995 5H21.0005" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M10.9995 12H21.0005" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M10.9995 19H21.0005" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.99951 5C6.99951 3.896 6.10351 3 4.99951 3C3.89551 3 2.99951 3.896 2.99951 5C2.99951 6.105 3.89551 7 4.99951 7C6.10351 7 6.99951 6.105 6.99951 5V5Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.99951 12C6.99951 10.896 6.10351 10 4.99951 10C3.89551 10 2.99951 10.896 2.99951 12C2.99951 13.105 3.89551 14 4.99951 14C6.10351 14 6.99951 13.105 6.99951 12V12Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.99951 12C6.99951 10.896 6.10351 10 4.99951 10C3.89551 10 2.99951 10.896 2.99951 12C2.99951 13.105 3.89551 14 4.99951 14C6.10351 14 6.99951 13.105 6.99951 12V12Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.99951 19C6.99951 17.896 6.10351 17 4.99951 17C3.89551 17 2.99951 17.896 2.99951 19C2.99951 20.105 3.89551 21 4.99951 21C6.10351 21 6.99951 20.105 6.99951 19V19Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'
1050
1055
  };
1051
1056
 
1052
1057
  /**
@@ -1213,6 +1218,10 @@
1213
1218
  if (attr === void 0) attr = {};
1214
1219
  return createIcon(Icons.recDropdown, 'rec-dropdown', attr);
1215
1220
  },
1221
+ /** 录像列表 */ recList: function(attr) {
1222
+ if (attr === void 0) attr = {};
1223
+ return createIcon(Icons.list, 'rec-list', attr);
1224
+ },
1216
1225
  /** 消息 */ alarmMessage: function(attr) {
1217
1226
  if (attr === void 0) attr = {};
1218
1227
  return createIcon(Icons.alarmMessage, 'alarm-message', attr);
@@ -1223,8 +1232,8 @@
1223
1232
  }
1224
1233
  };
1225
1234
 
1226
- function _extends$w() {
1227
- _extends$w = Object.assign || function(target) {
1235
+ function _extends$y() {
1236
+ _extends$y = Object.assign || function(target) {
1228
1237
  for(var i = 1; i < arguments.length; i++){
1229
1238
  var source = arguments[i];
1230
1239
  for(var key in source){
@@ -1235,9 +1244,9 @@
1235
1244
  }
1236
1245
  return target;
1237
1246
  };
1238
- return _extends$w.apply(this, arguments);
1247
+ return _extends$y.apply(this, arguments);
1239
1248
  }
1240
- function _inherits$u(subClass, superClass) {
1249
+ function _inherits$v(subClass, superClass) {
1241
1250
  if (typeof superClass !== "function" && superClass !== null) {
1242
1251
  throw new TypeError("Super expression must either be null or a function");
1243
1252
  }
@@ -1248,25 +1257,25 @@
1248
1257
  configurable: true
1249
1258
  }
1250
1259
  });
1251
- if (superClass) _set_prototype_of$x(subClass, superClass);
1260
+ if (superClass) _set_prototype_of$z(subClass, superClass);
1252
1261
  }
1253
- function _set_prototype_of$x(o, p) {
1254
- _set_prototype_of$x = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1262
+ function _set_prototype_of$z(o, p) {
1263
+ _set_prototype_of$z = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1255
1264
  o.__proto__ = p;
1256
1265
  return o;
1257
1266
  };
1258
- return _set_prototype_of$x(o, p);
1267
+ return _set_prototype_of$z(o, p);
1259
1268
  }
1260
1269
  var MESSAGE_DEFAULT_OPTIONS = {};
1261
1270
  /**
1262
1271
  * 消息控件
1263
1272
  * @category Control
1264
1273
  */ var Message = /*#__PURE__*/ function(Control) {
1265
- _inherits$u(Message, Control);
1274
+ _inherits$v(Message, Control);
1266
1275
  function Message(options) {
1267
1276
  if (options === void 0) options = {};
1268
1277
  var _this;
1269
- _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$w({}, options, {
1278
+ _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$y({}, options, {
1270
1279
  tagName: 'div',
1271
1280
  controlType: 'block'
1272
1281
  }))) || this, _this._$toast = null;
@@ -1415,12 +1424,12 @@
1415
1424
  Object.defineProperty(target, descriptor.key, descriptor);
1416
1425
  }
1417
1426
  }
1418
- function _create_class$g(Constructor, protoProps, staticProps) {
1427
+ function _create_class$j(Constructor, protoProps, staticProps) {
1419
1428
  if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
1420
1429
  return Constructor;
1421
1430
  }
1422
- function _extends$v() {
1423
- _extends$v = Object.assign || function(target) {
1431
+ function _extends$x() {
1432
+ _extends$x = Object.assign || function(target) {
1424
1433
  for(var i = 1; i < arguments.length; i++){
1425
1434
  var source = arguments[i];
1426
1435
  for(var key in source){
@@ -1431,9 +1440,9 @@
1431
1440
  }
1432
1441
  return target;
1433
1442
  };
1434
- return _extends$v.apply(this, arguments);
1443
+ return _extends$x.apply(this, arguments);
1435
1444
  }
1436
- function _inherits$t(subClass, superClass) {
1445
+ function _inherits$u(subClass, superClass) {
1437
1446
  if (typeof superClass !== "function" && superClass !== null) {
1438
1447
  throw new TypeError("Super expression must either be null or a function");
1439
1448
  }
@@ -1444,30 +1453,30 @@
1444
1453
  configurable: true
1445
1454
  }
1446
1455
  });
1447
- if (superClass) _set_prototype_of$w(subClass, superClass);
1456
+ if (superClass) _set_prototype_of$y(subClass, superClass);
1448
1457
  }
1449
- function _set_prototype_of$w(o, p) {
1450
- _set_prototype_of$w = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1458
+ function _set_prototype_of$y(o, p) {
1459
+ _set_prototype_of$y = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1451
1460
  o.__proto__ = p;
1452
1461
  return o;
1453
1462
  };
1454
- return _set_prototype_of$w(o, p);
1463
+ return _set_prototype_of$y(o, p);
1455
1464
  }
1456
1465
  /**
1457
1466
  * 播放/暂停控件
1458
1467
  * @category Control
1459
1468
  */ var Play = /*#__PURE__*/ function(Control) {
1460
- _inherits$t(Play, Control);
1469
+ _inherits$u(Play, Control);
1461
1470
  function Play(options) {
1462
1471
  var _this;
1463
- _this = Control.call(this, _extends$v({}, options, {
1472
+ _this = Control.call(this, _extends$x({}, options, {
1464
1473
  tagName: 'span',
1465
1474
  controlType: 'button',
1466
1475
  classNameSuffix: 'play'
1467
1476
  })) || this, _this._playing = false;
1468
1477
  _this._options = options;
1469
1478
  _this._playing = !!options.props.playing;
1470
- _this.on(EVENTS.play, function(playing) {
1479
+ _this.on(EVENTS$2.play, function(playing) {
1471
1480
  if (_this._playing !== playing) {
1472
1481
  _this._playing = playing;
1473
1482
  _this._render();
@@ -1481,7 +1490,7 @@
1481
1490
  * 点击 Control 会触发
1482
1491
  */ _proto._onControlClick = function _onControlClick(e) {
1483
1492
  this._playing = !this._playing;
1484
- this.emit(EVENTS.control.play, this._playing);
1493
+ this.emit(EVENTS$2.control.play, this._playing);
1485
1494
  this._options.onClick == null ? void 0 : this._options.onClick.call(this._options, e, this._playing);
1486
1495
  this._render();
1487
1496
  };
@@ -1498,7 +1507,7 @@
1498
1507
  });
1499
1508
  }
1500
1509
  };
1501
- _create_class$g(Play, [
1510
+ _create_class$j(Play, [
1502
1511
  {
1503
1512
  key: "playing",
1504
1513
  get: /**
@@ -2443,20 +2452,20 @@
2443
2452
  };
2444
2453
  }
2445
2454
 
2446
- function _array_like_to_array$2(arr, len) {
2455
+ function _array_like_to_array$3(arr, len) {
2447
2456
  if (len == null || len > arr.length) len = arr.length;
2448
2457
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2449
2458
  return arr2;
2450
2459
  }
2451
2460
  function _unsupported_iterable_to_array$2(o, minLen) {
2452
2461
  if (!o) return;
2453
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
2462
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
2454
2463
  var n = Object.prototype.toString.call(o).slice(8, -1);
2455
2464
  if (n === "Object" && o.constructor) n = o.constructor.name;
2456
2465
  if (n === "Map" || n === "Set") return Array.from(n);
2457
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
2466
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
2458
2467
  }
2459
- function _create_for_of_iterator_helper_loose$2(o, allowArrayLike) {
2468
+ function _create_for_of_iterator_helper_loose$3(o, allowArrayLike) {
2460
2469
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
2461
2470
  if (it) return (it = it.call(o)).next.bind(it);
2462
2471
  if (Array.isArray(o) || (it = _unsupported_iterable_to_array$2(o)) || allowArrayLike) {
@@ -2603,7 +2612,7 @@
2603
2612
  Utils.resizeObserver = function resizeObserver(node, callback) {
2604
2613
  // prettier-ignore
2605
2614
  var observerFn = function(entries, observer) {
2606
- for(var _iterator = _create_for_of_iterator_helper_loose$2(entries), _step; !(_step = _iterator()).done;){
2615
+ for(var _iterator = _create_for_of_iterator_helper_loose$3(entries), _step; !(_step = _iterator()).done;){
2607
2616
  var entry = _step.value;
2608
2617
  if (entry.target === node) {
2609
2618
  if (callback) callback(entries, observer);
@@ -2650,7 +2659,7 @@
2650
2659
  Object.defineProperty(target, descriptor.key, descriptor);
2651
2660
  }
2652
2661
  }
2653
- function _create_class$f(Constructor, protoProps, staticProps) {
2662
+ function _create_class$i(Constructor, protoProps, staticProps) {
2654
2663
  if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
2655
2664
  return Constructor;
2656
2665
  }
@@ -2917,7 +2926,7 @@
2917
2926
  });
2918
2927
  });
2919
2928
  };
2920
- _create_class$f(Progress, [
2929
+ _create_class$i(Progress, [
2921
2930
  {
2922
2931
  key: "disabled",
2923
2932
  get: function get() {
@@ -2974,12 +2983,12 @@
2974
2983
  Object.defineProperty(target, descriptor.key, descriptor);
2975
2984
  }
2976
2985
  }
2977
- function _create_class$e(Constructor, protoProps, staticProps) {
2986
+ function _create_class$h(Constructor, protoProps, staticProps) {
2978
2987
  if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
2979
2988
  return Constructor;
2980
2989
  }
2981
- function _extends$u() {
2982
- _extends$u = Object.assign || function(target) {
2990
+ function _extends$w() {
2991
+ _extends$w = Object.assign || function(target) {
2983
2992
  for(var i = 1; i < arguments.length; i++){
2984
2993
  var source = arguments[i];
2985
2994
  for(var key in source){
@@ -2990,9 +2999,9 @@
2990
2999
  }
2991
3000
  return target;
2992
3001
  };
2993
- return _extends$u.apply(this, arguments);
3002
+ return _extends$w.apply(this, arguments);
2994
3003
  }
2995
- function _inherits$s(subClass, superClass) {
3004
+ function _inherits$t(subClass, superClass) {
2996
3005
  if (typeof superClass !== "function" && superClass !== null) {
2997
3006
  throw new TypeError("Super expression must either be null or a function");
2998
3007
  }
@@ -3003,14 +3012,14 @@
3003
3012
  configurable: true
3004
3013
  }
3005
3014
  });
3006
- if (superClass) _set_prototype_of$v(subClass, superClass);
3015
+ if (superClass) _set_prototype_of$x(subClass, superClass);
3007
3016
  }
3008
- function _set_prototype_of$v(o, p) {
3009
- _set_prototype_of$v = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3017
+ function _set_prototype_of$x(o, p) {
3018
+ _set_prototype_of$x = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3010
3019
  o.__proto__ = p;
3011
3020
  return o;
3012
3021
  };
3013
- return _set_prototype_of$v(o, p);
3022
+ return _set_prototype_of$x(o, p);
3014
3023
  }
3015
3024
  var VOLUME_DEFAULT_OPTIONS = {
3016
3025
  volume: 0.8,
@@ -3024,12 +3033,12 @@
3024
3033
  * 音量调节控件
3025
3034
  * @category Control
3026
3035
  */ var Volume = /*#__PURE__*/ function(Control) {
3027
- _inherits$s(Volume, Control);
3036
+ _inherits$t(Volume, Control);
3028
3037
  function Volume(options) {
3029
3038
  if (options === void 0) options = {};
3030
3039
  var _this;
3031
3040
  var _this__options_props, _this__options_props1, _this__options_props2, _this__options_props3;
3032
- _this = Control.call(this, _extends$u({}, options, {
3041
+ _this = Control.call(this, _extends$w({}, options, {
3033
3042
  tagName: 'span',
3034
3043
  classNameSuffix: 'volume',
3035
3044
  controlType: 'button'
@@ -3060,7 +3069,7 @@
3060
3069
  onOpenChange: function(open) {
3061
3070
  _this._options.onOpenChange == null ? void 0 : _this._options.onOpenChange.call(_this._options, open, _this._muted ? _this._lastVolume : _this.volume, _this._muted);
3062
3071
  // prettier-ignore
3063
- _this.emit(EVENTS.control.volumePanelOpenChange, open, _this._lastVolume, _this._muted);
3072
+ _this.emit(EVENTS$2.control.volumePanelOpenChange, open, _this._lastVolume, _this._muted);
3064
3073
  }
3065
3074
  });
3066
3075
  _this._progress = new Progress({
@@ -3084,11 +3093,11 @@
3084
3093
  }
3085
3094
  _this._updateUI();
3086
3095
  _this._addEventListener();
3087
- _this.on(EVENTS.audioCodecUnsupported, function(flag) {
3096
+ _this.on(EVENTS$2.audioCodecUnsupported, function(flag) {
3088
3097
  flag = flag != null ? flag : true;
3089
3098
  _this.disabled = flag;
3090
3099
  });
3091
- _this.on(EVENTS.volumechange, function(volume, muted) {
3100
+ _this.on(EVENTS$2.volumechange, function(volume, muted) {
3092
3101
  // 接收
3093
3102
  if (_this._muted !== muted) _this.muted = muted;
3094
3103
  if (_this._lastVolume !== volume) _this.volume = volume;
@@ -3170,7 +3179,7 @@
3170
3179
  }
3171
3180
  });
3172
3181
  };
3173
- _create_class$e(Volume, [
3182
+ _create_class$h(Volume, [
3174
3183
  {
3175
3184
  key: "muted",
3176
3185
  get: /**
@@ -3191,7 +3200,7 @@
3191
3200
  }
3192
3201
  this._muted = muted;
3193
3202
  this._options.onChange == null ? void 0 : this._options.onChange.call(this._options, this.volume, muted);
3194
- this.emit(EVENTS.control.volumechange, this.volume, muted);
3203
+ this.emit(EVENTS$2.control.volumechange, this.volume, muted);
3195
3204
  }
3196
3205
  this._updateUI();
3197
3206
  }
@@ -3214,7 +3223,7 @@
3214
3223
  this._progress.value = this._muted ? 0 : _volume;
3215
3224
  }
3216
3225
  this._options.onChange == null ? void 0 : this._options.onChange.call(this._options, _volume, this._muted);
3217
- this.emit(EVENTS.control.volumechange, _volume, this._muted);
3226
+ this.emit(EVENTS$2.control.volumechange, _volume, this._muted);
3218
3227
  }
3219
3228
  this._updateUI();
3220
3229
  }
@@ -3888,8 +3897,8 @@
3888
3897
  return Fullscreen;
3889
3898
  }();
3890
3899
 
3891
- function _extends$t() {
3892
- _extends$t = Object.assign || function(target) {
3900
+ function _extends$v() {
3901
+ _extends$v = Object.assign || function(target) {
3893
3902
  for(var i = 1; i < arguments.length; i++){
3894
3903
  var source = arguments[i];
3895
3904
  for(var key in source){
@@ -3900,9 +3909,9 @@
3900
3909
  }
3901
3910
  return target;
3902
3911
  };
3903
- return _extends$t.apply(this, arguments);
3912
+ return _extends$v.apply(this, arguments);
3904
3913
  }
3905
- function _inherits$r(subClass, superClass) {
3914
+ function _inherits$s(subClass, superClass) {
3906
3915
  if (typeof superClass !== "function" && superClass !== null) {
3907
3916
  throw new TypeError("Super expression must either be null or a function");
3908
3917
  }
@@ -3913,24 +3922,24 @@
3913
3922
  configurable: true
3914
3923
  }
3915
3924
  });
3916
- if (superClass) _set_prototype_of$u(subClass, superClass);
3925
+ if (superClass) _set_prototype_of$w(subClass, superClass);
3917
3926
  }
3918
- function _set_prototype_of$u(o, p) {
3919
- _set_prototype_of$u = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3927
+ function _set_prototype_of$w(o, p) {
3928
+ _set_prototype_of$w = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3920
3929
  o.__proto__ = p;
3921
3930
  return o;
3922
3931
  };
3923
- return _set_prototype_of$u(o, p);
3932
+ return _set_prototype_of$w(o, p);
3924
3933
  }
3925
3934
  /**
3926
3935
  * 全屏控件
3927
3936
  * @category Control
3928
3937
  */ var Fullscreen = /*#__PURE__*/ function(Control) {
3929
- _inherits$r(Fullscreen, Control);
3938
+ _inherits$s(Fullscreen, Control);
3930
3939
  function Fullscreen(options) {
3931
3940
  var _this;
3932
3941
  var _options_props, _this_options;
3933
- _this = Control.call(this, _extends$t({
3942
+ _this = Control.call(this, _extends$v({
3934
3943
  tagName: 'span',
3935
3944
  classNameSuffix: 'fullscreen',
3936
3945
  controlType: 'button'
@@ -3995,8 +4004,8 @@
3995
4004
  return Fullscreen;
3996
4005
  }(Control);
3997
4006
 
3998
- function _extends$s() {
3999
- _extends$s = Object.assign || function(target) {
4007
+ function _extends$u() {
4008
+ _extends$u = Object.assign || function(target) {
4000
4009
  for(var i = 1; i < arguments.length; i++){
4001
4010
  var source = arguments[i];
4002
4011
  for(var key in source){
@@ -4007,9 +4016,9 @@
4007
4016
  }
4008
4017
  return target;
4009
4018
  };
4010
- return _extends$s.apply(this, arguments);
4019
+ return _extends$u.apply(this, arguments);
4011
4020
  }
4012
- function _inherits$q(subClass, superClass) {
4021
+ function _inherits$r(subClass, superClass) {
4013
4022
  if (typeof superClass !== "function" && superClass !== null) {
4014
4023
  throw new TypeError("Super expression must either be null or a function");
4015
4024
  }
@@ -4020,24 +4029,24 @@
4020
4029
  configurable: true
4021
4030
  }
4022
4031
  });
4023
- if (superClass) _set_prototype_of$t(subClass, superClass);
4032
+ if (superClass) _set_prototype_of$v(subClass, superClass);
4024
4033
  }
4025
- function _set_prototype_of$t(o, p) {
4026
- _set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
4034
+ function _set_prototype_of$v(o, p) {
4035
+ _set_prototype_of$v = Object.setPrototypeOf || function setPrototypeOf(o, p) {
4027
4036
  o.__proto__ = p;
4028
4037
  return o;
4029
4038
  };
4030
- return _set_prototype_of$t(o, p);
4039
+ return _set_prototype_of$v(o, p);
4031
4040
  }
4032
4041
  /**
4033
4042
  * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
4034
4043
  * @category Control
4035
4044
  */ var Rec = /*#__PURE__*/ function(Control) {
4036
- _inherits$q(Rec, Control);
4045
+ _inherits$r(Rec, Control);
4037
4046
  function Rec(options) {
4038
4047
  var _this;
4039
4048
  var _options_props;
4040
- _this = Control.call(this, _extends$s({}, options, {
4049
+ _this = Control.call(this, _extends$u({}, options, {
4041
4050
  tagName: 'div',
4042
4051
  controlType: 'block',
4043
4052
  classNameSuffix: 'rec'
@@ -4117,7 +4126,7 @@
4117
4126
  if (_this.recType !== type) {
4118
4127
  _this.recType = type;
4119
4128
  _this._activeIcon(type);
4120
- _this.emit(EVENTS.control.recTypeChange, type);
4129
+ _this.emit(EVENTS$2.control.recTypeChange, type);
4121
4130
  _this._options.onChange == null ? void 0 : _this._options.onChange.call(_this._options, type);
4122
4131
  }
4123
4132
  }
@@ -4445,7 +4454,8 @@
4445
4454
  FETCH_THEME_FAILED: '获取主题模板失败',
4446
4455
  cancel: '取消',
4447
4456
  ok: '确定',
4448
- close: '关闭'
4457
+ close: '关闭',
4458
+ BTN_REC_LIST_TITLE: '录像片段'
4449
4459
  };
4450
4460
 
4451
4461
  // 不要出现多层的的数据, 数据铺平
@@ -4726,7 +4736,8 @@
4726
4736
  FETCH_THEME_FAILED: 'Failed to fetch theme template',
4727
4737
  cancel: 'Cancel',
4728
4738
  ok: 'Ok',
4729
- close: 'Close'
4739
+ close: 'Close',
4740
+ BTN_REC_LIST_TITLE: 'Records'
4730
4741
  };
4731
4742
 
4732
4743
  /**
@@ -4949,6 +4960,11 @@
4949
4960
  defaultActive: 0,
4950
4961
  isrender: 1
4951
4962
  },
4963
+ {
4964
+ iconId: 'recList',
4965
+ part: 'right',
4966
+ isrender: 1
4967
+ },
4952
4968
  {
4953
4969
  iconId: 'alarmMessage',
4954
4970
  part: 'right',
@@ -5353,7 +5369,7 @@
5353
5369
  voice: voice
5354
5370
  };
5355
5371
 
5356
- function _inherits$p(subClass, superClass) {
5372
+ function _inherits$q(subClass, superClass) {
5357
5373
  if (typeof superClass !== "function" && superClass !== null) {
5358
5374
  throw new TypeError("Super expression must either be null or a function");
5359
5375
  }
@@ -5364,20 +5380,20 @@
5364
5380
  configurable: true
5365
5381
  }
5366
5382
  });
5367
- if (superClass) _set_prototype_of$s(subClass, superClass);
5383
+ if (superClass) _set_prototype_of$u(subClass, superClass);
5368
5384
  }
5369
- function _set_prototype_of$s(o, p) {
5370
- _set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5385
+ function _set_prototype_of$u(o, p) {
5386
+ _set_prototype_of$u = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5371
5387
  o.__proto__ = p;
5372
5388
  return o;
5373
5389
  };
5374
- return _set_prototype_of$s(o, p);
5390
+ return _set_prototype_of$u(o, p);
5375
5391
  }
5376
5392
  /**
5377
5393
  * 截图控件
5378
5394
  * @category Content
5379
5395
  */ var Content = /*#__PURE__*/ function(EventEmitter) {
5380
- _inherits$p(Content, EventEmitter);
5396
+ _inherits$q(Content, EventEmitter);
5381
5397
  function Content(options) {
5382
5398
  var _this;
5383
5399
  _this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._cleanUpResizeObserver = null, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
@@ -5395,7 +5411,7 @@
5395
5411
  var $popupContainer = options.getContainer();
5396
5412
  $popupContainer.appendChild(_this.$wrapper);
5397
5413
  }
5398
- _this.on(EVENTS.videoInfo, function(originWidth, originHeight) {
5414
+ _this.on(EVENTS$2.videoInfo, function(originWidth, originHeight) {
5399
5415
  _this.rerender(originWidth, originHeight);
5400
5416
  });
5401
5417
  // prettier-ignore
@@ -5452,7 +5468,7 @@
5452
5468
  scale = wScale > hScale ? wScale : hScale;
5453
5469
  }
5454
5470
  this.$video.style.cssText += "\n width: " + this._originWidth + "px;\n height: " + this._originHeight + "px;\n position: absolute;\n object-fit:" + objectFill + ";\n left: " + left + "px;\n top: " + top + "px;\n transform-origin: 50% 50%;\n transform: scale(" + scale + ");\n ";
5455
- this.emit(EVENTS.control.contentRerender, {
5471
+ this.emit(EVENTS$2.control.contentRerender, {
5456
5472
  scaleMode: this._scaleMode,
5457
5473
  objectFill: objectFill,
5458
5474
  scale: scale,
@@ -5486,14 +5502,14 @@
5486
5502
  (_this_$wrapper = this.$wrapper) == null ? void 0 : _this_$wrapper.remove();
5487
5503
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
5488
5504
  this.$wrapper = null;
5489
- this.emit(EVENTS.control.contentDestroy);
5505
+ this.emit(EVENTS$2.control.contentDestroy);
5490
5506
  this.removeAllListeners();
5491
5507
  };
5492
5508
  return Content;
5493
- }(EventEmitter);
5509
+ }(EventEmitter$1);
5494
5510
 
5495
- function _extends$r() {
5496
- _extends$r = Object.assign || function(target) {
5511
+ function _extends$t() {
5512
+ _extends$t = Object.assign || function(target) {
5497
5513
  for(var i = 1; i < arguments.length; i++){
5498
5514
  var source = arguments[i];
5499
5515
  for(var key in source){
@@ -5504,9 +5520,9 @@
5504
5520
  }
5505
5521
  return target;
5506
5522
  };
5507
- return _extends$r.apply(this, arguments);
5523
+ return _extends$t.apply(this, arguments);
5508
5524
  }
5509
- function _inherits$o(subClass, superClass) {
5525
+ function _inherits$p(subClass, superClass) {
5510
5526
  if (typeof superClass !== "function" && superClass !== null) {
5511
5527
  throw new TypeError("Super expression must either be null or a function");
5512
5528
  }
@@ -5517,23 +5533,23 @@
5517
5533
  configurable: true
5518
5534
  }
5519
5535
  });
5520
- if (superClass) _set_prototype_of$r(subClass, superClass);
5536
+ if (superClass) _set_prototype_of$t(subClass, superClass);
5521
5537
  }
5522
- function _set_prototype_of$r(o, p) {
5523
- _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5538
+ function _set_prototype_of$t(o, p) {
5539
+ _set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5524
5540
  o.__proto__ = p;
5525
5541
  return o;
5526
5542
  };
5527
- return _set_prototype_of$r(o, p);
5543
+ return _set_prototype_of$t(o, p);
5528
5544
  }
5529
5545
  /**
5530
5546
  * 更多控件
5531
5547
  * @category Control
5532
5548
  */ var More = /*#__PURE__*/ function(Control) {
5533
- _inherits$o(More, Control);
5549
+ _inherits$p(More, Control);
5534
5550
  function More(options) {
5535
5551
  var _this;
5536
- _this = Control.call(this, _extends$r({}, options, {
5552
+ _this = Control.call(this, _extends$t({}, options, {
5537
5553
  tagName: 'span',
5538
5554
  controlType: 'button',
5539
5555
  classNameSuffix: 'more'
@@ -5643,14 +5659,14 @@
5643
5659
  * @param theme - Theme
5644
5660
  */ function _themeEventemitter(theme) {
5645
5661
  // prettier-ignore
5646
- theme == null ? void 0 : theme.on(EVENTS.audioCodecUnsupported, function(flag) {
5662
+ theme == null ? void 0 : theme.on(EVENTS$2.audioCodecUnsupported, function(flag) {
5647
5663
  var _theme_controls;
5648
5664
  if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.volumeControl) {
5649
- theme.controls.volumeControl.emit(EVENTS.audioCodecUnsupported, flag);
5665
+ theme.controls.volumeControl.emit(EVENTS$2.audioCodecUnsupported, flag);
5650
5666
  }
5651
5667
  });
5652
5668
  // 处理信息提示 duration 单位秒
5653
- theme == null ? void 0 : theme.on(EVENTS.message, function(message, type, duration) {
5669
+ theme == null ? void 0 : theme.on(EVENTS$2.message, function(message, type, duration) {
5654
5670
  if (/error$/gi.test(type) && [
5655
5671
  'ptzError',
5656
5672
  'talkError',
@@ -5673,33 +5689,33 @@
5673
5689
  (_theme_messageControl3 = theme.messageControl) == null ? void 0 : _theme_messageControl3.info(message, duration);
5674
5690
  }
5675
5691
  });
5676
- theme == null ? void 0 : theme.on(EVENTS.audioInfo, function(info) {
5692
+ theme == null ? void 0 : theme.on(EVENTS$2.audioInfo, function(info) {
5677
5693
  var _theme_controls;
5678
5694
  // audioFormatName 是私有流的字段
5679
5695
  if ((theme == null ? void 0 : (_theme_controls = theme.controls) == null ? void 0 : _theme_controls.volumeControl) && (info.audioFormatName || info.encType)) {
5680
5696
  theme.controls.volumeControl.disabled = false;
5681
5697
  }
5682
5698
  });
5683
- theme == null ? void 0 : theme.on(EVENTS.videoInfo, function(info) {
5699
+ theme == null ? void 0 : theme.on(EVENTS$2.videoInfo, function(info) {
5684
5700
  // 排除流信息回调触发的事件
5685
5701
  if (info) {
5686
5702
  var // rerender 画面
5687
5703
  _theme_contentControl_emit, _theme_contentControl;
5688
- (_theme_contentControl = theme.contentControl) == null ? void 0 : (_theme_contentControl_emit = _theme_contentControl.emit) == null ? void 0 : _theme_contentControl_emit.call(_theme_contentControl, EVENTS.videoInfo, info.width, info.height);
5704
+ (_theme_contentControl = theme.contentControl) == null ? void 0 : (_theme_contentControl_emit = _theme_contentControl.emit) == null ? void 0 : _theme_contentControl_emit.call(_theme_contentControl, EVENTS$2.videoInfo, info.width, info.height);
5689
5705
  }
5690
5706
  });
5691
- theme == null ? void 0 : theme.on(EVENTS.resize, function() {
5707
+ theme == null ? void 0 : theme.on(EVENTS$2.resize, function() {
5692
5708
  var // rerender 画面
5693
5709
  _theme_contentControl_emit, _theme_contentControl;
5694
- (_theme_contentControl = theme.contentControl) == null ? void 0 : (_theme_contentControl_emit = _theme_contentControl.emit) == null ? void 0 : _theme_contentControl_emit.call(_theme_contentControl, EVENTS.resize);
5710
+ (_theme_contentControl = theme.contentControl) == null ? void 0 : (_theme_contentControl_emit = _theme_contentControl.emit) == null ? void 0 : _theme_contentControl_emit.call(_theme_contentControl, EVENTS$2.resize);
5695
5711
  });
5696
5712
  theme == null ? void 0 : theme.on('getDeviceInfo', function(info) {
5697
5713
  });
5698
- theme == null ? void 0 : theme.on(EVENTS.firstFrameDisplay, function() {
5714
+ theme == null ? void 0 : theme.on(EVENTS$2.firstFrameDisplay, function() {
5699
5715
  theme._disabled(false);
5700
5716
  });
5701
5717
  //
5702
- theme == null ? void 0 : theme.on(EVENTS.play, function(playing) {
5718
+ theme == null ? void 0 : theme.on(EVENTS$2.play, function(playing) {
5703
5719
  var _theme_controls;
5704
5720
  if (playing) {
5705
5721
  var _theme_messageControl;
@@ -5716,51 +5732,63 @@
5716
5732
  // =======================================================
5717
5733
  // 对讲
5718
5734
  // =======================================================
5719
- theme.on(EVENTS.talkingChange, function(talking) {
5735
+ theme.on(EVENTS$2.talkingChange, function(talking) {
5720
5736
  var _theme_controls, _theme_controls_talkControl, _theme_controls1;
5721
5737
  theme._talking = talking;
5722
5738
  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)) {
5723
5739
  var _theme_controls_talkControl1, _theme_controls2;
5724
- (_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_talkControl1 = _theme_controls2.talkControl) == null ? void 0 : _theme_controls_talkControl1.emit(EVENTS.talkingChange, talking);
5740
+ (_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_talkControl1 = _theme_controls2.talkControl) == null ? void 0 : _theme_controls_talkControl1.emit(EVENTS$2.talkingChange, talking);
5725
5741
  }
5726
5742
  });
5727
- theme.on(EVENTS.talkVolumeChange, function(value) {
5743
+ theme.on(EVENTS$2.talkVolumeChange, function(value) {
5728
5744
  var _theme_controls_talkControl_emit, _theme_controls_talkControl, _theme_controls;
5729
- (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_talkControl = _theme_controls.talkControl) == null ? void 0 : (_theme_controls_talkControl_emit = _theme_controls_talkControl.emit) == null ? void 0 : _theme_controls_talkControl_emit.call(_theme_controls_talkControl, EVENTS.talkVolumeChange, value);
5745
+ (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_talkControl = _theme_controls.talkControl) == null ? void 0 : (_theme_controls_talkControl_emit = _theme_controls_talkControl.emit) == null ? void 0 : _theme_controls_talkControl_emit.call(_theme_controls_talkControl, EVENTS$2.talkVolumeChange, value);
5730
5746
  });
5731
5747
  // =======================================================
5732
5748
  // 语音广播
5733
5749
  // =======================================================
5734
- theme.on(EVENTS.broadcastChange, function(active) {
5750
+ theme.on(EVENTS$2.broadcastChange, function(active) {
5735
5751
  var _theme_controls, _theme_controls_broadcastControl, _theme_controls1;
5736
5752
  if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.broadcastControl) && active !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_broadcastControl = _theme_controls1.broadcastControl) == null ? void 0 : _theme_controls_broadcastControl.active)) {
5737
5753
  var _theme_controls_broadcastControl1, _theme_controls2;
5738
- (_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_broadcastControl1 = _theme_controls2.broadcastControl) == null ? void 0 : _theme_controls_broadcastControl1.emit(EVENTS.broadcastChange, active);
5754
+ (_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_broadcastControl1 = _theme_controls2.broadcastControl) == null ? void 0 : _theme_controls_broadcastControl1.emit(EVENTS$2.broadcastChange, active);
5739
5755
  }
5740
5756
  });
5741
5757
  // =======================================================
5742
5758
  // AI对话框
5743
5759
  // =======================================================
5744
- theme.on(EVENTS.aichatChange, function(active) {
5760
+ theme.on(EVENTS$2.aichatChange, function(active) {
5745
5761
  var _theme_controls, _theme_controls_aiChatControl, _theme_controls1;
5746
5762
  if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.aiChatControl) && active !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_aiChatControl = _theme_controls1.aiChatControl) == null ? void 0 : _theme_controls_aiChatControl.active)) {
5747
5763
  var _theme_controls_aiChatControl1, _theme_controls2;
5748
- (_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_aiChatControl1 = _theme_controls2.aiChatControl) == null ? void 0 : _theme_controls_aiChatControl1.emit(EVENTS.aichatChange, active);
5764
+ (_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_aiChatControl1 = _theme_controls2.aiChatControl) == null ? void 0 : _theme_controls_aiChatControl1.emit(EVENTS$2.aichatChange, active);
5749
5765
  }
5750
5766
  });
5751
5767
  // =======================================================
5752
5768
  // 告警消息
5753
5769
  // =======================================================
5754
- theme.on(EVENTS.alarmMessageChange, function(active) {
5770
+ theme.on(EVENTS$2.alarmMessageChange, function(active) {
5755
5771
  var _theme_controls;
5756
5772
  if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.alarmMessageControl) {
5757
5773
  theme.controls.alarmMessageControl._panelOpen = active;
5758
5774
  }
5759
5775
  });
5760
5776
  // =======================================================
5777
+ // 录像列表
5778
+ // =======================================================
5779
+ theme.on(EVENTS$2.recListChange, function(active) {
5780
+ var _theme_controls;
5781
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.recListControl) {
5782
+ theme.controls.recListControl._panelOpen = active;
5783
+ if (theme.controls.recListControl.active !== active) {
5784
+ theme.controls.recListControl.active = active;
5785
+ }
5786
+ }
5787
+ });
5788
+ // =======================================================
5761
5789
  // 录制
5762
5790
  // =======================================================
5763
- theme.on(EVENTS.recordingChange, function(recording) {
5791
+ theme.on(EVENTS$2.recordingChange, function(recording) {
5764
5792
  var _theme_controls, _theme_controls_recordControl, _theme_controls1;
5765
5793
  theme._recording = recording;
5766
5794
  if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.recordControl) && recording !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_recordControl = _theme_controls1.recordControl) == null ? void 0 : _theme_controls_recordControl.active)) theme.controls.recordControl.active = recording;
@@ -5768,24 +5796,24 @@
5768
5796
  // =======================================================
5769
5797
  // 清晰度
5770
5798
  // =======================================================
5771
- theme.on(EVENTS.setVideoLevelList, function(list) {
5799
+ theme.on(EVENTS$2.setVideoLevelList, function(list) {
5772
5800
  var _theme_controls_definitionControl_emit, _theme_controls_definitionControl, _theme_controls;
5773
- (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_definitionControl = _theme_controls.definitionControl) == null ? void 0 : (_theme_controls_definitionControl_emit = _theme_controls_definitionControl.emit) == null ? void 0 : _theme_controls_definitionControl_emit.call(_theme_controls_definitionControl, EVENTS.setVideoLevelList, list || []);
5801
+ (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_definitionControl = _theme_controls.definitionControl) == null ? void 0 : (_theme_controls_definitionControl_emit = _theme_controls_definitionControl.emit) == null ? void 0 : _theme_controls_definitionControl_emit.call(_theme_controls_definitionControl, EVENTS$2.setVideoLevelList, list || []);
5774
5802
  });
5775
- theme.on(EVENTS.currentVideoLevel, function(item, level) {
5803
+ theme.on(EVENTS$2.currentVideoLevel, function(item, level) {
5776
5804
  var _theme_controls_definitionControl_emit, _theme_controls_definitionControl, _theme_controls;
5777
- (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_definitionControl = _theme_controls.definitionControl) == null ? void 0 : (_theme_controls_definitionControl_emit = _theme_controls_definitionControl.emit) == null ? void 0 : _theme_controls_definitionControl_emit.call(_theme_controls_definitionControl, EVENTS.currentVideoLevel, item, level);
5805
+ (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_definitionControl = _theme_controls.definitionControl) == null ? void 0 : (_theme_controls_definitionControl_emit = _theme_controls_definitionControl.emit) == null ? void 0 : _theme_controls_definitionControl_emit.call(_theme_controls_definitionControl, EVENTS$2.currentVideoLevel, item, level);
5778
5806
  });
5779
5807
  // =======================================================
5780
5808
  // 放大
5781
5809
  // =======================================================
5782
- theme.on(EVENTS.zoomingChange, function(zooming) {
5810
+ theme.on(EVENTS$2.zoomingChange, function(zooming) {
5783
5811
  var _theme_controls1, _theme_controls_zoomControl1, _theme_controls2;
5784
5812
  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) {
5785
5813
  theme.controls.zoomControl.active = zooming;
5786
5814
  }
5787
5815
  });
5788
- theme.on(EVENTS.zoomChange, function(zoom) {
5816
+ theme.on(EVENTS$2.zoomChange, function(zoom) {
5789
5817
  var _theme_controls, _theme_controls_zoomControl, _theme_controls1;
5790
5818
  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) {
5791
5819
  theme.controls.zoomControl.value = zoom;
@@ -5794,25 +5822,27 @@
5794
5822
  // =======================================================
5795
5823
  // 倍速
5796
5824
  // =======================================================
5797
- theme.on(EVENTS.speedChange, function(speed) {
5825
+ theme.on(EVENTS$2.speedChange, function(speed) {
5798
5826
  var _theme_controls_speedControl_emit, _theme_controls_speedControl, _theme_controls;
5799
- (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_speedControl = _theme_controls.speedControl) == null ? void 0 : (_theme_controls_speedControl_emit = _theme_controls_speedControl.emit) == null ? void 0 : _theme_controls_speedControl_emit.call(_theme_controls_speedControl, EVENTS.speedChange, speed);
5827
+ (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_speedControl = _theme_controls.speedControl) == null ? void 0 : (_theme_controls_speedControl_emit = _theme_controls_speedControl.emit) == null ? void 0 : _theme_controls_speedControl_emit.call(_theme_controls_speedControl, EVENTS$2.speedChange, speed);
5800
5828
  });
5801
5829
  // =======================================================
5802
5830
  // 回放片段
5803
5831
  // =======================================================
5804
- theme.on(EVENTS.setAllDayRecTimes, function(list) {
5805
- var _theme_controls_timeLineControl_emit, _theme_controls_timeLineControl, _theme_controls;
5806
- (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_timeLineControl = _theme_controls.timeLineControl) == null ? void 0 : (_theme_controls_timeLineControl_emit = _theme_controls_timeLineControl.emit) == null ? void 0 : _theme_controls_timeLineControl_emit.call(_theme_controls_timeLineControl, EVENTS.setAllDayRecTimes, list.list);
5832
+ theme.on(EVENTS$2.setAllDayRecTimes, function(list) {
5833
+ var _theme_controls_timeLineControl_emit, _theme_controls_timeLineControl, _theme_controls, _theme_controls_recListControl_emit, _theme_controls_recListControl, _theme_controls1;
5834
+ (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_timeLineControl = _theme_controls.timeLineControl) == null ? void 0 : (_theme_controls_timeLineControl_emit = _theme_controls_timeLineControl.emit) == null ? void 0 : _theme_controls_timeLineControl_emit.call(_theme_controls_timeLineControl, EVENTS$2.setAllDayRecTimes, list.list);
5835
+ (_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_recListControl = _theme_controls1.recListControl) == null ? void 0 : (_theme_controls_recListControl_emit = _theme_controls_recListControl.emit) == null ? void 0 : _theme_controls_recListControl_emit.call(_theme_controls_recListControl, EVENTS$2.setAllDayRecTimes, list.list);
5807
5836
  });
5808
- theme.on(EVENTS.getOSDTime, function(time) {
5809
- var _theme_controls_timeLineControl_emit, _theme_controls_timeLineControl, _theme_controls;
5810
- (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_timeLineControl = _theme_controls.timeLineControl) == null ? void 0 : (_theme_controls_timeLineControl_emit = _theme_controls_timeLineControl.emit) == null ? void 0 : _theme_controls_timeLineControl_emit.call(_theme_controls_timeLineControl, EVENTS.getOSDTime, time.data);
5837
+ theme.on(EVENTS$2.getOSDTime, function(time) {
5838
+ var _theme_controls_timeLineControl_emit, _theme_controls_timeLineControl, _theme_controls, _theme_controls_recListControl_emit, _theme_controls_recListControl, _theme_controls1;
5839
+ (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_timeLineControl = _theme_controls.timeLineControl) == null ? void 0 : (_theme_controls_timeLineControl_emit = _theme_controls_timeLineControl.emit) == null ? void 0 : _theme_controls_timeLineControl_emit.call(_theme_controls_timeLineControl, EVENTS$2.getOSDTime, time.data);
5840
+ (_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_recListControl = _theme_controls1.recListControl) == null ? void 0 : (_theme_controls_recListControl_emit = _theme_controls_recListControl.emit) == null ? void 0 : _theme_controls_recListControl_emit.call(_theme_controls_recListControl, EVENTS$2.getOSDTime, time.data);
5811
5841
  });
5812
5842
  // =======================================================
5813
5843
  // 全屏
5814
5844
  // =======================================================
5815
- theme == null ? void 0 : theme.on(EVENTS.fullscreenChange, function(info) {
5845
+ theme == null ? void 0 : theme.on(EVENTS$2.fullscreenChange, function(info) {
5816
5846
  if (theme.zoomUtil) {
5817
5847
  if ([
5818
5848
  0,
@@ -5827,7 +5857,7 @@
5827
5857
  }
5828
5858
  }
5829
5859
  });
5830
- theme == null ? void 0 : theme.on(EVENTS.orientationChange, function(angle) {
5860
+ theme == null ? void 0 : theme.on(EVENTS$2.orientationChange, function(angle) {
5831
5861
  if (theme.zoomUtil) {
5832
5862
  if ([
5833
5863
  0,
@@ -5843,9 +5873,9 @@
5843
5873
  }
5844
5874
  });
5845
5875
  // 日期选择器
5846
- theme == null ? void 0 : theme.on(EVENTS.control.dateMonthChange, function(dates) {
5876
+ theme == null ? void 0 : theme.on(EVENTS$2.control.dateMonthChange, function(dates) {
5847
5877
  var _theme_controls_dateControl_emit, _theme_controls_dateControl, _theme_controls;
5848
- (_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);
5878
+ (_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$2.control.dateMonthChange, dates);
5849
5879
  });
5850
5880
  }
5851
5881
  /**
@@ -5853,26 +5883,26 @@
5853
5883
  *
5854
5884
  * @param theme - Theme
5855
5885
  */ function _controlEventemitter(theme) {
5856
- var _theme_controls, _theme_controls1, _theme_controls2, _theme_controls3, _theme_controls4, _theme_controls5, _theme_controls6, _theme_controls7, _theme_controls8, _theme_controls9, _theme_controls10, _theme_controls11, _theme_controls12, _theme_controls13, _theme_controls14, _theme_controls15, _theme_controls16, _theme_controls17, _theme_controls18, _theme_controls19, _theme_controls20, _theme_controls21, _theme_controls22;
5886
+ var _theme_controls, _theme_controls1, _theme_controls2, _theme_controls3, _theme_controls4, _theme_controls5, _theme_controls6, _theme_controls7, _theme_controls8, _theme_controls9, _theme_controls10, _theme_controls11, _theme_controls12, _theme_controls13, _theme_controls14, _theme_controls15, _theme_controls16, _theme_controls17, _theme_controls18, _theme_controls19, _theme_controls20, _theme_controls21, _theme_controls22, _theme_controls23, _theme_controls24;
5857
5887
  // Controls
5858
5888
  if (theme._recFooter) {
5859
- theme._recFooter.on(EVENTS.theme.recFooterDestroy, function() {
5860
- theme.emit(EVENTS.theme.recFooterDestroy);
5889
+ theme._recFooter.on(EVENTS$2.theme.recFooterDestroy, function() {
5890
+ theme.emit(EVENTS$2.theme.recFooterDestroy);
5861
5891
  });
5862
5892
  }
5863
5893
  if (theme._mobileExtend) {
5864
- theme._mobileExtend.on(EVENTS.theme.mobileExtendDestroy, function() {
5865
- theme.emit(EVENTS.theme.mobileExtendDestroy);
5894
+ theme._mobileExtend.on(EVENTS$2.theme.mobileExtendDestroy, function() {
5895
+ theme.emit(EVENTS$2.theme.mobileExtendDestroy);
5866
5896
  });
5867
5897
  }
5868
5898
  // 主题和控件之间通过 事件监听进行通信, (不推荐回调,因为控件不能定义统一回调函数和控件间通信不好做)
5869
5899
  // controls => theme => 对外
5870
5900
  if (theme._pauseControl) {
5871
5901
  // 播放暂停控件
5872
- theme._pauseControl.on(EVENTS.control.play, function(playing, form) {
5902
+ theme._pauseControl.on(EVENTS$2.control.play, function(playing, form) {
5873
5903
  if (!theme.playing) {
5874
5904
  theme.playing = playing;
5875
- theme.emit(EVENTS.control.play, playing, form);
5905
+ theme.emit(EVENTS$2.control.play, playing, form);
5876
5906
  }
5877
5907
  });
5878
5908
  }
@@ -5880,122 +5910,131 @@
5880
5910
  if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.playControl) {
5881
5911
  // 播放暂停控件播放状态变化
5882
5912
  // prettier-ignore
5883
- theme.controls.playControl.on(EVENTS.control.play, function(playing) {
5913
+ theme.controls.playControl.on(EVENTS$2.control.play, function(playing) {
5884
5914
  if (theme.playing !== playing) {
5885
5915
  theme.playing = playing;
5886
- theme.emit(EVENTS.control.play, playing);
5916
+ theme.emit(EVENTS$2.control.play, playing);
5887
5917
  }
5888
5918
  });
5889
- theme.controls.playControl.on(EVENTS.control.playDestroy, function() {
5890
- theme.emit(EVENTS.control.playDestroy);
5919
+ theme.controls.playControl.on(EVENTS$2.control.playDestroy, function() {
5920
+ theme.emit(EVENTS$2.control.playDestroy);
5891
5921
  });
5892
5922
  }
5893
5923
  // 音量控件
5894
5924
  if ((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1.volumeControl) {
5895
5925
  // 音量控件音量变化
5896
5926
  // prettier-ignore
5897
- theme.controls.volumeControl.on(EVENTS.control.volumechange, function(volume, muted) {
5927
+ theme.controls.volumeControl.on(EVENTS$2.control.volumechange, function(volume, muted) {
5898
5928
  if (theme.muted !== muted) theme.muted = muted;
5899
5929
  if (theme.volume !== volume) theme.volume = volume;
5900
- theme.emit(EVENTS.control.volumechange, volume, muted);
5930
+ theme.emit(EVENTS$2.control.volumechange, volume, muted);
5901
5931
  });
5902
- theme.controls.volumeControl.on(EVENTS.control.volumePanelOpenChange, function(open, volume, muted) {
5903
- theme.emit(EVENTS.control.volumePanelOpenChange, open, volume, muted);
5932
+ theme.controls.volumeControl.on(EVENTS$2.control.volumePanelOpenChange, function(open, volume, muted) {
5933
+ theme.emit(EVENTS$2.control.volumePanelOpenChange, open, volume, muted);
5904
5934
  });
5905
- theme.controls.volumeControl.on(EVENTS.control.volumeDestroy, function() {
5906
- theme.emit(EVENTS.control.volumeDestroy);
5935
+ theme.controls.volumeControl.on(EVENTS$2.control.volumeDestroy, function() {
5936
+ theme.emit(EVENTS$2.control.volumeDestroy);
5907
5937
  });
5908
5938
  }
5909
5939
  // 云台控件
5910
5940
  if ((_theme_controls2 = theme.controls) == null ? void 0 : _theme_controls2.ptzControl) {
5911
- theme.controls.ptzControl.on(EVENTS.control.ptzPanelOpenChange, function(open) {
5941
+ theme.controls.ptzControl.on(EVENTS$2.control.ptzPanelOpenChange, function(open) {
5912
5942
  if (Utils.isMobile) theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open);
5913
- theme.emit(EVENTS.control.ptzPanelOpenChange, open);
5943
+ theme.emit(EVENTS$2.control.ptzPanelOpenChange, open);
5914
5944
  });
5915
- theme.controls.ptzControl.on(EVENTS.control.ptzSpeedChange, function(speed) {
5916
- theme.emit(EVENTS.control.ptzSpeedChange, speed);
5917
- theme.emit(EVENTS.ptzSpeedChange, speed);
5945
+ theme.controls.ptzControl.on(EVENTS$2.control.ptzSpeedChange, function(speed) {
5946
+ theme.emit(EVENTS$2.control.ptzSpeedChange, speed);
5947
+ theme.emit(EVENTS$2.ptzSpeedChange, speed);
5918
5948
  });
5919
- theme.controls.ptzControl.on(EVENTS.control.ptzError, function(info) {
5920
- theme.emit(EVENTS.control.ptzError, info);
5949
+ theme.controls.ptzControl.on(EVENTS$2.control.ptzError, function(info) {
5950
+ theme.emit(EVENTS$2.control.ptzError, info);
5921
5951
  var message = theme.i18n.t(info.localeKey);
5922
5952
  if (/^\[missing/.test(message)) {
5923
5953
  message = info.msg;
5924
5954
  }
5925
- theme.emit(EVENTS.message, message + " [" + info.code + "]", 'ptzError', 2);
5955
+ theme.emit(EVENTS$2.message, message + " [" + info.code + "]", 'ptzError', 2);
5926
5956
  });
5927
- theme.controls.ptzControl.on(EVENTS.control.ptzDestroy, function() {
5928
- theme.emit(EVENTS.control.ptzDestroy);
5957
+ theme.controls.ptzControl.on(EVENTS$2.control.ptzDestroy, function() {
5958
+ theme.emit(EVENTS$2.control.ptzDestroy);
5929
5959
  });
5930
5960
  }
5931
5961
  // 录制控件
5932
5962
  if ((_theme_controls3 = theme.controls) == null ? void 0 : _theme_controls3.recordControl) {
5933
- theme.controls.recordControl.on(EVENTS.control.recordingChange, function(recording) {
5934
- if (theme.recording !== recording) theme.emit(EVENTS.control.recordingChange, recording);
5963
+ theme.controls.recordControl.on(EVENTS$2.control.recordingChange, function(recording) {
5964
+ if (theme.recording !== recording) theme.emit(EVENTS$2.control.recordingChange, recording);
5935
5965
  });
5936
- theme.controls.recordControl.on(EVENTS.control.recordDestroy, function() {
5937
- theme.emit(EVENTS.control.recordDestroy);
5966
+ theme.controls.recordControl.on(EVENTS$2.control.recordDestroy, function() {
5967
+ theme.emit(EVENTS$2.control.recordDestroy);
5938
5968
  });
5939
5969
  }
5940
5970
  // 对讲控件
5941
5971
  if ((_theme_controls4 = theme.controls) == null ? void 0 : _theme_controls4.talkControl) {
5942
- theme.controls.talkControl.on(EVENTS.control.talkingChange, function(talking) {
5943
- if (theme.talking !== talking) theme.emit(EVENTS.control.talkingChange, talking);
5972
+ theme.controls.talkControl.on(EVENTS$2.control.talkingChange, function(talking) {
5973
+ if (theme.talking !== talking) theme.emit(EVENTS$2.control.talkingChange, talking);
5944
5974
  });
5945
- theme.controls.talkControl.on(EVENTS.control.talkDestroy, function() {
5946
- theme.emit(EVENTS.control.talkDestroy);
5975
+ theme.controls.talkControl.on(EVENTS$2.control.talkDestroy, function() {
5976
+ theme.emit(EVENTS$2.control.talkDestroy);
5947
5977
  });
5948
5978
  }
5949
5979
  // 语音广播控件
5950
5980
  if ((_theme_controls5 = theme.controls) == null ? void 0 : _theme_controls5.broadcastControl) {
5951
- theme.controls.broadcastControl.on(EVENTS.control.broadcastChange, function(active) {
5952
- theme.emit(EVENTS.control.broadcastChange, active);
5981
+ theme.controls.broadcastControl.on(EVENTS$2.control.broadcastChange, function(active) {
5982
+ theme.emit(EVENTS$2.control.broadcastChange, active);
5953
5983
  });
5954
- theme.controls.broadcastControl.on(EVENTS.control.broadcastDestroy, function() {
5955
- theme.emit(EVENTS.control.broadcastDestroy);
5984
+ theme.controls.broadcastControl.on(EVENTS$2.control.broadcastDestroy, function() {
5985
+ theme.emit(EVENTS$2.control.broadcastDestroy);
5956
5986
  });
5957
5987
  }
5958
5988
  // AI对话框
5959
5989
  if ((_theme_controls6 = theme.controls) == null ? void 0 : _theme_controls6.aiChatControl) {
5960
- theme.controls.aiChatControl.on(EVENTS.control.aichatChange, function(active) {
5961
- theme.emit(EVENTS.control.aichatChange, active);
5990
+ theme.controls.aiChatControl.on(EVENTS$2.control.aichatChange, function(active) {
5991
+ theme.emit(EVENTS$2.control.aichatChange, active);
5962
5992
  });
5963
- theme.controls.aiChatControl.on(EVENTS.control.aichatDestroy, function() {
5964
- theme.emit(EVENTS.control.aichatDestroy);
5993
+ theme.controls.aiChatControl.on(EVENTS$2.control.aichatDestroy, function() {
5994
+ theme.emit(EVENTS$2.control.aichatDestroy);
5965
5995
  });
5966
5996
  }
5967
5997
  // 直播按钮
5968
5998
  if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.liveControl) {
5969
- theme.controls.liveControl.on(EVENTS.control.liveChange, function() {
5999
+ theme.controls.liveControl.on(EVENTS$2.control.liveChange, function() {
5970
6000
  var _theme_controls;
5971
6001
  // 直接设置回放下拉控件为非激活状态
5972
6002
  if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.recDropdownControl) {
5973
6003
  theme.controls.recDropdownControl.active = false;
5974
6004
  }
5975
- theme.emit(EVENTS.control.liveChange);
6005
+ theme.emit(EVENTS$2.control.liveChange);
5976
6006
  });
5977
6007
  }
5978
6008
  // 回放下拉
5979
6009
  if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.recDropdownControl) {
5980
- theme.controls.recDropdownControl.on(EVENTS.control.recDropdownChange, function(type) {
6010
+ theme.controls.recDropdownControl.on(EVENTS$2.control.recDropdownChange, function(type) {
5981
6011
  var _theme_controls;
5982
6012
  // 直接设置直播控件为非激活状态
5983
6013
  if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.liveControl) {
5984
6014
  theme.controls.liveControl.active = false;
5985
6015
  }
5986
- theme.emit(EVENTS.control.recDropdownChange, type);
6016
+ theme.emit(EVENTS$2.control.recDropdownChange, type);
5987
6017
  });
5988
6018
  }
5989
6019
  // 告警消息
5990
6020
  if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.alarmMessageControl) {
5991
- theme.controls.alarmMessageControl.on(EVENTS.control.alarmMessageChange, function(active) {
5992
- theme.emit(EVENTS.control.alarmMessageChange, active);
6021
+ theme.controls.alarmMessageControl.on(EVENTS$2.control.alarmMessageChange, function(active) {
6022
+ theme.emit(EVENTS$2.control.alarmMessageChange, active);
6023
+ });
6024
+ }
6025
+ // 录像列表
6026
+ if ((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.recListControl) {
6027
+ theme.controls.recListControl.on(EVENTS$2.control.recListChange, function(active) {
6028
+ theme.emit(EVENTS$2.control.recListChange, active);
6029
+ });
6030
+ theme.controls.recListControl.on(EVENTS$2.control.recListDestroy, function() {
6031
+ theme.emit(EVENTS$2.control.recListDestroy);
5993
6032
  });
5994
6033
  }
5995
6034
  // 播放地址切换后同步 Live/RecDropdown 激活状态
5996
6035
  // changePlayUrl 后 urlInfo 已更新,firstFrameDisplay 表示新地址播放成功
5997
- if (((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.liveControl) || ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.recDropdownControl)) {
5998
- theme.on(EVENTS.firstFrameDisplay, function() {
6036
+ if (((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.liveControl) || ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.recDropdownControl)) {
6037
+ theme.on(EVENTS$2.firstFrameDisplay, function() {
5999
6038
  var _theme_controls, _theme_controls1;
6000
6039
  var urlInfo = theme.urlInfo;
6001
6040
  if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.liveControl) {
@@ -6007,107 +6046,107 @@
6007
6046
  });
6008
6047
  }
6009
6048
  // 缩放控件
6010
- if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.zoomControl) {
6011
- theme.controls.zoomControl.on(EVENTS.control.zoomChange, function(value, _percent, _range) {
6049
+ if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.zoomControl) {
6050
+ theme.controls.zoomControl.on(EVENTS$2.control.zoomChange, function(value, _percent, _range) {
6012
6051
  if (theme.zoom !== value) {
6013
6052
  theme.zoom = value;
6014
- theme.emit(EVENTS.control.zoomChange, value);
6053
+ theme.emit(EVENTS$2.control.zoomChange, value);
6015
6054
  }
6016
6055
  });
6017
- theme.controls.zoomControl.on(EVENTS.control.zoomPanelOpenChange, function(open, _zoom) {
6056
+ theme.controls.zoomControl.on(EVENTS$2.control.zoomPanelOpenChange, function(open, _zoom) {
6018
6057
  if (theme.zooming !== open) {
6019
6058
  theme.zooming = open;
6020
- theme.emit(EVENTS.control.zoomPanelOpenChange, open);
6059
+ theme.emit(EVENTS$2.control.zoomPanelOpenChange, open);
6021
6060
  }
6022
6061
  });
6023
- theme.controls.zoomControl.on(EVENTS.control.zoomDestroy, function() {
6062
+ theme.controls.zoomControl.on(EVENTS$2.control.zoomDestroy, function() {
6024
6063
  if (theme.zooming) {
6025
6064
  theme.zoom = 1;
6026
6065
  theme.zooming = false;
6027
6066
  }
6028
- theme.emit(EVENTS.control.zoomDestroy);
6067
+ theme.emit(EVENTS$2.control.zoomDestroy);
6029
6068
  });
6030
6069
  }
6031
6070
  // 清晰度控件
6032
- if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.definitionControl) {
6033
- theme.controls.definitionControl.on(EVENTS.control.definitionPanelOpenChange, function(open, definition, item) {
6071
+ if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.definitionControl) {
6072
+ theme.controls.definitionControl.on(EVENTS$2.control.definitionPanelOpenChange, function(open, definition, item) {
6034
6073
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, definition);
6035
- theme.emit(EVENTS.control.definitionPanelOpenChange, open, definition, item);
6074
+ theme.emit(EVENTS$2.control.definitionPanelOpenChange, open, definition, item);
6036
6075
  });
6037
- theme.controls.definitionControl.on(EVENTS.control.definitionChange, function(definition, item) {
6038
- theme.emit(EVENTS.control.definitionChange, definition, item);
6076
+ theme.controls.definitionControl.on(EVENTS$2.control.definitionChange, function(definition, item) {
6077
+ theme.emit(EVENTS$2.control.definitionChange, definition, item);
6039
6078
  });
6040
- theme.controls.definitionControl.on(EVENTS.control.definitionDestroy, function() {
6041
- theme.emit(EVENTS.control.definitionDestroy);
6079
+ theme.controls.definitionControl.on(EVENTS$2.control.definitionDestroy, function() {
6080
+ theme.emit(EVENTS$2.control.definitionDestroy);
6042
6081
  });
6043
6082
  }
6044
6083
  // 倍速控件
6045
- if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.speedControl) {
6046
- theme.controls.speedControl.on(EVENTS.control.speedPanelOpenChange, function(open, speed, item) {
6084
+ if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.speedControl) {
6085
+ theme.controls.speedControl.on(EVENTS$2.control.speedPanelOpenChange, function(open, speed, item) {
6047
6086
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, speed);
6048
- theme.emit(EVENTS.control.speedPanelOpenChange, open, speed, item);
6087
+ theme.emit(EVENTS$2.control.speedPanelOpenChange, open, speed, item);
6049
6088
  });
6050
- theme.controls.speedControl.on(EVENTS.control.speedChange, function(speed, item) {
6051
- theme.emit(EVENTS.control.speedChange, speed, item);
6089
+ theme.controls.speedControl.on(EVENTS$2.control.speedChange, function(speed, item) {
6090
+ theme.emit(EVENTS$2.control.speedChange, speed, item);
6052
6091
  });
6053
- theme.controls.speedControl.on(EVENTS.control.speedDestroy, function() {
6054
- theme.emit(EVENTS.control.speedDestroy);
6092
+ theme.controls.speedControl.on(EVENTS$2.control.speedDestroy, function() {
6093
+ theme.emit(EVENTS$2.control.speedDestroy);
6055
6094
  });
6056
6095
  }
6057
6096
  // 截图控件
6058
- if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.capturePictureControl) {
6059
- theme.controls.capturePictureControl.on(EVENTS.control.capturePicture, function(options) {
6060
- theme.emit(EVENTS.control.capturePicture, options);
6097
+ if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.capturePictureControl) {
6098
+ theme.controls.capturePictureControl.on(EVENTS$2.control.capturePicture, function(options) {
6099
+ theme.emit(EVENTS$2.control.capturePicture, options);
6061
6100
  });
6062
- theme.controls.capturePictureControl.on(EVENTS.control.capturePictureDestroy, function() {
6063
- theme.emit(EVENTS.control.capturePictureDestroy);
6101
+ theme.controls.capturePictureControl.on(EVENTS$2.control.capturePictureDestroy, function() {
6102
+ theme.emit(EVENTS$2.control.capturePictureDestroy);
6064
6103
  });
6065
6104
  }
6066
6105
  // 全屏控件
6067
- if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.fullscreenControl) {
6068
- theme.controls.fullscreenControl.on(EVENTS.control.fullscreenDestroy, function() {
6069
- theme.emit(EVENTS.control.fullscreenDestroy);
6106
+ if ((_theme_controls17 = theme.controls) == null ? void 0 : _theme_controls17.fullscreenControl) {
6107
+ theme.controls.fullscreenControl.on(EVENTS$2.control.fullscreenDestroy, function() {
6108
+ theme.emit(EVENTS$2.control.fullscreenDestroy);
6070
6109
  });
6071
6110
  }
6072
6111
  // 全局全屏控件
6073
- if ((_theme_controls17 = theme.controls) == null ? void 0 : _theme_controls17.globalFullscreenControl) {
6074
- theme.controls.globalFullscreenControl.on(EVENTS.control.globalFullscreenDestroy, function() {
6075
- theme.emit(EVENTS.control.globalFullscreenDestroy);
6112
+ if ((_theme_controls18 = theme.controls) == null ? void 0 : _theme_controls18.globalFullscreenControl) {
6113
+ theme.controls.globalFullscreenControl.on(EVENTS$2.control.globalFullscreenDestroy, function() {
6114
+ theme.emit(EVENTS$2.control.globalFullscreenDestroy);
6076
6115
  });
6077
6116
  }
6078
6117
  // 设备信息控件
6079
- if ((_theme_controls18 = theme.controls) == null ? void 0 : _theme_controls18.deviceControl) {
6080
- theme.controls.deviceControl.on(EVENTS.control.deviceDestroy, function() {
6081
- theme.emit(EVENTS.control.deviceDestroy);
6118
+ if ((_theme_controls19 = theme.controls) == null ? void 0 : _theme_controls19.deviceControl) {
6119
+ theme.controls.deviceControl.on(EVENTS$2.control.deviceDestroy, function() {
6120
+ theme.emit(EVENTS$2.control.deviceDestroy);
6082
6121
  });
6083
6122
  }
6084
6123
  // 回放类型切换控件
6085
- if ((_theme_controls19 = theme.controls) == null ? void 0 : _theme_controls19.recControl) {
6124
+ if ((_theme_controls20 = theme.controls) == null ? void 0 : _theme_controls20.recControl) {
6086
6125
  // prettier-ignore
6087
- theme.controls.recControl.on(EVENTS.control.recTypeChange, function(type) {
6126
+ theme.controls.recControl.on(EVENTS$2.control.recTypeChange, function(type) {
6088
6127
  if (theme.recType !== type) {
6089
6128
  var _theme__headerMoreControl, _theme_controls;
6090
6129
  theme.recType = type;
6091
- theme.emit(EVENTS.control.recTypeChange, type);
6130
+ theme.emit(EVENTS$2.control.recTypeChange, type);
6092
6131
  // theme.emit(EVENTS.recTypeChange, type);
6093
6132
  if ((_theme__headerMoreControl = theme._headerMoreControl) == null ? void 0 : _theme__headerMoreControl.picker) {
6094
6133
  theme._headerMoreControl.picker.open = false;
6095
6134
  }
6096
6135
  if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.speedControl) {
6097
- theme.controls.speedControl.emit(EVENTS.control.recTypeChange, type);
6136
+ theme.controls.speedControl.emit(EVENTS$2.control.recTypeChange, type);
6098
6137
  }
6099
6138
  }
6100
6139
  });
6101
- theme.controls.recControl.on(EVENTS.control.recDestroy, function() {
6102
- theme.emit(EVENTS.control.recDestroy);
6140
+ theme.controls.recControl.on(EVENTS$2.control.recDestroy, function() {
6141
+ theme.emit(EVENTS$2.control.recDestroy);
6103
6142
  });
6104
6143
  }
6105
6144
  // 时间轴控件
6106
- if ((_theme_controls20 = theme.controls) == null ? void 0 : _theme_controls20.timeLineControl) {
6107
- theme.controls.timeLineControl.on(EVENTS.control.timeLineChange, function(date) {
6108
- theme.emit(EVENTS.control.timeLineChange, date);
6145
+ if ((_theme_controls21 = theme.controls) == null ? void 0 : _theme_controls21.timeLineControl) {
6146
+ theme.controls.timeLineControl.on(EVENTS$2.control.timeLineChange, function(date) {
6147
+ theme.emit(EVENTS$2.control.timeLineChange, date);
6109
6148
  });
6110
- theme.controls.timeLineControl.on(EVENTS.control.timeLinePanelOpenChange, function(open) {
6149
+ theme.controls.timeLineControl.on(EVENTS$2.control.timeLinePanelOpenChange, function(open) {
6111
6150
  var _theme_controls_dateControl, _theme_controls, _theme_controls_timeControl, _theme_controls1;
6112
6151
  if ((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_dateControl = _theme_controls.dateControl) == null ? void 0 : _theme_controls_dateControl.datePicker) {
6113
6152
  var _theme_controls_dateControl_datePicker, _theme_controls_dateControl1, _theme_controls2;
@@ -6117,38 +6156,54 @@
6117
6156
  var _theme_controls_timeControl_timePicker, _theme_controls_timeControl1, _theme_controls3;
6118
6157
  (_theme_controls3 = theme.controls) == null ? void 0 : (_theme_controls_timeControl1 = _theme_controls3.timeControl) == null ? void 0 : (_theme_controls_timeControl_timePicker = _theme_controls_timeControl1.timePicker) == null ? void 0 : _theme_controls_timeControl_timePicker.hide();
6119
6158
  }
6120
- theme.emit(EVENTS.control.timeLinePanelOpenChange, open);
6159
+ theme.emit(EVENTS$2.control.timeLinePanelOpenChange, open);
6160
+ });
6161
+ theme.controls.timeLineControl.on(EVENTS$2.control.timeLineDestroy, function() {
6162
+ theme.emit(EVENTS$2.control.timeLineDestroy);
6121
6163
  });
6122
- theme.controls.timeLineControl.on(EVENTS.control.timeLineDestroy, function() {
6123
- theme.emit(EVENTS.control.timeLineDestroy);
6164
+ // this.emit("TimeLine.onSectionIconClick", result)
6165
+ theme.controls.timeLineControl.on("TimeLine.onSectionIconClick", function(result) {
6166
+ var _theme_controls;
6167
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.recListControl) {
6168
+ var _theme_controls_recListControl, _theme_controls1;
6169
+ (_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_recListControl = _theme_controls1.recListControl) == null ? void 0 : _theme_controls_recListControl.emit("TimeLine.onSectionIconClick", result);
6170
+ }
6171
+ theme.emit("TimeLine.onSectionIconClick", result);
6124
6172
  });
6125
6173
  }
6126
6174
  // 日历控件
6127
- if ((_theme_controls21 = theme.controls) == null ? void 0 : _theme_controls21.dateControl) {
6128
- theme.controls.dateControl.on(EVENTS.control.datePanelOpenChange, function(open, date) {
6129
- theme.emit(EVENTS.control.datePanelOpenChange, open, date);
6175
+ if ((_theme_controls22 = theme.controls) == null ? void 0 : _theme_controls22.dateControl) {
6176
+ theme.controls.dateControl.on(EVENTS$2.control.datePanelOpenChange, function(open, date) {
6177
+ theme.emit(EVENTS$2.control.datePanelOpenChange, open, date);
6130
6178
  });
6131
- theme.controls.dateControl.on(EVENTS.control.dateChange, function(date) {
6132
- theme.emit(EVENTS.control.dateChange, date);
6179
+ theme.controls.dateControl.on(EVENTS$2.control.dateChange, function(date) {
6180
+ theme.emit(EVENTS$2.control.dateChange, date);
6133
6181
  });
6134
- theme.controls.dateControl.on(EVENTS.control.dateDestroy, function() {
6135
- theme.emit(EVENTS.control.recDestroy);
6182
+ theme.controls.dateControl.on(EVENTS$2.control.dateDestroy, function() {
6183
+ theme.emit(EVENTS$2.control.recDestroy);
6136
6184
  });
6137
6185
  }
6138
6186
  // 时间控件
6139
- if ((_theme_controls22 = theme.controls) == null ? void 0 : _theme_controls22.timeControl) {
6140
- theme.controls.timeControl.on(EVENTS.control.timePanelOpenChange, function(open, time) {
6141
- theme.emit(EVENTS.control.timePanelOpenChange, open, time);
6187
+ if ((_theme_controls23 = theme.controls) == null ? void 0 : _theme_controls23.timeControl) {
6188
+ theme.controls.timeControl.on(EVENTS$2.control.timePanelOpenChange, function(open, time) {
6189
+ theme.emit(EVENTS$2.control.timePanelOpenChange, open, time);
6142
6190
  });
6143
- theme.controls.timeControl.on(EVENTS.control.timeChange, function(time) {
6144
- theme.emit(EVENTS.control.timeChange, time);
6191
+ theme.controls.timeControl.on(EVENTS$2.control.timeChange, function(time) {
6192
+ theme.emit(EVENTS$2.control.timeChange, time);
6193
+ });
6194
+ }
6195
+ // 回放片段列表
6196
+ if ((_theme_controls24 = theme.controls) == null ? void 0 : _theme_controls24.recListControl) {
6197
+ theme.controls.recListControl.on(EVENTS$2.control.recListCardClick, function(section, index, sections) {
6198
+ theme.emit(EVENTS$2.control.recListCardClick, section, index, sections);
6145
6199
  });
6146
6200
  }
6147
6201
  }
6148
6202
  var ignoreList = [
6149
- EVENTS.getOSDTime,
6150
- EVENTS.setAllDayRecTimes,
6151
- EVENTS.talkVolumeChange
6203
+ EVENTS$2.getOSDTime,
6204
+ EVENTS$2.setAllDayRecTimes,
6205
+ EVENTS$2.talkVolumeChange,
6206
+ EVENTS$2.control.recListCardClick
6152
6207
  ];
6153
6208
  /**
6154
6209
  * 打印所有事件触发日志(仅主题层, 没有控件层因为已经透传到主题层了)
@@ -6224,12 +6279,12 @@
6224
6279
  Object.defineProperty(target, descriptor.key, descriptor);
6225
6280
  }
6226
6281
  }
6227
- function _create_class$d(Constructor, protoProps, staticProps) {
6282
+ function _create_class$g(Constructor, protoProps, staticProps) {
6228
6283
  if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
6229
6284
  return Constructor;
6230
6285
  }
6231
- function _extends$q() {
6232
- _extends$q = Object.assign || function(target) {
6286
+ function _extends$s() {
6287
+ _extends$s = Object.assign || function(target) {
6233
6288
  for(var i = 1; i < arguments.length; i++){
6234
6289
  var source = arguments[i];
6235
6290
  for(var key in source){
@@ -6240,9 +6295,9 @@
6240
6295
  }
6241
6296
  return target;
6242
6297
  };
6243
- return _extends$q.apply(this, arguments);
6298
+ return _extends$s.apply(this, arguments);
6244
6299
  }
6245
- function _inherits$n(subClass, superClass) {
6300
+ function _inherits$o(subClass, superClass) {
6246
6301
  if (typeof superClass !== "function" && superClass !== null) {
6247
6302
  throw new TypeError("Super expression must either be null or a function");
6248
6303
  }
@@ -6253,14 +6308,14 @@
6253
6308
  configurable: true
6254
6309
  }
6255
6310
  });
6256
- if (superClass) _set_prototype_of$q(subClass, superClass);
6311
+ if (superClass) _set_prototype_of$s(subClass, superClass);
6257
6312
  }
6258
- function _set_prototype_of$q(o, p) {
6259
- _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6313
+ function _set_prototype_of$s(o, p) {
6314
+ _set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6260
6315
  o.__proto__ = p;
6261
6316
  return o;
6262
6317
  };
6263
- return _set_prototype_of$q(o, p);
6318
+ return _set_prototype_of$s(o, p);
6264
6319
  }
6265
6320
  var ZOOM_DEFAULT_OPTIONS = {
6266
6321
  open: false,
@@ -6270,17 +6325,17 @@
6270
6325
  * 电子放大控件
6271
6326
  * @category Control
6272
6327
  */ var Zoom$1 = /*#__PURE__*/ function(Control) {
6273
- _inherits$n(Zoom, Control);
6328
+ _inherits$o(Zoom, Control);
6274
6329
  function Zoom(options) {
6275
6330
  var _this;
6276
- _this = Control.call(this, _extends$q({}, options, {
6331
+ _this = Control.call(this, _extends$s({}, options, {
6277
6332
  tagName: 'span',
6278
6333
  controlType: 'button',
6279
6334
  classNameSuffix: 'zoom'
6280
6335
  })) || this, _this._value = 1, _this._isRotated = false;
6281
6336
  _this._options = Object.assign({}, ZOOM_DEFAULT_OPTIONS, options || {});
6282
6337
  _this._render();
6283
- _this.emit(EVENTS.zoomChange, function(zoom) {
6338
+ _this.emit(EVENTS$2.zoomChange, function(zoom) {
6284
6339
  if (_this._progress) {
6285
6340
  _this.value = zoom;
6286
6341
  }
@@ -6319,7 +6374,7 @@
6319
6374
  if (value !== _this._value) {
6320
6375
  _this._value = value;
6321
6376
  _this._options.onChange == null ? void 0 : _this._options.onChange.call(_this._options, value, percent, range);
6322
- _this.emit(EVENTS.control.zoomChange, value, percent, range);
6377
+ _this.emit(EVENTS$2.control.zoomChange, value, percent, range);
6323
6378
  }
6324
6379
  },
6325
6380
  renderText: function(value) {
@@ -6351,7 +6406,7 @@
6351
6406
  this.active = !this.active;
6352
6407
  Control.prototype._onControlClick.call(this, e);
6353
6408
  };
6354
- _create_class$d(Zoom, [
6409
+ _create_class$g(Zoom, [
6355
6410
  {
6356
6411
  key: "value",
6357
6412
  get: function get() {
@@ -6377,12 +6432,12 @@
6377
6432
  if (this.active) {
6378
6433
  var _this__$zoomPanel_classList, _this__$zoomPanel;
6379
6434
  (_this__$zoomPanel = this._$zoomPanel) == null ? void 0 : (_this__$zoomPanel_classList = _this__$zoomPanel.classList) == null ? void 0 : _this__$zoomPanel_classList.remove("" + PREFIX_CLASS + "-hide");
6380
- this.emit(EVENTS.control.zoomPanelOpenChange, true);
6435
+ this.emit(EVENTS$2.control.zoomPanelOpenChange, true);
6381
6436
  } else {
6382
6437
  var _this__$zoomPanel_classList1, _this__$zoomPanel1;
6383
6438
  (_this__$zoomPanel1 = this._$zoomPanel) == null ? void 0 : (_this__$zoomPanel_classList1 = _this__$zoomPanel1.classList) == null ? void 0 : _this__$zoomPanel_classList1.add("" + PREFIX_CLASS + "-hide");
6384
6439
  this._progress.value = 1;
6385
- this.emit(EVENTS.control.zoomPanelOpenChange, false);
6440
+ this.emit(EVENTS$2.control.zoomPanelOpenChange, false);
6386
6441
  }
6387
6442
  }
6388
6443
  },
@@ -6406,10 +6461,10 @@
6406
6461
  * Copyright (c) 2026-05-04 Ezviz-OpenBiz
6407
6462
  * Released under the MIT License.
6408
6463
  */
6409
- function _create_class$c(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var ZOOM_DEFAULT_POSITION=[0,0],DefaultOptions={initialZoom:1,defaultCursor:"pointer",scrollVelocity:.1,animDuration:.25,allowZoom:true,allowPan:true,onChange:function(){},onTranslateChange:function(){},onTap:function(){},max:8,min:1,zoomStep:.1,allowTouchEvents:false,allowWheel:true,ignoredMouseButtons:[],doubleTouchMaxDelay:300,decelerationDuration:750},Zoom=function(){function Zoom(container,options){var _this=this;this._dragging=false,this.destroy=function(){_this.setAllowZoom(false),_this.reset(),_this.removeEventListeners();},this.setTransform=function(trans){_this.transform=trans;},this.getTransform=function(){return _this.transform},this.updateTranslate=function(){var translateX=0,translateY=0;translateX=_this.percentPos[0]<0?_this.percentPos[0]<-0.5*(_this.zoom-1)?-0.5*(_this.zoom-1):_this.percentPos[0]:_this.percentPos[0]>.5*(_this.zoom-1)?.5*(_this.zoom-1):_this.percentPos[0],translateY=_this.percentPos[1]<0?_this.percentPos[1]<-0.5*(_this.zoom-1)?-0.5*(_this.zoom-1):_this.percentPos[1]:_this.percentPos[1]>.5*(_this.zoom-1)?.5*(_this.zoom-1):_this.percentPos[1],_this.percentPos=[translateX,translateY];},this.update=function(){_this.container&&(_this.updateTranslate(),_this.container.style.transition="transform ease-out "+_this.transition+"s",_this.container.style.transform="translate3d("+100*_this.percentPos[0]+"%, "+100*_this.percentPos[1]+"%, 0) scale("+_this.zoom+")");},this.setAllowZoom=function(allow){_this.options.allowZoom=allow;},this.setZoom=function(zoom,reset){zoom=parseFloat(zoom.toFixed(_this.getPrecision(_this.options.zoomStep))),_this.zoom!==zoom&&(_this.zoom=zoom,_this.update(),null==_this.options.onChange||_this.options.onChange.call(_this.options,+_this.zoom.toFixed(_this.getPrecision(_this.options.zoomStep)),reset));},this.getZoom=function(){return _this.zoom},this.setPos=function(pos){var _this_container,_this_container1,containerWidth=null==(_this_container=_this.container)?void 0:_this_container.clientWidth,containerHeight=null==(_this_container1=_this.container)?void 0:_this_container1.clientHeight;+_this.pos[0]===pos[0]&&+_this.pos[1]===pos[1]||(_this.percentPos=[pos[0]/containerWidth,pos[1]/containerHeight],_this.update(),null==_this.options.onTranslateChange||_this.options.onTranslateChange.call(_this.options,{posX:pos[0],posY:pos[1]}));},this.setTransitionDuration=function(duration){_this.transition=duration,_this.update();},this.setCursor=function(cursor){_this.container&&(_this.container.style.cssText+="cursor:"+cursor+";",_this.cursor=cursor);},this.zoomIn=function(value){var _this_options_max,_this_options_max1,newPosX=_this.pos[0],newPosY=_this.pos[1],prevZoom=_this.zoom,newZoom=prevZoom+value<(null!=(_this_options_max=_this.options.max)?_this_options_max:8)?prevZoom+value:null!=(_this_options_max1=_this.options.max)?_this_options_max1:8;newZoom!==prevZoom&&(newPosX=newPosX*(newZoom-1)/(prevZoom>1?prevZoom-1:prevZoom),newPosY=newPosY*(newZoom-1)/(prevZoom>1?prevZoom-1:prevZoom)),_this.setZoom(newZoom),_this.setPos([newPosX,newPosY]),_this.setTransitionDuration(_this.options.animDuration);},this.zoomOut=function(value){var _this_options_min,_this_options_min1,newPosX=_this.pos[0],newPosY=_this.pos[1],prevZoom=_this.zoom,newZoom=prevZoom-value>(null!=(_this_options_min=_this.options.min)?_this_options_min:1)?prevZoom-value:null!=(_this_options_min1=_this.options.min)?_this_options_min1:1;newZoom!==prevZoom&&(newPosX=newPosX*(newZoom-1)/(prevZoom-1),newPosY=newPosY*(newZoom-1)/(prevZoom-1)),_this.setZoom(newZoom),_this.setPos([newPosX,newPosY]),_this.setTransitionDuration(_this.options.animDuration);},this.zoomToZone=function(relX,relY,relWidth,relHeight){var _this_container;if(_this.container){var _this_options_max,newPosX=_this.pos[0],newPosY=_this.pos[1],parentRect=(null==(_this_container=_this.container)?void 0:_this_container.parentNode).getBoundingClientRect(),prevZoom=_this.zoom,optimalZoomX=parentRect.width/relWidth,optimalZoomY=parentRect.height/relHeight,newZoom=Math.min(optimalZoomX,optimalZoomY,null!=(_this_options_max=_this.options.max)?_this_options_max:8),rect=_this.container.getBoundingClientRect(),_ref=[rect.width/prevZoom/2,rect.height/prevZoom/2],_ref1=[relX+relWidth/2,relY+relHeight/2];newPosX=(_ref[0]-_ref1[0])*newZoom,newPosY=(_ref[1]-_ref1[1])*newZoom,_this.setZoom(newZoom),_this.setPos([newPosX,newPosY]),_this.setTransitionDuration(_this.options.animDuration);}},this.getNewPosition=function(x,y,newZoom){var prevZoom=[_this.zoom,_this.pos[0],_this.pos[1]][0];if(1===newZoom||!_this)return ZOOM_DEFAULT_POSITION;var _ref1=[_this.container.clientWidth,_this.container.clientHeight],clientWidth=_ref1[0],clientHeight=_ref1[1];if(newZoom>prevZoom)return [0,0];var w=-(x-clientWidth/2)/(clientWidth/2)*newZoom/2,h=-(y-clientHeight/2)/(clientHeight/2)*newZoom/2;return w>newZoom/2-.5&&(w=3.5),h>newZoom/2-.5&&(h=3.5),[clientWidth*w,clientHeight*h]},this.fullZoomInOnPosition=function(x,y){var _this_options_max,zoom=null!=(_this_options_max=_this.options.max)?_this_options_max:DefaultOptions.max;_this.setZoom(null!=zoom?zoom:DefaultOptions.max),_this.setPos(_this.getNewPosition(x,y,zoom)),_this.setTransitionDuration(_this.options.animDuration);},this.getLimitedShift=function(shift,minLimit,maxLimit,minElement,maxElement){if(shift>0){if(minElement>minLimit)return 0;if(minElement+shift>minLimit)return minLimit-minElement}else if(shift<0){if(maxElement<maxLimit)return 0;if(maxElement+shift<maxLimit)return maxLimit-maxElement}return shift},this.getCursor=function(canMoveOnX,canMoveOnY){return canMoveOnX&&canMoveOnY?"move":canMoveOnX?"ew-resize":canMoveOnY?"ns-resize":"auto"},this.move=function(shiftX,shiftY,transitionDuration){if(void 0===transitionDuration&&(transitionDuration=0),_this.container){var newPosX=_this.pos[0],newPosY=_this.pos[1],rect=_this.container.getBoundingClientRect(),parentRect=_this.container.parentNode.getBoundingClientRect(),shiftHorizontal=_this.transform?shiftY:shiftX,shiftVertical=_this.transform?shiftX:shiftY,_ref=_this.transform?[rect.height>parentRect.bottom-parentRect.top,shiftVertical>0&&rect.top-parentRect.top<0,shiftVertical<0&&rect.bottom-parentRect.bottom>0]:[rect.width>parentRect.right-parentRect.left,shiftHorizontal>0&&rect.left-parentRect.left<0,shiftHorizontal<0&&rect.right-parentRect.right>0],canMoveOnX=_ref[0]||_ref[1]||_ref[2];canMoveOnX&&(_this.transform?newPosX+=_this.getLimitedShift(shiftVertical,parentRect.top,parentRect.bottom,rect.top,rect.bottom):newPosX+=_this.getLimitedShift(shiftHorizontal,parentRect.left,parentRect.right,rect.left,rect.right));var _ref1=_this.transform?[rect.width>parentRect.right-parentRect.left,shiftHorizontal>0&&rect.right-parentRect.right<0,shiftHorizontal<0&&rect.left-parentRect.left>0]:[rect.height>parentRect.bottom-parentRect.top,shiftVertical>0&&rect.top-parentRect.top<0,shiftVertical<0&&rect.bottom-parentRect.bottom>0],canMoveOnY=_ref1[0]||_ref1[1]||_ref1[2];if(canMoveOnY)if(_this.transform){newPosY+=function(shift,minLimit,maxLimit,minElement,maxElement){if(shift>0){if(maxElement<maxLimit+1)return 0;if(maxElement+shift<maxLimit+1)return maxLimit-maxElement}else if(shift<0){if(minElement+1>minLimit)return 0;if(minElement+1+shift>minLimit)return minLimit-minElement}return shift}(shiftHorizontal,parentRect.left,parentRect.right,rect.left,rect.right);}else newPosY+=_this.getLimitedShift(shiftVertical,parentRect.top,parentRect.bottom,rect.top,rect.bottom);var cursor=_this.getCursor(canMoveOnX,canMoveOnY);_this.setPos([newPosX,newPosY]),_this.setCursor(cursor),_this.setTransitionDuration(transitionDuration);}},this.isDoubleTapping=function(){var _this_lastTouchTime,_this_options_doubleTouchMaxDelay,_this_lastDoubleTapTime,_this_options_doubleTouchMaxDelay1,touchTime=(new Date).getTime();return touchTime-(null!=(_this_lastTouchTime=_this.lastTouchTime)?_this_lastTouchTime:0)<(null!=(_this_options_doubleTouchMaxDelay=_this.options.doubleTouchMaxDelay)?_this_options_doubleTouchMaxDelay:300)&&touchTime-(null!=(_this_lastDoubleTapTime=_this.lastDoubleTapTime)?_this_lastDoubleTapTime:0)>(null!=(_this_options_doubleTouchMaxDelay1=_this.options.doubleTouchMaxDelay)?_this_options_doubleTouchMaxDelay1:750)?(_this.lastDoubleTapTime=touchTime,true):(_this.lastTouchTime=touchTime,false)},this.startDeceleration=function(lastShiftOnX,lastShiftOnY){var startTimestamp=null,startDecelerationMove=function(timestamp){null===startTimestamp&&(startTimestamp=timestamp);var _this_options_decelerationDuration,_this_options_decelerationDuration1,_this_options_decelerationDuration2,progress=timestamp-startTimestamp,ratio=((null!=(_this_options_decelerationDuration=_this.options.decelerationDuration)?_this_options_decelerationDuration:750)-progress)/(null!=(_this_options_decelerationDuration1=_this.options.decelerationDuration)?_this_options_decelerationDuration1:750),_ref=[lastShiftOnX*ratio,lastShiftOnY*ratio],shiftX=_ref[0],shiftY=_ref[1];progress<(null!=(_this_options_decelerationDuration2=_this.options.decelerationDuration)?_this_options_decelerationDuration2:750)&&Math.max(Math.abs(shiftX),Math.abs(shiftY))>1?(_this.move(shiftX,shiftY,0),_this.lastRequestAnimationId=requestAnimationFrame(startDecelerationMove)):_this.lastRequestAnimationId=null;};_this.lastRequestAnimationId=requestAnimationFrame(startDecelerationMove);},this.reset=function(){_this.setZoom(_this.options.initialZoom,true),_this.cursor=_this.options.defaultCursor,_this.setTransitionDuration(_this.options.animDuration),_this.setPos(ZOOM_DEFAULT_POSITION);},this.addScale=function(scale){ void 0===scale&&(scale=1),_this.handleZoomAdd(scale);},this.handleZoomAdd=function(scale){if(void 0===scale&&(scale=1),_this.options.allowZoom&&_this.options.allowWheel){var _this_options_max,newZoom=parseFloat((_this.zoom+scale).toFixed(_this.getPrecision(_this.options.zoomStep)));newZoom>(null!=(_this_options_max=_this.options.max)?_this_options_max:8)&&(newZoom=8),_this.setZoom(newZoom),_this.setPos(_this.pos),_this.setTransitionDuration(.05);}},this.subScale=function(scale){ void 0===scale&&(scale=1),_this.handleZoomSub(scale);},this.handleZoomSub=function(scale){if(void 0===scale&&(scale=1),_this.options.allowZoom&&_this.options.allowWheel){var newZoom=parseFloat((_this.zoom-scale).toFixed(_this.getPrecision(_this.options.zoomStep)));newZoom<1&&(newZoom=1),_this.setZoom(newZoom),_this.setPos(_this.pos),_this.setTransitionDuration(.05);}},this.handleMouseWheel=function(event){if(event.preventDefault(),_this.options.allowZoom&&_this.options.allowWheel){var _this_options_max,_this_options_min,velocity=event.deltaY<0?_this.options.scrollVelocity:0-_this.options.scrollVelocity,newZoom=parseFloat(Math.max(Math.min(_this.zoom+velocity,null!=(_this_options_max=_this.options.max)?_this_options_max:8),null!=(_this_options_min=_this.options.min)?_this_options_min:1).toFixed(_this.getPrecision(_this.options.zoomStep)));_this.setZoom(newZoom),_this.setTransitionDuration(.05);}},this.handleMouseStart=function(event){var _this_options_ignoredMouseButtons;event.preventDefault(),_this.options.allowPan&&!(null==(_this_options_ignoredMouseButtons=_this.options.ignoredMouseButtons)?void 0:_this_options_ignoredMouseButtons.includes(event.button))&&(_this._dragging=true,_this.lastRequestAnimationId&&cancelAnimationFrame(_this.lastRequestAnimationId),_this.lastCursor=_this.getCoordinates(event));},this.handleMouseMove=function(event){event.preventDefault(),_this.options.allowPan&&_this.lastCursor&&_this._dragging&&_this._touchOrMouseDrag(event);},this.handleMouseStop=function(event){event.preventDefault(),_this.lastShift&&(_this.startDeceleration(_this.lastShift[0],_this.lastShift[1]),_this.lastShift=null),_this.lastCursor=null,_this.setCursor("auto"),_this._dragging=false;},this.handleTouchStart=function(event){var isThisDoubleTapping=_this.isDoubleTapping();_this.isMultiTouch=event.touches.length,_this.options.allowTouchEvents||event.preventDefault(),_this.lastRequestAnimationId&&cancelAnimationFrame(_this.lastRequestAnimationId);var _this_getCoordinates=_this.getCoordinates(event.touches[0]),posX=_this_getCoordinates[0],posY=_this_getCoordinates[1];if(_this.isMultiTouch>1)_this.lastCursor=[posX,posY];else if(isThisDoubleTapping&&_this.options.allowZoom)if(1===_this.zoom){var _this_container_getBoundingClientRect=_this.container.getBoundingClientRect();_this_container_getBoundingClientRect.top,_this_container_getBoundingClientRect.left;var ref,ref1,x=_this_container_getBoundingClientRect.x,y=_this_container_getBoundingClientRect.y;posX=(ref1=[posX-(x=(ref=_this.transform?[y,x]:[x,y])[0]),posY-(y=ref[1])])[0],posY=ref1[1],_this.fullZoomInOnPosition(posX,posY);}else _this.reset();else _this._tapStartTime=(new Date).getTime(),_this.options.allowPan&&(_this.lastCursor=[posX,posY]);},this.handleTouchMove=function(event){if(_this.options.allowTouchEvents||event.preventDefault(),_this.lastCursor)if(1===_this.isMultiTouch)_this._touchOrMouseDrag(event.touches[0]),_this.lastTouchDistance=null;else if(_this.isMultiTouch>1){var newZoom=_this.zoom,_this_getCoordinates=_this.getCoordinates(event.touches[0]),pos1X=_this_getCoordinates[0],pos1Y=_this_getCoordinates[1],_this_getCoordinates1=_this.getCoordinates(event.touches[1]),pos2X=_this_getCoordinates1[0],pos2Y=_this_getCoordinates1[1],distance=Math.sqrt(Math.pow(pos2X-pos1X,2)+Math.pow(pos2Y-pos1Y,2));if(_this.lastTouchDistance&&distance&&distance!==_this.lastTouchDistance){var _this_options_max,_this_options_min,_this_options_max1;if(_this.options.allowZoom)if((newZoom+=(distance-_this.lastTouchDistance)/100)>(null!=(_this_options_max=_this.options.max)?_this_options_max:8))newZoom=null!=(_this_options_max1=_this.options.max)?_this_options_max1:8;else if(newZoom<(null!=(_this_options_min=_this.options.min)?_this_options_min:1)){var _this_options_min1;newZoom=null!=(_this_options_min1=_this.options.min)?_this_options_min1:1;}_this.setZoom(newZoom),_this.setTransitionDuration(0);}_this.lastCursor=[pos1X,pos1Y],_this.lastTouchDistance=distance;}},this.handleTouchStop=function(){_this.lastShift&&(_this.startDeceleration(_this.lastShift[0],_this.lastShift[1]),_this.lastShift=null),_this._tapStartTime&&(new Date).getTime()-_this._tapStartTime<200&&(null==_this.options.onTap||_this.options.onTap.call(_this.options)),_this._tapStartTime=void 0,_this.lastCursor=null,_this.lastTouchDistance=null,_this.isMultiTouch=0;},this.container=container,this.options=Object.assign({},DefaultOptions,options||{}),this.percentPos=ZOOM_DEFAULT_POSITION,this.transition=this.options.animDuration,this.zoom=1,this.cursor="auto",this.lastCursor=[0,0],this.lastShift=null,this.lastTouchDistance=null,this.lastRequestAnimationId=null,this.lastTouchTime=(new Date).getTime(),this.lastDoubleTapTime=(new Date).getTime(),this.transform=false,this.isMultiTouch=1,this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseStart=this.handleMouseStart.bind(this),this.handleMouseStop=this.handleMouseStop.bind(this),this.handleMouseWheel=this.handleMouseWheel.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchMove=this.handleTouchMove.bind(this),this.handleTouchStop=this.handleTouchStop.bind(this),this.getZoom=this.getZoom.bind(this),this.setZoom=this.setZoom.bind(this);}var _proto=Zoom.prototype;return _proto.setUpEventListeners=function(){var refCurrentValue=this.container;window.matchMedia("(pointer: fine)").matches?(this.options.allowWheel&&(null==refCurrentValue||refCurrentValue.addEventListener("wheel",this.handleMouseWheel,{passive:false})),null==refCurrentValue||refCurrentValue.addEventListener("mousedown",this.handleMouseStart,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("mousemove",this.handleMouseMove,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("mouseup",this.handleMouseStop,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("mouseleave",this.handleMouseStop,{passive:false})):(null==refCurrentValue||refCurrentValue.addEventListener("touchstart",this.handleTouchStart,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("touchmove",this.handleTouchMove,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("touchend",this.handleTouchStop,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("touchcancel",this.handleTouchStop,{passive:false}));},_proto.removeEventListeners=function(){var refCurrentValue=this.container;window.matchMedia("(pointer: fine)").matches?(this.options.allowWheel&&(null==refCurrentValue||refCurrentValue.removeEventListener("wheel",this.handleMouseWheel)),null==refCurrentValue||refCurrentValue.removeEventListener("mousedown",this.handleMouseStart),null==refCurrentValue||refCurrentValue.removeEventListener("mousemove",this.handleMouseMove),null==refCurrentValue||refCurrentValue.removeEventListener("mouseup",this.handleMouseStop),null==refCurrentValue||refCurrentValue.removeEventListener("mouseleave",this.handleMouseStop)):(null==refCurrentValue||refCurrentValue.removeEventListener("touchstart",this.handleTouchStart),null==refCurrentValue||refCurrentValue.removeEventListener("touchmove",this.handleTouchMove),null==refCurrentValue||refCurrentValue.removeEventListener("touchend",this.handleTouchStop),null==refCurrentValue||refCurrentValue.removeEventListener("touchcancel",this.handleTouchStop));},_proto.getPrecision=function(value){ void 0===value&&(value=1);var valueStr=value.toString();return valueStr.includes(".")?valueStr.split(".")[1].length:1},_proto.getCoordinates=function(event){var clientHeight=this.container.clientHeight,clientTop=this.container.clientTop,clientLeft=this.container.clientLeft,_ref=this.transform?[event.clientY,clientHeight-event.clientX]:[event.clientX-clientTop,event.clientY-clientLeft];return [_ref[0],_ref[1]]},_proto._touchOrMouseDrag=function(event){if(this.lastCursor){var _this_getCoordinates=this.getCoordinates(event),posX=_this_getCoordinates[0],posY=_this_getCoordinates[1],shiftX=posX-this.lastCursor[0],shiftY=posY-this.lastCursor[1];this.move(shiftX,shiftY,0),this.lastCursor=[posX,posY],this.lastShift=[shiftX,shiftY];}},_create_class$c(Zoom,[{key:"pos",get:function(){return [this.container.clientWidth*this.percentPos[0],this.container.clientHeight*this.percentPos[1]]}}]),Zoom}();Zoom.VERSION="1.0.0-beta.2";
6464
+ function _create_class$f(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var ZOOM_DEFAULT_POSITION=[0,0],DefaultOptions$1={initialZoom:1,defaultCursor:"pointer",scrollVelocity:.1,animDuration:.25,allowZoom:true,allowPan:true,onChange:function(){},onTranslateChange:function(){},onTap:function(){},max:8,min:1,zoomStep:.1,allowTouchEvents:false,allowWheel:true,ignoredMouseButtons:[],doubleTouchMaxDelay:300,decelerationDuration:750},Zoom=function(){function Zoom(container,options){var _this=this;this._dragging=false,this.destroy=function(){_this.setAllowZoom(false),_this.reset(),_this.removeEventListeners();},this.setTransform=function(trans){_this.transform=trans;},this.getTransform=function(){return _this.transform},this.updateTranslate=function(){var translateX=0,translateY=0;translateX=_this.percentPos[0]<0?_this.percentPos[0]<-0.5*(_this.zoom-1)?-0.5*(_this.zoom-1):_this.percentPos[0]:_this.percentPos[0]>.5*(_this.zoom-1)?.5*(_this.zoom-1):_this.percentPos[0],translateY=_this.percentPos[1]<0?_this.percentPos[1]<-0.5*(_this.zoom-1)?-0.5*(_this.zoom-1):_this.percentPos[1]:_this.percentPos[1]>.5*(_this.zoom-1)?.5*(_this.zoom-1):_this.percentPos[1],_this.percentPos=[translateX,translateY];},this.update=function(){_this.container&&(_this.updateTranslate(),_this.container.style.transition="transform ease-out "+_this.transition+"s",_this.container.style.transform="translate3d("+100*_this.percentPos[0]+"%, "+100*_this.percentPos[1]+"%, 0) scale("+_this.zoom+")");},this.setAllowZoom=function(allow){_this.options.allowZoom=allow;},this.setZoom=function(zoom,reset){zoom=parseFloat(zoom.toFixed(_this.getPrecision(_this.options.zoomStep))),_this.zoom!==zoom&&(_this.zoom=zoom,_this.update(),null==_this.options.onChange||_this.options.onChange.call(_this.options,+_this.zoom.toFixed(_this.getPrecision(_this.options.zoomStep)),reset));},this.getZoom=function(){return _this.zoom},this.setPos=function(pos){var _this_container,_this_container1,containerWidth=null==(_this_container=_this.container)?void 0:_this_container.clientWidth,containerHeight=null==(_this_container1=_this.container)?void 0:_this_container1.clientHeight;+_this.pos[0]===pos[0]&&+_this.pos[1]===pos[1]||(_this.percentPos=[pos[0]/containerWidth,pos[1]/containerHeight],_this.update(),null==_this.options.onTranslateChange||_this.options.onTranslateChange.call(_this.options,{posX:pos[0],posY:pos[1]}));},this.setTransitionDuration=function(duration){_this.transition=duration,_this.update();},this.setCursor=function(cursor){_this.container&&(_this.container.style.cssText+="cursor:"+cursor+";",_this.cursor=cursor);},this.zoomIn=function(value){var _this_options_max,_this_options_max1,newPosX=_this.pos[0],newPosY=_this.pos[1],prevZoom=_this.zoom,newZoom=prevZoom+value<(null!=(_this_options_max=_this.options.max)?_this_options_max:8)?prevZoom+value:null!=(_this_options_max1=_this.options.max)?_this_options_max1:8;newZoom!==prevZoom&&(newPosX=newPosX*(newZoom-1)/(prevZoom>1?prevZoom-1:prevZoom),newPosY=newPosY*(newZoom-1)/(prevZoom>1?prevZoom-1:prevZoom)),_this.setZoom(newZoom),_this.setPos([newPosX,newPosY]),_this.setTransitionDuration(_this.options.animDuration);},this.zoomOut=function(value){var _this_options_min,_this_options_min1,newPosX=_this.pos[0],newPosY=_this.pos[1],prevZoom=_this.zoom,newZoom=prevZoom-value>(null!=(_this_options_min=_this.options.min)?_this_options_min:1)?prevZoom-value:null!=(_this_options_min1=_this.options.min)?_this_options_min1:1;newZoom!==prevZoom&&(newPosX=newPosX*(newZoom-1)/(prevZoom-1),newPosY=newPosY*(newZoom-1)/(prevZoom-1)),_this.setZoom(newZoom),_this.setPos([newPosX,newPosY]),_this.setTransitionDuration(_this.options.animDuration);},this.zoomToZone=function(relX,relY,relWidth,relHeight){var _this_container;if(_this.container){var _this_options_max,newPosX=_this.pos[0],newPosY=_this.pos[1],parentRect=(null==(_this_container=_this.container)?void 0:_this_container.parentNode).getBoundingClientRect(),prevZoom=_this.zoom,optimalZoomX=parentRect.width/relWidth,optimalZoomY=parentRect.height/relHeight,newZoom=Math.min(optimalZoomX,optimalZoomY,null!=(_this_options_max=_this.options.max)?_this_options_max:8),rect=_this.container.getBoundingClientRect(),_ref=[rect.width/prevZoom/2,rect.height/prevZoom/2],_ref1=[relX+relWidth/2,relY+relHeight/2];newPosX=(_ref[0]-_ref1[0])*newZoom,newPosY=(_ref[1]-_ref1[1])*newZoom,_this.setZoom(newZoom),_this.setPos([newPosX,newPosY]),_this.setTransitionDuration(_this.options.animDuration);}},this.getNewPosition=function(x,y,newZoom){var prevZoom=[_this.zoom,_this.pos[0],_this.pos[1]][0];if(1===newZoom||!_this)return ZOOM_DEFAULT_POSITION;var _ref1=[_this.container.clientWidth,_this.container.clientHeight],clientWidth=_ref1[0],clientHeight=_ref1[1];if(newZoom>prevZoom)return [0,0];var w=-(x-clientWidth/2)/(clientWidth/2)*newZoom/2,h=-(y-clientHeight/2)/(clientHeight/2)*newZoom/2;return w>newZoom/2-.5&&(w=3.5),h>newZoom/2-.5&&(h=3.5),[clientWidth*w,clientHeight*h]},this.fullZoomInOnPosition=function(x,y){var _this_options_max,zoom=null!=(_this_options_max=_this.options.max)?_this_options_max:DefaultOptions$1.max;_this.setZoom(null!=zoom?zoom:DefaultOptions$1.max),_this.setPos(_this.getNewPosition(x,y,zoom)),_this.setTransitionDuration(_this.options.animDuration);},this.getLimitedShift=function(shift,minLimit,maxLimit,minElement,maxElement){if(shift>0){if(minElement>minLimit)return 0;if(minElement+shift>minLimit)return minLimit-minElement}else if(shift<0){if(maxElement<maxLimit)return 0;if(maxElement+shift<maxLimit)return maxLimit-maxElement}return shift},this.getCursor=function(canMoveOnX,canMoveOnY){return canMoveOnX&&canMoveOnY?"move":canMoveOnX?"ew-resize":canMoveOnY?"ns-resize":"auto"},this.move=function(shiftX,shiftY,transitionDuration){if(void 0===transitionDuration&&(transitionDuration=0),_this.container){var newPosX=_this.pos[0],newPosY=_this.pos[1],rect=_this.container.getBoundingClientRect(),parentRect=_this.container.parentNode.getBoundingClientRect(),shiftHorizontal=_this.transform?shiftY:shiftX,shiftVertical=_this.transform?shiftX:shiftY,_ref=_this.transform?[rect.height>parentRect.bottom-parentRect.top,shiftVertical>0&&rect.top-parentRect.top<0,shiftVertical<0&&rect.bottom-parentRect.bottom>0]:[rect.width>parentRect.right-parentRect.left,shiftHorizontal>0&&rect.left-parentRect.left<0,shiftHorizontal<0&&rect.right-parentRect.right>0],canMoveOnX=_ref[0]||_ref[1]||_ref[2];canMoveOnX&&(_this.transform?newPosX+=_this.getLimitedShift(shiftVertical,parentRect.top,parentRect.bottom,rect.top,rect.bottom):newPosX+=_this.getLimitedShift(shiftHorizontal,parentRect.left,parentRect.right,rect.left,rect.right));var _ref1=_this.transform?[rect.width>parentRect.right-parentRect.left,shiftHorizontal>0&&rect.right-parentRect.right<0,shiftHorizontal<0&&rect.left-parentRect.left>0]:[rect.height>parentRect.bottom-parentRect.top,shiftVertical>0&&rect.top-parentRect.top<0,shiftVertical<0&&rect.bottom-parentRect.bottom>0],canMoveOnY=_ref1[0]||_ref1[1]||_ref1[2];if(canMoveOnY)if(_this.transform){newPosY+=function(shift,minLimit,maxLimit,minElement,maxElement){if(shift>0){if(maxElement<maxLimit+1)return 0;if(maxElement+shift<maxLimit+1)return maxLimit-maxElement}else if(shift<0){if(minElement+1>minLimit)return 0;if(minElement+1+shift>minLimit)return minLimit-minElement}return shift}(shiftHorizontal,parentRect.left,parentRect.right,rect.left,rect.right);}else newPosY+=_this.getLimitedShift(shiftVertical,parentRect.top,parentRect.bottom,rect.top,rect.bottom);var cursor=_this.getCursor(canMoveOnX,canMoveOnY);_this.setPos([newPosX,newPosY]),_this.setCursor(cursor),_this.setTransitionDuration(transitionDuration);}},this.isDoubleTapping=function(){var _this_lastTouchTime,_this_options_doubleTouchMaxDelay,_this_lastDoubleTapTime,_this_options_doubleTouchMaxDelay1,touchTime=(new Date).getTime();return touchTime-(null!=(_this_lastTouchTime=_this.lastTouchTime)?_this_lastTouchTime:0)<(null!=(_this_options_doubleTouchMaxDelay=_this.options.doubleTouchMaxDelay)?_this_options_doubleTouchMaxDelay:300)&&touchTime-(null!=(_this_lastDoubleTapTime=_this.lastDoubleTapTime)?_this_lastDoubleTapTime:0)>(null!=(_this_options_doubleTouchMaxDelay1=_this.options.doubleTouchMaxDelay)?_this_options_doubleTouchMaxDelay1:750)?(_this.lastDoubleTapTime=touchTime,true):(_this.lastTouchTime=touchTime,false)},this.startDeceleration=function(lastShiftOnX,lastShiftOnY){var startTimestamp=null,startDecelerationMove=function(timestamp){null===startTimestamp&&(startTimestamp=timestamp);var _this_options_decelerationDuration,_this_options_decelerationDuration1,_this_options_decelerationDuration2,progress=timestamp-startTimestamp,ratio=((null!=(_this_options_decelerationDuration=_this.options.decelerationDuration)?_this_options_decelerationDuration:750)-progress)/(null!=(_this_options_decelerationDuration1=_this.options.decelerationDuration)?_this_options_decelerationDuration1:750),_ref=[lastShiftOnX*ratio,lastShiftOnY*ratio],shiftX=_ref[0],shiftY=_ref[1];progress<(null!=(_this_options_decelerationDuration2=_this.options.decelerationDuration)?_this_options_decelerationDuration2:750)&&Math.max(Math.abs(shiftX),Math.abs(shiftY))>1?(_this.move(shiftX,shiftY,0),_this.lastRequestAnimationId=requestAnimationFrame(startDecelerationMove)):_this.lastRequestAnimationId=null;};_this.lastRequestAnimationId=requestAnimationFrame(startDecelerationMove);},this.reset=function(){_this.setZoom(_this.options.initialZoom,true),_this.cursor=_this.options.defaultCursor,_this.setTransitionDuration(_this.options.animDuration),_this.setPos(ZOOM_DEFAULT_POSITION);},this.addScale=function(scale){ void 0===scale&&(scale=1),_this.handleZoomAdd(scale);},this.handleZoomAdd=function(scale){if(void 0===scale&&(scale=1),_this.options.allowZoom&&_this.options.allowWheel){var _this_options_max,newZoom=parseFloat((_this.zoom+scale).toFixed(_this.getPrecision(_this.options.zoomStep)));newZoom>(null!=(_this_options_max=_this.options.max)?_this_options_max:8)&&(newZoom=8),_this.setZoom(newZoom),_this.setPos(_this.pos),_this.setTransitionDuration(.05);}},this.subScale=function(scale){ void 0===scale&&(scale=1),_this.handleZoomSub(scale);},this.handleZoomSub=function(scale){if(void 0===scale&&(scale=1),_this.options.allowZoom&&_this.options.allowWheel){var newZoom=parseFloat((_this.zoom-scale).toFixed(_this.getPrecision(_this.options.zoomStep)));newZoom<1&&(newZoom=1),_this.setZoom(newZoom),_this.setPos(_this.pos),_this.setTransitionDuration(.05);}},this.handleMouseWheel=function(event){if(event.preventDefault(),_this.options.allowZoom&&_this.options.allowWheel){var _this_options_max,_this_options_min,velocity=event.deltaY<0?_this.options.scrollVelocity:0-_this.options.scrollVelocity,newZoom=parseFloat(Math.max(Math.min(_this.zoom+velocity,null!=(_this_options_max=_this.options.max)?_this_options_max:8),null!=(_this_options_min=_this.options.min)?_this_options_min:1).toFixed(_this.getPrecision(_this.options.zoomStep)));_this.setZoom(newZoom),_this.setTransitionDuration(.05);}},this.handleMouseStart=function(event){var _this_options_ignoredMouseButtons;event.preventDefault(),_this.options.allowPan&&!(null==(_this_options_ignoredMouseButtons=_this.options.ignoredMouseButtons)?void 0:_this_options_ignoredMouseButtons.includes(event.button))&&(_this._dragging=true,_this.lastRequestAnimationId&&cancelAnimationFrame(_this.lastRequestAnimationId),_this.lastCursor=_this.getCoordinates(event));},this.handleMouseMove=function(event){event.preventDefault(),_this.options.allowPan&&_this.lastCursor&&_this._dragging&&_this._touchOrMouseDrag(event);},this.handleMouseStop=function(event){event.preventDefault(),_this.lastShift&&(_this.startDeceleration(_this.lastShift[0],_this.lastShift[1]),_this.lastShift=null),_this.lastCursor=null,_this.setCursor("auto"),_this._dragging=false;},this.handleTouchStart=function(event){var isThisDoubleTapping=_this.isDoubleTapping();_this.isMultiTouch=event.touches.length,_this.options.allowTouchEvents||event.preventDefault(),_this.lastRequestAnimationId&&cancelAnimationFrame(_this.lastRequestAnimationId);var _this_getCoordinates=_this.getCoordinates(event.touches[0]),posX=_this_getCoordinates[0],posY=_this_getCoordinates[1];if(_this.isMultiTouch>1)_this.lastCursor=[posX,posY];else if(isThisDoubleTapping&&_this.options.allowZoom)if(1===_this.zoom){var _this_container_getBoundingClientRect=_this.container.getBoundingClientRect();_this_container_getBoundingClientRect.top,_this_container_getBoundingClientRect.left;var ref,ref1,x=_this_container_getBoundingClientRect.x,y=_this_container_getBoundingClientRect.y;posX=(ref1=[posX-(x=(ref=_this.transform?[y,x]:[x,y])[0]),posY-(y=ref[1])])[0],posY=ref1[1],_this.fullZoomInOnPosition(posX,posY);}else _this.reset();else _this._tapStartTime=(new Date).getTime(),_this.options.allowPan&&(_this.lastCursor=[posX,posY]);},this.handleTouchMove=function(event){if(_this.options.allowTouchEvents||event.preventDefault(),_this.lastCursor)if(1===_this.isMultiTouch)_this._touchOrMouseDrag(event.touches[0]),_this.lastTouchDistance=null;else if(_this.isMultiTouch>1){var newZoom=_this.zoom,_this_getCoordinates=_this.getCoordinates(event.touches[0]),pos1X=_this_getCoordinates[0],pos1Y=_this_getCoordinates[1],_this_getCoordinates1=_this.getCoordinates(event.touches[1]),pos2X=_this_getCoordinates1[0],pos2Y=_this_getCoordinates1[1],distance=Math.sqrt(Math.pow(pos2X-pos1X,2)+Math.pow(pos2Y-pos1Y,2));if(_this.lastTouchDistance&&distance&&distance!==_this.lastTouchDistance){var _this_options_max,_this_options_min,_this_options_max1;if(_this.options.allowZoom)if((newZoom+=(distance-_this.lastTouchDistance)/100)>(null!=(_this_options_max=_this.options.max)?_this_options_max:8))newZoom=null!=(_this_options_max1=_this.options.max)?_this_options_max1:8;else if(newZoom<(null!=(_this_options_min=_this.options.min)?_this_options_min:1)){var _this_options_min1;newZoom=null!=(_this_options_min1=_this.options.min)?_this_options_min1:1;}_this.setZoom(newZoom),_this.setTransitionDuration(0);}_this.lastCursor=[pos1X,pos1Y],_this.lastTouchDistance=distance;}},this.handleTouchStop=function(){_this.lastShift&&(_this.startDeceleration(_this.lastShift[0],_this.lastShift[1]),_this.lastShift=null),_this._tapStartTime&&(new Date).getTime()-_this._tapStartTime<200&&(null==_this.options.onTap||_this.options.onTap.call(_this.options)),_this._tapStartTime=void 0,_this.lastCursor=null,_this.lastTouchDistance=null,_this.isMultiTouch=0;},this.container=container,this.options=Object.assign({},DefaultOptions$1,options||{}),this.percentPos=ZOOM_DEFAULT_POSITION,this.transition=this.options.animDuration,this.zoom=1,this.cursor="auto",this.lastCursor=[0,0],this.lastShift=null,this.lastTouchDistance=null,this.lastRequestAnimationId=null,this.lastTouchTime=(new Date).getTime(),this.lastDoubleTapTime=(new Date).getTime(),this.transform=false,this.isMultiTouch=1,this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseStart=this.handleMouseStart.bind(this),this.handleMouseStop=this.handleMouseStop.bind(this),this.handleMouseWheel=this.handleMouseWheel.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchMove=this.handleTouchMove.bind(this),this.handleTouchStop=this.handleTouchStop.bind(this),this.getZoom=this.getZoom.bind(this),this.setZoom=this.setZoom.bind(this);}var _proto=Zoom.prototype;return _proto.setUpEventListeners=function(){var refCurrentValue=this.container;window.matchMedia("(pointer: fine)").matches?(this.options.allowWheel&&(null==refCurrentValue||refCurrentValue.addEventListener("wheel",this.handleMouseWheel,{passive:false})),null==refCurrentValue||refCurrentValue.addEventListener("mousedown",this.handleMouseStart,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("mousemove",this.handleMouseMove,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("mouseup",this.handleMouseStop,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("mouseleave",this.handleMouseStop,{passive:false})):(null==refCurrentValue||refCurrentValue.addEventListener("touchstart",this.handleTouchStart,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("touchmove",this.handleTouchMove,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("touchend",this.handleTouchStop,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("touchcancel",this.handleTouchStop,{passive:false}));},_proto.removeEventListeners=function(){var refCurrentValue=this.container;window.matchMedia("(pointer: fine)").matches?(this.options.allowWheel&&(null==refCurrentValue||refCurrentValue.removeEventListener("wheel",this.handleMouseWheel)),null==refCurrentValue||refCurrentValue.removeEventListener("mousedown",this.handleMouseStart),null==refCurrentValue||refCurrentValue.removeEventListener("mousemove",this.handleMouseMove),null==refCurrentValue||refCurrentValue.removeEventListener("mouseup",this.handleMouseStop),null==refCurrentValue||refCurrentValue.removeEventListener("mouseleave",this.handleMouseStop)):(null==refCurrentValue||refCurrentValue.removeEventListener("touchstart",this.handleTouchStart),null==refCurrentValue||refCurrentValue.removeEventListener("touchmove",this.handleTouchMove),null==refCurrentValue||refCurrentValue.removeEventListener("touchend",this.handleTouchStop),null==refCurrentValue||refCurrentValue.removeEventListener("touchcancel",this.handleTouchStop));},_proto.getPrecision=function(value){ void 0===value&&(value=1);var valueStr=value.toString();return valueStr.includes(".")?valueStr.split(".")[1].length:1},_proto.getCoordinates=function(event){var clientHeight=this.container.clientHeight,clientTop=this.container.clientTop,clientLeft=this.container.clientLeft,_ref=this.transform?[event.clientY,clientHeight-event.clientX]:[event.clientX-clientTop,event.clientY-clientLeft];return [_ref[0],_ref[1]]},_proto._touchOrMouseDrag=function(event){if(this.lastCursor){var _this_getCoordinates=this.getCoordinates(event),posX=_this_getCoordinates[0],posY=_this_getCoordinates[1],shiftX=posX-this.lastCursor[0],shiftY=posY-this.lastCursor[1];this.move(shiftX,shiftY,0),this.lastCursor=[posX,posY],this.lastShift=[shiftX,shiftY];}},_create_class$f(Zoom,[{key:"pos",get:function(){return [this.container.clientWidth*this.percentPos[0],this.container.clientHeight*this.percentPos[1]]}}]),Zoom}();Zoom.VERSION="1.0.0-beta.2";
6410
6465
 
6411
- function _extends$p() {
6412
- _extends$p = Object.assign || function(target) {
6466
+ function _extends$r() {
6467
+ _extends$r = Object.assign || function(target) {
6413
6468
  for(var i = 1; i < arguments.length; i++){
6414
6469
  var source = arguments[i];
6415
6470
  for(var key in source){
@@ -6420,10 +6475,10 @@
6420
6475
  }
6421
6476
  return target;
6422
6477
  };
6423
- return _extends$p.apply(this, arguments);
6478
+ return _extends$r.apply(this, arguments);
6424
6479
  }
6425
6480
  function __zoom(theme, container, options) {
6426
- theme.zoomUtil = new Zoom(container, _extends$p({}, options || {}, {
6481
+ theme.zoomUtil = new Zoom(container, _extends$r({}, options || {}, {
6427
6482
  min: 1,
6428
6483
  onChange: function(zoom, reset) {
6429
6484
  if (zoom !== theme._zoom) {
@@ -6434,7 +6489,7 @@
6434
6489
  },
6435
6490
  onTranslateChange: function(pos) {
6436
6491
  var _options_onTranslateChange;
6437
- theme.emit(EVENTS.zoomTranslateChange, pos);
6492
+ theme.emit(EVENTS$2.zoomTranslateChange, pos);
6438
6493
  options == null ? void 0 : (_options_onTranslateChange = options.onTranslateChange) == null ? void 0 : _options_onTranslateChange.call(options, pos);
6439
6494
  },
6440
6495
  onTap: options == null ? void 0 : options.onTap
@@ -6648,8 +6703,8 @@
6648
6703
  });
6649
6704
  };
6650
6705
  }
6651
- function _extends$o() {
6652
- _extends$o = Object.assign || function(target) {
6706
+ function _extends$q() {
6707
+ _extends$q = Object.assign || function(target) {
6653
6708
  for(var i = 1; i < arguments.length; i++){
6654
6709
  var source = arguments[i];
6655
6710
  for(var key in source){
@@ -6660,7 +6715,7 @@
6660
6715
  }
6661
6716
  return target;
6662
6717
  };
6663
- return _extends$o.apply(this, arguments);
6718
+ return _extends$q.apply(this, arguments);
6664
6719
  }
6665
6720
  function _ts_generator$6(thisArg, body) {
6666
6721
  var f, y, t, _ = {
@@ -6788,7 +6843,7 @@
6788
6843
  }
6789
6844
  if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
6790
6845
  // TODO: 因为回放是一组, 位置以第一个位置为准
6791
- recControls.push(recControls[0] ? _extends$o({}, item, {
6846
+ recControls.push(recControls[0] ? _extends$q({}, item, {
6792
6847
  part: recControls[0].part
6793
6848
  }) : item);
6794
6849
  return false;
@@ -6811,7 +6866,7 @@
6811
6866
  }
6812
6867
  if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
6813
6868
  // TODO: 因为回放是一组, 位置以第一个位置为准
6814
- recControls.push(recControls[0] ? _extends$o({}, item, {
6869
+ recControls.push(recControls[0] ? _extends$q({}, item, {
6815
6870
  part: recControls[0].part
6816
6871
  }) : item);
6817
6872
  return false;
@@ -6920,14 +6975,14 @@
6920
6975
  2,
6921
6976
  template
6922
6977
  ];
6923
- theme.emit(EVENTS.message, theme.i18n.t('FETCH_THEME_FAILED'), 'themeError');
6978
+ theme.emit(EVENTS$2.message, theme.i18n.t('FETCH_THEME_FAILED'), 'themeError');
6924
6979
  return [
6925
6980
  2,
6926
6981
  null
6927
6982
  ];
6928
6983
  case 4:
6929
6984
  _state.sent();
6930
- theme.emit(EVENTS.message, theme.i18n.t('FETCH_THEME_FAILED'), 'themeError');
6985
+ theme.emit(EVENTS$2.message, theme.i18n.t('FETCH_THEME_FAILED'), 'themeError');
6931
6986
  return [
6932
6987
  2,
6933
6988
  null
@@ -7062,8 +7117,8 @@
7062
7117
  return Component;
7063
7118
  }();
7064
7119
 
7065
- function _extends$n() {
7066
- _extends$n = Object.assign || function(target) {
7120
+ function _extends$p() {
7121
+ _extends$p = Object.assign || function(target) {
7067
7122
  for(var i = 1; i < arguments.length; i++){
7068
7123
  var source = arguments[i];
7069
7124
  for(var key in source){
@@ -7074,9 +7129,9 @@
7074
7129
  }
7075
7130
  return target;
7076
7131
  };
7077
- return _extends$n.apply(this, arguments);
7132
+ return _extends$p.apply(this, arguments);
7078
7133
  }
7079
- function _inherits$m(subClass, superClass) {
7134
+ function _inherits$n(subClass, superClass) {
7080
7135
  if (typeof superClass !== "function" && superClass !== null) {
7081
7136
  throw new TypeError("Super expression must either be null or a function");
7082
7137
  }
@@ -7087,28 +7142,28 @@
7087
7142
  configurable: true
7088
7143
  }
7089
7144
  });
7090
- if (superClass) _set_prototype_of$p(subClass, superClass);
7145
+ if (superClass) _set_prototype_of$r(subClass, superClass);
7091
7146
  }
7092
- function _set_prototype_of$p(o, p) {
7093
- _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7147
+ function _set_prototype_of$r(o, p) {
7148
+ _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7094
7149
  o.__proto__ = p;
7095
7150
  return o;
7096
7151
  };
7097
- return _set_prototype_of$p(o, p);
7152
+ return _set_prototype_of$r(o, p);
7098
7153
  }
7099
7154
  var Footer$1 = /*#__PURE__*/ function(Component) {
7100
- _inherits$m(Footer, Component);
7155
+ _inherits$n(Footer, Component);
7101
7156
  function Footer(options) {
7102
7157
  if (options === void 0) options = {};
7103
- return Component.call(this, _extends$n({}, options, {
7158
+ return Component.call(this, _extends$p({}, options, {
7104
7159
  cType: 'footer'
7105
7160
  })) || this;
7106
7161
  }
7107
7162
  return Footer;
7108
7163
  }(Component);
7109
7164
 
7110
- function _extends$m() {
7111
- _extends$m = Object.assign || function(target) {
7165
+ function _extends$o() {
7166
+ _extends$o = Object.assign || function(target) {
7112
7167
  for(var i = 1; i < arguments.length; i++){
7113
7168
  var source = arguments[i];
7114
7169
  for(var key in source){
@@ -7119,9 +7174,9 @@
7119
7174
  }
7120
7175
  return target;
7121
7176
  };
7122
- return _extends$m.apply(this, arguments);
7177
+ return _extends$o.apply(this, arguments);
7123
7178
  }
7124
- function _inherits$l(subClass, superClass) {
7179
+ function _inherits$m(subClass, superClass) {
7125
7180
  if (typeof superClass !== "function" && superClass !== null) {
7126
7181
  throw new TypeError("Super expression must either be null or a function");
7127
7182
  }
@@ -7132,20 +7187,20 @@
7132
7187
  configurable: true
7133
7188
  }
7134
7189
  });
7135
- if (superClass) _set_prototype_of$o(subClass, superClass);
7190
+ if (superClass) _set_prototype_of$q(subClass, superClass);
7136
7191
  }
7137
- function _set_prototype_of$o(o, p) {
7138
- _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7192
+ function _set_prototype_of$q(o, p) {
7193
+ _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7139
7194
  o.__proto__ = p;
7140
7195
  return o;
7141
7196
  };
7142
- return _set_prototype_of$o(o, p);
7197
+ return _set_prototype_of$q(o, p);
7143
7198
  }
7144
7199
  var Header$1 = /*#__PURE__*/ function(Component) {
7145
- _inherits$l(Header, Component);
7200
+ _inherits$m(Header, Component);
7146
7201
  function Header(options) {
7147
7202
  if (options === void 0) options = {};
7148
- return Component.call(this, _extends$m({}, options, {
7203
+ return Component.call(this, _extends$o({}, options, {
7149
7204
  cType: 'header'
7150
7205
  })) || this;
7151
7206
  }
@@ -7311,8 +7366,8 @@
7311
7366
  };
7312
7367
  }
7313
7368
 
7314
- function _extends$l() {
7315
- _extends$l = Object.assign || function(target) {
7369
+ function _extends$n() {
7370
+ _extends$n = Object.assign || function(target) {
7316
7371
  for(var i = 1; i < arguments.length; i++){
7317
7372
  var source = arguments[i];
7318
7373
  for(var key in source){
@@ -7323,9 +7378,9 @@
7323
7378
  }
7324
7379
  return target;
7325
7380
  };
7326
- return _extends$l.apply(this, arguments);
7381
+ return _extends$n.apply(this, arguments);
7327
7382
  }
7328
- function _inherits$k(subClass, superClass) {
7383
+ function _inherits$l(subClass, superClass) {
7329
7384
  if (typeof superClass !== "function" && superClass !== null) {
7330
7385
  throw new TypeError("Super expression must either be null or a function");
7331
7386
  }
@@ -7336,23 +7391,23 @@
7336
7391
  configurable: true
7337
7392
  }
7338
7393
  });
7339
- if (superClass) _set_prototype_of$n(subClass, superClass);
7394
+ if (superClass) _set_prototype_of$p(subClass, superClass);
7340
7395
  }
7341
- function _set_prototype_of$n(o, p) {
7342
- _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7396
+ function _set_prototype_of$p(o, p) {
7397
+ _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7343
7398
  o.__proto__ = p;
7344
7399
  return o;
7345
7400
  };
7346
- return _set_prototype_of$n(o, p);
7401
+ return _set_prototype_of$p(o, p);
7347
7402
  }
7348
7403
  /**
7349
7404
  * 全局全屏
7350
7405
  * 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
7351
7406
  * @category Control
7352
7407
  */ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
7353
- _inherits$k(GlobalFullscreen, Fullscreen);
7408
+ _inherits$l(GlobalFullscreen, Fullscreen);
7354
7409
  function GlobalFullscreen(options) {
7355
- return Fullscreen.call(this, _extends$l({}, options, {
7410
+ return Fullscreen.call(this, _extends$n({}, options, {
7356
7411
  controlType: 'button',
7357
7412
  classNameSuffix: 'global-fullscreen'
7358
7413
  })) || this;
@@ -7383,8 +7438,8 @@
7383
7438
  return GlobalFullscreen;
7384
7439
  }(Fullscreen);
7385
7440
 
7386
- function _extends$k() {
7387
- _extends$k = Object.assign || function(target) {
7441
+ function _extends$m() {
7442
+ _extends$m = Object.assign || function(target) {
7388
7443
  for(var i = 1; i < arguments.length; i++){
7389
7444
  var source = arguments[i];
7390
7445
  for(var key in source){
@@ -7395,9 +7450,9 @@
7395
7450
  }
7396
7451
  return target;
7397
7452
  };
7398
- return _extends$k.apply(this, arguments);
7453
+ return _extends$m.apply(this, arguments);
7399
7454
  }
7400
- function _inherits$j(subClass, superClass) {
7455
+ function _inherits$k(subClass, superClass) {
7401
7456
  if (typeof superClass !== "function" && superClass !== null) {
7402
7457
  throw new TypeError("Super expression must either be null or a function");
7403
7458
  }
@@ -7408,23 +7463,23 @@
7408
7463
  configurable: true
7409
7464
  }
7410
7465
  });
7411
- if (superClass) _set_prototype_of$m(subClass, superClass);
7466
+ if (superClass) _set_prototype_of$o(subClass, superClass);
7412
7467
  }
7413
- function _set_prototype_of$m(o, p) {
7414
- _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7415
- o.__proto__ = p;
7468
+ function _set_prototype_of$o(o, p) {
7469
+ _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7470
+ o.__proto__ = p;
7416
7471
  return o;
7417
7472
  };
7418
- return _set_prototype_of$m(o, p);
7473
+ return _set_prototype_of$o(o, p);
7419
7474
  }
7420
7475
  /**
7421
7476
  * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
7422
7477
  * @category Control
7423
7478
  */ var CapturePicture = /*#__PURE__*/ function(Control) {
7424
- _inherits$j(CapturePicture, Control);
7479
+ _inherits$k(CapturePicture, Control);
7425
7480
  function CapturePicture(options) {
7426
7481
  var _this;
7427
- _this = Control.call(this, _extends$k({}, options, {
7482
+ _this = Control.call(this, _extends$m({}, options, {
7428
7483
  tagName: 'span',
7429
7484
  classNameSuffix: 'capture-picture'
7430
7485
  })) || this, _this._timer = null;
@@ -7432,7 +7487,7 @@
7432
7487
  _this._render();
7433
7488
  if (typeof _this.options.onCapture === 'function') {
7434
7489
  // 监听截图结果事件
7435
- _this.on(EVENTS.control.capturePictureResult, _this.options.onCapture);
7490
+ _this.on(EVENTS$2.control.capturePictureResult, _this.options.onCapture);
7436
7491
  }
7437
7492
  return _this;
7438
7493
  }
@@ -7456,7 +7511,7 @@
7456
7511
  var _this = this;
7457
7512
  this.active = true;
7458
7513
  var _this_options_type, _this_options_cloudRecUpload;
7459
- this.emit(EVENTS.control.capturePicture, {
7514
+ this.emit(EVENTS$2.control.capturePicture, {
7460
7515
  type: (_this_options_type = this.options.type) != null ? _this_options_type : 'download',
7461
7516
  quality: this.options.quality || 0.9,
7462
7517
  cloudRecUpload: (_this_options_cloudRecUpload = this.options.cloudRecUpload) != null ? _this_options_cloudRecUpload : true
@@ -7482,7 +7537,7 @@
7482
7537
  * Copyright (c) 2026-05-04 Ezviz-OpenBiz
7483
7538
  * Released under the MIT License.
7484
7539
  */
7485
- var PTZ_DEFAULT_OPTIONS={language:"zh",env:{domain:"https://open.ys7.com"},accessToken:"",speed:2,locales:{zh:{GET_PTZ_STATUS:"获取当前云台状态",GET_PTZ_STATUS_FAILED:"未加载Theme模块,无法获取云台状态",MOBILE_HIDE_PTZ:"移动端,非全屏状态不展示云台",OPTION_PTZ_FAILED:"未加载Theme模块,无法操作云台",MOBILE_PTZ_TIPS:"请通过操控云台来调整摄像机视角",PTZ_FAST:"快",PTZ_MID:"中",PTZ_SLOW:"慢",PTZ_SPEED:"调整云台转动速度",DEVICE_ZOOM:"控制设备放大/缩小画面",DEVICE_FOCUS:"调整设备焦距"},en:{GET_PTZ_STATUS:"Get current PTZ status",GET_PTZ_STATUS_FAILED:"Theme module is not loaded, PTZ status cannot be obtained",MOBILE_HIDE_PTZ:"Mobile terminal, PTZ is not displayed in non-full screen state",OPTION_PTZ_FAILED:"Theme module is not loaded, PTZ cannot be operated",MOBILE_PTZ_TIPS:"Adjust camera angle by manipulating gimbal",PTZ_FAST:"F",PTZ_MID:"M",PTZ_SLOW:"S",PTZ_SPEED:"Adjust the PTZ rotation speed",DEVICE_ZOOM:"Control the device to zoom in/out of the screen",DEVICE_FOCUS:"Adjusting the device's focal length"}}},PTZ_SPEED={1:1,2:3,3:7,slow:1,mid:3,fast:7},BasePtz=function(){function BasePtz(container,options){var _this_options_locales,_this_options_locales1,_this_options_locales2;if(void 0===options&&(options={}),!container)throw new Error("Ptz container is required");(this.options=deepmerge(PTZ_DEFAULT_OPTIONS,options,{clone:false}),null==(_this_options_locales=this.options.locales)?void 0:_this_options_locales[this.options.language])?this.locale=null==(_this_options_locales1=this.options.locales)?void 0:_this_options_locales1[this.options.language]:this.locale=null==(_this_options_locales2=this.options.locales)?void 0:_this_options_locales2.zh;this.$container=container,this.speed=PTZ_SPEED[this.options.speed||2];}var _proto=BasePtz.prototype;return _proto.updateOptions=function(options){this.options=deepmerge(this.options,options,{clone:false});},_proto.destroy=function(){},BasePtz}();function _set_prototype_of$1$3(o,p){return _set_prototype_of$1$3=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$3(o,p)}var MobilePtz=function(BasePtz){function MobilePtz(container,options){var _this;return (_this=BasePtz.call(this,container,options)||this)._touchstart=_this._touchstart.bind(_this),_this._touchend=_this._touchend.bind(_this),_this._render(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$1$3(subClass,superClass);}(MobilePtz,BasePtz);var _proto=MobilePtz.prototype;return _proto.destroy=function(){this._removeEventListener(),this.$content&&(this.$content.remove(),this.$content=null),BasePtz.prototype.destroy.call(this);},_proto._render=function(){this.$content=document.createElement("div"),this.$content.classList.add("ez-mobile-ptz-content"),this.$content.innerHTML='\n <div class="ez-mobile-ptz-wrap">\n <div class="ez-mobile-ptz-container">\n <div class="ez-mobile-ptz-center ez-mobile-ptz-center"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-top ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-left ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-bottom ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-right ez-mobile-ptz-default"></div>\n </div>\n </div>\n ',this.$container.appendChild(this.$content),this._addEventListener();},_proto._addEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.addEventListener(touchstart,this._touchstart),$warp.addEventListener(touchend,this._touchend));},_proto._touchstart=function(e){e.preventDefault(),this._handlePtzTouch(e,"start");},_proto._touchend=function(e){e.preventDefault(),this._handlePtzTouch(e,"stop");},_proto._removeEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.removeEventListener(touchstart,this._touchstart),$warp.removeEventListener(touchend,this._touchend));},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_e_changedTouches_,_e_changedTouches_1,_this_options_env,_this_options_token_deviceToken1,_this_options_token1;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");var _this_options_env1,$warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),rect=$warp.getBoundingClientRect(),containerCenterX=rect.left+130,containerCenterY=rect.top+130,left=(e.x||(null==(_e_changedTouches_=e.changedTouches[0])?void 0:_e_changedTouches_.clientX))-containerCenterX,top=(e.y||(null==(_e_changedTouches_1=e.changedTouches[0])?void 0:_e_changedTouches_1.clientY))-containerCenterY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),$icons=$warp.querySelectorAll(".ez-mobile-ptz-icon");(Math.abs(left)>Math.abs(top)?left>0?(direction=3,$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=2,$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):top>0?(direction=1,$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=0,$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")),$warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop",$warp.style.cssText="",$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"));var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{direction:direction,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed","1"),data.append("direction",direction+""),data.append("accessToken",token),fetch(url,{method:"POST",body:data}).then(function(response){return response.json()}).then(function(rt){200===rt.code||[60005,60002,60003,60004].includes(+rt.code)&&($warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"),null==operationResultCb||operationResultCb(rt);}).catch(function(err){}).finally(function(){operationResultCb=null;});},MobilePtz}(BasePtz);function asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value;}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw);}function _async_to_generator$5(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"throw",err);}_next(void 0);})}}function _create_class$b(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$l(o,p){return _set_prototype_of$l=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$l(o,p)}function _ts_generator$5(thisArg,body){var f,y,t,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]},g=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return g.next=verb(0),g.throw=verb(1),g.return=verb(2),"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return function(op){if(f)throw new TypeError("Generator is already executing.");for(;g&&(g=0,op[0]&&(_=0)),_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=_.trys,(t=t.length>0&&t[t.length-1])||6!==op[0]&&2!==op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_);}catch(e){op=[6,e],y=0;}finally{f=t=0;}if(5&op[0])throw op[1];return {value:op[0]?op[1]:void 0,done:true}}([n,v])}}}var Ptz$1=function(BasePtz){function Ptz(container,options){var _this;return void 0===options&&(options={}),(_this=BasePtz.call(this,container,options)||this)._isMobile=distExports$4.isMobile(),_this._isRotate=false,_this._clearTimer=null,_this._$wrapper=document.createElement("div"),_this._$wrapper.className="ez-ptz-container-wrap",_this._$directionCircleContainer=document.createElement("div"),_this._$directionCircleContainer.classList.add("ez-ptz-container"),_this._$directionCircleContainer.innerHTML='\n <div class="ez-ptz-main ez-ptz-direction-center"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top" data-direction="0"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top-left" data-direction="4"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left" data-direction="2"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left-bottom" data-direction="5"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom" data-direction="1"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom-right" data-direction="7"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right" data-direction="3"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right-top" data-direction="6"></div>\n ',_this._$wrapper.appendChild(_this._$directionCircleContainer),_this._$speedContainer=document.createElement("div"),_this._$speedContainer.classList.add("ez-ptz-speed-container"),_this._$speedContainer.innerHTML='\n <div class="ez-ptz-speed-progress" title="'+_this.locale.PTZ_SPEED+'">\n <div class="ez-ptz-speed-progress-line">\n <div class="ez-ptz-speed-progress-line-dot '+(1===_this.speed?"ez-ptz-speed-active":"")+'" data-id="slow" data-index="1" data-value="1"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(3===_this.speed?"ez-ptz-speed-active":"")+'" data-id="mid" data-index="2" data-value="3"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(7===_this.speed?"ez-ptz-speed-active":"")+'" data-id="fast" data-index="3" data-value="7"></div>\n </div>\n <div class="ez-ptz-speed-progress-points">\n <div class="ez-ptz-speed-progress-points-slow">\n '+_this.locale.PTZ_SLOW+'\n </div>\n <div class="ez-ptz-speed-progress-points-mid">\n '+_this.locale.PTZ_MID+'\n </div>\n <div class="ez-ptz-speed-progress-points-fast">\n '+_this.locale.PTZ_FAST+"\n </div>\n </div>\n </div>\n ",_this._$wrapper.appendChild(_this._$speedContainer),_this._$btnContainer=document.createElement("div"),_this._$btnContainer.classList.add("ez-ptz-btn-container"),_this._$btnContainer.innerHTML='\n <div class="ez-ptz-btn-zoom" title="'+_this.locale.DEVICE_ZOOM+'" style="user-select: none;">\n <div class="ez-ptz-btn-zoom-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M563.2 198.4c179.2 0 326.4 147.2 326.4 326.4s-147.2 326.4-326.4 326.4S230.4 704 230.4 524.8s147.2-326.4 332.8-326.4z m0 64c-147.2 0-262.4 115.2-262.4 262.4s115.2 262.4 262.4 262.4 262.4-115.2 262.4-262.4S704 262.4 563.2 262.4z" fill="#ffffff"></path>\n <path d="M691.2 556.8H428.8c-19.2 0-32-12.8-32-32s12.8-32 32-32h262.4c19.2 0 32 12.8 32 32s-12.8 32-32 32z" fill="#ffffff">\n </path>\n <path d="M556.8 691.2c-19.2 0-32-12.8-32-32V396.8c0-19.2 12.8-32 32-32s32 12.8 32 32v262.4c0 19.2-12.8 32-32 32z" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-zoom-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M569.6 838.4c-172.8 0-307.2-140.8-307.2-307.2s140.8-307.2 307.2-307.2 307.2 140.8 307.2 307.2-140.8 307.2-307.2 307.2z m0-64c134.4 0 249.6-108.8 249.6-249.6S704 281.6 569.6 281.6 320 396.8 320 531.2s108.8 243.2 249.6 243.2z" fill="#ffffff"></path>\n <path d="M691.2 563.2H448c-19.2 0-32-12.8-32-32s12.8-38.4 32-38.4h249.6c19.2 0 32 12.8 32 32s-19.2 38.4-38.4 38.4z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n <div class="ez-ptz-btn-focal" title="'+_this.locale.DEVICE_FOCUS+'" style="user-select: none;">\n <div class="ez-ptz-btn-focal-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M646.4 825.6H320c-44.8 0-83.2-38.4-83.2-83.2V409.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6zM320 390.4c-12.8 0-19.2 6.4-19.2 19.2v326.4c0 12.8 6.4 19.2 19.2 19.2h326.4c12.8 0 19.2-6.4 19.2-19.2V409.6c0-12.8-6.4-19.2-19.2-19.2H320z" fill="#ffffff"></path>\n <path d="M396.8 358.4V281.6c0-25.6 25.6-51.2 51.2-51.2h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H704l-6.4-268.8" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-focal-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M320 358.4h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H320c-25.6 0-51.2-25.6-51.2-51.2V409.6c0-25.6 25.6-51.2 51.2-51.2z" fill="#ffffff"></path>\n <path d="M774.4 697.6H704c-19.2 0-32-12.8-32-32s12.8-32 32-32h70.4c12.8 0 19.2-6.4 19.2-19.2V281.6c0-12.8-6.4-19.2-19.2-19.2H448c-12.8 0-19.2 6.4-19.2 19.2v70.4c0 19.2-12.8 32-32 32s-32-12.8-32-25.6V281.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n ',_this._$wrapper.appendChild(_this._$btnContainer),container.appendChild(_this._$wrapper),_this._$directionCircleContainer.onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._$directionCircleContainer.ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._onSwitchSpeed=function(e){var list=Array.from(_this._$speedContainer.querySelectorAll(".ez-ptz-speed-progress-line-dot"));if(list.includes(e.target)&&!e.target.classList.contains("ez-ptz-speed-active")){list.forEach(function(item){item===e.target?item.classList.add("ez-ptz-speed-active"):item.classList.remove("ez-ptz-speed-active");});var value=e.target.getAttribute("data-value"),index=e.target.getAttribute("data-index");_this.speed=+value,null==_this.options.onSpeedChange||_this.options.onSpeedChange.call(_this.options,+index);}},_this._$speedContainer.onmouseup=_this._onSwitchSpeed,_this._isMobile&&(_this._$speedContainer.ontouchend=_this._onSwitchSpeed),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");}),_this._isMobile&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");})),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$l(subClass,superClass);}(Ptz,BasePtz);var _proto=Ptz.prototype;return _proto.destroy=function(){this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer&&(this._$directionCircleContainer.remove(),this._$directionCircleContainer=null),this._$speedContainer&&(this._onSwitchSpeed=null,this._$speedContainer.remove(),this._$speedContainer=null),this._$btnContainer&&(this._$btnContainer.remove(),this._$btnContainer=null),this._$wrapper&&(this._$wrapper.remove(),this._$wrapper=null),BasePtz.prototype.destroy.call(this);},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_this_options_env,_this_options_token_deviceToken1,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzQueue||(this._ptzQueue=Promise.resolve());var container=this._$directionCircleContainer.getBoundingClientRect(),containerCenterX=container.left+(this._$directionCircleContainer.clientWidth+2)/2,containerCenterY=container.top+(this._$directionCircleContainer.clientHeight+2)/2,eventX=e.x||e.changedTouches[0].clientX,eventY=e.y||e.changedTouches[0].clientY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),backDeg=0;function getAreaId(x,y){var rad=Math.atan2(y,x);rad<0&&(rad+=2*Math.PI);var deg=rad*(180/Math.PI)-225-12.5;return deg<0&&(deg+=360),Math.floor(deg/45)+1}var _this_options_env1,left=eventX-containerCenterX,top=eventY-containerCenterY;if(this.isRotate)switch(getAreaId(left,top)){case 1:direction=2,backDeg=90;break;case 2:direction=4,backDeg=135;break;case 3:direction=0,backDeg=180;break;case 4:direction=6,backDeg=225;break;case 5:direction=3,backDeg=270;break;case 6:direction=7,backDeg=315;break;case 7:direction=1,backDeg=0;break;case 8:direction=5,backDeg=45;}else switch(getAreaId(left,top)){case 1:direction=0,backDeg=180;break;case 2:direction=6,backDeg=225;break;case 3:direction=3,backDeg=270;break;case 4:direction=7,backDeg=315;break;case 5:direction=1,backDeg=0;break;case 6:direction=5,backDeg=45;break;case 7:direction=2,backDeg=90;break;case 8:direction=4,backDeg=135;}(this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer.style.cssText="start"===type?"background-image:linear-gradient("+backDeg+"deg, #4277FF 0%, rgba(100,143,252,0.00) 30%)":"","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{areaId:getAreaId(left,top),direction:direction,backDeg:backDeg,isRotate:this.isRotate,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzQueue=this._ptzQueue.then(function(){return _async_to_generator$5(function(){var _this;return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return _this=this,[4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){var _rt_result;null==operationResultCb||operationResultCb(rt);var code=rt.code||(null==rt||null==(_rt_result=rt.result)?void 0:_rt_result.code);return [6e4,60001,60002,60003,60004,60005,60006,10002].includes(+code)&&(_this._$directionCircleContainer.style.cssText="background-image:linear-gradient("+backDeg+"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)"),rt}).catch(function(err){}).finally(function(){operationResultCb=null,"stop"===type&&(_this._clearTimer=setTimeout(function(){_this._$directionCircleContainer.style.cssText="";},1e3));})];case 1:return [2,_state.sent()]}})}).call(_this)}),"stop"===type&&(this._ptzQueue=this._ptzQueue.finally(function(){}));},_proto._handleBtnTouch=function(btn,option,type){var _this_options_token,_this_options_env,_this_options_token_deviceToken,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)?void 0:_this_options_token.deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzOperation||(this._ptzOperation=Promise.resolve());var direction=8;direction="zoom"===btn?"add"===option?8:9:"add"===option?10:11;var _this_options_env1,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken.video);"stop"===type&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{btn:btn,option:option,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzOperation=this._ptzOperation.then(function(){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){return null==operationResultCb||operationResultCb(rt),rt}).catch(function(err){}).finally(function(){operationResultCb=null;})];case 1:return [2,_state.sent()]}})})()}),"stop"===type&&(this._ptzOperation=this._ptzOperation.finally(function(){_this._ptzOperation=null;}));},_create_class$b(Ptz,[{key:"isRotate",get:function(){return this._isRotate},set:function(isRotate){this._isRotate=isRotate;}}]),Ptz}(BasePtz);
7540
+ var PTZ_DEFAULT_OPTIONS={language:"zh",env:{domain:"https://open.ys7.com"},accessToken:"",speed:2,locales:{zh:{GET_PTZ_STATUS:"获取当前云台状态",GET_PTZ_STATUS_FAILED:"未加载Theme模块,无法获取云台状态",MOBILE_HIDE_PTZ:"移动端,非全屏状态不展示云台",OPTION_PTZ_FAILED:"未加载Theme模块,无法操作云台",MOBILE_PTZ_TIPS:"请通过操控云台来调整摄像机视角",PTZ_FAST:"快",PTZ_MID:"中",PTZ_SLOW:"慢",PTZ_SPEED:"调整云台转动速度",DEVICE_ZOOM:"控制设备放大/缩小画面",DEVICE_FOCUS:"调整设备焦距"},en:{GET_PTZ_STATUS:"Get current PTZ status",GET_PTZ_STATUS_FAILED:"Theme module is not loaded, PTZ status cannot be obtained",MOBILE_HIDE_PTZ:"Mobile terminal, PTZ is not displayed in non-full screen state",OPTION_PTZ_FAILED:"Theme module is not loaded, PTZ cannot be operated",MOBILE_PTZ_TIPS:"Adjust camera angle by manipulating gimbal",PTZ_FAST:"F",PTZ_MID:"M",PTZ_SLOW:"S",PTZ_SPEED:"Adjust the PTZ rotation speed",DEVICE_ZOOM:"Control the device to zoom in/out of the screen",DEVICE_FOCUS:"Adjusting the device's focal length"}}},PTZ_SPEED={1:1,2:3,3:7,slow:1,mid:3,fast:7},BasePtz=function(){function BasePtz(container,options){var _this_options_locales,_this_options_locales1,_this_options_locales2;if(void 0===options&&(options={}),!container)throw new Error("Ptz container is required");(this.options=deepmerge(PTZ_DEFAULT_OPTIONS,options,{clone:false}),null==(_this_options_locales=this.options.locales)?void 0:_this_options_locales[this.options.language])?this.locale=null==(_this_options_locales1=this.options.locales)?void 0:_this_options_locales1[this.options.language]:this.locale=null==(_this_options_locales2=this.options.locales)?void 0:_this_options_locales2.zh;this.$container=container,this.speed=PTZ_SPEED[this.options.speed||2];}var _proto=BasePtz.prototype;return _proto.updateOptions=function(options){this.options=deepmerge(this.options,options,{clone:false});},_proto.destroy=function(){},BasePtz}();function _set_prototype_of$1$3(o,p){return _set_prototype_of$1$3=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$3(o,p)}var MobilePtz=function(BasePtz){function MobilePtz(container,options){var _this;return (_this=BasePtz.call(this,container,options)||this)._touchstart=_this._touchstart.bind(_this),_this._touchend=_this._touchend.bind(_this),_this._render(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$1$3(subClass,superClass);}(MobilePtz,BasePtz);var _proto=MobilePtz.prototype;return _proto.destroy=function(){this._removeEventListener(),this.$content&&(this.$content.remove(),this.$content=null),BasePtz.prototype.destroy.call(this);},_proto._render=function(){this.$content=document.createElement("div"),this.$content.classList.add("ez-mobile-ptz-content"),this.$content.innerHTML='\n <div class="ez-mobile-ptz-wrap">\n <div class="ez-mobile-ptz-container">\n <div class="ez-mobile-ptz-center ez-mobile-ptz-center"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-top ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-left ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-bottom ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-right ez-mobile-ptz-default"></div>\n </div>\n </div>\n ',this.$container.appendChild(this.$content),this._addEventListener();},_proto._addEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.addEventListener(touchstart,this._touchstart),$warp.addEventListener(touchend,this._touchend));},_proto._touchstart=function(e){e.preventDefault(),this._handlePtzTouch(e,"start");},_proto._touchend=function(e){e.preventDefault(),this._handlePtzTouch(e,"stop");},_proto._removeEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.removeEventListener(touchstart,this._touchstart),$warp.removeEventListener(touchend,this._touchend));},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_e_changedTouches_,_e_changedTouches_1,_this_options_env,_this_options_token_deviceToken1,_this_options_token1;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");var _this_options_env1,$warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),rect=$warp.getBoundingClientRect(),containerCenterX=rect.left+130,containerCenterY=rect.top+130,left=(e.x||(null==(_e_changedTouches_=e.changedTouches[0])?void 0:_e_changedTouches_.clientX))-containerCenterX,top=(e.y||(null==(_e_changedTouches_1=e.changedTouches[0])?void 0:_e_changedTouches_1.clientY))-containerCenterY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),$icons=$warp.querySelectorAll(".ez-mobile-ptz-icon");(Math.abs(left)>Math.abs(top)?left>0?(direction=3,$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=2,$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):top>0?(direction=1,$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=0,$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")),$warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop",$warp.style.cssText="",$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"));var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{direction:direction,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed","1"),data.append("direction",direction+""),data.append("accessToken",token),fetch(url,{method:"POST",body:data}).then(function(response){return response.json()}).then(function(rt){200===rt.code||[60005,60002,60003,60004].includes(+rt.code)&&($warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"),null==operationResultCb||operationResultCb(rt);}).catch(function(err){}).finally(function(){operationResultCb=null;});},MobilePtz}(BasePtz);function asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value;}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw);}function _async_to_generator$5(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"throw",err);}_next(void 0);})}}function _create_class$e(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$n(o,p){return _set_prototype_of$n=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$n(o,p)}function _ts_generator$5(thisArg,body){var f,y,t,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]},g=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return g.next=verb(0),g.throw=verb(1),g.return=verb(2),"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return function(op){if(f)throw new TypeError("Generator is already executing.");for(;g&&(g=0,op[0]&&(_=0)),_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=_.trys,(t=t.length>0&&t[t.length-1])||6!==op[0]&&2!==op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_);}catch(e){op=[6,e],y=0;}finally{f=t=0;}if(5&op[0])throw op[1];return {value:op[0]?op[1]:void 0,done:true}}([n,v])}}}var Ptz$1=function(BasePtz){function Ptz(container,options){var _this;return void 0===options&&(options={}),(_this=BasePtz.call(this,container,options)||this)._isMobile=distExports$4.isMobile(),_this._isRotate=false,_this._clearTimer=null,_this._$wrapper=document.createElement("div"),_this._$wrapper.className="ez-ptz-container-wrap",_this._$directionCircleContainer=document.createElement("div"),_this._$directionCircleContainer.classList.add("ez-ptz-container"),_this._$directionCircleContainer.innerHTML='\n <div class="ez-ptz-main ez-ptz-direction-center"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top" data-direction="0"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top-left" data-direction="4"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left" data-direction="2"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left-bottom" data-direction="5"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom" data-direction="1"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom-right" data-direction="7"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right" data-direction="3"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right-top" data-direction="6"></div>\n ',_this._$wrapper.appendChild(_this._$directionCircleContainer),_this._$speedContainer=document.createElement("div"),_this._$speedContainer.classList.add("ez-ptz-speed-container"),_this._$speedContainer.innerHTML='\n <div class="ez-ptz-speed-progress" title="'+_this.locale.PTZ_SPEED+'">\n <div class="ez-ptz-speed-progress-line">\n <div class="ez-ptz-speed-progress-line-dot '+(1===_this.speed?"ez-ptz-speed-active":"")+'" data-id="slow" data-index="1" data-value="1"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(3===_this.speed?"ez-ptz-speed-active":"")+'" data-id="mid" data-index="2" data-value="3"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(7===_this.speed?"ez-ptz-speed-active":"")+'" data-id="fast" data-index="3" data-value="7"></div>\n </div>\n <div class="ez-ptz-speed-progress-points">\n <div class="ez-ptz-speed-progress-points-slow">\n '+_this.locale.PTZ_SLOW+'\n </div>\n <div class="ez-ptz-speed-progress-points-mid">\n '+_this.locale.PTZ_MID+'\n </div>\n <div class="ez-ptz-speed-progress-points-fast">\n '+_this.locale.PTZ_FAST+"\n </div>\n </div>\n </div>\n ",_this._$wrapper.appendChild(_this._$speedContainer),_this._$btnContainer=document.createElement("div"),_this._$btnContainer.classList.add("ez-ptz-btn-container"),_this._$btnContainer.innerHTML='\n <div class="ez-ptz-btn-zoom" title="'+_this.locale.DEVICE_ZOOM+'" style="user-select: none;">\n <div class="ez-ptz-btn-zoom-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M563.2 198.4c179.2 0 326.4 147.2 326.4 326.4s-147.2 326.4-326.4 326.4S230.4 704 230.4 524.8s147.2-326.4 332.8-326.4z m0 64c-147.2 0-262.4 115.2-262.4 262.4s115.2 262.4 262.4 262.4 262.4-115.2 262.4-262.4S704 262.4 563.2 262.4z" fill="#ffffff"></path>\n <path d="M691.2 556.8H428.8c-19.2 0-32-12.8-32-32s12.8-32 32-32h262.4c19.2 0 32 12.8 32 32s-12.8 32-32 32z" fill="#ffffff">\n </path>\n <path d="M556.8 691.2c-19.2 0-32-12.8-32-32V396.8c0-19.2 12.8-32 32-32s32 12.8 32 32v262.4c0 19.2-12.8 32-32 32z" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-zoom-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M569.6 838.4c-172.8 0-307.2-140.8-307.2-307.2s140.8-307.2 307.2-307.2 307.2 140.8 307.2 307.2-140.8 307.2-307.2 307.2z m0-64c134.4 0 249.6-108.8 249.6-249.6S704 281.6 569.6 281.6 320 396.8 320 531.2s108.8 243.2 249.6 243.2z" fill="#ffffff"></path>\n <path d="M691.2 563.2H448c-19.2 0-32-12.8-32-32s12.8-38.4 32-38.4h249.6c19.2 0 32 12.8 32 32s-19.2 38.4-38.4 38.4z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n <div class="ez-ptz-btn-focal" title="'+_this.locale.DEVICE_FOCUS+'" style="user-select: none;">\n <div class="ez-ptz-btn-focal-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M646.4 825.6H320c-44.8 0-83.2-38.4-83.2-83.2V409.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6zM320 390.4c-12.8 0-19.2 6.4-19.2 19.2v326.4c0 12.8 6.4 19.2 19.2 19.2h326.4c12.8 0 19.2-6.4 19.2-19.2V409.6c0-12.8-6.4-19.2-19.2-19.2H320z" fill="#ffffff"></path>\n <path d="M396.8 358.4V281.6c0-25.6 25.6-51.2 51.2-51.2h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H704l-6.4-268.8" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-focal-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M320 358.4h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H320c-25.6 0-51.2-25.6-51.2-51.2V409.6c0-25.6 25.6-51.2 51.2-51.2z" fill="#ffffff"></path>\n <path d="M774.4 697.6H704c-19.2 0-32-12.8-32-32s12.8-32 32-32h70.4c12.8 0 19.2-6.4 19.2-19.2V281.6c0-12.8-6.4-19.2-19.2-19.2H448c-12.8 0-19.2 6.4-19.2 19.2v70.4c0 19.2-12.8 32-32 32s-32-12.8-32-25.6V281.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n ',_this._$wrapper.appendChild(_this._$btnContainer),container.appendChild(_this._$wrapper),_this._$directionCircleContainer.onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._$directionCircleContainer.ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._onSwitchSpeed=function(e){var list=Array.from(_this._$speedContainer.querySelectorAll(".ez-ptz-speed-progress-line-dot"));if(list.includes(e.target)&&!e.target.classList.contains("ez-ptz-speed-active")){list.forEach(function(item){item===e.target?item.classList.add("ez-ptz-speed-active"):item.classList.remove("ez-ptz-speed-active");});var value=e.target.getAttribute("data-value"),index=e.target.getAttribute("data-index");_this.speed=+value,null==_this.options.onSpeedChange||_this.options.onSpeedChange.call(_this.options,+index);}},_this._$speedContainer.onmouseup=_this._onSwitchSpeed,_this._isMobile&&(_this._$speedContainer.ontouchend=_this._onSwitchSpeed),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");}),_this._isMobile&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");})),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$n(subClass,superClass);}(Ptz,BasePtz);var _proto=Ptz.prototype;return _proto.destroy=function(){this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer&&(this._$directionCircleContainer.remove(),this._$directionCircleContainer=null),this._$speedContainer&&(this._onSwitchSpeed=null,this._$speedContainer.remove(),this._$speedContainer=null),this._$btnContainer&&(this._$btnContainer.remove(),this._$btnContainer=null),this._$wrapper&&(this._$wrapper.remove(),this._$wrapper=null),BasePtz.prototype.destroy.call(this);},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_this_options_env,_this_options_token_deviceToken1,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzQueue||(this._ptzQueue=Promise.resolve());var container=this._$directionCircleContainer.getBoundingClientRect(),containerCenterX=container.left+(this._$directionCircleContainer.clientWidth+2)/2,containerCenterY=container.top+(this._$directionCircleContainer.clientHeight+2)/2,eventX=e.x||e.changedTouches[0].clientX,eventY=e.y||e.changedTouches[0].clientY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),backDeg=0;function getAreaId(x,y){var rad=Math.atan2(y,x);rad<0&&(rad+=2*Math.PI);var deg=rad*(180/Math.PI)-225-12.5;return deg<0&&(deg+=360),Math.floor(deg/45)+1}var _this_options_env1,left=eventX-containerCenterX,top=eventY-containerCenterY;if(this.isRotate)switch(getAreaId(left,top)){case 1:direction=2,backDeg=90;break;case 2:direction=4,backDeg=135;break;case 3:direction=0,backDeg=180;break;case 4:direction=6,backDeg=225;break;case 5:direction=3,backDeg=270;break;case 6:direction=7,backDeg=315;break;case 7:direction=1,backDeg=0;break;case 8:direction=5,backDeg=45;}else switch(getAreaId(left,top)){case 1:direction=0,backDeg=180;break;case 2:direction=6,backDeg=225;break;case 3:direction=3,backDeg=270;break;case 4:direction=7,backDeg=315;break;case 5:direction=1,backDeg=0;break;case 6:direction=5,backDeg=45;break;case 7:direction=2,backDeg=90;break;case 8:direction=4,backDeg=135;}(this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer.style.cssText="start"===type?"background-image:linear-gradient("+backDeg+"deg, #4277FF 0%, rgba(100,143,252,0.00) 30%)":"","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{areaId:getAreaId(left,top),direction:direction,backDeg:backDeg,isRotate:this.isRotate,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzQueue=this._ptzQueue.then(function(){return _async_to_generator$5(function(){var _this;return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return _this=this,[4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){var _rt_result;null==operationResultCb||operationResultCb(rt);var code=rt.code||(null==rt||null==(_rt_result=rt.result)?void 0:_rt_result.code);return [6e4,60001,60002,60003,60004,60005,60006,10002].includes(+code)&&(_this._$directionCircleContainer.style.cssText="background-image:linear-gradient("+backDeg+"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)"),rt}).catch(function(err){}).finally(function(){operationResultCb=null,"stop"===type&&(_this._clearTimer=setTimeout(function(){_this._$directionCircleContainer.style.cssText="";},1e3));})];case 1:return [2,_state.sent()]}})}).call(_this)}),"stop"===type&&(this._ptzQueue=this._ptzQueue.finally(function(){}));},_proto._handleBtnTouch=function(btn,option,type){var _this_options_token,_this_options_env,_this_options_token_deviceToken,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)?void 0:_this_options_token.deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzOperation||(this._ptzOperation=Promise.resolve());var direction=8;direction="zoom"===btn?"add"===option?8:9:"add"===option?10:11;var _this_options_env1,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken.video);"stop"===type&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{btn:btn,option:option,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzOperation=this._ptzOperation.then(function(){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){return null==operationResultCb||operationResultCb(rt),rt}).catch(function(err){}).finally(function(){operationResultCb=null;})];case 1:return [2,_state.sent()]}})})()}),"stop"===type&&(this._ptzOperation=this._ptzOperation.finally(function(){_this._ptzOperation=null;}));},_create_class$e(Ptz,[{key:"isRotate",get:function(){return this._isRotate},set:function(isRotate){this._isRotate=isRotate;}}]),Ptz}(BasePtz);
7486
7541
 
7487
7542
  function _defineProperties$4(target, props) {
7488
7543
  for(var i = 0; i < props.length; i++){
@@ -7493,12 +7548,12 @@
7493
7548
  Object.defineProperty(target, descriptor.key, descriptor);
7494
7549
  }
7495
7550
  }
7496
- function _create_class$a(Constructor, protoProps, staticProps) {
7551
+ function _create_class$d(Constructor, protoProps, staticProps) {
7497
7552
  if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
7498
7553
  return Constructor;
7499
7554
  }
7500
- function _extends$j() {
7501
- _extends$j = Object.assign || function(target) {
7555
+ function _extends$l() {
7556
+ _extends$l = Object.assign || function(target) {
7502
7557
  for(var i = 1; i < arguments.length; i++){
7503
7558
  var source = arguments[i];
7504
7559
  for(var key in source){
@@ -7509,9 +7564,9 @@
7509
7564
  }
7510
7565
  return target;
7511
7566
  };
7512
- return _extends$j.apply(this, arguments);
7567
+ return _extends$l.apply(this, arguments);
7513
7568
  }
7514
- function _inherits$i(subClass, superClass) {
7569
+ function _inherits$j(subClass, superClass) {
7515
7570
  if (typeof superClass !== "function" && superClass !== null) {
7516
7571
  throw new TypeError("Super expression must either be null or a function");
7517
7572
  }
@@ -7522,23 +7577,23 @@
7522
7577
  configurable: true
7523
7578
  }
7524
7579
  });
7525
- if (superClass) _set_prototype_of$k(subClass, superClass);
7580
+ if (superClass) _set_prototype_of$m(subClass, superClass);
7526
7581
  }
7527
- function _set_prototype_of$k(o, p) {
7528
- _set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7582
+ function _set_prototype_of$m(o, p) {
7583
+ _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7529
7584
  o.__proto__ = p;
7530
7585
  return o;
7531
7586
  };
7532
- return _set_prototype_of$k(o, p);
7587
+ return _set_prototype_of$m(o, p);
7533
7588
  }
7534
7589
  /**
7535
7590
  * 云台控件
7536
7591
  * @category Control
7537
7592
  */ var Ptz = /*#__PURE__*/ function(Control) {
7538
- _inherits$i(Ptz, Control);
7593
+ _inherits$j(Ptz, Control);
7539
7594
  function Ptz(options) {
7540
7595
  var _this;
7541
- _this = Control.call(this, _extends$j({}, options, {
7596
+ _this = Control.call(this, _extends$l({}, options, {
7542
7597
  tagName: 'span',
7543
7598
  controlType: 'button',
7544
7599
  classNameSuffix: 'ptz'
@@ -7581,7 +7636,7 @@
7581
7636
  this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
7582
7637
  this.$panel.appendChild(this.$turntable);
7583
7638
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7584
- this._ptzControl = new Ptz$1(this.$turntable, _extends$j({}, this._options, {
7639
+ this._ptzControl = new Ptz$1(this.$turntable, _extends$l({}, this._options, {
7585
7640
  onSpeedChange: this._onSpeedChange.bind(this),
7586
7641
  onDirection: this._onDirection.bind(this)
7587
7642
  }));
@@ -7590,7 +7645,7 @@
7590
7645
  };
7591
7646
  _proto.renderMobileExtend = function renderMobileExtend($container) {
7592
7647
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7593
- if (!this._ptzControl1) this._ptzControl1 = new MobilePtz($container, _extends$j({}, this._options, {
7648
+ if (!this._ptzControl1) this._ptzControl1 = new MobilePtz($container, _extends$l({}, this._options, {
7594
7649
  onSpeedChange: this._onSpeedChange.bind(this),
7595
7650
  onDirection: this._onDirection.bind(this)
7596
7651
  }));
@@ -7604,7 +7659,7 @@
7604
7659
  }
7605
7660
  };
7606
7661
  _proto._onSpeedChange = function _onSpeedChange(speed) {
7607
- this.emit(EVENTS.control.ptzSpeedChange, speed);
7662
+ this.emit(EVENTS$2.control.ptzSpeedChange, speed);
7608
7663
  this._options.onSpeedChange == null ? void 0 : this._options.onSpeedChange.call(this._options, speed);
7609
7664
  };
7610
7665
  _proto._onDirection = function _onDirection(requestData) {
@@ -7613,7 +7668,7 @@
7613
7668
  var _responseResult_result;
7614
7669
  var code = +(responseResult.code || (responseResult == null ? void 0 : (_responseResult_result = responseResult.result) == null ? void 0 : _responseResult_result.code));
7615
7670
  if (requestData.type === 'start' && code !== 200) {
7616
- _this.emit(EVENTS.control.ptzError, {
7671
+ _this.emit(EVENTS$2.control.ptzError, {
7617
7672
  code: code,
7618
7673
  // prettier-ignore
7619
7674
  localeKey: requestData.btn === 'zoom' && code === 60000 ? 'NOT_SUPPORT_DEVICE_ZOOM' : requestData.btn === 'focal' && code === 60006 ? 'NOT_SUPPORT_FOCUS' : '38' + code,
@@ -7635,7 +7690,7 @@
7635
7690
  _proto.reset = function reset(hide) {
7636
7691
  this.active = false;
7637
7692
  };
7638
- _create_class$a(Ptz, [
7693
+ _create_class$d(Ptz, [
7639
7694
  {
7640
7695
  key: "isRotated",
7641
7696
  get: function get() {
@@ -7689,12 +7744,12 @@
7689
7744
  Object.defineProperty(target, descriptor.key, descriptor);
7690
7745
  }
7691
7746
  }
7692
- function _create_class$9(Constructor, protoProps, staticProps) {
7747
+ function _create_class$c(Constructor, protoProps, staticProps) {
7693
7748
  if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
7694
7749
  return Constructor;
7695
7750
  }
7696
- function _extends$i() {
7697
- _extends$i = Object.assign || function(target) {
7751
+ function _extends$k() {
7752
+ _extends$k = Object.assign || function(target) {
7698
7753
  for(var i = 1; i < arguments.length; i++){
7699
7754
  var source = arguments[i];
7700
7755
  for(var key in source){
@@ -7705,9 +7760,9 @@
7705
7760
  }
7706
7761
  return target;
7707
7762
  };
7708
- return _extends$i.apply(this, arguments);
7763
+ return _extends$k.apply(this, arguments);
7709
7764
  }
7710
- function _inherits$h(subClass, superClass) {
7765
+ function _inherits$i(subClass, superClass) {
7711
7766
  if (typeof superClass !== "function" && superClass !== null) {
7712
7767
  throw new TypeError("Super expression must either be null or a function");
7713
7768
  }
@@ -7718,14 +7773,14 @@
7718
7773
  configurable: true
7719
7774
  }
7720
7775
  });
7721
- if (superClass) _set_prototype_of$j(subClass, superClass);
7776
+ if (superClass) _set_prototype_of$l(subClass, superClass);
7722
7777
  }
7723
- function _set_prototype_of$j(o, p) {
7724
- _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7778
+ function _set_prototype_of$l(o, p) {
7779
+ _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7725
7780
  o.__proto__ = p;
7726
7781
  return o;
7727
7782
  };
7728
- return _set_prototype_of$j(o, p);
7783
+ return _set_prototype_of$l(o, p);
7729
7784
  }
7730
7785
  var RECORD_DEFAULT_OPTIONS = {
7731
7786
  maxDuration: 3600
@@ -7739,10 +7794,10 @@
7739
7794
  * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
7740
7795
  * @category Control
7741
7796
  */ var Record = /*#__PURE__*/ function(Control) {
7742
- _inherits$h(Record, Control);
7797
+ _inherits$i(Record, Control);
7743
7798
  function Record(options) {
7744
7799
  var _this;
7745
- _this = Control.call(this, _extends$i({}, options, {
7800
+ _this = Control.call(this, _extends$k({}, options, {
7746
7801
  tagName: 'span',
7747
7802
  controlType: 'button',
7748
7803
  classNameSuffix: 'record'
@@ -7812,7 +7867,7 @@
7812
7867
  this.active = !this.active;
7813
7868
  Control.prototype._onControlClick.call(this, e);
7814
7869
  };
7815
- _create_class$9(Record, [
7870
+ _create_class$c(Record, [
7816
7871
  {
7817
7872
  key: "active",
7818
7873
  get: /**
@@ -7833,7 +7888,7 @@
7833
7888
  } else {
7834
7889
  this._destroyTimer();
7835
7890
  }
7836
- this.emit(EVENTS.control.recordingChange, this._active);
7891
+ this.emit(EVENTS$2.control.recordingChange, this._active);
7837
7892
  }
7838
7893
  }
7839
7894
  }
@@ -7879,12 +7934,12 @@
7879
7934
  Object.defineProperty(target, descriptor.key, descriptor);
7880
7935
  }
7881
7936
  }
7882
- function _create_class$8(Constructor, protoProps, staticProps) {
7937
+ function _create_class$b(Constructor, protoProps, staticProps) {
7883
7938
  if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
7884
7939
  return Constructor;
7885
7940
  }
7886
- function _extends$h() {
7887
- _extends$h = Object.assign || function(target) {
7941
+ function _extends$j() {
7942
+ _extends$j = Object.assign || function(target) {
7888
7943
  for(var i = 1; i < arguments.length; i++){
7889
7944
  var source = arguments[i];
7890
7945
  for(var key in source){
@@ -7895,9 +7950,9 @@
7895
7950
  }
7896
7951
  return target;
7897
7952
  };
7898
- return _extends$h.apply(this, arguments);
7953
+ return _extends$j.apply(this, arguments);
7899
7954
  }
7900
- function _inherits$g(subClass, superClass) {
7955
+ function _inherits$h(subClass, superClass) {
7901
7956
  if (typeof superClass !== "function" && superClass !== null) {
7902
7957
  throw new TypeError("Super expression must either be null or a function");
7903
7958
  }
@@ -7908,14 +7963,14 @@
7908
7963
  configurable: true
7909
7964
  }
7910
7965
  });
7911
- if (superClass) _set_prototype_of$i(subClass, superClass);
7966
+ if (superClass) _set_prototype_of$k(subClass, superClass);
7912
7967
  }
7913
- function _set_prototype_of$i(o, p) {
7914
- _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7968
+ function _set_prototype_of$k(o, p) {
7969
+ _set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7915
7970
  o.__proto__ = p;
7916
7971
  return o;
7917
7972
  };
7918
- return _set_prototype_of$i(o, p);
7973
+ return _set_prototype_of$k(o, p);
7919
7974
  }
7920
7975
  function _ts_generator$4(thisArg, body) {
7921
7976
  var f, y, t, _ = {
@@ -8017,23 +8072,23 @@
8017
8072
  *
8018
8073
  * @category Control
8019
8074
  */ var Talk = /*#__PURE__*/ function(Control) {
8020
- _inherits$g(Talk, Control);
8075
+ _inherits$h(Talk, Control);
8021
8076
  function Talk(options) {
8022
8077
  var _this;
8023
- _this = Control.call(this, _extends$h({}, options, {
8078
+ _this = Control.call(this, _extends$j({}, options, {
8024
8079
  tagName: 'span',
8025
8080
  controlType: 'button',
8026
8081
  classNameSuffix: 'talk'
8027
8082
  })) || this, _this._value = 0;
8028
8083
  _this._options = options;
8029
8084
  _this._render();
8030
- _this.on(EVENTS.talkingChange, function(talking) {
8085
+ _this.on(EVENTS$2.talkingChange, function(talking) {
8031
8086
  if (_this.active !== talking) {
8032
8087
  _this.active = talking;
8033
8088
  _this._render();
8034
8089
  }
8035
8090
  });
8036
- _this.on(EVENTS.talkVolumeChange, function(value) {
8091
+ _this.on(EVENTS$2.talkVolumeChange, function(value) {
8037
8092
  var _this__options_onChange, _this__options;
8038
8093
  _this.value = value;
8039
8094
  (_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, value);
@@ -8054,7 +8109,7 @@
8054
8109
  this._value = 0;
8055
8110
  this.active = false;
8056
8111
  this._render();
8057
- this.emit(EVENTS.control.talkingChange, false);
8112
+ this.emit(EVENTS$2.control.talkingChange, false);
8058
8113
  Control.prototype.reset.call(this, hide);
8059
8114
  }
8060
8115
  };
@@ -8076,7 +8131,7 @@
8076
8131
  return _ts_generator$4(this, function(_state) {
8077
8132
  _superprop_get__onControlClick().call(_this, e);
8078
8133
  this.active = !this.active;
8079
- this.emit(EVENTS.control.talkingChange, this.active);
8134
+ this.emit(EVENTS$2.control.talkingChange, this.active);
8080
8135
  this._render();
8081
8136
  return [
8082
8137
  2
@@ -8084,7 +8139,7 @@
8084
8139
  });
8085
8140
  }).call(this);
8086
8141
  };
8087
- _create_class$8(Talk, [
8142
+ _create_class$b(Talk, [
8088
8143
  {
8089
8144
  key: "value",
8090
8145
  get: /**
@@ -8153,8 +8208,8 @@
8153
8208
  });
8154
8209
  };
8155
8210
  }
8156
- function _extends$g() {
8157
- _extends$g = Object.assign || function(target) {
8211
+ function _extends$i() {
8212
+ _extends$i = Object.assign || function(target) {
8158
8213
  for(var i = 1; i < arguments.length; i++){
8159
8214
  var source = arguments[i];
8160
8215
  for(var key in source){
@@ -8165,9 +8220,9 @@
8165
8220
  }
8166
8221
  return target;
8167
8222
  };
8168
- return _extends$g.apply(this, arguments);
8223
+ return _extends$i.apply(this, arguments);
8169
8224
  }
8170
- function _inherits$f(subClass, superClass) {
8225
+ function _inherits$g(subClass, superClass) {
8171
8226
  if (typeof superClass !== "function" && superClass !== null) {
8172
8227
  throw new TypeError("Super expression must either be null or a function");
8173
8228
  }
@@ -8178,14 +8233,14 @@
8178
8233
  configurable: true
8179
8234
  }
8180
8235
  });
8181
- if (superClass) _set_prototype_of$h(subClass, superClass);
8236
+ if (superClass) _set_prototype_of$j(subClass, superClass);
8182
8237
  }
8183
- function _set_prototype_of$h(o, p) {
8184
- _set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8238
+ function _set_prototype_of$j(o, p) {
8239
+ _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8185
8240
  o.__proto__ = p;
8186
8241
  return o;
8187
8242
  };
8188
- return _set_prototype_of$h(o, p);
8243
+ return _set_prototype_of$j(o, p);
8189
8244
  }
8190
8245
  function _ts_generator$3(thisArg, body) {
8191
8246
  var f, y, t, _ = {
@@ -8285,17 +8340,17 @@
8285
8340
  *
8286
8341
  * @category Control
8287
8342
  */ var Broadcast = /*#__PURE__*/ function(Control) {
8288
- _inherits$f(Broadcast, Control);
8343
+ _inherits$g(Broadcast, Control);
8289
8344
  function Broadcast(options) {
8290
8345
  var _this;
8291
- _this = Control.call(this, _extends$g({}, options, {
8346
+ _this = Control.call(this, _extends$i({}, options, {
8292
8347
  tagName: 'span',
8293
8348
  controlType: 'button',
8294
8349
  classNameSuffix: 'broadcast'
8295
8350
  })) || this;
8296
8351
  _this._options = options;
8297
8352
  _this._render();
8298
- _this.on(EVENTS.broadcastChange, function(active) {
8353
+ _this.on(EVENTS$2.broadcastChange, function(active) {
8299
8354
  if (_this.active !== active) {
8300
8355
  _this.active = active;
8301
8356
  _this._render();
@@ -8319,7 +8374,7 @@
8319
8374
  if (this.active) {
8320
8375
  this.active = false;
8321
8376
  this._render();
8322
- this.emit(EVENTS.control.broadcastChange, false);
8377
+ this.emit(EVENTS$2.control.broadcastChange, false);
8323
8378
  Control.prototype.reset.call(this, hide);
8324
8379
  }
8325
8380
  };
@@ -8342,7 +8397,7 @@
8342
8397
  return _ts_generator$3(this, function(_state) {
8343
8398
  _superprop_get__onControlClick().call(_this, e);
8344
8399
  this.active = !this.active;
8345
- this.emit(EVENTS.control.broadcastChange, this.active);
8400
+ this.emit(EVENTS$2.control.broadcastChange, this.active);
8346
8401
  (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, this.active);
8347
8402
  this._render();
8348
8403
  return [
@@ -8383,8 +8438,8 @@
8383
8438
  });
8384
8439
  };
8385
8440
  }
8386
- function _extends$f() {
8387
- _extends$f = Object.assign || function(target) {
8441
+ function _extends$h() {
8442
+ _extends$h = Object.assign || function(target) {
8388
8443
  for(var i = 1; i < arguments.length; i++){
8389
8444
  var source = arguments[i];
8390
8445
  for(var key in source){
@@ -8395,9 +8450,9 @@
8395
8450
  }
8396
8451
  return target;
8397
8452
  };
8398
- return _extends$f.apply(this, arguments);
8453
+ return _extends$h.apply(this, arguments);
8399
8454
  }
8400
- function _inherits$e(subClass, superClass) {
8455
+ function _inherits$f(subClass, superClass) {
8401
8456
  if (typeof superClass !== "function" && superClass !== null) {
8402
8457
  throw new TypeError("Super expression must either be null or a function");
8403
8458
  }
@@ -8408,14 +8463,14 @@
8408
8463
  configurable: true
8409
8464
  }
8410
8465
  });
8411
- if (superClass) _set_prototype_of$g(subClass, superClass);
8466
+ if (superClass) _set_prototype_of$i(subClass, superClass);
8412
8467
  }
8413
- function _set_prototype_of$g(o, p) {
8414
- _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8468
+ function _set_prototype_of$i(o, p) {
8469
+ _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8415
8470
  o.__proto__ = p;
8416
8471
  return o;
8417
8472
  };
8418
- return _set_prototype_of$g(o, p);
8473
+ return _set_prototype_of$i(o, p);
8419
8474
  }
8420
8475
  function _ts_generator$2(thisArg, body) {
8421
8476
  var f, y, t, _ = {
@@ -8515,17 +8570,17 @@
8515
8570
  *
8516
8571
  * @category Control
8517
8572
  */ var AIChat = /*#__PURE__*/ function(Control) {
8518
- _inherits$e(AIChat, Control);
8573
+ _inherits$f(AIChat, Control);
8519
8574
  function AIChat(options) {
8520
8575
  var _this;
8521
- _this = Control.call(this, _extends$f({}, options, {
8576
+ _this = Control.call(this, _extends$h({}, options, {
8522
8577
  tagName: 'span',
8523
8578
  controlType: 'button',
8524
8579
  classNameSuffix: 'aichat'
8525
8580
  })) || this;
8526
8581
  _this._options = options;
8527
8582
  _this._render();
8528
- _this.on(EVENTS.aichatChange, function(active) {
8583
+ _this.on(EVENTS$2.aichatChange, function(active) {
8529
8584
  if (_this.active !== active) {
8530
8585
  _this.active = active;
8531
8586
  _this._render();
@@ -8549,7 +8604,7 @@
8549
8604
  if (this.active) {
8550
8605
  this.active = false;
8551
8606
  this._render();
8552
- this.emit(EVENTS.control.aichatChange, false);
8607
+ this.emit(EVENTS$2.control.aichatChange, false);
8553
8608
  Control.prototype.reset.call(this, hide);
8554
8609
  }
8555
8610
  };
@@ -8572,7 +8627,7 @@
8572
8627
  return _ts_generator$2(this, function(_state) {
8573
8628
  _superprop_get__onControlClick().call(_this, e);
8574
8629
  this.active = !this.active;
8575
- this.emit(EVENTS.control.aichatChange, this.active);
8630
+ this.emit(EVENTS$2.control.aichatChange, this.active);
8576
8631
  (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, this.active);
8577
8632
  this._render();
8578
8633
  return [
@@ -8584,100 +8639,635 @@
8584
8639
  return AIChat;
8585
8640
  }(Control);
8586
8641
 
8587
- function _extends$e() {
8588
- _extends$e = Object.assign || function(target) {
8589
- for(var i = 1; i < arguments.length; i++){
8590
- var source = arguments[i];
8591
- for(var key in source){
8592
- if (Object.prototype.hasOwnProperty.call(source, key)) {
8593
- target[key] = source[key];
8594
- }
8595
- }
8596
- }
8597
- return target;
8598
- };
8599
- return _extends$e.apply(this, arguments);
8600
- }
8601
- function _inherits$d(subClass, superClass) {
8602
- if (typeof superClass !== "function" && superClass !== null) {
8603
- throw new TypeError("Super expression must either be null or a function");
8604
- }
8605
- subClass.prototype = Object.create(superClass && superClass.prototype, {
8606
- constructor: {
8607
- value: subClass,
8608
- writable: true,
8609
- configurable: true
8610
- }
8611
- });
8612
- if (superClass) _set_prototype_of$f(subClass, superClass);
8613
- }
8614
- function _set_prototype_of$f(o, p) {
8615
- _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8616
- o.__proto__ = p;
8617
- return o;
8618
- };
8619
- return _set_prototype_of$f(o, p);
8642
+ function _extends$g() {
8643
+ _extends$g = Object.assign || function(target) {
8644
+ for(var i = 1; i < arguments.length; i++){
8645
+ var source = arguments[i];
8646
+ for(var key in source){
8647
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
8648
+ target[key] = source[key];
8649
+ }
8650
+ }
8651
+ }
8652
+ return target;
8653
+ };
8654
+ return _extends$g.apply(this, arguments);
8655
+ }
8656
+ function _inherits$e(subClass, superClass) {
8657
+ if (typeof superClass !== "function" && superClass !== null) {
8658
+ throw new TypeError("Super expression must either be null or a function");
8659
+ }
8660
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
8661
+ constructor: {
8662
+ value: subClass,
8663
+ writable: true,
8664
+ configurable: true
8665
+ }
8666
+ });
8667
+ if (superClass) _set_prototype_of$h(subClass, superClass);
8668
+ }
8669
+ function _set_prototype_of$h(o, p) {
8670
+ _set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8671
+ o.__proto__ = p;
8672
+ return o;
8673
+ };
8674
+ return _set_prototype_of$h(o, p);
8675
+ }
8676
+ /**
8677
+ * 直播按钮控件
8678
+ *
8679
+ * 点击切换到直播模式
8680
+ *
8681
+ * @category Control
8682
+ */ var Live = /*#__PURE__*/ function(Control) {
8683
+ _inherits$e(Live, Control);
8684
+ function Live(options) {
8685
+ var _this;
8686
+ var _this___options_props1;
8687
+ _this = Control.call(this, _extends$g({}, options, {
8688
+ tagName: 'span',
8689
+ controlType: 'button',
8690
+ classNameSuffix: 'live'
8691
+ })) || this;
8692
+ _this._options = options;
8693
+ _this._render();
8694
+ // H5 端不展示直播/回放切换按钮
8695
+ if (Utils.isMobile) {
8696
+ _this.$container.style.display = 'none';
8697
+ }
8698
+ // 初始化时根据当前播放模式确定激活状态
8699
+ _this._syncActiveByUrlInfo((_this___options_props1 = _this.__options.props) == null ? void 0 : _this___options_props1.urlInfo);
8700
+ return _this;
8701
+ }
8702
+ var _proto = Live.prototype;
8703
+ /**
8704
+ * 根据 urlInfo 同步激活状态
8705
+ * 在初始化和播放地址切换后调用
8706
+ */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
8707
+ var shouldBeActive = !!(urlInfo && urlInfo.type === 'live');
8708
+ this.active = shouldBeActive;
8709
+ };
8710
+ _proto._render = function _render() {
8711
+ var _this_locale;
8712
+ this.$container.innerHTML = IconComponents.live({
8713
+ title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_LIVE) || '直播'
8714
+ });
8715
+ };
8716
+ /**
8717
+ * 销毁
8718
+ */ _proto.destroy = function destroy() {
8719
+ Control.prototype.destroy.call(this);
8720
+ };
8721
+ /**
8722
+ * 点击 Control 会触发
8723
+ */ _proto._onControlClick = function _onControlClick(e) {
8724
+ var _this__options_onChange, _this__options;
8725
+ Control.prototype._onControlClick.call(this, e);
8726
+ // 已经是直播模式则不触发
8727
+ if (this.active) {
8728
+ return;
8729
+ }
8730
+ this.active = true;
8731
+ this.emit(EVENTS$2.control.liveChange);
8732
+ (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options);
8733
+ };
8734
+ return Live;
8735
+ }(Control);
8736
+
8737
+ function _extends$f() {
8738
+ _extends$f = Object.assign || function(target) {
8739
+ for(var i = 1; i < arguments.length; i++){
8740
+ var source = arguments[i];
8741
+ for(var key in source){
8742
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
8743
+ target[key] = source[key];
8744
+ }
8745
+ }
8746
+ }
8747
+ return target;
8748
+ };
8749
+ return _extends$f.apply(this, arguments);
8750
+ }
8751
+ function _inherits$d(subClass, superClass) {
8752
+ if (typeof superClass !== "function" && superClass !== null) {
8753
+ throw new TypeError("Super expression must either be null or a function");
8754
+ }
8755
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
8756
+ constructor: {
8757
+ value: subClass,
8758
+ writable: true,
8759
+ configurable: true
8760
+ }
8761
+ });
8762
+ if (superClass) _set_prototype_of$g(subClass, superClass);
8763
+ }
8764
+ function _set_prototype_of$g(o, p) {
8765
+ _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8766
+ o.__proto__ = p;
8767
+ return o;
8768
+ };
8769
+ return _set_prototype_of$g(o, p);
8770
+ }
8771
+ /**
8772
+ * 回放下拉控件
8773
+ *
8774
+ * 鼠标移入弹出气泡,展示云存储、云录制、本地回放三个选项
8775
+ *
8776
+ * @category Control
8777
+ */ var RecDropdown = /*#__PURE__*/ function(Control) {
8778
+ _inherits$d(RecDropdown, Control);
8779
+ function RecDropdown(options) {
8780
+ var _this;
8781
+ var _options_props, _this___options_props1;
8782
+ _this = Control.call(this, _extends$f({}, options, {
8783
+ tagName: 'span',
8784
+ controlType: 'button',
8785
+ classNameSuffix: 'rec-dropdown'
8786
+ })) || this;
8787
+ _this._options = options;
8788
+ // H5 端不展示直播/回放切换按钮
8789
+ if (Utils.isMobile) {
8790
+ _this.$container.style.display = 'none';
8791
+ }
8792
+ // 初始化时根据 urlInfo 确定当前回放类型和激活状态
8793
+ _this._recType = options.recType || ((_options_props = options.props) == null ? void 0 : _options_props.recType) || 'cloudRec';
8794
+ _this._syncActiveByUrlInfo((_this___options_props1 = _this.__options.props) == null ? void 0 : _this___options_props1.urlInfo);
8795
+ _this._render();
8796
+ _this._initPicker();
8797
+ return _this;
8798
+ }
8799
+ var _proto = RecDropdown.prototype;
8800
+ /**
8801
+ * 根据 urlInfo 同步激活状态和回放类型
8802
+ * 在初始化和播放地址切换后调用
8803
+ */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
8804
+ if (urlInfo && urlInfo.type === 'rec') {
8805
+ var _urlInfo_searchParams1;
8806
+ this.active = true;
8807
+ if (urlInfo.recType === 'cloud' && ((_urlInfo_searchParams1 = urlInfo.searchParams) == null ? void 0 : _urlInfo_searchParams1.busType) === '7') {
8808
+ this._recType = 'cloudRecord';
8809
+ } else if (urlInfo.recType === 'cloud') {
8810
+ this._recType = 'cloudRec';
8811
+ } else {
8812
+ this._recType = 'rec';
8813
+ }
8814
+ this._activeOption(this._recType);
8815
+ } else {
8816
+ this.active = false;
8817
+ }
8818
+ };
8819
+ _proto._render = function _render() {
8820
+ var _this_locale;
8821
+ this.$container.innerHTML = IconComponents.recDropdown({
8822
+ title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_REC_DROPDOWN) || '回放'
8823
+ });
8824
+ };
8825
+ _proto._initPicker = function _initPicker() {
8826
+ var _this = this;
8827
+ this._picker = new Picker(this.$container, {
8828
+ getPopupContainer: function() {
8829
+ return Utils.isMobile ? _this.__options.rootContainer : _this.$container;
8830
+ },
8831
+ trigger: Utils.isMobile ? 'click' : 'hover',
8832
+ isMobile: Utils.isMobile,
8833
+ wrapClassName: "" + PREFIX_CLASS + "-rec-dropdown-picker",
8834
+ placement: 'bottom',
8835
+ offset: [
8836
+ 0,
8837
+ 4
8838
+ ]
8839
+ });
8840
+ this._picker.innerHTML(this._getPanelHTML());
8841
+ this._activeOption(this._recType);
8842
+ this._bindPanelEvents();
8843
+ };
8844
+ _proto._getPanelHTML = function _getPanelHTML() {
8845
+ var _this_locale, _this_locale1, _this_locale2;
8846
+ var cloudRecLabel = ((_this_locale = this.locale) == null ? void 0 : _this_locale.REC_DROPDOWN_CLOUD_REC) || '云存储';
8847
+ var cloudRecordLabel = ((_this_locale1 = this.locale) == null ? void 0 : _this_locale1.REC_DROPDOWN_CLOUD_RECORD) || '云录制';
8848
+ var localRecLabel = ((_this_locale2 = this.locale) == null ? void 0 : _this_locale2.REC_DROPDOWN_LOCAL_REC) || '本地回放';
8849
+ return '<div class="' + PREFIX_CLASS + '-rec-dropdown-panel">\n <ul class="' + PREFIX_CLASS + '-rec-dropdown-list">\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="cloudRec">\n <span>' + cloudRecLabel + '</span>\n </li>\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="cloudRecord">\n <span>' + cloudRecordLabel + '</span>\n </li>\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="rec">\n <span>' + localRecLabel + "</span>\n </li>\n </ul>\n </div>";
8850
+ };
8851
+ _proto._bindPanelEvents = function _bindPanelEvents() {
8852
+ var _this = this;
8853
+ this._delegation = delegate(this._picker.$body, "." + PREFIX_CLASS + "-rec-dropdown-item", 'click', function(e) {
8854
+ e.stopPropagation();
8855
+ var type = e.delegateTarget.getAttribute('data-type');
8856
+ if (type) {
8857
+ var _this__options_onChange, _this__options;
8858
+ _this._recType = type;
8859
+ _this._activeOption(type);
8860
+ // 设置自身为激活状态
8861
+ _this.active = true;
8862
+ _this.emit(EVENTS$2.control.recDropdownChange, type);
8863
+ (_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, type);
8864
+ _this._picker.open = false;
8865
+ }
8866
+ });
8867
+ };
8868
+ _proto._activeOption = function _activeOption(type) {
8869
+ var _this__picker;
8870
+ if ((_this__picker = this._picker) == null ? void 0 : _this__picker.$body) {
8871
+ var items = this._picker.$body.querySelectorAll("." + PREFIX_CLASS + "-rec-dropdown-item");
8872
+ items.forEach(function(item) {
8873
+ item.classList.remove("" + PREFIX_CLASS + "-active");
8874
+ });
8875
+ var target = this._picker.$body.querySelector("." + PREFIX_CLASS + '-rec-dropdown-item[data-type="' + type + '"]');
8876
+ target == null ? void 0 : target.classList.add("" + PREFIX_CLASS + "-active");
8877
+ }
8878
+ };
8879
+ /**
8880
+ * 销毁
8881
+ */ _proto.destroy = function destroy() {
8882
+ var _this__delegation_destroy, _this__delegation;
8883
+ (_this__delegation = this._delegation) == null ? void 0 : (_this__delegation_destroy = _this__delegation.destroy) == null ? void 0 : _this__delegation_destroy.call(_this__delegation);
8884
+ this._delegation = null;
8885
+ if (this._picker) {
8886
+ this._picker.destroy();
8887
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8888
+ this._picker = null;
8889
+ }
8890
+ Control.prototype.destroy.call(this);
8891
+ };
8892
+ /**
8893
+ * 点击 Control 会触发(移动端 click 触发 picker)
8894
+ */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
8895
+ _proto._onControlClick = function _onControlClick(_e) {
8896
+ // picker 自行处理 click/hover,这里不额外处理
8897
+ };
8898
+ return RecDropdown;
8899
+ }(Control);
8900
+
8901
+ var eventemitter3 = {exports: {}};
8902
+
8903
+ var hasRequiredEventemitter3;
8904
+
8905
+ function requireEventemitter3 () {
8906
+ if (hasRequiredEventemitter3) return eventemitter3.exports;
8907
+ hasRequiredEventemitter3 = 1;
8908
+ (function (module) {
8909
+
8910
+ var has = Object.prototype.hasOwnProperty
8911
+ , prefix = '~';
8912
+
8913
+ /**
8914
+ * Constructor to create a storage for our `EE` objects.
8915
+ * An `Events` instance is a plain object whose properties are event names.
8916
+ *
8917
+ * @constructor
8918
+ * @private
8919
+ */
8920
+ function Events() {}
8921
+
8922
+ //
8923
+ // We try to not inherit from `Object.prototype`. In some engines creating an
8924
+ // instance in this way is faster than calling `Object.create(null)` directly.
8925
+ // If `Object.create(null)` is not supported we prefix the event names with a
8926
+ // character to make sure that the built-in object properties are not
8927
+ // overridden or used as an attack vector.
8928
+ //
8929
+ if (Object.create) {
8930
+ Events.prototype = Object.create(null);
8931
+
8932
+ //
8933
+ // This hack is needed because the `__proto__` property is still inherited in
8934
+ // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
8935
+ //
8936
+ if (!new Events().__proto__) prefix = false;
8937
+ }
8938
+
8939
+ /**
8940
+ * Representation of a single event listener.
8941
+ *
8942
+ * @param {Function} fn The listener function.
8943
+ * @param {*} context The context to invoke the listener with.
8944
+ * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
8945
+ * @constructor
8946
+ * @private
8947
+ */
8948
+ function EE(fn, context, once) {
8949
+ this.fn = fn;
8950
+ this.context = context;
8951
+ this.once = once || false;
8952
+ }
8953
+
8954
+ /**
8955
+ * Add a listener for a given event.
8956
+ *
8957
+ * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
8958
+ * @param {(String|Symbol)} event The event name.
8959
+ * @param {Function} fn The listener function.
8960
+ * @param {*} context The context to invoke the listener with.
8961
+ * @param {Boolean} once Specify if the listener is a one-time listener.
8962
+ * @returns {EventEmitter}
8963
+ * @private
8964
+ */
8965
+ function addListener(emitter, event, fn, context, once) {
8966
+ if (typeof fn !== 'function') {
8967
+ throw new TypeError('The listener must be a function');
8968
+ }
8969
+
8970
+ var listener = new EE(fn, context || emitter, once)
8971
+ , evt = prefix ? prefix + event : event;
8972
+
8973
+ if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
8974
+ else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
8975
+ else emitter._events[evt] = [emitter._events[evt], listener];
8976
+
8977
+ return emitter;
8978
+ }
8979
+
8980
+ /**
8981
+ * Clear event by name.
8982
+ *
8983
+ * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
8984
+ * @param {(String|Symbol)} evt The Event name.
8985
+ * @private
8986
+ */
8987
+ function clearEvent(emitter, evt) {
8988
+ if (--emitter._eventsCount === 0) emitter._events = new Events();
8989
+ else delete emitter._events[evt];
8990
+ }
8991
+
8992
+ /**
8993
+ * Minimal `EventEmitter` interface that is molded against the Node.js
8994
+ * `EventEmitter` interface.
8995
+ *
8996
+ * @constructor
8997
+ * @public
8998
+ */
8999
+ function EventEmitter() {
9000
+ this._events = new Events();
9001
+ this._eventsCount = 0;
9002
+ }
9003
+
9004
+ /**
9005
+ * Return an array listing the events for which the emitter has registered
9006
+ * listeners.
9007
+ *
9008
+ * @returns {Array}
9009
+ * @public
9010
+ */
9011
+ EventEmitter.prototype.eventNames = function eventNames() {
9012
+ var names = []
9013
+ , events
9014
+ , name;
9015
+
9016
+ if (this._eventsCount === 0) return names;
9017
+
9018
+ for (name in (events = this._events)) {
9019
+ if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
9020
+ }
9021
+
9022
+ if (Object.getOwnPropertySymbols) {
9023
+ return names.concat(Object.getOwnPropertySymbols(events));
9024
+ }
9025
+
9026
+ return names;
9027
+ };
9028
+
9029
+ /**
9030
+ * Return the listeners registered for a given event.
9031
+ *
9032
+ * @param {(String|Symbol)} event The event name.
9033
+ * @returns {Array} The registered listeners.
9034
+ * @public
9035
+ */
9036
+ EventEmitter.prototype.listeners = function listeners(event) {
9037
+ var evt = prefix ? prefix + event : event
9038
+ , handlers = this._events[evt];
9039
+
9040
+ if (!handlers) return [];
9041
+ if (handlers.fn) return [handlers.fn];
9042
+
9043
+ for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
9044
+ ee[i] = handlers[i].fn;
9045
+ }
9046
+
9047
+ return ee;
9048
+ };
9049
+
9050
+ /**
9051
+ * Return the number of listeners listening to a given event.
9052
+ *
9053
+ * @param {(String|Symbol)} event The event name.
9054
+ * @returns {Number} The number of listeners.
9055
+ * @public
9056
+ */
9057
+ EventEmitter.prototype.listenerCount = function listenerCount(event) {
9058
+ var evt = prefix ? prefix + event : event
9059
+ , listeners = this._events[evt];
9060
+
9061
+ if (!listeners) return 0;
9062
+ if (listeners.fn) return 1;
9063
+ return listeners.length;
9064
+ };
9065
+
9066
+ /**
9067
+ * Calls each of the listeners registered for a given event.
9068
+ *
9069
+ * @param {(String|Symbol)} event The event name.
9070
+ * @returns {Boolean} `true` if the event had listeners, else `false`.
9071
+ * @public
9072
+ */
9073
+ EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
9074
+ var evt = prefix ? prefix + event : event;
9075
+
9076
+ if (!this._events[evt]) return false;
9077
+
9078
+ var listeners = this._events[evt]
9079
+ , len = arguments.length
9080
+ , args
9081
+ , i;
9082
+
9083
+ if (listeners.fn) {
9084
+ if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
9085
+
9086
+ switch (len) {
9087
+ case 1: return listeners.fn.call(listeners.context), true;
9088
+ case 2: return listeners.fn.call(listeners.context, a1), true;
9089
+ case 3: return listeners.fn.call(listeners.context, a1, a2), true;
9090
+ case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
9091
+ case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
9092
+ case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
9093
+ }
9094
+
9095
+ for (i = 1, args = new Array(len -1); i < len; i++) {
9096
+ args[i - 1] = arguments[i];
9097
+ }
9098
+
9099
+ listeners.fn.apply(listeners.context, args);
9100
+ } else {
9101
+ var length = listeners.length
9102
+ , j;
9103
+
9104
+ for (i = 0; i < length; i++) {
9105
+ if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
9106
+
9107
+ switch (len) {
9108
+ case 1: listeners[i].fn.call(listeners[i].context); break;
9109
+ case 2: listeners[i].fn.call(listeners[i].context, a1); break;
9110
+ case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
9111
+ case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
9112
+ default:
9113
+ if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
9114
+ args[j - 1] = arguments[j];
9115
+ }
9116
+
9117
+ listeners[i].fn.apply(listeners[i].context, args);
9118
+ }
9119
+ }
9120
+ }
9121
+
9122
+ return true;
9123
+ };
9124
+
9125
+ /**
9126
+ * Add a listener for a given event.
9127
+ *
9128
+ * @param {(String|Symbol)} event The event name.
9129
+ * @param {Function} fn The listener function.
9130
+ * @param {*} [context=this] The context to invoke the listener with.
9131
+ * @returns {EventEmitter} `this`.
9132
+ * @public
9133
+ */
9134
+ EventEmitter.prototype.on = function on(event, fn, context) {
9135
+ return addListener(this, event, fn, context, false);
9136
+ };
9137
+
9138
+ /**
9139
+ * Add a one-time listener for a given event.
9140
+ *
9141
+ * @param {(String|Symbol)} event The event name.
9142
+ * @param {Function} fn The listener function.
9143
+ * @param {*} [context=this] The context to invoke the listener with.
9144
+ * @returns {EventEmitter} `this`.
9145
+ * @public
9146
+ */
9147
+ EventEmitter.prototype.once = function once(event, fn, context) {
9148
+ return addListener(this, event, fn, context, true);
9149
+ };
9150
+
9151
+ /**
9152
+ * Remove the listeners of a given event.
9153
+ *
9154
+ * @param {(String|Symbol)} event The event name.
9155
+ * @param {Function} fn Only remove the listeners that match this function.
9156
+ * @param {*} context Only remove the listeners that have this context.
9157
+ * @param {Boolean} once Only remove one-time listeners.
9158
+ * @returns {EventEmitter} `this`.
9159
+ * @public
9160
+ */
9161
+ EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
9162
+ var evt = prefix ? prefix + event : event;
9163
+
9164
+ if (!this._events[evt]) return this;
9165
+ if (!fn) {
9166
+ clearEvent(this, evt);
9167
+ return this;
9168
+ }
9169
+
9170
+ var listeners = this._events[evt];
9171
+
9172
+ if (listeners.fn) {
9173
+ if (
9174
+ listeners.fn === fn &&
9175
+ (!once || listeners.once) &&
9176
+ (!context || listeners.context === context)
9177
+ ) {
9178
+ clearEvent(this, evt);
9179
+ }
9180
+ } else {
9181
+ for (var i = 0, events = [], length = listeners.length; i < length; i++) {
9182
+ if (
9183
+ listeners[i].fn !== fn ||
9184
+ (once && !listeners[i].once) ||
9185
+ (context && listeners[i].context !== context)
9186
+ ) {
9187
+ events.push(listeners[i]);
9188
+ }
9189
+ }
9190
+
9191
+ //
9192
+ // Reset the array, or remove it completely if we have no more listeners.
9193
+ //
9194
+ if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
9195
+ else clearEvent(this, evt);
9196
+ }
9197
+
9198
+ return this;
9199
+ };
9200
+
9201
+ /**
9202
+ * Remove all listeners, or those of the specified event.
9203
+ *
9204
+ * @param {(String|Symbol)} [event] The event name.
9205
+ * @returns {EventEmitter} `this`.
9206
+ * @public
9207
+ */
9208
+ EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
9209
+ var evt;
9210
+
9211
+ if (event) {
9212
+ evt = prefix ? prefix + event : event;
9213
+ if (this._events[evt]) clearEvent(this, evt);
9214
+ } else {
9215
+ this._events = new Events();
9216
+ this._eventsCount = 0;
9217
+ }
9218
+
9219
+ return this;
9220
+ };
9221
+
9222
+ //
9223
+ // Alias methods names because people roll like that.
9224
+ //
9225
+ EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
9226
+ EventEmitter.prototype.addListener = EventEmitter.prototype.on;
9227
+
9228
+ //
9229
+ // Expose the prefix.
9230
+ //
9231
+ EventEmitter.prefixed = prefix;
9232
+
9233
+ //
9234
+ // Allow `EventEmitter` to be imported as module namespace.
9235
+ //
9236
+ EventEmitter.EventEmitter = EventEmitter;
9237
+
9238
+ //
9239
+ // Expose the module.
9240
+ //
9241
+ {
9242
+ module.exports = EventEmitter;
9243
+ }
9244
+ } (eventemitter3));
9245
+ return eventemitter3.exports;
8620
9246
  }
8621
- /**
8622
- * 直播按钮控件
8623
- *
8624
- * 点击切换到直播模式
8625
- *
8626
- * @category Control
8627
- */ var Live = /*#__PURE__*/ function(Control) {
8628
- _inherits$d(Live, Control);
8629
- function Live(options) {
8630
- var _this;
8631
- var _this___options_props1;
8632
- _this = Control.call(this, _extends$e({}, options, {
8633
- tagName: 'span',
8634
- controlType: 'button',
8635
- classNameSuffix: 'live'
8636
- })) || this;
8637
- _this._options = options;
8638
- _this._render();
8639
- // H5 端不展示直播/回放切换按钮
8640
- if (Utils.isMobile) {
8641
- _this.$container.style.display = 'none';
8642
- }
8643
- // 初始化时根据当前播放模式确定激活状态
8644
- _this._syncActiveByUrlInfo((_this___options_props1 = _this.__options.props) == null ? void 0 : _this___options_props1.urlInfo);
8645
- return _this;
8646
- }
8647
- var _proto = Live.prototype;
8648
- /**
8649
- * 根据 urlInfo 同步激活状态
8650
- * 在初始化和播放地址切换后调用
8651
- */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
8652
- var shouldBeActive = !!(urlInfo && urlInfo.type === 'live');
8653
- this.active = shouldBeActive;
8654
- };
8655
- _proto._render = function _render() {
8656
- var _this_locale;
8657
- this.$container.innerHTML = IconComponents.live({
8658
- title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_LIVE) || '直播'
8659
- });
8660
- };
8661
- /**
8662
- * 销毁
8663
- */ _proto.destroy = function destroy() {
8664
- Control.prototype.destroy.call(this);
8665
- };
8666
- /**
8667
- * 点击 Control 会触发
8668
- */ _proto._onControlClick = function _onControlClick(e) {
8669
- var _this__options_onChange, _this__options;
8670
- Control.prototype._onControlClick.call(this, e);
8671
- // 已经是直播模式则不触发
8672
- if (this.active) {
8673
- return;
8674
- }
8675
- this.active = true;
8676
- this.emit(EVENTS.control.liveChange);
8677
- (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options);
8678
- };
8679
- return Live;
8680
- }(Control);
9247
+
9248
+ var eventemitter3Exports = requireEventemitter3();
9249
+ var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
9250
+
9251
+ /*
9252
+ * @ezuikit/control-modal v0.0.1-beta.7
9253
+ * Copyright (c) 2026-07-03 Ezviz-OpenBiz
9254
+ * Released under the MIT License.
9255
+ */
9256
+ function _array_like_to_array$2(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _create_class$a(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _create_for_of_iterator_helper_loose$2(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return (it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array$2(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array$2(o,minLen):void 0}}(o))||allowArrayLike){it&&(o=it);var i=0;return function(){return i>=o.length?{done:true}:{done:false,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var ModalProvider=function(){function ModalProvider(){this._instances=new Set,this._zIndexCounter=1e3;}var _proto=ModalProvider.prototype;return _proto.register=function(modal,minZIndex){this._instances.add(modal);var base=Math.max(this._zIndexCounter,minZIndex||1e3);return this._zIndexCounter=base+2,base},_proto.unregister=function(modal){this._instances.delete(modal);},_proto.bringToTop=function(){var base=this._zIndexCounter;return this._zIndexCounter+=2,base},_proto.getInstances=function(){return Array.from(this._instances)},_proto.destroyAll=function(){for(var _step,_iterator=_create_for_of_iterator_helper_loose$2(this.getInstances());!(_step=_iterator()).done;){var modal=_step.value;modal._destroyed||modal.destroy();}},ModalProvider.getInstance=function(){return ModalProvider._instance||(ModalProvider._instance=new ModalProvider),ModalProvider._instance},ModalProvider.resetInstance=function(){ModalProvider._instance&&(ModalProvider._instance._instances.clear(),ModalProvider._instance._zIndexCounter=1e3,ModalProvider._instance=null);},_create_class$a(ModalProvider,[{key:"count",get:function(){return this._instances.size}}]),ModalProvider}();ModalProvider._instance=null;var EVENTS$1={open:"open",close:"close",dragStart:"dragStart",dragging:"dragging",dragEnd:"dragEnd"},_$MODAL_LOCALES$_={zh:{close:"关闭"},en:{close:"Close"}},__$MODAL_DEFAULT_OPTIONS$__={width:420,position:"center",draggable:true,showMask:true,maskClosable:true,showHeader:true,showClose:true,closeOnEscape:true,open:false,zIndex:1e3,language:"zh"};var Modal=function(){function Modal(container,options){this._$mask=null,this._$header=null,this._$title=null,this._$close=null,this._visible=false,this._dragging=false,this._dragOffset={x:0,y:0},this._destroyed=false,this._dragBounds={maxLeft:0,maxTop:0},this._dragPoint=null,this._dragRafId=null,this._pos={x:0,y:0},this.options=deepmerge(__$MODAL_DEFAULT_OPTIONS$__,null!=options?options:{},{clone:false}),this._eventEmitter=new EventEmitter,this._i18n=new I18n$1(deepmerge(_$MODAL_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"}),this._container=this._resolveContainer(container),this._baseZIndex=ModalProvider.getInstance().register(this,this.options.zIndex),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onDragFrame=this._onDragFrame.bind(this),this._onHeaderPointerDown=this._onHeaderPointerDown.bind(this),this._onCloseClick=this._onCloseClick.bind(this),this._onMaskClick=this._onMaskClick.bind(this),this._onKeydown=this._onKeydown.bind(this),this._onWindowResize=this._onWindowResize.bind(this),this._onModalPointerDown=this._onModalPointerDown.bind(this),this._onWrapDblClick=this._onWrapDblClick.bind(this),this._render(),this._bindEvents(),this.options.open&&this.open();}var _proto=Modal.prototype;return _proto.open=function(){this._destroyed||this._visible||(this._visible=true,this._$mask&&this._$mask.classList.remove("emodal-hidden"),this._$wrap.classList.remove("emodal-hidden"),this._applyInitialPosition(),window.addEventListener("resize",this._onWindowResize),this.options.closeOnEscape&&document.addEventListener("keydown",this._onKeydown),this._eventEmitter.emit(EVENTS$1.open),null==this.options.onOpen||this.options.onOpen.call(this.options));},_proto.close=function(){!this._destroyed&&this._visible&&(this._visible=false,this._$mask&&this._$mask.classList.add("emodal-hidden"),this._$wrap.classList.add("emodal-hidden"),this._stopDragging(),window.removeEventListener("resize",this._onWindowResize),document.removeEventListener("keydown",this._onKeydown),this._eventEmitter.emit(EVENTS$1.close),null==this.options.onClose||this.options.onClose.call(this.options));},_proto.isVisible=function(){return this._visible},_proto.bringToTop=function(){this._destroyed||(this._baseZIndex=ModalProvider.getInstance().bringToTop(),this._$mask&&(this._$mask.style.zIndex=""+this._baseZIndex),this._$wrap.style.zIndex=""+(this._baseZIndex+1));},_proto.setTitle=function(title){this.options.title=title,this._$title&&this._mount(this._$title,title);},_proto.setContent=function(content){this.options.content=content,this._mount(this._$body,content);},_proto.updateOptions=function(options){this.options=deepmerge(this.options,options,{clone:false}),(options.language||options.locales)&&(this._i18n=new I18n$1(deepmerge(_$MODAL_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"})),this._stopDragging();var wasVisible=this._visible;this._teardownDom(),this._render(),this._bindEvents(),wasVisible&&(this._visible=false,this.open());},_proto.on=function(event,callback){this._eventEmitter.on(event,callback);},_proto.off=function(event,callback){this._eventEmitter.off(event,callback);},_proto.setPosition=function(left,top,bounds){var _ref=bounds||this._bounds(),maxLeft=_ref.maxLeft,maxTop=_ref.maxTop,x=Math.max(0,Math.min(left,maxLeft)),y=Math.max(0,Math.min(top,maxTop));return this._setTranslate(x,y),{x:x,y:y}},_proto.destroy=function(){this._destroyed||(this._stopDragging(),window.removeEventListener("resize",this._onWindowResize),document.removeEventListener("keydown",this._onKeydown),this._teardownDom(),this._eventEmitter.removeAllListeners(),this._destroyed=true,ModalProvider.getInstance().unregister(this));},_proto._resolveContainer=function(container){return "string"==typeof container?document.querySelector(container)||document.body:container||document.body},_proto._toSize=function(value){return null==value||""===value?null:"number"==typeof value?value+"px":value},_proto._render=function(){this.options.showMask&&(this._$mask=document.createElement("div"),this._$mask.className="emodal-mask emodal-hidden",this._$mask.style.zIndex=""+this._baseZIndex,this._container.appendChild(this._$mask)),this._$wrap=document.createElement("div"),this._$wrap.className="emodal-wrap emodal-hidden",this.options.draggable&&this._$wrap.classList.add("emodal-draggable"),this.options.className&&this._$wrap.classList.add(this.options.className),this._$wrap.style.zIndex=""+(this._baseZIndex+1);var w=this._toSize(this.options.width);w&&(this._$wrap.style.width=w);var h=this._toSize(this.options.height);h&&(this._$wrap.style.height=h),this.options.showHeader?(this._$header=document.createElement("div"),this._$header.className="emodal-header",this._$title=document.createElement("div"),this._$title.className="emodal-title",void 0!==this.options.title&&this._mount(this._$title,this.options.title),this._$header.appendChild(this._$title),this.options.showClose&&(this._$close=document.createElement("button"),this._$close.type="button",this._$close.className="emodal-close",this._$close.setAttribute("aria-label",String(this._i18n.t("close"))),this._$close.innerHTML='<svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true">\n <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n</svg>',this._$header.appendChild(this._$close)),this._$wrap.appendChild(this._$header)):(this._$header=null,this._$title=null,this._$close=null),this._$body=document.createElement("div"),this._$body.className="emodal-body",void 0!==this.options.content&&this._mount(this._$body,this.options.content),this._$wrap.appendChild(this._$body),this._container.appendChild(this._$wrap);},_proto._mount=function(target,content){var left,right;left=content,(null!=(right=HTMLElement)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?(target.innerHTML="",target.appendChild(content)):target.innerHTML=null!=content?content:"";},_proto._teardownDom=function(){var _this__$mask;this._$wrap.parentNode&&this._$wrap.parentNode.removeChild(this._$wrap),(null==(_this__$mask=this._$mask)?void 0:_this__$mask.parentNode)&&this._$mask.parentNode.removeChild(this._$mask),this._$mask=null,this._$header=null,this._$title=null,this._$close=null;},_proto._bindEvents=function(){var _this__$close,_this__$mask,_this__$mask1;(null==(_this__$close=this._$close)||_this__$close.addEventListener("click",this._onCloseClick),this.options.showMask&&this.options.maskClosable)&&(null==(_this__$mask1=this._$mask)||_this__$mask1.addEventListener("click",this._onMaskClick));this.options.draggable&&this._$header&&(this._$header.addEventListener("mousedown",this._onHeaderPointerDown),this._$header.addEventListener("touchstart",this._onHeaderPointerDown,{passive:false})),this._$wrap.addEventListener("pointerdown",this._onModalPointerDown),this._$wrap.addEventListener("dblclick",this._onWrapDblClick),null==(_this__$mask=this._$mask)||_this__$mask.addEventListener("pointerdown",this._onModalPointerDown);},_proto._onCloseClick=function(e){e.stopPropagation(),this.close();},_proto._onMaskClick=function(){this.close();},_proto._onModalPointerDown=function(){this.bringToTop();},_proto._onWrapDblClick=function(e){e.stopPropagation();},_proto._onKeydown=function(e){"Escape"!==e.key&&"Esc"!==e.key||this.close();},_proto._onWindowResize=function(){if(this._dragging)return this._dragBounds=this._bounds(),void this.setPosition(this._pos.x,this._pos.y,this._dragBounds);this.setPosition(this._pos.x,this._pos.y);},_proto._getPoint=function(e){if("touches"in e){var t=e.touches[0]||e.changedTouches[0];return {x:t.clientX,y:t.clientY}}return {x:e.clientX,y:e.clientY}},_proto._onHeaderPointerDown=function(e){if(this.options.draggable){var target=e.target;if(!(this._$close&&(target===this._$close||this._$close.contains(target))||"button"in e&&0!==e.button)){var point=this._getPoint(e),rect=this._$wrap.getBoundingClientRect();this._dragOffset={x:point.x-rect.left,y:point.y-rect.top},this._dragBounds=this._bounds(),this._dragging=true,this._$wrap.style.willChange="transform",document.body.classList.add("emodal-dragging"),document.addEventListener("mousemove",this._onPointerMove),document.addEventListener("mouseup",this._onPointerUp),document.addEventListener("touchmove",this._onPointerMove,{passive:false}),document.addEventListener("touchend",this._onPointerUp),document.addEventListener("touchcancel",this._onPointerUp),this._eventEmitter.emit(EVENTS$1.dragStart);}}},_proto._onPointerMove=function(e){this._dragging&&(e.cancelable&&e.preventDefault(),this._dragPoint=this._getPoint(e),null===this._dragRafId&&(this._dragRafId=requestAnimationFrame(this._onDragFrame)));},_proto._onDragFrame=function(){if(this._dragRafId=null,this._dragging&&this._dragPoint){var left=this._dragPoint.x-this._dragOffset.x,top=this._dragPoint.y-this._dragOffset.y,_this__dragBounds=this._dragBounds,maxLeft=_this__dragBounds.maxLeft,maxTop=_this__dragBounds.maxTop,x=Math.max(0,Math.min(left,maxLeft)),y=Math.max(0,Math.min(top,maxTop));this._setTranslate(x,y),this._eventEmitter.emit(EVENTS$1.dragging,{x:x,y:y});}},_proto._onPointerUp=function(){this._dragging&&(this._stopDragging(),this._eventEmitter.emit(EVENTS$1.dragEnd,{left:this._pos.x,top:this._pos.y}));},_proto._stopDragging=function(){null!==this._dragRafId&&(cancelAnimationFrame(this._dragRafId),this._dragRafId=null),this._dragPoint=null,this._dragging?(this._dragging=false,this._$wrap&&(this._$wrap.style.willChange=""),document.body.classList.remove("emodal-dragging"),document.removeEventListener("mousemove",this._onPointerMove),document.removeEventListener("mouseup",this._onPointerUp),document.removeEventListener("touchmove",this._onPointerMove),document.removeEventListener("touchend",this._onPointerUp),document.removeEventListener("touchcancel",this._onPointerUp)):document.body.classList.remove("emodal-dragging");},_proto._bounds=function(){var vw=document.documentElement.clientWidth,vh=document.documentElement.clientHeight,w=this._$wrap.offsetWidth,h=this._$wrap.offsetHeight;return {maxLeft:Math.max(0,vw-w),maxTop:Math.max(0,vh-h)}},_proto._setTranslate=function(x,y){this._pos={x:x,y:y},this._$wrap.style.transform="translate3d("+x+"px, "+y+"px, 0)";},_proto._center=function(){var vw=document.documentElement.clientWidth,vh=document.documentElement.clientHeight,w=this._$wrap.offsetWidth,h=this._$wrap.offsetHeight;this.setPosition((vw-w)/2,(vh-h)/2);},_proto._applyInitialPosition=function(){var obj,position=this.options.position;position&&"object"==(void 0===position?"undefined":(obj=position)&&"undefined"!=typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj)?this.setPosition(position.x,position.y):this._center();},Modal}();Modal.VERSION="0.0.1-beta.7",Modal.EVENTS=EVENTS$1;
9257
+
9258
+ /*
9259
+ * @ezuikit/control-virtual-scroll v0.0.1-beta.3
9260
+ * Copyright (c) 2026-07-03 Ezviz-OpenBiz
9261
+ * Released under the MIT License.
9262
+ */
9263
+ var EVENTS={render:"render",scroll:"scroll",reachTop:"reachTop",reachBottom:"reachBottom"},DefaultOptions={itemHeight:40,buffer:5,smooth:true};function _create_class$9(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var _OVERWRITE_MERGE_={clone:false,arrayMerge:function(_dest,src){return src}},VirtualScroll=function(){function VirtualScroll(container,options){this._active=new Map,this._pool=[],this._heights=[],this._prefix=[],this._prefixDirty=false,this._containerHeight=0,this._startIndex=-1,this._endIndex=-1,this._ticking=false,this._destroyed=false,this._resizeObserver=null,this._eventEmitter=new EventEmitter,this.options=deepmerge(DefaultOptions,null!=options?options:{},_OVERWRITE_MERGE_),this._wrapper=this._resolveContainer(null!=container?container:this.options.container),this._onScroll=this._onScroll.bind(this),this._onResize=this._onResize.bind(this),this._wrapper.classList.add("evscroll-wrapper"),"static"===getComputedStyle(this._wrapper).position&&(this._wrapper.style.position="relative"),this._wrapper.style.overflowY="auto",this._$content=document.createElement("div"),this._$content.className="evscroll-content",this._$viewport=document.createElement("div"),this._$viewport.className="evscroll-viewport",this._$content.appendChild(this._$viewport),this._wrapper.appendChild(this._$content),this._containerHeight=this._wrapper.clientHeight,this._wrapper.addEventListener("scroll",this._onScroll,{passive:true}),this._setupResizeObserver(),this._initHeights(),this._syncContentHeight(),this._compute(true);}var _proto=VirtualScroll.prototype;return _proto.getTotalCount=function(){return this.options.data?this.options.data.length:this.options.total||0},_proto.getCurrentRange=function(){return {startIndex:this._startIndex,endIndex:this._endIndex}},_proto.scrollToIndex=function(index,smooth){var total=this.getTotalCount();if(index<0||index>=total)return false;var top=this._offsetOf(index),useSmooth=void 0===smooth?this.options.smooth:smooth;return "function"==typeof this._wrapper.scrollTo?this._wrapper.scrollTo({top:top,behavior:useSmooth?"smooth":"auto"}):this._wrapper.scrollTop=top,true},_proto.scrollToTop=function(smooth){this.scrollToIndex(0,smooth);},_proto.scrollToBottom=function(smooth){var total=this.getTotalCount();total>0&&this.scrollToIndex(total-1,smooth);},_proto.setData=function(data){this.options.data=data,this.refresh();},_proto.setTotal=function(total){this.options.total=total,this.options.data=void 0,this.refresh();},_proto.refresh=function(){this._reset(),this._initHeights(),this._syncContentHeight(),this._compute(true);},_proto.updateOptions=function(options){this.options=deepmerge(this.options,options,_OVERWRITE_MERGE_),this.refresh();},_proto.on=function(event,callback){this._eventEmitter.on(event,callback);},_proto.off=function(event,callback){this._eventEmitter.off(event,callback);},_proto.destroy=function(){this._destroyed||(this._wrapper.removeEventListener("scroll",this._onScroll),this._resizeObserver?(this._resizeObserver.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResize),this._reset(),this._$content.parentNode===this._wrapper&&this._wrapper.removeChild(this._$content),this._wrapper.classList.remove("evscroll-wrapper"),this._eventEmitter.removeAllListeners(),this._destroyed=true);},_proto._resolveContainer=function(container){var el="string"==typeof container?document.querySelector(container):container;if(!el)throw new Error("[VirtualScroll] container not found: "+String(container));return el},_proto._estimated=function(){var _this_options_estimatedItemHeight,ih=this.options.itemHeight;return null!=(_this_options_estimatedItemHeight=this.options.estimatedItemHeight)?_this_options_estimatedItemHeight:"number"==typeof ih&&ih>0?ih:DefaultOptions.itemHeight},_proto._baseHeightAt=function(index){var ih=this.options.itemHeight;if("function"==typeof ih){var h=ih(index,this.options.data?this.options.data[index]:void 0);return h>0?h:this._estimated()}return this._estimated()},_proto._initHeights=function(){if(!this._variable)return this._heights=[],this._prefix=[],void(this._prefixDirty=false);for(var total=this.getTotalCount(),heights=new Array(total),i=0;i<total;i++)heights[i]=this._baseHeightAt(i);this._heights=heights,this._prefixDirty=true,this._ensurePrefix();},_proto._ensurePrefix=function(){if(this._variable){var total=this.getTotalCount();if(this._prefixDirty||this._prefix.length!==total+1){var prefix=new Array(total+1);prefix[0]=0;for(var i=0;i<total;i++)prefix[i+1]=prefix[i]+(this._heights[i]||0);this._prefix=prefix,this._prefixDirty=false;}}},_proto._offsetOf=function(index){if(this._variable){this._ensurePrefix();var i=Math.max(0,Math.min(index,this.getTotalCount()));return this._prefix[i]||0}return index*this._fixedHeight},_proto._heightOf=function(index){return this._variable?this._heights[index]||0:this._fixedHeight},_proto._totalHeight=function(){return this._variable?(this._ensurePrefix(),this._prefix[this.getTotalCount()]||0):this.getTotalCount()*this._fixedHeight},_proto._findStartIndex=function(scrollTop){var total=this.getTotalCount();if(0===total)return 0;if(!this._variable)return Math.min(total-1,Math.max(0,Math.floor(scrollTop/this._fixedHeight)));this._ensurePrefix();for(var lo=0,hi=total;lo<hi;){var mid=lo+hi+1>>1;this._prefix[mid]<=scrollTop?lo=mid:hi=mid-1;}return Math.min(lo,total-1)},_proto._syncContentHeight=function(){this._$content.style.height=this._totalHeight()+"px";},_proto._onScroll=function(){var _this=this;this._eventEmitter.emit(EVENTS.scroll,this._wrapper.scrollTop),null==this.options.onScroll||this.options.onScroll.call(this.options,this._wrapper.scrollTop),this._ticking||(this._ticking=true,requestAnimationFrame(function(){_this._compute(false),_this._ticking=false;}));},_proto._setupResizeObserver=function(){var _this=this;"undefined"!=typeof ResizeObserver?(this._resizeObserver=new ResizeObserver(function(){return _this._onResize()}),this._resizeObserver.observe(this._wrapper)):window.addEventListener("resize",this._onResize);},_proto._onResize=function(){var h=this._wrapper.clientHeight;h!==this._containerHeight&&(this._containerHeight=h,this._compute(true));},_proto._compute=function(force){if(!this._destroyed){var total=this.getTotalCount();if((0===total||0===this._containerHeight)&&(this._containerHeight=this._wrapper.clientHeight,0===total))return this._reset(),void(this._$content.style.height="0px");var start,end,scrollTop=this._wrapper.scrollTop,buffer=this._buffer;if(this._variable)this._ensurePrefix(),start=Math.max(0,this._findStartIndex(scrollTop)-buffer),end=Math.min(total-1,this._findStartIndex(scrollTop+this._containerHeight)+buffer);else {var itemHeight=this._fixedHeight,rawStart=Math.floor(scrollTop/itemHeight);start=Math.max(0,rawStart-buffer);var capacity=Math.ceil(this._containerHeight/itemHeight);end=Math.min(total-1,rawStart+capacity-1+buffer);}if(force||start!==this._startIndex||end!==this._endIndex){if(this._startIndex=start,this._endIndex=end,this._updateRange(start,end),this._dynamic&&this._measureAndAdjust()){var st=this._wrapper.scrollTop,s2=Math.max(0,this._findStartIndex(st)-buffer),e2=Math.min(total-1,this._findStartIndex(st+this._containerHeight)+buffer);s2===start&&e2===end||(this._startIndex=s2,this._endIndex=e2,this._updateRange(s2,e2),start=s2,end=e2);}var range={startIndex:start,endIndex:end};this._eventEmitter.emit(EVENTS.render,range),null==this.options.onRender||this.options.onRender.call(this.options,range),0===start&&this._eventEmitter.emit(EVENTS.reachTop),end===total-1&&this._eventEmitter.emit(EVENTS.reachBottom);}}},_proto._measureAndAdjust=function(){var _this=this,changed=false;if(this._active.forEach(function(el,idx){var h=el.offsetHeight;h>0&&Math.abs(h-(_this._heights[idx]||0))>.5&&(_this._heights[idx]=h,changed=true);}),!changed)return false;var anchorIdx=this._startIndex>=0?this._startIndex:0,gap=this._wrapper.scrollTop-this._offsetOf(anchorIdx);this._prefixDirty=true,this._ensurePrefix(),this._$content.style.height=this._totalHeight()+"px",this._repositionActive();var newScrollTop=this._offsetOf(anchorIdx)+gap;return newScrollTop>=0&&Math.abs(newScrollTop-this._wrapper.scrollTop)>.5&&(this._wrapper.scrollTop=newScrollTop),true},_proto._repositionActive=function(){var _this=this;this._active.forEach(function(el,idx){el.style.top=_this._offsetOf(idx)+"px";});},_proto._updateRange=function(start,end){var _this=this,toRecycle=[];this._active.forEach(function(_el,idx){(idx<start||idx>end)&&toRecycle.push(idx);}),toRecycle.forEach(function(idx){var el=_this._active.get(idx);el&&(el.style.display="none",_this._pool.push(el)),_this._active.delete(idx);});for(var i=start;i<=end;i++)if(!this._active.has(i)){var el=this._pool.pop()||this._createItemEl();el.style.display="",el.style.top=this._offsetOf(i)+"px",el.style.height=this._dynamic?"":this._heightOf(i)+"px",el.setAttribute("data-index",String(i)),this._fillItem(el,i),el.parentNode!==this._$viewport&&this._$viewport.appendChild(el),this._active.set(i,el);}},_proto._createItemEl=function(){var el=document.createElement("div");return el.className="evscroll-item",el},_proto._fillItem=function(el,index){var left,right,item=this.options.data?this.options.data[index]:void 0,content=this.options.renderItem(index,item);left=content,(null!=(right=HTMLElement)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?el.replaceChildren(content):el.innerHTML=null!=content?content:"";},_proto._reset=function(){this._active.clear(),this._pool=[],this._$viewport.replaceChildren(),this._startIndex=-1,this._endIndex=-1;},_create_class$9(VirtualScroll,[{key:"_dynamic",get:function(){return !!this.options.dynamicHeight}},{key:"_variable",get:function(){return this._dynamic||"function"==typeof this.options.itemHeight}},{key:"_fixedHeight",get:function(){var ih=this.options.itemHeight;return "number"==typeof ih&&ih>0?ih:DefaultOptions.itemHeight}},{key:"_buffer",get:function(){var _this_options_buffer;return null!=(_this_options_buffer=this.options.buffer)?_this_options_buffer:DefaultOptions.buffer}}]),VirtualScroll}();VirtualScroll.VERSION="0.0.1-beta.3",VirtualScroll.EVENTS=EVENTS;
9264
+
9265
+ /*
9266
+ * @ezuikit/control-rec-list-modal v0.0.1-beta.5
9267
+ * Copyright (c) 2026-07-03 Ezviz-OpenBiz
9268
+ * Released under the MIT License.
9269
+ */
9270
+ var __$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__$1={targets:[],root:null,rootMargin:"0px",threshold:.1,loadingClass:"ez-lazy-image-loading",loadedClass:"ez-lazy-image-loaded",loadedErrorClass:"ez-lazy-image-error",dwell:200,onLoadError:function(){}},ImageLazyLoader$1=function(){function ImageLazyLoader(options){ void 0===options&&(options={}),this._pendingTimers=new Map,this.options=Object.assign({},__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__$1,options),this._observer=null,this._init();}var _proto=ImageLazyLoader.prototype;return _proto._init=function(){var _this=this;ImageLazyLoader.isSupported&&(this._observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){var target=entry.target;if(entry.isIntersecting){if(_this._pendingTimers.has(target))return;var timer=setTimeout(function(){var _this__observer;_this._pendingTimers.delete(target),_this._loadImage(target),null==(_this__observer=_this._observer)||_this__observer.unobserve(target);},_this.options.dwell);_this._pendingTimers.set(target,timer);}else {var timer1=_this._pendingTimers.get(target);void 0!==timer1&&(clearTimeout(timer1),_this._pendingTimers.delete(target));}});},this.options)),this.addImages(this.options.targets);},_proto._loadImage=function(img){var _img_classList,_img_classList1,_img_classList2,_this=this;if(img&&!(null==(_img_classList=img.classList)?void 0:_img_classList.contains(this.options.loadingClass))&&!(null==(_img_classList1=img.classList)?void 0:_img_classList1.contains(this.options.loadedClass))&&!(null==(_img_classList2=img.classList)?void 0:_img_classList2.contains(this.options.loadedErrorClass))&&img.hasAttribute("data-src")){var _this1=this;img.classList.add(this.options.loadingClass);var tempImg=new Image;tempImg.onload=function(){img.src=img.dataset.src,img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedClass),img.dispatchEvent(new Event("lazyloaded"));},tempImg.onerror=function(){img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedErrorClass),null==_this1.options.onLoadError||_this1.options.onLoadError.call(_this1.options,img);},tempImg.src=img.dataset.src;}},_proto.addImages=function(targets){var _this=this;(null==targets?void 0:targets.length)&&targets.forEach(function(target){var _this__observer;(null==target?void 0:target.hasAttribute("data-src"))&&(ImageLazyLoader.isSupported&&_this._observer?null==(_this__observer=_this._observer)||_this__observer.observe(target):_this._loadImage(target));});},_proto.destroy=function(){this._pendingTimers.forEach(function(timer){return clearTimeout(timer)}),this._pendingTimers.clear(),this._observer&&(this._observer.disconnect(),this._observer=null);},ImageLazyLoader}();function _create_class$1$2(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}ImageLazyLoader$1.isSupported="IntersectionObserver"in window;var _PREFIX_$1="ez-rec-list-modal-checkbox",Checkbox=function(){function Checkbox(options){var _options_checked,_options_disabled,_options_label,_options_size;void 0===options&&(options={}),this._$label=null,this._destroyed=false,this.options={checked:null!=(_options_checked=options.checked)&&_options_checked,disabled:null!=(_options_disabled=options.disabled)&&_options_disabled,label:null!=(_options_label=options.label)?_options_label:"",size:null!=(_options_size=options.size)?_options_size:16,onChange:options.onChange},this._onChange=this._onChange.bind(this),this._$root=document.createElement("label"),this._$root.className=_PREFIX_$1,this._$root.style.setProperty("--ez-rec-list-modal-checkbox-size",this.options.size+"px"),this._$input=document.createElement("input"),this._$input.type="checkbox",this._$input.className=_PREFIX_$1+"-input",this._$input.checked=this.options.checked,this._$input.disabled=this.options.disabled,this._$input.addEventListener("change",this._onChange),this._$root.appendChild(this._$input),this._$box=document.createElement("span"),this._$box.className=_PREFIX_$1+"-box",this._$box.innerHTML='<span class="'+_PREFIX_$1+'-check"><svg viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M3.5 8.4 6.4 11.3 12.5 4.9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></span>',this._$root.appendChild(this._$box),this.options.label&&(this._$label=document.createElement("span"),this._$label.className=_PREFIX_$1+"-label",this._$label.textContent=this.options.label,this._$root.appendChild(this._$label)),this._syncState();}var _proto=Checkbox.prototype;return _proto.setChecked=function(checked,emit){ void 0===emit&&(emit=false),this._$input.checked!==checked&&(this._$input.checked=checked,this._syncState(),emit&&(null==this.options.onChange||this.options.onChange.call(this.options,checked)));},_proto.setDisabled=function(disabled){this.options.disabled=disabled,this._$input.disabled=disabled,this._syncState();},_proto.setLabel=function(label){this.options.label=label,label?(this._$label||(this._$label=document.createElement("span"),this._$label.className=_PREFIX_$1+"-label",this._$root.appendChild(this._$label)),this._$label.textContent=label):this._$label&&(this._$label.remove(),this._$label=null);},_proto.destroy=function(){this._destroyed||(this._destroyed=true,this._$input.removeEventListener("change",this._onChange),this._$root.remove());},_proto._onChange=function(){this._syncState(),null==this.options.onChange||this.options.onChange.call(this.options,this._$input.checked);},_proto._syncState=function(){this._$root.classList.toggle(_PREFIX_$1+"-checked",this._$input.checked),this._$root.classList.toggle(_PREFIX_$1+"-disabled",this.options.disabled);},_create_class$1$2(Checkbox,[{key:"el",get:function(){return this._$root}},{key:"checked",get:function(){return this._$input.checked}}]),Checkbox}(),_$REC_EVENT_ICONS$__playing='<svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="playing">\n <rect x="1.5" y="7" width="3" height="7.5" rx="1.5"/>\n <rect x="6.5" y="3" width="3" height="11.5" rx="1.5"/>\n <rect x="11" y="5.5" width="3" height="9" rx="1.5"/>\n </svg>',_$REC_EVENT_ICONS$__humanDetection='<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="humanDetection">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.42689 10.122L5.78846 9.81738C5.5102 9.68459 5.33301 9.4037 5.33301 9.09537V6.6667C5.33301 6.22487 5.69118 5.8667 6.13301 5.8667H9.86634C10.3082 5.8667 10.6663 6.22487 10.6663 6.6667V9.10694C10.6663 9.40926 10.4959 9.68576 10.2258 9.82162L9.62858 10.122H6.42689Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.00039 2.1333C8.88405 2.1333 9.60039 2.84965 9.60039 3.7333C9.60039 4.61696 8.88405 5.3333 8.00039 5.3333C7.11674 5.3333 6.40039 4.61696 6.40039 3.7333C6.40039 2.84965 7.11674 2.1333 8.00039 2.1333Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.80039 9.06689C9.24222 9.06689 9.60039 9.42507 9.60039 9.8669V13.0669C9.60039 13.5087 9.24222 13.8669 8.80039 13.8669H7.20039C6.75856 13.8669 6.40039 13.5087 6.40039 13.0669V9.8669C6.40039 9.42507 6.75856 9.06689 7.20039 9.06689H8.80039Z" fill="currentColor"/>\n <path d="M4.26628 2.6665H2.93294C2.19694 2.6665 1.59961 3.26325 1.59961 3.99984V5.33317" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M1.59961 10.6665V11.9998C1.59961 12.7358 2.19694 13.3332 2.93294 13.3332H4.26628" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M11.7334 13.3332H13.0667C13.8033 13.3332 14.4001 12.7358 14.4001 11.9998V10.6665" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M14.4001 5.33317V3.99984C14.4001 3.26325 13.8033 2.6665 13.0667 2.6665H11.7334" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>',_$REC_EVENT_ICONS$__vehicleDetection='<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="vehicleDetection">\n <path d="M14.2522 6.62695L12.6147 7.25195" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M3.39233 7.25L1.74854 6.625" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M12.6116 7.25L12.0872 4.7425C11.9354 4.01875 11.2972 3.5 10.5572 3.5H5.50722C4.7816 3.5 4.15098 4 3.98598 4.70687L3.3916 7.25" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M12.375 7.25098C13.4106 7.25098 14.25 8.09035 14.25 9.12598V12.1523C14.247 12.3407 11.125 11.9375 11.125 11.9375H4.875C4.875 11.9375 1.7522 12.4275 1.75 12.2822V9.12598C1.75 8.09035 2.58938 7.25098 3.625 7.25098H12.375ZM4.09375 9.28125L4.03027 9.28516C3.80148 9.3162 3.625 9.51269 3.625 9.75C3.625 10.0089 3.83487 10.2188 4.09375 10.2188H5.65625L5.71973 10.2148C5.94852 10.1838 6.125 9.98731 6.125 9.75C6.125 9.49112 5.91513 9.28125 5.65625 9.28125H4.09375ZM10.2803 9.28516C10.0515 9.3162 9.875 9.51269 9.875 9.75C9.875 10.0089 10.0849 10.2188 10.3438 10.2188H11.9062L11.9697 10.2148C12.1985 10.1838 12.375 9.98731 12.375 9.75C12.375 9.49112 12.1651 9.28125 11.9062 9.28125H10.3438L10.2803 9.28516Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.25 9.125C14.25 8.08938 13.4106 7.25 12.375 7.25H3.625C2.58938 7.25 1.75 8.08938 1.75 9.125V12.0373H14.25V9.125V9.125Z" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.5625 13.4998C5.08 13.4998 5.5 13.0798 5.5 12.5623V11.9373L2.375 11.875V12.7185C2.375 13.1498 2.725 13.4998 3.15625 13.4998H4.5625Z" fill="currentColor" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M12.6877 13.4998C13.2052 13.4998 13.6252 13.0798 13.6252 12.5623V11.9373L10.5002 11.875V12.7185C10.5002 13.1498 10.8502 13.4998 11.2815 13.4998H12.6877Z" fill="currentColor" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>',_$REC_EVENT_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',_$REC_LIST_MODAL_LOCALES$_={zh:{title:"录像片段",empty:"暂无录像",eventFilter:"事件片段"},en:{title:"Recordings",empty:"No recordings",eventFilter:"Event"}};function _create_class$8(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$e(){return _extends$e=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$e.apply(this,arguments)}function _set_prototype_of$f(o,p){return _set_prototype_of$f=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$f(o,p)}var _PREFIX_="ez-rec-list-modal",_ICON_EVENT_='<svg viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true"><path d="M11.5 1.5H4.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1Zm0 1.1v10.8h-7V2.6h7ZM6 5.2h4v-1H6v1Zm0 2.3h4v-1H6v1Zm0 2.3h2.7v-1H6v1Z"/></svg>',_REC_EVENT_ICONS_={1:_ICON_EVENT_,2:_ICON_EVENT_,3:_$REC_EVENT_ICONS$__humanDetection,4:'<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="faceDetection">\n <path d="M4.26628 2.66602H2.93294C2.19694 2.66602 1.59961 3.26276 1.59961 3.99935V5.33268" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M1.59961 10.666V11.9993C1.59961 12.7353 2.19694 13.3327 2.93294 13.3327H4.26628" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M11.7334 13.3327H13.0667C13.8033 13.3327 14.4001 12.7353 14.4001 11.9993V10.666" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M14.4001 5.33268V3.99935C14.4001 3.26276 13.8033 2.66602 13.0667 2.66602H11.7334" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.26636 8.53273C4.26636 8.53273 3.74805 8.7145 3.74805 9.32262C3.74805 9.93074 4.12968 10.4493 4.62191 10.4493C4.73317 10.9272 5.97651 13.0867 8.08858 13.0867C10.0905 13.0867 11.5552 10.3969 11.5552 10.3969C11.5552 10.3969 12.2716 10.1395 12.2518 9.32262C12.2325 8.69788 11.7965 8.53273 11.7965 8.53273C11.7965 8.53273 12.1055 5.56552 9.99785 4.3185C7.89022 3.07148 6.36571 4.5319 6.36571 4.5319C6.36571 4.5319 4.11766 4.87602 4.2222 7.69628" fill="currentColor"/>\n </svg>',5:_$REC_EVENT_ICONS$__vehicleDetection,6:'<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="petDetection">\n <path d="M10.134 2.66309C11.9012 2.66316 13.3341 4.09615 13.3342 5.86328V10.6641C13.334 12.4311 11.9011 13.8632 10.134 13.8633H5.86743C4.10029 13.8633 2.6675 12.4311 2.66724 10.6641V5.86328C2.66739 4.09611 4.10022 2.66309 5.86743 2.66309H10.134ZM7.97583 7.95312C7.5222 7.95327 7.15454 8.32075 7.15454 8.77441C7.15459 9.07899 7.32174 9.34112 7.56763 9.4834C7.5526 9.52337 7.54321 9.56694 7.54321 9.6123C7.54296 10.2798 6.9996 10.8223 6.33228 10.8223C6.13114 10.8224 5.96802 10.9863 5.96802 11.1875C5.96822 11.3882 6.13127 11.5516 6.33228 11.5518C7.0251 11.5518 7.63284 11.185 7.97583 10.6367C8.31908 11.1851 8.92713 11.5518 9.62036 11.5518C9.82129 11.5516 9.98442 11.3881 9.98462 11.1875C9.98462 10.9864 9.8214 10.8225 9.62036 10.8223C8.95273 10.8223 8.4087 10.2798 8.40845 9.6123C8.40845 9.56694 8.39906 9.52337 8.38403 9.4834C8.63004 9.34115 8.79805 9.07907 8.7981 8.77441C8.7981 8.32066 8.42989 7.95312 7.97583 7.95312ZM5.06665 5.87207C4.62483 5.87226 4.26685 6.23032 4.26685 6.67188C4.26708 7.11353 4.62497 7.47149 5.06665 7.47168C5.50818 7.47168 5.86622 7.11365 5.86646 6.67188C5.86646 6.2302 5.50832 5.87207 5.06665 5.87207ZM10.9338 5.87207C10.492 5.87226 10.134 6.23032 10.134 6.67188C10.1343 7.11353 10.4922 7.47149 10.9338 7.47168C11.3754 7.47168 11.7334 7.11365 11.7336 6.67188C11.7336 6.2302 11.3755 5.87207 10.9338 5.87207Z" fill="currentColor"/>\n <path d="M12.8 4.08984C12.9449 4.28499 13.0671 4.49562 13.1633 4.71777L15.1584 8.09668C15.4833 8.64759 15.5543 9.28148 15.3577 9.88086C15.1613 10.4797 14.7204 10.9735 14.1174 11.2705C13.8537 11.4002 13.4576 11.4741 13.1633 11.5137C13.0759 11.7889 12.9522 12.0484 12.8 12.2891V4.08984Z" fill="currentColor" fill-opacity="0.6"/>\n <path d="M3.19946 12.4372C3.05452 12.242 2.93249 12.0315 2.83618 11.8093L0.841064 8.43039C0.51612 7.87943 0.44519 7.24568 0.641846 6.64621C0.838188 6.04713 1.27893 5.5536 1.88208 5.25656C2.14581 5.12684 2.54188 5.05303 2.83618 5.0134C2.92354 4.73812 3.04729 4.47872 3.19946 4.23801L3.19946 12.4372Z" fill="currentColor" fill-opacity="0.6"/>\n </svg>',ALRAM:_ICON_EVENT_,TIMIING:_ICON_EVENT_,CAR:_$REC_EVENT_ICONS$__vehicleDetection,HD:_$REC_EVENT_ICONS$__humanDetection},_$REC_LIST_MODAL_DEFAULT_OPTIONS$_={width:260,height:490,buffer:5,startTimeFormat:"HH:mm",groupTitleFormat:"HH:00",showEventFilter:true,showCardTypeIcon:true,eventFilterChecked:false},RecListModal=function(Modal){function RecListModal(container,options){var _this,_ref,_ref1,_ref2,_ref3,_ref4,_ref5,_ref6,_ref7,_ref8,_ref9;(_this=Modal.call(this,container,RecListModal._mergeModalOptions(options))||this)._$titleWrap=null,_this._eventCheckbox=null,_this._virtualScroll=null,_this._lazyLoader=null,_this._rows=[],_this._sortedSections=[],_this._eventOnly=false,_this._vsInited=false,_this._recordDestroyed=false,_this._activeIndex=-1,_this._userInteracting=false,_this._userScrollTimer=null;var def=_$REC_LIST_MODAL_DEFAULT_OPTIONS$_;return _this._recI18n=new I18n$1(deepmerge(_$REC_LIST_MODAL_LOCALES$_,_this.options.locales||{},{clone:false}),{defaultLocale:_this.options.language||"zh"}),_this.recordOptions={sections:null!=(_ref=null==options?void 0:options.sections)?_ref:[],buffer:null!=(_ref1=null==options?void 0:options.buffer)?_ref1:def.buffer,coverQuery:null!=(_ref2=null==options?void 0:options.coverQuery)?_ref2:"",startTimeFormat:null!=(_ref3=null==options?void 0:options.startTimeFormat)?_ref3:def.startTimeFormat,groupTitleFormat:null!=(_ref4=null==options?void 0:options.groupTitleFormat)?_ref4:def.groupTitleFormat,emptyText:null!=(_ref5=null==options?void 0:options.emptyText)?_ref5:String(_this._recI18n.t("empty")),showEventFilter:null!=(_ref6=null==options?void 0:options.showEventFilter)?_ref6:def.showEventFilter,eventFilterText:null!=(_ref7=null==options?void 0:options.eventFilterText)?_ref7:String(_this._recI18n.t("eventFilter")),eventFilterChecked:null!=(_ref8=null==options?void 0:options.eventFilterChecked)?_ref8:def.eventFilterChecked,showCardTypeIcon:null!=(_ref9=null==options?void 0:options.showCardTypeIcon)?_ref9:def.showCardTypeIcon,isEvent:null==options?void 0:options.isEvent,renderCardIcon:null==options?void 0:options.renderCardIcon,onCardClick:null==options?void 0:options.onCardClick},_this._eventOnly=_this.recordOptions.eventFilterChecked,_this._activeTime="number"==typeof(null==options?void 0:options.activeTime)?options.activeTime:void 0,_this._titleText="string"==typeof(null==options?void 0:options.title)?options.title:String(_this._recI18n.t("title")),_this.setTitle(_this._buildHeaderTitle()),_this._$listRoot=document.createElement("div"),_this._$listRoot.className=_PREFIX_+"-list",_this._$empty=document.createElement("div"),_this._$empty.className=_PREFIX_+"-empty",_this._$empty.textContent=_this.recordOptions.emptyText,_this._$empty.style.display="none",_this._$listRoot.appendChild(_this._$empty),_this.setContent(_this._$listRoot),_this._onListClick=_this._onListClick.bind(_this),_this._onUserScroll=_this._onUserScroll.bind(_this),_this._$listRoot.addEventListener("click",_this._onListClick),_this._buildRows(),_this.isVisible()&&_this._ensureVirtualScroll(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$f(subClass,superClass);}(RecListModal,Modal);var _proto=RecListModal.prototype;return _proto.open=function(){Modal.prototype.open.call(this),this._$listRoot&&(this._ensureVirtualScroll(),this._userInteracting=false,this._userScrollTimer&&(clearTimeout(this._userScrollTimer),this._userScrollTimer=null),this._scrollToActive(true));},_proto.setSections=function(sections){this.recordOptions.sections=sections||[],this._buildRows(),this._virtualScroll?this._virtualScroll.setData(this._rows):this.isVisible()&&this._ensureVirtualScroll(),this._toggleEmpty();},_proto.setActiveTime=function(time){this._activeTime="number"==typeof time?time:void 0,this._refreshActiveState(),this._scrollToActive();},_proto.showEventFilter=function(show){var _this=this;if(this.recordOptions.showEventFilter=show,show){var _this__$titleWrap;if(this._eventCheckbox)return;var checkbox=new Checkbox({label:this.recordOptions.eventFilterText,checked:this._eventOnly,onChange:function(checked){return _this._onEventFilterChange(checked)}});checkbox.el.addEventListener("mousedown",function(e){return e.stopPropagation()}),checkbox.el.addEventListener("touchstart",function(e){return e.stopPropagation()}),null==(_this__$titleWrap=this._$titleWrap)||_this__$titleWrap.appendChild(checkbox.el),this._eventCheckbox=checkbox;}else {if(!this._eventCheckbox)return;this._eventCheckbox.destroy(),this._eventCheckbox=null;}},_proto.destroy=function(){var _this__eventCheckbox,_this__virtualScroll,_this__lazyLoader;this._recordDestroyed||(this._recordDestroyed=true,null==(_this__eventCheckbox=this._eventCheckbox)||_this__eventCheckbox.destroy(),this._eventCheckbox=null,this._userScrollTimer&&(clearTimeout(this._userScrollTimer),this._userScrollTimer=null),this._$listRoot.removeEventListener("click",this._onListClick),this._$listRoot.removeEventListener("wheel",this._onUserScroll),this._$listRoot.removeEventListener("touchmove",this._onUserScroll),null==(_this__virtualScroll=this._virtualScroll)||_this__virtualScroll.destroy(),this._virtualScroll=null,null==(_this__lazyLoader=this._lazyLoader)||_this__lazyLoader.destroy(),this._lazyLoader=null),Modal.prototype.destroy.call(this);},_proto._rowHeight=function(row){return row&&"header"===row.type?28:this._cardRowHeight},_proto._buildHeaderTitle=function(){var _this=this,wrap=document.createElement("div");wrap.className=_PREFIX_+"-title",this._$titleWrap=wrap;var text=document.createElement("span");if(text.className=_PREFIX_+"-title-text",text.textContent=this._titleText,wrap.appendChild(text),this.recordOptions.showEventFilter){var checkbox=new Checkbox({label:this.recordOptions.eventFilterText,checked:this._eventOnly,onChange:function(checked){return _this._onEventFilterChange(checked)}});checkbox.el.addEventListener("mousedown",function(e){return e.stopPropagation()}),checkbox.el.addEventListener("touchstart",function(e){return e.stopPropagation()}),wrap.appendChild(checkbox.el),this._eventCheckbox=checkbox;}return wrap},_proto._onEventFilterChange=function(checked){var _this__virtualScroll;this._eventOnly=checked,this._buildRows(),null==(_this__virtualScroll=this._virtualScroll)||_this__virtualScroll.setData(this._rows),this._toggleEmpty();},_proto._ensureVirtualScroll=function(){var _this__virtualScroll,_this=this;this._recordDestroyed||(this._toggleEmpty(),this._vsInited?(null==(_this__virtualScroll=this._virtualScroll)||_this__virtualScroll.refresh(),this._observeVisibleImages()):(this._vsInited=true,this._lazyLoader=new ImageLazyLoader$1({root:this._$listRoot}),this._virtualScroll=new VirtualScroll(this._$listRoot,{data:this._rows,itemHeight:function(_index,row){return _this._rowHeight(row)},buffer:this.recordOptions.buffer,renderItem:function(index,item){return _this._renderRow(index,item)},onRender:function(){return _this._observeVisibleImages()}}),this._observeVisibleImages(),this._$listRoot.addEventListener("wheel",this._onUserScroll,{passive:true}),this._$listRoot.addEventListener("touchmove",this._onUserScroll,{passive:true}),this._scrollToActive(true)));},_proto._toggleEmpty=function(){this._$empty&&(this._$empty.style.display=0===this._rows.length?"":"none");},_proto._isEvent=function(section){return "function"==typeof this.recordOptions.isEvent?this.recordOptions.isEvent(section):!!_REC_EVENT_ICONS_[section.EVENT_TYPE]},_proto._buildRows=function(){var _this=this;this._activeIndex=-1;var sorted=(this.recordOptions.sections||[]).filter(function(s){return s&&"number"==typeof s.startTime&&"number"==typeof s.endTime}).filter(function(s){return !_this._eventOnly||_this._isEvent(s)}).slice().reverse();this._sortedSections=sorted;for(var rows=[],groups=new Map,i=0;i<sorted.length;i++){var section=sorted[i],key=distExports$4.DateTime.format(section.startTime,"YYYY-MM-DD HH"),bucket=groups.get(key);bucket||(bucket=[],groups.set(key,bucket)),bucket.push({section:section,index:i});}groups.forEach(function(bucket){rows.push({type:"header",title:distExports$4.DateTime.format(bucket[0].section.startTime,_this.recordOptions.groupTitleFormat),count:bucket.length});for(var i=0;i<bucket.length;i+=2)rows.push({type:"cards",items:bucket.slice(i,i+2)});}),this._rows=rows;},_proto._renderRow=function(_index,row){var _this=this;if(!row)return "";if("header"===row.type)return '<div class="'+_PREFIX_+'-group">\n <span class="'+_PREFIX_+'-group-title">'+this._escape(row.title)+"</span>\n </div>";var cards=row.items.map(function(it){return _this._renderCard(it.section,it.index)}).join("");return '<div class="'+_PREFIX_+'-row">'+cards+"</div>"},_proto._renderCard=function(section,index){var start,end,_DateTime_toDate,_DateTime_toDate1,secondNum,second,minute,startText=distExports$4.DateTime.format(section.startTime,this.recordOptions.startTimeFormat),durationText=(start=section.startTime,end=section.endTime,secondNum=Math.floor((null==(_DateTime_toDate=distExports$4.DateTime.toDate(end))?void 0:_DateTime_toDate.getTime())-(null==(_DateTime_toDate1=distExports$4.DateTime.toDate(start))?void 0:_DateTime_toDate1.getTime()))/1e3,second=secondNum%60,((minute=Math.floor(secondNum/60))>0?distExports$4.DateTime.fillZero(minute)+"'":"0'")+distExports$4.DateTime.fillZero(second)+"''"),cover=section.coverPic?""+section.coverPic+this.recordOptions.coverQuery:"",media=cover?'<img class="'+_PREFIX_+'-card-img ez-lazy-image" data-src="'+this._setImageScr(this._escape(cover))+'" alt="" />':'<div class="'+_PREFIX_+'-card-placeholder">'+_$REC_EVENT_ICONS$__picture+"</div>",icon=this._renderCardIcon(section),activeCls=this._isActive(section)?" "+_PREFIX_+"-card-active":"";return '<div class="'+_PREFIX_+"-card"+activeCls+'" data-card-index="'+index+'">\n <div class="'+_PREFIX_+'-card-thumb">\n '+media+'\n <span class="'+_PREFIX_+'-card-start">'+this._escape(startText)+'</span>\n <span class="'+_PREFIX_+'-card-duration">'+this._escape(durationText)+'</span>\n <span class="'+_PREFIX_+'-card-playing">'+_$REC_EVENT_ICONS$__playing+"</span>\n "+icon+"\n </div>\n </div>"},_proto._isActive=function(section){var t=this._activeTime;return "number"==typeof t&&t>=section.startTime&&t<=section.endTime},_proto._refreshActiveState=function(){var _this=this;this._$listRoot.querySelectorAll("."+_PREFIX_+"-card").forEach(function(card){var idx=Number(card.getAttribute("data-card-index")),section=_this._sortedSections[idx];card.classList.toggle(_PREFIX_+"-card-active",!!section&&_this._isActive(section));});},_proto._findActiveIndex=function(){if("number"!=typeof this._activeTime)return -1;for(var i=0;i<this._sortedSections.length;i++)if(this._isActive(this._sortedSections[i]))return i;return -1},_proto._rowIndexOfSection=function(sectionIndex){for(var i=0;i<this._rows.length;i++){var row=this._rows[i];if("cards"===row.type&&row.items.some(function(it){return it.index===sectionIndex}))return i}return -1},_proto._scrollToActive=function(force){ void 0===force&&(force=false);var idx=this._findActiveIndex();if((force||idx!==this._activeIndex)&&(this._activeIndex=idx,!(idx<0||!this._virtualScroll||!force&&this._userInteracting))){var rowIndex=this._rowIndexOfSection(idx);rowIndex>=0&&this._virtualScroll.scrollToIndex(rowIndex,true);}},_proto._onUserScroll=function(){var _this=this;this._userInteracting=true,this._userScrollTimer&&clearTimeout(this._userScrollTimer),this._userScrollTimer=setTimeout(function(){_this._userInteracting=false,_this._userScrollTimer=null;},3e3);},_proto._renderCardIcon=function(section){if(!this.recordOptions.showCardTypeIcon)return "";var inner="function"==typeof this.recordOptions.renderCardIcon?this.recordOptions.renderCardIcon(section):_REC_EVENT_ICONS_[section.EVENT_TYPE];return inner?'<span class="'+_PREFIX_+'-card-icon">'+inner+"</span>":""},_proto._observeVisibleImages=function(){if(this._lazyLoader){var imgs=this._$listRoot.querySelectorAll("img[data-src]");imgs.length&&this._lazyLoader.addImages(Array.from(imgs));}},_proto._onListClick=function(e){var onCardClick=this.recordOptions.onCardClick;if(onCardClick){var target=e.target,card=null==target?void 0:target.closest("."+_PREFIX_+"-card");if(card){var idx=Number(card.getAttribute("data-card-index")),section=this._sortedSections[idx];section&&onCardClick(section,idx,this._sortedSections);}}},_proto._escape=function(text){return String(text).replace(/[&<>"']/g,function(ch){switch(ch){case "&":return "&amp;";case "<":return "&lt;";case ">":return "&gt;";case '"':return "&quot;";default:return "&#39;"}})},_proto._setImageScr=function(src){if(src){var query="x=200&"+(this.options.coverQuery||"");return src+(src.includes("?")?"&":"?")+query}return ""},RecListModal._mergeModalOptions=function(options){var _ref,_ref1;return _extends$e({},options,{width:null!=(_ref=null==options?void 0:options.width)?_ref:_$REC_LIST_MODAL_DEFAULT_OPTIONS$_.width,height:null!=(_ref1=null==options?void 0:options.height)?_ref1:_$REC_LIST_MODAL_DEFAULT_OPTIONS$_.height,content:"",title:""})},_create_class$8(RecListModal,[{key:"_cardRowHeight",get:function(){return 70}}]),RecListModal}(Modal);RecListModal.VERSION="0.0.1-beta.5";
8681
9271
 
8682
9272
  function _extends$d() {
8683
9273
  _extends$d = Object.assign || function(target) {
@@ -8714,133 +9304,120 @@
8714
9304
  return _set_prototype_of$e(o, p);
8715
9305
  }
8716
9306
  /**
8717
- * 回放下拉控件
9307
+ * 录像列表按钮控件
8718
9308
  *
8719
- * 鼠标移入弹出气泡,展示云存储、云录制、本地回放三个选项
9309
+ * 点击切换录像列表面板的展示/隐藏状态
8720
9310
  *
8721
9311
  * @category Control
8722
- */ var RecDropdown = /*#__PURE__*/ function(Control) {
8723
- _inherits$c(RecDropdown, Control);
8724
- function RecDropdown(options) {
9312
+ */ var RecList = /*#__PURE__*/ function(Control) {
9313
+ _inherits$c(RecList, Control);
9314
+ function RecList(options) {
8725
9315
  var _this;
8726
- var _options_props, _this___options_props1;
9316
+ var _this__options_props, _this__options, _this_locale;
9317
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
8727
9318
  _this = Control.call(this, _extends$d({}, options, {
8728
9319
  tagName: 'span',
8729
9320
  controlType: 'button',
8730
- classNameSuffix: 'rec-dropdown'
8731
- })) || this;
9321
+ classNameSuffix: 'rec-list'
9322
+ })) || this, _this._panelOpen = false, _this.records = [];
8732
9323
  _this._options = options;
8733
- // H5 端不展示直播/回放切换按钮
8734
- if (Utils.isMobile) {
8735
- _this.$container.style.display = 'none';
8736
- }
8737
- // 初始化时根据 urlInfo 确定当前回放类型和激活状态
8738
- _this._recType = options.recType || ((_options_props = options.props) == null ? void 0 : _options_props.recType) || 'cloudRec';
8739
- _this._syncActiveByUrlInfo((_this___options_props1 = _this.__options.props) == null ? void 0 : _this___options_props1.urlInfo);
9324
+ _this.records = ((_this__options = _this._options) == null ? void 0 : (_this__options_props = _this__options.props) == null ? void 0 : _this__options_props.recordList) || [];
8740
9325
  _this._render();
8741
- _this._initPicker();
9326
+ _this._modal = new RecListModal(_this._options.rootContainer, _extends$d({
9327
+ showMask: false,
9328
+ title: (_this_locale = _this.locale) == null ? void 0 : _this_locale.BTN_REC_LIST_TITLE
9329
+ }, options, {
9330
+ onCardClick: function(section, index, sections) {
9331
+ _this.emit(EVENTS$2.control.recListCardClick, section, index, sections);
9332
+ },
9333
+ onClose: function() {
9334
+ var _this__options_onClose, _this__options;
9335
+ _this._panelOpen = false;
9336
+ _this.active = false;
9337
+ _this.emit(EVENTS$2.control.recListChange, false);
9338
+ (_this__options = _this._options) == null ? void 0 : (_this__options_onClose = _this__options.onClose) == null ? void 0 : _this__options_onClose.call(_this__options);
9339
+ }
9340
+ }));
9341
+ _this.on(EVENTS$2.setAllDayRecTimes, function(records) {
9342
+ var // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
9343
+ _this__modal, _this__modal1;
9344
+ _this.disabled = records.length === 0;
9345
+ _this.records = records;
9346
+ (_this__modal = _this._modal) == null ? void 0 : _this__modal.setSections(records);
9347
+ var _this__options_showEventFilter;
9348
+ (_this__modal1 = _this._modal) == null ? void 0 : _this__modal1.showEventFilter((_this__options_showEventFilter = _this._options.showEventFilter) != null ? _this__options_showEventFilter : true);
9349
+ });
9350
+ _this.on(EVENTS$2.getOSDTime, function(time) {
9351
+ if (time) {
9352
+ var _this__modal_setActiveTime, _this__modal;
9353
+ var _currentTime = time;
9354
+ (_this__modal = _this._modal) == null ? void 0 : (_this__modal_setActiveTime = _this__modal.setActiveTime) == null ? void 0 : _this__modal_setActiveTime.call(_this__modal, _currentTime);
9355
+ }
9356
+ });
9357
+ _this.on("TimeLine.onSectionIconClick", function(result) {
9358
+ var // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
9359
+ _this__modal, _this__modal1, // this._options.rootContainer
9360
+ _this__modal2, _this__modal3, _this__modal4;
9361
+ var list = _this.records.slice(result.index || 0, result.index + result.count);
9362
+ var $rootContainer = _this._options.rootContainer;
9363
+ var width = $rootContainer.clientWidth;
9364
+ var rect = $rootContainer.getBoundingClientRect();
9365
+ (_this__modal = _this._modal) == null ? void 0 : _this__modal.setSections(list);
9366
+ (_this__modal1 = _this._modal) == null ? void 0 : _this__modal1.showEventFilter(false);
9367
+ (_this__modal2 = _this._modal) == null ? void 0 : _this__modal2.open();
9368
+ if (!((_this__modal3 = _this._modal) == null ? void 0 : _this__modal3.isVisible)) (_this__modal4 = _this._modal) == null ? void 0 : _this__modal4.setPosition(width + rect.x, rect.y);
9369
+ });
9370
+ _this.on(EVENTS$2.recListChange, function(open) {
9371
+ _this._panelOpen = open;
9372
+ _this.active = open;
9373
+ });
8742
9374
  return _this;
8743
9375
  }
8744
- var _proto = RecDropdown.prototype;
8745
- /**
8746
- * 根据 urlInfo 同步激活状态和回放类型
8747
- * 在初始化和播放地址切换后调用
8748
- */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
8749
- if (urlInfo && urlInfo.type === 'rec') {
8750
- var _urlInfo_searchParams1;
8751
- this.active = true;
8752
- if (urlInfo.recType === 'cloud' && ((_urlInfo_searchParams1 = urlInfo.searchParams) == null ? void 0 : _urlInfo_searchParams1.busType) === '7') {
8753
- this._recType = 'cloudRecord';
8754
- } else if (urlInfo.recType === 'cloud') {
8755
- this._recType = 'cloudRec';
8756
- } else {
8757
- this._recType = 'rec';
8758
- }
8759
- this._activeOption(this._recType);
8760
- } else {
8761
- this.active = false;
8762
- }
8763
- };
9376
+ var _proto = RecList.prototype;
8764
9377
  _proto._render = function _render() {
8765
9378
  var _this_locale;
8766
- this.$container.innerHTML = IconComponents.recDropdown({
8767
- title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_REC_DROPDOWN) || '回放'
8768
- });
8769
- };
8770
- _proto._initPicker = function _initPicker() {
8771
- var _this = this;
8772
- this._picker = new Picker(this.$container, {
8773
- getPopupContainer: function() {
8774
- return Utils.isMobile ? _this.__options.rootContainer : _this.$container;
8775
- },
8776
- trigger: Utils.isMobile ? 'click' : 'hover',
8777
- isMobile: Utils.isMobile,
8778
- wrapClassName: "" + PREFIX_CLASS + "-rec-dropdown-picker",
8779
- placement: 'bottom',
8780
- offset: [
8781
- 0,
8782
- 4
8783
- ]
8784
- });
8785
- this._picker.innerHTML(this._getPanelHTML());
8786
- this._activeOption(this._recType);
8787
- this._bindPanelEvents();
8788
- };
8789
- _proto._getPanelHTML = function _getPanelHTML() {
8790
- var _this_locale, _this_locale1, _this_locale2;
8791
- var cloudRecLabel = ((_this_locale = this.locale) == null ? void 0 : _this_locale.REC_DROPDOWN_CLOUD_REC) || '云存储';
8792
- var cloudRecordLabel = ((_this_locale1 = this.locale) == null ? void 0 : _this_locale1.REC_DROPDOWN_CLOUD_RECORD) || '云录制';
8793
- var localRecLabel = ((_this_locale2 = this.locale) == null ? void 0 : _this_locale2.REC_DROPDOWN_LOCAL_REC) || '本地回放';
8794
- return '<div class="' + PREFIX_CLASS + '-rec-dropdown-panel">\n <ul class="' + PREFIX_CLASS + '-rec-dropdown-list">\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="cloudRec">\n <span>' + cloudRecLabel + '</span>\n </li>\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="cloudRecord">\n <span>' + cloudRecordLabel + '</span>\n </li>\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="rec">\n <span>' + localRecLabel + "</span>\n </li>\n </ul>\n </div>";
8795
- };
8796
- _proto._bindPanelEvents = function _bindPanelEvents() {
8797
- var _this = this;
8798
- this._delegation = delegate(this._picker.$body, "." + PREFIX_CLASS + "-rec-dropdown-item", 'click', function(e) {
8799
- e.stopPropagation();
8800
- var type = e.delegateTarget.getAttribute('data-type');
8801
- if (type) {
8802
- var _this__options_onChange, _this__options;
8803
- _this._recType = type;
8804
- _this._activeOption(type);
8805
- // 设置自身为激活状态
8806
- _this.active = true;
8807
- _this.emit(EVENTS.control.recDropdownChange, type);
8808
- (_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, type);
8809
- _this._picker.open = false;
8810
- }
9379
+ this.$container.innerHTML = IconComponents.recList({
9380
+ title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_REC_LIST_TITLE) || '录像列表'
8811
9381
  });
8812
9382
  };
8813
- _proto._activeOption = function _activeOption(type) {
8814
- var _this__picker;
8815
- if ((_this__picker = this._picker) == null ? void 0 : _this__picker.$body) {
8816
- var items = this._picker.$body.querySelectorAll("." + PREFIX_CLASS + "-rec-dropdown-item");
8817
- items.forEach(function(item) {
8818
- item.classList.remove("" + PREFIX_CLASS + "-active");
8819
- });
8820
- var target = this._picker.$body.querySelector("." + PREFIX_CLASS + '-rec-dropdown-item[data-type="' + type + '"]');
8821
- target == null ? void 0 : target.classList.add("" + PREFIX_CLASS + "-active");
8822
- }
8823
- };
8824
9383
  /**
8825
9384
  * 销毁
8826
9385
  */ _proto.destroy = function destroy() {
8827
- var _this__delegation_destroy, _this__delegation;
8828
- (_this__delegation = this._delegation) == null ? void 0 : (_this__delegation_destroy = _this__delegation.destroy) == null ? void 0 : _this__delegation_destroy.call(_this__delegation);
8829
- this._delegation = null;
8830
- if (this._picker) {
8831
- this._picker.destroy();
8832
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8833
- this._picker = null;
9386
+ if (this._panelOpen) {
9387
+ this.emit(EVENTS$2.control.recListChange, false);
9388
+ }
9389
+ this.emit(EVENTS$2.control.recListDestroy);
9390
+ if (this._modal) {
9391
+ this._modal.destroy();
9392
+ this._modal = null;
8834
9393
  }
8835
9394
  Control.prototype.destroy.call(this);
8836
9395
  };
8837
9396
  /**
8838
- * 点击 Control 会触发(移动端 click 触发 picker)
8839
- */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
8840
- _proto._onControlClick = function _onControlClick(_e) {
8841
- // picker 自行处理 click/hover,这里不额外处理
9397
+ * 点击 Control 会触发
9398
+ */ _proto._onControlClick = function _onControlClick(e) {
9399
+ Control.prototype._onControlClick.call(this, e);
9400
+ this._panelOpen = !this._panelOpen;
9401
+ this.active = this._panelOpen;
9402
+ if (this.active) {
9403
+ var // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
9404
+ _this__modal, _this__modal1, // this._options.rootContainer
9405
+ _this__modal2, _this__modal3, _this__modal4;
9406
+ var $rootContainer = this._options.rootContainer;
9407
+ var width = $rootContainer.clientWidth;
9408
+ var rect = $rootContainer.getBoundingClientRect();
9409
+ (_this__modal = this._modal) == null ? void 0 : _this__modal.setSections(this.records);
9410
+ var _this__options_showEventFilter;
9411
+ (_this__modal1 = this._modal) == null ? void 0 : _this__modal1.showEventFilter((_this__options_showEventFilter = this._options.showEventFilter) != null ? _this__options_showEventFilter : true);
9412
+ (_this__modal2 = this._modal) == null ? void 0 : _this__modal2.open();
9413
+ if (!((_this__modal3 = this._modal) == null ? void 0 : _this__modal3.isVisible)) (_this__modal4 = this._modal) == null ? void 0 : _this__modal4.setPosition(width + rect.x, rect.y);
9414
+ } else {
9415
+ var _this__modal5;
9416
+ (_this__modal5 = this._modal) == null ? void 0 : _this__modal5.close();
9417
+ }
9418
+ this.emit(EVENTS$2.control.recListChange, this._panelOpen);
8842
9419
  };
8843
- return RecDropdown;
9420
+ return RecList;
8844
9421
  }(Control);
8845
9422
 
8846
9423
  function _extends$c() {
@@ -8894,7 +9471,7 @@
8894
9471
  })) || this, _this._panelOpen = false;
8895
9472
  _this._options = options;
8896
9473
  _this._render();
8897
- _this.on(EVENTS.alarmMessageChange, function(open) {
9474
+ _this.on(EVENTS$2.alarmMessageChange, function(open) {
8898
9475
  _this._panelOpen = open;
8899
9476
  });
8900
9477
  return _this;
@@ -8910,7 +9487,7 @@
8910
9487
  * 销毁
8911
9488
  */ _proto.destroy = function destroy() {
8912
9489
  if (this._panelOpen) {
8913
- this.emit(EVENTS.control.alarmMessageChange, false);
9490
+ this.emit(EVENTS$2.control.alarmMessageChange, false);
8914
9491
  }
8915
9492
  Control.prototype.destroy.call(this);
8916
9493
  };
@@ -8920,7 +9497,7 @@
8920
9497
  var _this__options_onChange, _this__options;
8921
9498
  Control.prototype._onControlClick.call(this, e);
8922
9499
  this._panelOpen = !this._panelOpen;
8923
- this.emit(EVENTS.control.alarmMessageChange, this._panelOpen);
9500
+ this.emit(EVENTS$2.control.alarmMessageChange, this._panelOpen);
8924
9501
  (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, this._panelOpen);
8925
9502
  };
8926
9503
  return AlarmMessage;
@@ -9349,23 +9926,23 @@
9349
9926
  var _options_onChange;
9350
9927
  options == null ? void 0 : (_options_onChange = options.onChange) == null ? void 0 : _options_onChange.call(options, value, item);
9351
9928
  if (value === 'auto') {
9352
- _assert_this_initialized$1(_this).emit(EVENTS.control.definitionChange, 'auto', _assert_this_initialized$1(_this)._level);
9929
+ _assert_this_initialized$1(_this).emit(EVENTS$2.control.definitionChange, 'auto', _assert_this_initialized$1(_this)._level);
9353
9930
  } else {
9354
9931
  _assert_this_initialized$1(_this)._level = value;
9355
- _assert_this_initialized$1(_this).emit(EVENTS.control.definitionChange, value, item);
9932
+ _assert_this_initialized$1(_this).emit(EVENTS$2.control.definitionChange, value, item);
9356
9933
  }
9357
9934
  },
9358
9935
  onOpenChange: function(open, value, item) {
9359
9936
  var _options_onOpenChange;
9360
9937
  options == null ? void 0 : (_options_onOpenChange = options.onOpenChange) == null ? void 0 : _options_onOpenChange.call(options, open, value, item);
9361
- _assert_this_initialized$1(_this).emit(EVENTS.control.definitionPanelOpenChange, open, value, item);
9938
+ _assert_this_initialized$1(_this).emit(EVENTS$2.control.definitionPanelOpenChange, open, value, item);
9362
9939
  }
9363
9940
  })) || this, _this._level = '';
9364
9941
  _this.options = options || {};
9365
- _this.on(EVENTS.setVideoLevelList, function(list) {
9942
+ _this.on(EVENTS$2.setVideoLevelList, function(list) {
9366
9943
  Select.prototype.updateOptions.call(_assert_this_initialized$1(_this), __filter(list, _this.locale));
9367
9944
  });
9368
- _this.on(EVENTS.currentVideoLevel, function(item, realLevel) {
9945
+ _this.on(EVENTS$2.currentVideoLevel, function(item, realLevel) {
9369
9946
  var l = (typeof item === "undefined" ? "undefined" : _type_of(item)) === 'object' ? item.level : item;
9370
9947
  _this._level = realLevel + '';
9371
9948
  if (l === 'auto') {
@@ -9475,20 +10052,20 @@
9475
10052
  var _options_onChange;
9476
10053
  value = +value;
9477
10054
  options == null ? void 0 : (_options_onChange = options.onChange) == null ? void 0 : _options_onChange.call(options, value, item);
9478
- _assert_this_initialized(_this).emit(EVENTS.control.speedChange, value, item);
10055
+ _assert_this_initialized(_this).emit(EVENTS$2.control.speedChange, value, item);
9479
10056
  },
9480
10057
  onOpenChange: function(open, value, item) {
9481
10058
  var _options_onOpenChange;
9482
10059
  value = +value;
9483
10060
  options == null ? void 0 : (_options_onOpenChange = options.onOpenChange) == null ? void 0 : _options_onOpenChange.call(options, open, value, item);
9484
- _assert_this_initialized(_this).emit(EVENTS.control.speedPanelOpenChange, open, value, item);
10061
+ _assert_this_initialized(_this).emit(EVENTS$2.control.speedPanelOpenChange, open, value, item);
9485
10062
  }
9486
10063
  })) || this;
9487
10064
  _this._filterSpeedList(options.list, options.props.recType);
9488
- _this.on(EVENTS.speedChange, function(speed) {
10065
+ _this.on(EVENTS$2.speedChange, function(speed) {
9489
10066
  if (_this.value !== speed + '') _this.value = speed + '';
9490
10067
  });
9491
- _this.on(EVENTS.control.recTypeChange, function(type) {
10068
+ _this.on(EVENTS$2.control.recTypeChange, function(type) {
9492
10069
  _this._filterSpeedList(options.list, type);
9493
10070
  });
9494
10071
  return _this;
@@ -9580,7 +10157,7 @@
9580
10157
  _this._value = distExports$4.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');
9581
10158
  _this._render();
9582
10159
  // 日期上的点
9583
- _this.on(EVENTS.control.dateMonthChange, function(dates) {
10160
+ _this.on(EVENTS$2.control.dateMonthChange, function(dates) {
9584
10161
  var _this_datePicker_updateBadges, _this_datePicker;
9585
10162
  (_this_datePicker = _this.datePicker) == null ? void 0 : (_this_datePicker_updateBadges = _this_datePicker.updateBadges) == null ? void 0 : _this_datePicker_updateBadges.call(_this_datePicker, dates);
9586
10163
  });
@@ -9625,7 +10202,7 @@
9625
10202
  if (date && _this._value !== distExports$4.DateTime.format(date, 'YYYY-MM-DD') && isMobile1) {
9626
10203
  _this._value = distExports$4.DateTime.format(date, 'YYYY-MM-DD');
9627
10204
  _this.options.onOk == null ? void 0 : _this.options.onOk.call(_this.options, date);
9628
- _this.emit(EVENTS.control.dateChange, date);
10205
+ _this.emit(EVENTS$2.control.dateChange, date);
9629
10206
  if (date && _this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
9630
10207
  _this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value").innerHTML = _this._getDateStr();
9631
10208
  }
@@ -9635,12 +10212,12 @@
9635
10212
  if (date && _this._value !== distExports$4.DateTime.format(date, 'YYYY-MM-DD') && !isMobile1 && mode === 'date') {
9636
10213
  _this._value = distExports$4.DateTime.format(date, 'YYYY-MM-DD');
9637
10214
  _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, date);
9638
- _this.emit(EVENTS.control.dateChange, date);
10215
+ _this.emit(EVENTS$2.control.dateChange, date);
9639
10216
  }
9640
10217
  },
9641
10218
  onOpenChange: function(open) {
9642
10219
  _this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, _this.datePicker.current);
9643
- _this.emit(EVENTS.control.datePanelOpenChange, open, _this.datePicker.current);
10220
+ _this.emit(EVENTS$2.control.datePanelOpenChange, open, _this.datePicker.current);
9644
10221
  }
9645
10222
  }));
9646
10223
  };
@@ -9776,12 +10353,12 @@
9776
10353
  if (time && _this._value !== time) {
9777
10354
  _this._value = time;
9778
10355
  _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, time, _times);
9779
- _this.emit(EVENTS.control.timeChange, time);
10356
+ _this.emit(EVENTS$2.control.timeChange, time);
9780
10357
  }
9781
10358
  },
9782
10359
  onOpenChange: function(open) {
9783
10360
  _this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, _this.timePicker.current);
9784
- _this.emit(EVENTS.control.timePanelOpenChange, open, _this.timePicker.current);
10361
+ _this.emit(EVENTS$2.control.timePanelOpenChange, open, _this.timePicker.current);
9785
10362
  }
9786
10363
  }));
9787
10364
  };
@@ -10369,11 +10946,11 @@
10369
10946
  var DragScroll = /*@__PURE__*/getDefaultExportFromCjs(distExports);
10370
10947
 
10371
10948
  /*
10372
- * @ezuikit/control-time-line v2.1.0-beta.3
10373
- * Copyright (c) 2026-06-26 Ezviz-OpenBiz
10949
+ * @ezuikit/control-time-line v2.1.0-beta.5
10950
+ * Copyright (c) 2026-07-03 Ezviz-OpenBiz
10374
10951
  * Released under the MIT License.
10375
10952
  */
10376
- var _$TIMELINE_LOCALES$_={zh:{title:"包含{{len}}段录像",foldTitle:"{{len}}个录像"},en:{title:"Includes {{len}} {{unit}}",foldTitle:"{{len}} {{unit}}"}};function _create_class$2(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var _$BASE_TIME_LINE_DEFAULT_OPTIONS$_={current:new Date,language:"zh",timeSections:[],readOnly:false,className:"",timeWidth:0,width:"100%",timePointColor:"#FFF",timeTextColor:"#FFF",timeScaleColor:"#FFF",timeSectionColor:"rgba(24, 144, 255, 0.5)",timeAxisBgColor:"#000",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",hoverTipBgColor:"rgba(0, 0, 0, 0.75)",hoverTipColor:"#FFFFFF",hoverLineColor:"rgba(255, 255, 255, 0.8)",opBtnBorderColor:"rgba(153, 153, 153, 1)",opBtnActiveColor:"rgba(54, 159, 255, 1)",opBtnDisabledBorderColor:"rgba(222, 222, 222, 1)",pickerHeaderColor:"rgba(44, 44, 44, 1)",pickerCloseColor:"#20262c",pickerCloseActiveColor:"rgba(240, 87, 87, 1)",pickerItemTitleColor:"rgba(102, 102, 102, 1)",coverFoldPlaceholderBackColor:"#cccccc",coverFoldPlaceholderFrontColor:"#ededed",coverFoldOverlayColor:"rgba(0, 0, 0, 0.3)",itemCoverPlaceholderStartColor:"rgb(183, 195, 207)",itemCoverPlaceholderEndColor:"rgb(212, 209, 209)",timeTextFontSize:12,timeTextFontFamily:"serif",scaleLineWidth:1,onChange:function(){},onDragStart:function(){},onDragging:function(){},onDragEnd:function(){},onDestroy:function(){}},BaseTimeLine=function(){function BaseTimeLine(container,options){if(this._current=new Date,this._readOnly=false,this._width=0,this._height=0,this._destroyed=false,this._timeWidth=0,this._timeSections=[],this.$container=container,!container)throw new Error("container is required");var left,right;this.options=deepmerge(_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}),this.options.timeSections&&Array.isArray(this.options.timeSections)&&(this._timeSections=this.options.timeSections),this.options.readOnly&&(this.readOnly=this.options.readOnly),this.options.className&&this.$container.classList.add(this.options.className),this.$container.style.position="relative",this.options.current&&(left=this.options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?this._current=this.options.current||new Date:this._current=new Date,this.i18n=new I18n(deepmerge(_$TIMELINE_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"}),this._timeWidth=this.options.timeWidth||0,this._resize(this.options.width||"100%",this.options.height);}var _proto=BaseTimeLine.prototype;return _proto.setReadOnly=function(readOnly){this.readOnly=readOnly;},_proto.update=function(current){this._current=current;},_proto.updateTimeSections=function(timeSections){timeSections&&Array.isArray(timeSections)&&(this._timeSections=timeSections);},_proto.resize=function(width,height){this._resize(width,height);},_proto._resize=function(width,height){var cssText="";/^\d+(\.\d+)?$/.test(width+"")?cssText+="width: "+width+"px;":width&&(cssText+="width: "+width+";"),/^\d+(\.\d+)?$/.test(height+"")?cssText+="height: "+height+"px;":height&&(cssText+="height: "+height+";"),this.$container&&(this.$container.style.cssText+=cssText),this._width=Math.floor(this.$container.clientWidth),this._height=Math.floor(this.$container.clientHeight);},_proto.setTimeWidth=function(timeWidth){[0,1,2,3,4,5].includes(timeWidth)&&(this._timeWidth=timeWidth);},_proto.destroy=function(){this._current=null,null==this.options.onDestroy||this.options.onDestroy.call(this.options),this._timeSections=[],this._readOnly=false,this._destroyed=true;},_create_class$2(BaseTimeLine,[{key:"current",get:function(){return this._current},set:function(current){this._current=current;}},{key:"readOnly",get:function(){return this._readOnly},set:function(readOnly){this._readOnly!==readOnly&&(this._readOnly=readOnly,this.$container.style.cursor=readOnly?"not-allowed":"pointer");}},{key:"timeSections",get:function(){return this._timeSections}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"timeWidth",get:function(){return this._timeWidth}}]),BaseTimeLine}();BaseTimeLine.LOCALES=_$TIMELINE_LOCALES$_;var TimeLineUtil=function(){function TimeLineUtil(){}return TimeLineUtil.timeToSecond=function(time){var e=time.split(":");return 60*Number(e[0])*60+60*Number(e[1])+(Number(e[2])||0)},TimeLineUtil.minuteToTime=function(minute){var hour=Math.floor(minute/60),m=minute%60;return (hour>9?hour:"0"+hour)+":"+(m>9?m:"0"+m)},TimeLineUtil.timeToMinute=function(time){var e=time.split(":");return 60*Number(e[0])+Number(e[1])},TimeLineUtil.tranTimeToString=function(start,end){var _DateTime_toDate,_DateTime_toDate1,secondNum=Math.floor((null==(_DateTime_toDate=distExports$4.DateTime.toDate(end))?void 0:_DateTime_toDate.getTime())-(null==(_DateTime_toDate1=distExports$4.DateTime.toDate(start))?void 0:_DateTime_toDate1.getTime()))/1e3,second=secondNum%60,minute=Math.floor(secondNum/60);return (minute>0?distExports$4.DateTime.fillZero(minute)+"'":"0'")+distExports$4.DateTime.fillZero(second)+"''"},TimeLineUtil}(),_$TIMELINE_ICONS$__tip='<svg viewBox="0 0 57 24" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="tip">\n <path class="ez-time-line-icon-tip" fill-rule="evenodd" d="m4,0l44,0c2.2091,0 4,1.7909 4,4l0,3.8218l4.9399,3.3572c0.5839,0.3968 0.5839,1.2574 0,1.6542l-4.9399,3.3572l0,3.8096c0,2.2091 -1.7909,4 -4,4l-44,0c-2.2091,0 -4,-1.7909 -4,-4l0,-16c0,-2.2091 1.7909,-4 4,-4z"/>\n </svg>',_$TIMELINE_ICONS$__plus='\n <svg viewBox="0 0 16 16" stroke="currentColor" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="plus">\n <path d="M0 0L10.6667 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0,1,-1,0,8,2.66663)"/>\n <path d="M2.66669 8L13.3334 8" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__minus='\n <svg viewBox="0 0 16 16" stroke="currentColor" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="minus">\n <path d="M2.66669 8L13.3334 8" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__close='\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n ',_$TIMELINE_ICONS$__pause='<svg viewBox="0 0 20 20" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="pause">\n\t\t <path d="M9.43914 2.47881L13.4688 8.4912C14.3594 9.81998 13.4071 11.6047 11.8074 11.6047L3.74811 11.6047C2.14849 11.6047 1.19616 9.81998 2.08675 8.4912L6.11641 2.47881C6.90863 1.2968 8.64693 1.2968 9.43914 2.47881Z" fill-rule="evenodd" transform="matrix(0,1,-1,0,16.5781,2.22229)" />\n </svg>\n ',_$TIMELINE_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',TIME_WIDTH=[[1,10,10,"单位 1秒"],[60,20,5,"单位 1分钟"],[600,20,6,"单位 10分钟"],[3600,30,6,"单位 1小时"],[14400,40,2,"单位 4小时"],[43200,80,2,"单位 12小时"]],MOBILE_TIME_WIDTH=[[1,10,10,"单位 1分钟"],[10,20,5,"单位 10分钟"],[30,20,6,"单位 30分钟"],[60,30,6,"单位 1小时"],[120,40,2,"单位 2小时"],[240,80,2,"单位 4小时"]],__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__={targets:[],root:null,rootMargin:"0px",threshold:.1,loadingClass:"ez-lazy-image-loading",loadedClass:"ez-lazy-image-loaded",loadedErrorClass:"ez-lazy-image-error",onLoadError:function(){}},ImageLazyLoader=function(){function ImageLazyLoader(options){ void 0===options&&(options={}),this.options=Object.assign({},__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__,options),this._observer=null,this._init();}var _proto=ImageLazyLoader.prototype;return _proto._init=function(){var _this=this;ImageLazyLoader.isSupported&&(this._observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){var _this__observer;entry.isIntersecting&&(_this._loadImage(entry.target),null==(_this__observer=_this._observer)||_this__observer.unobserve(entry.target));});},this.options)),this.addImages(this.options.targets);},_proto._loadImage=function(img){var _img_classList,_img_classList1,_img_classList2,_this=this;if(img&&!(null==(_img_classList=img.classList)?void 0:_img_classList.contains(this.options.loadingClass))&&!(null==(_img_classList1=img.classList)?void 0:_img_classList1.contains(this.options.loadedClass))&&!(null==(_img_classList2=img.classList)?void 0:_img_classList2.contains(this.options.loadedErrorClass))&&img.hasAttribute("data-src")){var _this1=this;img.classList.add(this.options.loadingClass);var tempImg=new Image;tempImg.onload=function(){img.src=img.dataset.src,img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedClass),img.dispatchEvent(new Event("lazyloaded"));},tempImg.onerror=function(e){img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedErrorClass),null==_this1.options.onLoadError||_this1.options.onLoadError.call(_this1.options,img);},tempImg.src=img.dataset.src;}},_proto.addImages=function(targets){var _this=this;(null==targets?void 0:targets.length)&&targets.forEach(function(target){var _this__observer;(null==target?void 0:target.hasAttribute("data-src"))&&(ImageLazyLoader.isSupported&&_this._observer?null==(_this__observer=_this._observer)||_this__observer.observe(target):_this._loadImage(target));});},_proto.destroy=function(){this._observer&&(this._observer.disconnect(),this._observer=null);},ImageLazyLoader}();function _create_class$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1$1(){return _extends$1$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1$1.apply(this,arguments)}function _set_prototype_of$1$1(o,p){return _set_prototype_of$1$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$1(o,p)}ImageLazyLoader.isSupported="IntersectionObserver"in window;var _$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_=Object.assign({},_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,{height:400,width:"100%",timeWidth:0,readOnly:false,timePointColor:"#648FFC",timeTextColor:"#666666",timeScaleColor:"transparent",timeSectionColor:"#369FFF",timeAxisBgColor:"#BDCDFF",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",showTimeWidthBtn:true,showCoverFold:true}),MobileTimeLine=function(BaseTimeLine){function MobileTimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}))||this)._isTouchStart=false,_this._dragScroll=null,_this._moveStartX=0,_this._moveStartY=0,_this._imageLazyLoader=null,_this._imageLazyLoaderPicker=null,_this.state={start:"00:00:00",end:"24:00:00",current:null,timeArr:[],availTimeLine:[],index:0},_this._onImageError=_this._onImageError.bind(_this),_this._plusClick=_this._plusClick.bind(_this),_this._minusClick=_this._minusClick.bind(_this),_this._onPickerClose=_this._onPickerClose.bind(_this),_this._onClickItem=_this._onClickItem.bind(_this),_this._onClickCoverFold=_this._onClickCoverFold.bind(_this),_this._imageLazyLoader=new ImageLazyLoader({root:_this.$container,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}}),_this._render(),_this.options.timeSections&&Array.isArray(_this.options.timeSections)&&_this.updateTimeSections(_this.options.timeSections),_this._applyCssVars(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$1$1(subClass,superClass);}(MobileTimeLine,BaseTimeLine);var _proto=MobileTimeLine.prototype;return _proto._applyCssVars=function(){var opts,_this=this,vars=(opts=this.options,{"--ez-time-line-axis-border-color":String(opts.timeAxisBgColor),"--ez-time-line-section-color":String(opts.timeSectionColor),"--ez-time-line-text-color":String(opts.timeTextColor),"--ez-time-line-point-color":String(opts.timePointColor),"--ez-time-line-current-bg":String(opts.currentTimeBgColor),"--ez-time-line-current-color":String(opts.currentTimeColor),"--ez-time-line-op-btn-border":String(opts.opBtnBorderColor),"--ez-time-line-op-btn-active":String(opts.opBtnActiveColor),"--ez-time-line-op-btn-disabled-border":String(opts.opBtnDisabledBorderColor),"--ez-time-line-picker-header":String(opts.pickerHeaderColor),"--ez-time-line-picker-close":String(opts.pickerCloseColor),"--ez-time-line-picker-close-active":String(opts.pickerCloseActiveColor),"--ez-time-line-picker-item-title":String(opts.pickerItemTitleColor),"--ez-time-line-cover-fold-placeholder-back":String(opts.coverFoldPlaceholderBackColor),"--ez-time-line-cover-fold-placeholder-front":String(opts.coverFoldPlaceholderFrontColor),"--ez-time-line-cover-fold-overlay":String(opts.coverFoldOverlayColor),"--ez-time-line-item-cover-placeholder-start":String(opts.itemCoverPlaceholderStartColor),"--ez-time-line-item-cover-placeholder-end":String(opts.itemCoverPlaceholderEndColor),"--ez-time-line-hover-tip-bg":String(opts.hoverTipBgColor),"--ez-time-line-hover-tip-color":String(opts.hoverTipColor)});Object.entries(vars).forEach(function(param){var name=param[0],value=param[1];return _this.$container.style.setProperty(name,value)});},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._dragScroll&&(this._dragScroll.readonly=readOnly);},_proto.setTimeWidth=function(timeWidth){MOBILE_TIME_WIDTH[timeWidth]&&(BaseTimeLine.prototype.setTimeWidth.call(this,timeWidth),this._matchTimeDot());},_proto.updateTimeSections=function(timeSections,defaultIndex){BaseTimeLine.prototype.updateTimeSections.call(this,timeSections);var list=timeSections.map(function(record){return _extends$1$1({},record,{startTime:distExports$4.DateTime.format(record.startTime,"HH:mm:ss"),endTime:distExports$4.DateTime.format(record.endTime,"HH:mm:ss")})});if(list.length>0){ void 0===defaultIndex&&(defaultIndex=list.length-1);var current=this.state.current;this._setState({availTimeLine:list,start:list[defaultIndex].startTime,end:list[defaultIndex].endTime,current:null===current?list[defaultIndex].startTime:current}),this._matchTimeDot();}else this._setState({availTimeLine:[],current:distExports$4.DateTime.format(this.current||(new Date).getTime(),"HH:mm:ss")}),this._matchTimeDot();},_proto.update=function(time){var _this__dragScroll;time&&!(null==(_this__dragScroll=this._dragScroll)?void 0:_this__dragScroll.isDragging)&&(this._setState({current:distExports$4.DateTime.format(time,"HH:mm:ss")}),this._currentOffsetH());},_proto.destroy=function(){var _this__dragScroll;if(this._scrollTimer&&(clearInterval(this._scrollTimer),this._scrollTimer=null),this._$currentTime)try{this.$container.removeChild(this._$currentTime),this._$currentTime=null;}catch(error){}if(this._$itemContainer&&this._$itemList)try{this._$itemContainer.removeChild(this._$itemList),this._$itemList=null;}catch(error){}if(this._$itemContainer)try{this.$container.removeChild(this._$itemContainer),this._$itemContainer=null;}catch(error){}if(this._$op)try{this.$container.removeChild(this._$op),this._$op=null;}catch(error){}this._picker&&(this._picker.destroy(),this._picker=null),this._imageLazyLoader&&(this._imageLazyLoader.destroy(),this._imageLazyLoader=null),this._imageLazyLoaderPicker&&(this._imageLazyLoaderPicker.destroy(),this._imageLazyLoaderPicker=null),this._removeEventListener(),null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.destroy(),this._dragScroll=null,BaseTimeLine.prototype.destroy.call(this);},_proto._setState=function(obj){var _this=this;Object.keys(obj).forEach(function(key){var _this__dragScroll,_this_timeSections_;"current"===key&&obj[key]?(_this._setCurrentDOM(obj[key]),_this.state.current===obj[key]||(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.isDragging)||(_this.state[key]=obj[key],_this.current=new Date(distExports$4.DateTime.format((null==(_this_timeSections_=_this.timeSections[0])?void 0:_this_timeSections_.endTime)||(new Date).getTime(),"YYYY-MM-DD")+"T"+obj[key]),null==_this.options.onChange||_this.options.onChange.call(_this.options,_this.current))):_this.state[key]=obj[key];});},_proto._setCurrentDOM=function(time){this._$currentTime&&(this._$currentTime.querySelector(".ez-time-line-current-value").innerHTML=time);},_proto._matchTimeDot=function(){for(var scaleWidth=this._scaleWidth,timeArr=[],minute=TimeLineUtil.timeToMinute("24:00:00"),i=minute=Math.floor(minute/scaleWidth)*scaleWidth;i>=0;){var marginTop=0,marginBottom=0;i==minute&&(marginTop=70),0==i&&(marginBottom=this.$container.clientHeight-70);var time=TimeLineUtil.minuteToTime(i);timeArr.push({id:i,current:time,label:"a"+i,marginTop:marginTop,marginBottom:marginBottom,recArr:[],coverArr:this._filterTimeSectionsByTime(time)}),i-=scaleWidth;}this._setState({timeArr:timeArr}),this._matchRecTimeDot();},_proto._matchRecTimeDot=function(){var _this_state=this.state,availTimeLine=_this_state.availTimeLine,timeArr=_this_state.timeArr,scaleWidth=this._scaleWidth,len=availTimeLine.length;if(0===len)for(var j=0;j<timeArr.length;j++)timeArr[j].recArr=[];else {for(var k=0;k<timeArr.length;k++)timeArr[k].recArr=[];for(var i=0;i<len;i++){var stAvailPercent,etAvailPercent,temp=availTimeLine[i],st=TimeLineUtil.timeToSecond(temp.startTime),et=TimeLineUtil.timeToSecond(temp.endTime),stMinute=Math.floor(st/(60*scaleWidth))*scaleWidth;stAvailPercent=(st-60*stMinute)/scaleWidth;var etMinute=Math.floor(et/(60*scaleWidth))*scaleWidth;etAvailPercent=(et-60*etMinute)/scaleWidth;for(var j1=0;j1<timeArr.length;j1++)if(timeArr[j1].id==stMinute&&timeArr[j1].id==etMinute){var height=etAvailPercent-stAvailPercent,top=60-etAvailPercent;timeArr[j1].recArr.push({height:height,top:top});}else timeArr[j1].id==stMinute?timeArr[j1].recArr.push({height:60-stAvailPercent,top:0}):timeArr[j1].id==etMinute?timeArr[j1].recArr.push({height:etAvailPercent,top:60-etAvailPercent}):timeArr[j1].id>stMinute&&timeArr[j1].id<etMinute&&timeArr[j1].recArr.push({height:60,top:0});}}this._setState({timeArr:timeArr}),this._renderDateLine();},_proto._renderDateLine=function(){var _this=this,timeArr=this.state.timeArr,container=this._$itemList;container.innerHTML="",timeArr.forEach(function(item,index){var _this__imageLazyLoader,timeItemDOM=document.createElement("div");timeItemDOM.setAttribute("class","ez-time-line-time-scale-area"),item.marginTop&&(timeItemDOM.style.cssText+="margin-top: "+item.marginTop+"px;"),item.marginBottom&&(timeItemDOM.style.cssText+="margin-bottom: "+item.marginBottom+"px;"),timeItemDOM.style.cssText+="border-right-color: "+String(_this.options.timeAxisBgColor)+";",timeItemDOM.setAttribute("data-time",item.current),timeItemDOM.setAttribute("data-index",index+""),document.createElement("div").setAttribute("class","ez-time-line-scale");var timeItemHtml="";item.coverArr.length&&_this.options.showCoverFold&&(timeItemHtml+='\n <div class="ez-time-line-time-cover-fold '+(item.coverArr.length>1?"ez-time-line-time-cover-fold-multiple":"")+'"\n data-start="'+item.current+'">\n '+(item.coverArr.length>1?'<div class="ez-time-line-cover-fold-placeholder" style="color: #FFF"></div>':"")+'\n <div class="ez-time-line-time-cover-fold-img">\n <img data-src="'+_this._setImageScr(item.coverArr[0].coverPic)+'" class="ez-time-line-img"/>\n <span class="ez-time-line-time-cover-fold-len">\n '+(item.coverArr.length>1?_this.i18n.t("foldTitle",{len:item.coverArr.length,unit:"videos"}):""+distExports$4.DateTime.format(item.coverArr[0].startTime,"HH:mm"))+"\n </span>\n "+(1===item.coverArr.length?'<span class="ez-time-line-time-cover-fold-time">'+TimeLineUtil.tranTimeToString(item.coverArr[0].startTime,item.coverArr[0].endTime)+"</span>":"")+'\n <span class="ez-time-line-time-cover-fold-pause">'+_$TIMELINE_ICONS$__pause+"</span>\n </div>\n </div>"),item.recArr.forEach(function(i){timeItemHtml+='<div class="ez-time-line-time-unavail"\n style="height: '+i.height+"px;background-color:"+String(_this.options.timeSectionColor)+"; top: "+i.top+'px">\n </div>';}),timeItemHtml+="<div id="+item.label+' class="ez-time-line-time-label" style="color: '+String(_this.options.timeTextColor)+'">'+item.current+"</div>",timeItemDOM.innerHTML=timeItemHtml,container.appendChild(timeItemDOM),item.coverArr.length&&_this.options.showCoverFold&&(null==(_this__imageLazyLoader=_this._imageLazyLoader)||_this__imageLazyLoader.addImages(container.querySelectorAll("img.ez-time-line-img")||[]));}),this._currentOffsetH();},_proto._currentOffsetH=function(){var current=this.state.current;if(current){var _this__dragScroll,y=(86400-TimeLineUtil.timeToSecond(current)||0)/this._scaleWidth;null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y+60,false);}},_proto._render=function(){var _this=this;if(this._$currentTime=document.createElement("div"),this._$currentTime.classList.add("ez-time-line-current"),this._$currentTime.innerHTML='<div class="ez-time-line-current-content" style="color: '+String(this.options.currentTimeBgColor)+'">\n <span class="ez-time-line-current-tip">'+_$TIMELINE_ICONS$__tip+'</span>\n <span class="ez-time-line-current-tip-line" style="background-color: '+String(this.options.timePointColor)+';"></span>\n <div class="ez-time-line-current-value" style="color: '+String(this.options.currentTimeColor)+'">00:00:00</div>\n </div>',this.$container.appendChild(this._$currentTime),this._$itemContainer=document.createElement("div"),this._$itemContainer.classList.add("ez-time-line-container"),this.$container.appendChild(this._$itemContainer),this._dragScroll=new DragScroll(this._$itemContainer,{hideScrollbar:true,onChange:function(state){var result=_this._offsetYToTime(state.y);result[1]!==_this.state.current&&_this._setCurrentDOM(result[0]>=86400?"23:59:59":result[1]);},onDragStart:function(e){_this._moveStartX=e.clientX,_this._moveStartY=e.clientY,null==_this.options.onDragStart||_this.options.onDragStart.call(_this.options,_this.state.current);},onDragging:function(){null==_this.options.onDragging||_this.options.onDragging.call(_this.options,_this.state.current);},onDragEnd:function(){var _this__dragScroll,result=_this._offsetYToTime(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.currentY);result[1]!==_this.state.current&&_this._setState({current:result[0]>=86400?"23:59:59":result[1]}),null==_this.options.onDragEnd||_this.options.onDragEnd.call(_this.options,_this.state.current);}}),/\d/.test(this.options.height))this._$itemContainer.style.cssText+="height: "+this.options.height+"px";else if("string"==typeof this.options.height)this._$itemContainer.style.cssText+="height: "+this.options.height;else {var height=this.$container.clientHeight;this._$itemContainer.style.cssText+="height: "+height+"px";}this._$itemList=document.createElement("div"),this._$itemList.classList.add("ez-time-line-item"),this._dragScroll.$content.appendChild(this._$itemList),this.options.showTimeWidthBtn&&(this._$op=document.createElement("div"),this._$op.classList.add("ez-time-line-op"),this._$op.innerHTML='<span class="ez-time-line-op-wrapper"><span class="ez-time-line-icon-plus">'+_$TIMELINE_ICONS$__plus+'</span> <span class="ez-time-line-icon-minus">'+_$TIMELINE_ICONS$__minus+"</span></span>",this.$container.appendChild(this._$op)),this.options.showCoverFold&&(this._picker=new Picker(null,{isMobile:true,wrapClassName:"ez-time-line-picker",onOpenChange:function(isOpen){var _this_options_onPickerOpenChange,_this_options;null==(_this_options=_this.options)||null==(_this_options_onPickerOpenChange=_this_options.onPickerOpenChange)||_this_options_onPickerOpenChange.call(_this_options,isOpen);}}),this._imageLazyLoaderPicker=new ImageLazyLoader({root:this._picker.$body,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}})),this._addEventListener();},_proto._addEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.addEventListener("click",this._plusClick,false),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.addEventListener("click",this._minusClick,false));this._matchTimeDot(),this._picker&&(this._delegatePickerClose=delegate(this._picker.$body,".ez-time-line-picker-close","click",this._onPickerClose,false),this._delegateItemContent=delegate(this._picker.$body,".ez-time-line-picker-item-content","click",this._onClickItem,false),this._delegateCoverFold=delegate(this._$itemList,".ez-time-line-time-cover-fold","click",this._onClickCoverFold,false));},_proto._removeEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1,_this__picker_$body_querySelector,_this__picker_$body;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.removeEventListener("click",this._plusClick),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.removeEventListener("click",this._minusClick));this._picker&&(null==(_this__picker_$body=this._picker.$body)||null==(_this__picker_$body_querySelector=_this__picker_$body.querySelector(".ez-time-line-picker-close"))||_this__picker_$body_querySelector.removeEventListener("click",this._onPickerClose),this._delegateItemContent&&(this._delegateItemContent.forEach(function(delegation){delegation.destroy();}),this._delegateItemContent=null),this._delegatePickerClose&&(this._delegatePickerClose.forEach(function(delegation){delegation.destroy();}),this._delegatePickerClose=null),this._delegateCoverFold&&(this._delegateCoverFold.forEach(function(delegation){delegation.destroy();}),this._delegateCoverFold=null));},_proto._plusClick=function(){var timeWidth=this.timeWidth+1;timeWidth>0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(timeWidth);},_proto._minusClick=function(){var timeWidth=this.timeWidth-1;timeWidth>=0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(Math.floor(timeWidth));},_proto._timeSectionsToGroupsByHour=function(list){var obj={};return list.forEach(function(item,index){var hour=distExports$4.DateTime.format(item.startTime,"HH");obj[+hour]?obj[+hour].push(_extends$1$1({},item,{_index:index})):obj[+hour]=[_extends$1$1({},item,{_index:index})];}),obj},_proto._filterTimeSectionsByTime=function(start){if(!start)return [];var startSecond=TimeLineUtil.timeToSecond(start+":00"),endSecond=TimeLineUtil.timeToSecond(start+":00")+60*this._scaleWidth;return this.timeSections.filter(function(item){var _$start=TimeLineUtil.timeToSecond(distExports$4.DateTime.format(item.startTime,"HH:mm:ss"));return _$start>=startSecond&&_$start<endSecond})},_proto._renderPickerContent=function(start){var _this__picker_innerHTML,_this__picker,_this__picker1,_this__picker2,_this__imageLazyLoaderPicker,_this=this,list=this._filterTimeSectionsByTime(start),hourGroups=this._timeSectionsToGroupsByHour(list);(null==(_this__picker=this._picker)||null==(_this__picker_innerHTML=_this__picker.innerHTML)||_this__picker_innerHTML.call(_this__picker,'<div class="ez-time-line-picker-container">\n <div class="ez-time-line-picker-header">\n <span class="ez-time-line-picker-close">'+_$TIMELINE_ICONS$__close+"</span>\n "+this.i18n.t("title",{len:list.length,unit:list.length>1?"videos":"video"})+'\n </div>\n <div class="ez-time-line-picker-content">\n <div class="ez-time-line-picker-list">\n '+Object.keys(hourGroups).reverse().map(function(key){return '<div class="ez-time-line-picker-item">\n <div class="ez-time-line-picker-item-title">'+key+':00</div>\n <div class="ez-time-line-picker-item-list">\n '+hourGroups[key].reverse().map(function(item){return '<div class="ez-time-line-picker-item-content"\n data-start="'+distExports$4.DateTime.format(item.startTime,"YYYYMMDDTHHmmssZ")+'"\n data-end="'+distExports$4.DateTime.format(item.endTime,"YYYYMMDDTHHmmssZ")+'"\n data-index="'+item._index+'">\n <span class="ez-time-line-picker-item-time">'+distExports$4.DateTime.format(item.startTime,"HH:mm")+'</span>\n <span class="ez-time-line-picker-item-duration">\n '+TimeLineUtil.tranTimeToString(item.startTime,item.endTime)+'\n </span>\n <img class="ez-time-line-picker-item-cover" data-src="'+_this._setImageScr(item.coverPic)+'"/>\n </div>'}).join("")+"\n </div>\n </div>"}).join("")+"\n </div>\n </div>\n </div>\n </div>"),null==(_this__picker1=this._picker)?void 0:_this__picker1.$body)&&(null==(_this__imageLazyLoaderPicker=this._imageLazyLoaderPicker)||_this__imageLazyLoaderPicker.addImages((null==(_this__picker2=this._picker)?void 0:_this__picker2.$body.querySelectorAll("img"))||[]));},_proto._onImageError=function(img){if(!img.hasAttribute("data-error")){var _img_parentNode,placeholder=document.createElement("div");placeholder.classList.add("ez-time-line-item-cover-placeholder"),placeholder.innerHTML=""+_$TIMELINE_ICONS$__picture,null==(_img_parentNode=img.parentNode)||_img_parentNode.appendChild(placeholder),img.setAttribute("data-error","true"),img.remove();}},_proto._onPickerClose=function(){this._picker&&(this._picker.open=false);},_proto._onClickItem=function(e){var _e_delegateTarget_getAttribute,_e_delegateTarget,index=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_getAttribute=_e_delegateTarget.getAttribute)?void 0:_e_delegateTarget_getAttribute.call(_e_delegateTarget,"data-index");this._picker&&(this._picker.open=false),null==this.options.onPickerSelect||this.options.onPickerSelect.call(this.options,this.timeSections[+index]);},_proto._onClickCoverFold=function(e){var _e_delegateTarget_parentElement_getAttribute,_e_delegateTarget_parentElement,_e_delegateTarget;e.preventDefault();var time=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_parentElement=_e_delegateTarget.parentElement)||null==(_e_delegateTarget_parentElement_getAttribute=_e_delegateTarget_parentElement.getAttribute)?void 0:_e_delegateTarget_parentElement_getAttribute.call(_e_delegateTarget_parentElement,"data-time"),moveX=Math.abs(this._moveStartX-e.clientX),moveY=Math.abs(this._moveStartY-e.clientY);this._picker&&time&&!(moveX>=1||moveY>=1)&&(this._renderPickerContent(time),this._picker.open=true);},_proto._setImageScr=function(src){if(src){var query="x=200&"+(this.options.coverQuery||"");return src+(src.includes("?")?"&":"?")+query}return ""},_proto._offsetYToTime=function(offsetY){var _this__dragScroll,y=offsetY;offsetY<60&&(y=60,null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y));var second=86400-Math.floor((y-60)*this._scaleWidth);return [second,distExports$4.DateTime.fillZero(Math.floor(second/3600))+":"+distExports$4.DateTime.fillZero(Math.floor(second%3600/60))+":"+distExports$4.DateTime.fillZero(second%60)]},_create_class$1(MobileTimeLine,[{key:"_scaleWidth",get:function(){return (MOBILE_TIME_WIDTH[this.timeWidth]||MOBILE_TIME_WIDTH[0])[0]}}]),MobileTimeLine}(BaseTimeLine);function isOverlap(a_start,a_end,b_start,b_end){return Math.max(a_start,b_start)<=Math.min(a_end,b_end)}function _extends$5(){return _extends$5=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$5.apply(this,arguments)}function getTouchDistance(touches){var touch1=touches[0],touch2=touches[1],dx=touch2.clientX-touch1.clientX,dy=touch2.clientY-touch1.clientY;return Math.sqrt(dx*dx+dy*dy)}function _create_class$3(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$6(o,p){return _set_prototype_of$6=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$6(o,p)}var _$TIMELINE_DEFAULT_OPTIONS$_={height:36,dpr:window.devicePixelRatio||2,readOnly:false,scaleOffsetTop:4,showYearMonthDay:true,showHoverTip:true,hoverTipPlacement:"follow",enabledClickToSeek:true},TimeLine=function(BaseTimeLine){function TimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$TIMELINE_DEFAULT_OPTIONS$_,options,{clone:true}))||this)._$canvas=null,_this._ctx=null,_this._timeWidthArray=TIME_WIDTH[0],_this._centerPositionX=0,_this._isMouseDown=false,_this._mousePosition=0,_this._oldTime=null,_this._isOver=false,_this._moved=false,_this._lastTouchDist=0,_this._$hoverTip=null,_this._hoverRafId=null,_this._hoverX=0,_this._hoverY=0,_this._hoverActive=false,_this._hoverLineX=0,_this._dragMoved=false,_this._containerRect=null,_this._drawRafId=null,_this.$container=container,_this._mousemoveFun=_this._mousemoveFun.bind(_this),_this._mouseoverFun=_this._mouseoverFun.bind(_this),_this._mouseleaveFun=_this._mouseleaveFun.bind(_this),_this._mousedownFun=_this._mousedownFun.bind(_this),_this._mouseUpFun=_this._mouseUpFun.bind(_this),_this._mousewheelFun=_this._mousewheelFun.bind(_this),_this._containerWheelFun=_this._containerWheelFun.bind(_this),_this._touchstartFun=_this._touchstartFun.bind(_this),_this._touchmoveFun=_this._touchmoveFun.bind(_this),_this._touchendFun=_this._touchendFun.bind(_this),_this._clickFun=_this._clickFun.bind(_this),_this._init(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$6(subClass,superClass);}(TimeLine,BaseTimeLine);var _proto=TimeLine.prototype;return _proto._init=function(){this._$canvas=document.createElement("canvas"),this._ctx=this._$canvas.getContext("2d"),this.readOnly||(this._$canvas.style.cursor="pointer"),this.$container.appendChild(this._$canvas),this.resize(this.width,this.height),this._update({current:this.current,timeWidth:this.timeWidth,timeSections:this.timeSections}),this._initHoverTip(),this._applyHoverTipVars(),this._addEventListener();},_proto.resize=function(width,height){BaseTimeLine.prototype.resize.call(this,width,height),this._$canvas&&width&&(this._$canvas.width=this.width*this.options.dpr,this._$canvas.style.width=this.width+"px"),this._$canvas&&height&&(this._$canvas.height=this.height*this.options.dpr,this._$canvas.style.height=this.height+"px"),this._containerRect=null,this._draw();},_proto.setTimeWidth=function(timeWidth){this._update({timeWidth:timeWidth});},_proto.updateTimeSections=function(timeSections){this._update({timeSections:timeSections});},_proto.update=function(time){time&&!this._isMouseDown&&this._update({current:distExports$4.DateTime.toDate(time)});},_proto._update=function(options){var left,right,_this__$canvas;(void 0===options&&(options={}),(null==options?void 0:options.current)&&(left=options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)&&(this.current=options.current),(null==options?void 0:options.timeSections)&&BaseTimeLine.prototype.updateTimeSections.call(this,function(timeSections){if(0===timeSections.length)return timeSections;for(var normalized=timeSections.map(function(item){var startTime=item.startTime,endTime=item.endTime;return 10===(startTime+"").length&&(startTime*=1e3),10===(endTime+"").length&&(endTime*=1e3),_extends$5({},item,{startTime:startTime,endTime:endTime})}),merged=[normalized[0]],i=1;i<normalized.length;i++){var prev=merged[merged.length-1],curr=normalized[i];prev.endTime>=curr.startTime?prev.endTime=Math.max(prev.endTime,curr.endTime):merged.push(curr);}return merged}(options.timeSections)),"number"==typeof(null==options?void 0:options.timeWidth)&&(null==options?void 0:options.timeWidth)<TIME_WIDTH.length&&(BaseTimeLine.prototype.setTimeWidth.call(this,options.timeWidth),this._timeWidthArray=TIME_WIDTH[Math.floor(this.timeWidth)]),"number"==typeof(null==options?void 0:options.timeWidth)&&this._timeWidthArray)&&(this._timeWidthArray[3]&&(null==(_this__$canvas=this._$canvas)||_this__$canvas.setAttribute("data-title",this._timeWidthArray[3])));this._draw(),this._hoverActive&&this._$hoverTip&&!this._isMouseDown&&this._showHoverTip(this._hoverX,this._hoverY);},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._$canvas&&(this._$canvas.style.cursor=readOnly?"not-allowed":"pointer");},_proto.destroy=function(){this._removeEventListener(),this._hideHoverTip(),null!=this._drawRafId&&(cancelAnimationFrame(this._drawRafId),this._drawRafId=null),this._$hoverTip&&this._$hoverTip.remove(),this._$hoverTip=null,this._$canvas&&this._$canvas.remove(),this._$canvas=null,this._ctx=null,this._containerRect=null,BaseTimeLine.prototype.destroy.call(this);},_proto._initHoverTip=function(){if(this.options.showHoverTip){var tip=document.createElement("div");tip.className="ez-time-line-hover-tip",this.$container.appendChild(tip),this._$hoverTip=tip,this._applyHoverTipVars();}},_proto._applyHoverTipVars=function(){this.$container.style.setProperty("--ez-time-line-hover-tip-bg",String(this.options.hoverTipBgColor)),this.$container.style.setProperty("--ez-time-line-hover-tip-color",String(this.options.hoverTipColor));},_proto._hoverTimeAt=function(x){var seconds=(x-this.width/2)/this._curScaleSpacing*this._timeWidthArray[0];return new Date(this.current.getTime()+Math.round(1e3*seconds))},_proto._localDayStartSec=function(sec){var d=new Date(1e3*sec);return d.setHours(0,0,0,0),Math.floor(d.getTime()/1e3)},_proto._getContainerRect=function(){return this._containerRect||(this._containerRect=this.$container.getBoundingClientRect()),this._containerRect},_proto._scheduleDraw=function(){var _this=this;null==this._drawRafId&&(this._drawRafId=requestAnimationFrame(function(){_this._drawRafId=null,_this._draw();}));},_proto._formatHoverTime=function(date){if("function"==typeof this.options.renderHoverTip)return this.options.renderHoverTip(date);var fmt=this.options.hoverTipFormat||"yyyy-MM-dd HH:mm:ss";return distExports$4.DateTime.format(date,fmt)},_proto._showHoverTip=function(x,y){var _this=this;this._$hoverTip&&(this._hoverX=x,this._hoverY=y,null==this._hoverRafId&&(this._hoverRafId=requestAnimationFrame(function(){_this._hoverRafId=null,_this._renderHoverTip();})));},_proto._renderHoverTip=function(){var tip=this._$hoverTip;if(tip){var width=this.width,tx=Math.max(0,Math.min(this._hoverX,width)),date=this._hoverTimeAt(tx),content=this._formatHoverTime(date);"function"==typeof this.options.renderHoverTip?tip.innerHTML=content:tip.textContent=content,tip.style.display="inline-flex",tip.style.opacity="1";var left,top,tipW=tip.offsetWidth;if("top"===this.options.hoverTipPlacement)(left=this._hoverX-tipW/2)+tipW>width&&(left=width-tipW),left<0&&(left=0),top=-tip.offsetHeight-2;else {(left=this._hoverX+14)+tipW>width&&(left=this._hoverX-14-tipW),left<0&&(left=0),top=this._hoverY+16;}tip.style.left=left+"px",tip.style.top=top+"px";}},_proto._hideHoverTip=function(){null!=this._hoverRafId&&(cancelAnimationFrame(this._hoverRafId),this._hoverRafId=null),this._$hoverTip&&(this._$hoverTip.style.display="none",this._$hoverTip.style.opacity="0");},_proto._draw=function(){this._ctx&&(this._ctx.fillStyle=this.options.timeAxisBgColor,this._ctx.fillRect(0,0,this.width*this.options.dpr,this.height*this.options.dpr)),this._drawSections(),this._drawScale(),this._drawHoverLine();},_proto._drawHoverLine=function(){if(this._hoverActive&&!this._isMouseDown&&this._ctx){var dpr=this.options.dpr,x=Math.max(0,Math.min(this._hoverLineX,this.width))*dpr,lineWidth=this.options.scaleLineWidth*dpr;this._drawSolidLine(x,0,x,this.height*dpr,lineWidth,this.options.hoverLineColor);}},_proto._drawScale=function(){var lineWidth=this.options.scaleLineWidth*this.options.dpr;this._centerPositionX=parseInt(this.width*this.options.dpr/2+"");for(var centerPosition={x:this.width*this.options.dpr/2,y:this.height*this.options.dpr},curScaleTime=Math.floor(this.current.getTime()/1e3),offsetSecond=(curScaleTime-this._localDayStartSec(curScaleTime))%this._timeWidthArray[0],padding=this.height*this.options.dpr/20,spacing=this._curScaleSpacing*this.options.dpr,rightLastScaleTimeX=Math.floor(this._centerPositionX+(this._timeWidthArray[0]-offsetSecond)/this._timeWidthArray[0]*spacing),leftLastScaleTime=curScaleTime-offsetSecond,rightLastScaleTime=leftLastScaleTime+this._timeWidthArray[0],x=rightLastScaleTimeX-spacing;x>0;x-=spacing){0===(leftLastScaleTime-this._localDayStartSec(leftLastScaleTime))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x,padding,x,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(distExports$4.DateTime.format(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x,padding,x,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),leftLastScaleTime-=this._timeWidthArray[0];}for(var x1=rightLastScaleTimeX;x1<=this.width*this.options.dpr;x1+=spacing){0===(rightLastScaleTime-this._localDayStartSec(rightLastScaleTime))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x1,padding,x1,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(distExports$4.DateTime.format(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x1,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x1,padding,x1,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),rightLastScaleTime+=this._timeWidthArray[0];}this._drawCenterIndicator(centerPosition.x,centerPosition.y);},_proto._drawCenterIndicator=function(centerX,totalHeight){if(this._ctx){var dpr=this.options.dpr,lineW=2*dpr,triH=3*dpr,baseW=6*dpr,baseH=5*dpr,x=centerX;this._ctx.save(),this._ctx.fillStyle=this.options.timePointColor,this._ctx.fillRect(x-lineW/2,0,lineW,totalHeight),this._ctx.beginPath(),this._ctx.moveTo(x-baseW/2,0),this._ctx.lineTo(x+baseW/2,0),this._ctx.lineTo(x+baseW/2,baseH),this._ctx.lineTo(x,baseH+triH),this._ctx.lineTo(x-baseW/2,baseH),this._ctx.closePath(),this._ctx.fill(),this._ctx.beginPath(),this._ctx.moveTo(x-baseW/2,totalHeight),this._ctx.lineTo(x+baseW/2,totalHeight),this._ctx.lineTo(x+baseW/2,totalHeight-baseH),this._ctx.lineTo(x,totalHeight-baseH-triH),this._ctx.lineTo(x-baseW/2,totalHeight-baseH),this._ctx.closePath(),this._ctx.fill(),this._ctx.restore();}},_proto._drawSolidLine=function(startX,startY,endX,endY,lineWidth,color){this._ctx&&(this._ctx.save(),this._ctx.strokeStyle=null!=color?color:this.options.timeScaleColor,this._ctx.lineWidth=lineWidth,this._ctx.beginPath(),this._ctx.moveTo(startX,startY),this._ctx.lineTo(endX,endY),this._ctx.stroke(),this._ctx.restore());},_proto._drawTextString=function(text,x,y,align){if(this._ctx){var timeTexts=text.split(" ");this._ctx.font=(opts=this.options,dpr=this.options.dpr,(null!=(_opts_timeTextFontSize=opts.timeTextFontSize)?_opts_timeTextFontSize:12)*(dpr||1)+"px "+(null!=(_opts_timeTextFontFamily=opts.timeTextFontFamily)?_opts_timeTextFontFamily:"serif")),this._ctx.fillStyle=this.options.timeTextColor,this._ctx.textAlign=align||"left",this._timeWidthArray[0]%60==0&&(timeTexts[1]=timeTexts[1].replace(/:00$/,"")),this._ctx.fillText(timeTexts[1],x,y+8*this.options.dpr),!this.options.showYearMonthDay||"00:00:00"!==timeTexts[1]&&"00:00"!==timeTexts[1]&&this._timeWidthArray[0]*this._timeWidthArray[2]!==86400||(this._ctx.textAlign=align||"left",this._ctx.fillText(timeTexts[0],x,y+18*this.options.dpr));}var opts,dpr,_opts_timeTextFontSize,_opts_timeTextFontFamily;},_proto._drawSections=function(){for(var timeArr=this.timeSections||[],dpr=this.options.dpr,_ref=this.options.timeSectionOffset||[],tmp=_ref[0],offsetTopPx=void 0===tmp?0:tmp,tmp1=_ref[1],offsetTop=offsetTopPx*dpr,offsetBottom=(void 0===tmp1?0:tmp1)*dpr,sectionHeight=this.height*dpr-offsetTop-offsetBottom,i=0;i<timeArr.length;i++){var position=this._findPosition(timeArr[i]);this._ctx&&isOverlap(0,this.width*this.options.dpr,position.x1,position.x2)&&(this._ctx.fillStyle=this.options.timeSectionColor,this._ctx.fillRect(position.x1,offsetTop,position.x2-position.x1,sectionHeight));}},_proto._findPosition=function(item){var x1=(parseInt((item.startTime-this.current.getTime())/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing+this.width/2)*this.options.dpr;return {x1:x1,x2:x1+parseInt((item.endTime-item.startTime)/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing*this.options.dpr}},_proto._addEventListener=function(){this._$canvas&&(this._$canvas.addEventListener("mousemove",this._mousemoveFun),this._$canvas.addEventListener("mouseover",this._mouseoverFun),this._$canvas.addEventListener("mouseleave",this._mouseleaveFun),this._$canvas.addEventListener("mousedown",this._mousedownFun),this._$canvas.addEventListener("mouseup",this._mouseUpFun),this._$canvas.addEventListener("click",this._clickFun),this._$canvas.addEventListener("wheel",this._mousewheelFun),this.$container.addEventListener("wheel",this._containerWheelFun,{passive:false}),this._$canvas.addEventListener("touchstart",this._touchstartFun,{passive:false}),this._$canvas.addEventListener("touchmove",this._touchmoveFun,{passive:false}),this._$canvas.addEventListener("touchend",this._touchendFun,{passive:false}));},_proto._removeEventListener=function(){this._$canvas&&(this._$canvas.removeEventListener("mousemove",this._mousemoveFun),this._$canvas.removeEventListener("mouseover",this._mouseoverFun),this._$canvas.removeEventListener("mouseleave",this._mouseleaveFun),this._$canvas.removeEventListener("mousedown",this._mousedownFun),this._$canvas.removeEventListener("mouseup",this._mouseUpFun),this._$canvas.removeEventListener("click",this._clickFun),this._$canvas.removeEventListener("wheel",this._mousewheelFun),this.$container.removeEventListener("wheel",this._containerWheelFun),this._$canvas.removeEventListener("touchstart",this._touchstartFun),this._$canvas.removeEventListener("touchmove",this._touchmoveFun),this._$canvas.removeEventListener("touchend",this._touchendFun));},_proto._mousedownFun=function(e){this.readOnly||(this._isMouseDown=true,this._mousePosition=e.pageX,this._oldTime=this.current,this._dragMoved=false,this._hideHoverTip(),this._hoverActive=false,null==this.options.onDragStart||this.options.onDragStart.call(this.options,this.current));},_proto._mouseoverFun=function(){this.readOnly||(this._isOver=true,this._containerRect=this.$container.getBoundingClientRect());},_proto._mouseleaveFun=function(e){this.readOnly||(this._isOver=false,this._containerRect=null,this._hideHoverTip(),this._hoverActive=false,this._draw(),this._moveEndOrTouchEndFun(e));},_proto._containerWheelFun=function(e){e.preventDefault();},_proto._mouseUpFun=function(e){this._moveEndOrTouchEndFun(e);},_proto._clickFun=function(e){if(!this.readOnly&&this.options.enabledClickToSeek)if(this._dragMoved)this._dragMoved=false;else {var rect=this._getContainerRect(),x=e.clientX-rect.left,date=this._hoverTimeAt(x);this._update({current:date}),null==this.options.onClickSeek||this.options.onClickSeek.call(this.options,date);}},_proto._mousemoveFun=function(e){if(!this.readOnly)if(this._isMouseDown&&this._isOver)this._moveUpdateFun(e.pageX);else {var left=parseInt(this.$container.offsetLeft+"",10);this._mousePosition=e.pageX-left;var rect=this._getContainerRect();this._hoverActive=true,this._hoverLineX=e.clientX-rect.left,this._scheduleDraw(),this._showHoverTip(e.clientX-rect.left,e.clientY-rect.top);}},_proto._mousewheelFun=function(e){e.preventDefault();},_proto._touchstartFun=function(e){if(!this.readOnly)if(this._oldTime=this.current,this._isOver=true,1===e.touches.length){var touch=e.touches[0];this._isMouseDown=true,this._mousePosition=touch.clientX;}else 2===e.touches.length&&(this._lastTouchDist=getTouchDistance(e.touches));},_proto._touchmoveFun=function(e){if(e.preventDefault(),e.stopPropagation(),!this.readOnly)if(1===e.touches.length){var touch=e.touches[0];this._moveUpdateFun(touch.clientX);}else 2===e.touches.length&&(this._lastTouchDist=getTouchDistance(e.touches));},_proto._touchendFun=function(e){this.readOnly||this._moveEndOrTouchEndFun(e);},_proto._moveEndOrTouchEndFun=function(e){e.preventDefault(),this.readOnly||this._isMouseDown&&(this._isMouseDown=false,this._moved&&(this._moved=false,this._update({current:this.current}),this._oldTime=this.current,null==this.options.onDragEnd||this.options.onDragEnd.call(this.options,this.current,this._isOver)),this._isOver&&Math.abs(this._mousePosition-(e.pageX||0))>5&&(null==this.options.onChange||this.options.onChange.call(this.options,this.current)),this._mousePosition=0,this._lastTouchDist=0);},_proto._moveUpdateFun=function(x){var mouseOffset=this._mousePosition-x;if(0!==mouseOffset){if(this._oldTime){var currentTime=this._oldTime.getTime()+1e3*parseInt(mouseOffset/this._curScaleSpacing*this._timeWidthArray[0]+"",10);this._update({current:new Date(currentTime)}),null==this.options.onDragging||this.options.onDragging.call(this.options,new Date(currentTime));}this._moved=true,this._dragMoved=true;}},_create_class$3(TimeLine,[{key:"_curScaleSpacing",get:function(){var _this__timeWidthArray,_this__timeWidthArray1;return Math.floor((null==(_this__timeWidthArray=this._timeWidthArray)?void 0:_this__timeWidthArray[1])-(null==(_this__timeWidthArray1=this._timeWidthArray)?void 0:_this__timeWidthArray1[1])*+(this.timeWidth%1/2).toFixed(2))}}]),TimeLine}(BaseTimeLine);TimeLine.TIME_WIDTH=TIME_WIDTH;
10953
+ var _$TIMELINE_LOCALES$_={zh:{title:"包含{{len}}段录像",foldTitle:"{{len}}个录像"},en:{title:"Includes {{len}} {{unit}}",foldTitle:"{{len}} {{unit}}"}};function _create_class$2(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var _$BASE_TIME_LINE_DEFAULT_OPTIONS$_={current:new Date,language:"zh",timeSections:[],readOnly:false,className:"",timeWidth:0,width:"100%",timePointColor:"#FFF",timeTextColor:"#FFF",timeScaleColor:"#FFF",timeSectionColor:"rgba(24, 144, 255, 0.5)",timeAxisBgColor:"#000",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",hoverTipBgColor:"rgba(0, 0, 0, 0.75)",hoverTipColor:"#FFFFFF",hoverLineColor:"rgba(255, 255, 255, 0.8)",opBtnBorderColor:"rgba(153, 153, 153, 1)",opBtnActiveColor:"rgba(54, 159, 255, 1)",opBtnDisabledBorderColor:"rgba(222, 222, 222, 1)",pickerHeaderColor:"rgba(44, 44, 44, 1)",pickerCloseColor:"#20262c",pickerCloseActiveColor:"rgba(240, 87, 87, 1)",pickerItemTitleColor:"rgba(102, 102, 102, 1)",coverFoldPlaceholderBackColor:"#cccccc",coverFoldPlaceholderFrontColor:"#ededed",coverFoldOverlayColor:"rgba(0, 0, 0, 0.3)",itemCoverPlaceholderStartColor:"rgb(183, 195, 207)",itemCoverPlaceholderEndColor:"rgb(212, 209, 209)",timeTextFontSize:12,timeTextFontFamily:"serif",scaleLineWidth:1,onChange:function(){},onDragStart:function(){},onDragging:function(){},onDragEnd:function(){},onDestroy:function(){}},BaseTimeLine=function(){function BaseTimeLine(container,options){if(this._current=new Date,this._readOnly=false,this._width=0,this._height=0,this._destroyed=false,this._timeWidth=0,this._timeSections=[],this.$container=container,!container)throw new Error("container is required");var left,right;this.options=deepmerge(_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}),this.options.timeSections&&Array.isArray(this.options.timeSections)&&(this._timeSections=this.options.timeSections),this.options.readOnly&&(this.readOnly=this.options.readOnly),this.options.className&&this.$container.classList.add(this.options.className),this.$container.style.position="relative",this.options.current&&(left=this.options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?this._current=this.options.current||new Date:this._current=new Date,this.i18n=new I18n(deepmerge(_$TIMELINE_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"}),this._timeWidth=this.options.timeWidth||0,this._resize(this.options.width||"100%",this.options.height);}var _proto=BaseTimeLine.prototype;return _proto.setReadOnly=function(readOnly){this.readOnly=readOnly;},_proto.update=function(current){this._current=current;},_proto.updateTimeSections=function(timeSections){timeSections&&Array.isArray(timeSections)&&(this._timeSections=timeSections);},_proto.resize=function(width,height){this._resize(width,height);},_proto._resize=function(width,height){var cssText="";/^\d+(\.\d+)?$/.test(width+"")?cssText+="width: "+width+"px;":width&&(cssText+="width: "+width+";"),/^\d+(\.\d+)?$/.test(height+"")?cssText+="height: "+height+"px;":height&&(cssText+="height: "+height+";"),this.$container&&(this.$container.style.cssText+=cssText),this._width=Math.floor(this.$container.clientWidth),this._height=Math.floor(this.$container.clientHeight);},_proto.setTimeWidth=function(timeWidth){[0,1,2,3,4,5].includes(timeWidth)&&(this._timeWidth=timeWidth);},_proto.destroy=function(){this._current=null,null==this.options.onDestroy||this.options.onDestroy.call(this.options),this._timeSections=[],this._readOnly=false,this._destroyed=true;},_create_class$2(BaseTimeLine,[{key:"current",get:function(){return this._current},set:function(current){this._current=current;}},{key:"readOnly",get:function(){return this._readOnly},set:function(readOnly){this._readOnly!==readOnly&&(this._readOnly=readOnly,this.$container.style.cursor=readOnly?"not-allowed":"pointer");}},{key:"timeSections",get:function(){return this._timeSections}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"timeWidth",get:function(){return this._timeWidth}}]),BaseTimeLine}();BaseTimeLine.LOCALES=_$TIMELINE_LOCALES$_;var TimeLineUtil=function(){function TimeLineUtil(){}return TimeLineUtil.timeToSecond=function(time){var e=time.split(":");return 60*Number(e[0])*60+60*Number(e[1])+(Number(e[2])||0)},TimeLineUtil.minuteToTime=function(minute){var hour=Math.floor(minute/60),m=minute%60;return (hour>9?hour:"0"+hour)+":"+(m>9?m:"0"+m)},TimeLineUtil.timeToMinute=function(time){var e=time.split(":");return 60*Number(e[0])+Number(e[1])},TimeLineUtil.tranTimeToString=function(start,end){var _DateTime_toDate,_DateTime_toDate1,secondNum=Math.floor((null==(_DateTime_toDate=distExports$4.DateTime.toDate(end))?void 0:_DateTime_toDate.getTime())-(null==(_DateTime_toDate1=distExports$4.DateTime.toDate(start))?void 0:_DateTime_toDate1.getTime()))/1e3,second=secondNum%60,minute=Math.floor(secondNum/60);return (minute>0?distExports$4.DateTime.fillZero(minute)+"'":"0'")+distExports$4.DateTime.fillZero(second)+"''"},TimeLineUtil}(),_$TIMELINE_ICONS$__tip='<svg viewBox="0 0 57 24" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="tip">\n <path class="ez-time-line-icon-tip" fill-rule="evenodd" d="m4,0l44,0c2.2091,0 4,1.7909 4,4l0,3.8218l4.9399,3.3572c0.5839,0.3968 0.5839,1.2574 0,1.6542l-4.9399,3.3572l0,3.8096c0,2.2091 -1.7909,4 -4,4l-44,0c-2.2091,0 -4,-1.7909 -4,-4l0,-16c0,-2.2091 1.7909,-4 4,-4z"/>\n </svg>',_$TIMELINE_ICONS$__plus='\n <svg viewBox="0 0 16 16" stroke="currentColor" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="plus">\n <path d="M0 0L10.6667 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0,1,-1,0,8,2.66663)"/>\n <path d="M2.66669 8L13.3334 8" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__minus='\n <svg viewBox="0 0 16 16" stroke="currentColor" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="minus">\n <path d="M2.66669 8L13.3334 8" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__close='\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n ',_$TIMELINE_ICONS$__pause='<svg viewBox="0 0 20 20" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="pause">\n\t\t <path d="M9.43914 2.47881L13.4688 8.4912C14.3594 9.81998 13.4071 11.6047 11.8074 11.6047L3.74811 11.6047C2.14849 11.6047 1.19616 9.81998 2.08675 8.4912L6.11641 2.47881C6.90863 1.2968 8.64693 1.2968 9.43914 2.47881Z" fill-rule="evenodd" transform="matrix(0,1,-1,0,16.5781,2.22229)" />\n </svg>\n ',_$TIMELINE_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',_$TIMELINE_ICONS$__event='\n <svg viewBox="0 0 20 20" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="event">\n <path d="M14.074 2.91669C15.4547 2.91669 16.574 4.03597 16.574 5.41669V15.8334C16.574 17.2141 15.4547 18.3334 14.074 18.3334H5.32968C3.94897 18.3334 2.82968 17.2141 2.82968 15.8334V5.41669C2.82968 4.03597 3.94897 2.91669 5.32968 2.91669H14.074ZM5.32968 4.16669C4.63933 4.16669 4.07968 4.72633 4.07968 5.41669V15.8334C4.07968 16.5237 4.63933 17.0834 5.32968 17.0834H14.074C14.7644 17.0834 15.324 16.5237 15.324 15.8334V5.41669C15.324 4.72633 14.7644 4.16669 14.074 4.16669H5.32968Z"/>\n <path d="M11.7228 8.54169C12.068 8.54169 12.3478 8.82151 12.3478 9.16669C12.3478 9.51186 12.068 9.79169 11.7228 9.79169H6.56897C6.22379 9.79169 5.94397 9.51186 5.94397 9.16669C5.94397 8.82151 6.22379 8.54169 6.56897 8.54169H11.7228Z"/>\n <path d="M9.14659 11.875C9.49165 11.8751 9.77159 12.1549 9.77159 12.5C9.77159 12.8451 9.49165 13.1249 9.14659 13.125H6.56927C6.2241 13.125 5.94427 12.8452 5.94427 12.5C5.94427 12.1548 6.2241 11.875 6.56927 11.875H9.14659Z"/>\n <path d="M7.09341 4.46613C7.09341 4.8113 6.81359 5.09113 6.46841 5.09113C6.12324 5.09113 5.84341 4.8113 5.84341 4.46613V2.47394C5.84341 2.12876 6.12324 1.84894 6.46841 1.84894C6.81359 1.84894 7.09341 2.12876 7.09341 2.47394V4.46613Z"/>\n <path d="M13.5607 4.46613C13.5607 4.8113 13.2809 5.09113 12.9357 5.09113C12.5905 5.09113 12.3107 4.8113 12.3107 4.46613V2.47394C12.3107 2.12876 12.5905 1.84894 12.9357 1.84894C13.2809 1.84894 13.5607 2.12876 13.5607 2.47394V4.46613Z"/>\n </svg>\n ',TIME_WIDTH=[[1,10,10,"单位 1秒"],[60,20,5,"单位 1分钟"],[600,20,6,"单位 10分钟"],[3600,30,6,"单位 1小时"],[14400,40,2,"单位 4小时"],[43200,80,2,"单位 12小时"]],MOBILE_TIME_WIDTH=[[1,10,10,"单位 1分钟"],[10,20,5,"单位 10分钟"],[30,20,6,"单位 30分钟"],[60,30,6,"单位 1小时"],[120,40,2,"单位 2小时"],[240,80,2,"单位 4小时"]],__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__={targets:[],root:null,rootMargin:"0px",threshold:.1,loadingClass:"ez-lazy-image-loading",loadedClass:"ez-lazy-image-loaded",loadedErrorClass:"ez-lazy-image-error",onLoadError:function(){}},ImageLazyLoader=function(){function ImageLazyLoader(options){ void 0===options&&(options={}),this.options=Object.assign({},__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__,options),this._observer=null,this._init();}var _proto=ImageLazyLoader.prototype;return _proto._init=function(){var _this=this;ImageLazyLoader.isSupported&&(this._observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){var _this__observer;entry.isIntersecting&&(_this._loadImage(entry.target),null==(_this__observer=_this._observer)||_this__observer.unobserve(entry.target));});},this.options)),this.addImages(this.options.targets);},_proto._loadImage=function(img){var _img_classList,_img_classList1,_img_classList2,_this=this;if(img&&!(null==(_img_classList=img.classList)?void 0:_img_classList.contains(this.options.loadingClass))&&!(null==(_img_classList1=img.classList)?void 0:_img_classList1.contains(this.options.loadedClass))&&!(null==(_img_classList2=img.classList)?void 0:_img_classList2.contains(this.options.loadedErrorClass))&&img.hasAttribute("data-src")){var _this1=this;img.classList.add(this.options.loadingClass);var tempImg=new Image;tempImg.onload=function(){img.src=img.dataset.src,img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedClass),img.dispatchEvent(new Event("lazyloaded"));},tempImg.onerror=function(e){img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedErrorClass),null==_this1.options.onLoadError||_this1.options.onLoadError.call(_this1.options,img);},tempImg.src=img.dataset.src;}},_proto.addImages=function(targets){var _this=this;(null==targets?void 0:targets.length)&&targets.forEach(function(target){var _this__observer;(null==target?void 0:target.hasAttribute("data-src"))&&(ImageLazyLoader.isSupported&&_this._observer?null==(_this__observer=_this._observer)||_this__observer.observe(target):_this._loadImage(target));});},_proto.destroy=function(){this._observer&&(this._observer.disconnect(),this._observer=null);},ImageLazyLoader}();function _create_class$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1$1(){return _extends$1$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1$1.apply(this,arguments)}function _set_prototype_of$1$1(o,p){return _set_prototype_of$1$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$1(o,p)}ImageLazyLoader.isSupported="IntersectionObserver"in window;var _$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_=Object.assign({},_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,{height:400,width:"100%",timeWidth:0,readOnly:false,timePointColor:"#648FFC",timeTextColor:"#666666",timeScaleColor:"transparent",timeSectionColor:"#369FFF",timeAxisBgColor:"#BDCDFF",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",showTimeWidthBtn:true,showCoverFold:true}),MobileTimeLine=function(BaseTimeLine){function MobileTimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}))||this)._isTouchStart=false,_this._dragScroll=null,_this._moveStartX=0,_this._moveStartY=0,_this._imageLazyLoader=null,_this._imageLazyLoaderPicker=null,_this.state={start:"00:00:00",end:"24:00:00",current:null,timeArr:[],availTimeLine:[],index:0},_this._onImageError=_this._onImageError.bind(_this),_this._plusClick=_this._plusClick.bind(_this),_this._minusClick=_this._minusClick.bind(_this),_this._onPickerClose=_this._onPickerClose.bind(_this),_this._onClickItem=_this._onClickItem.bind(_this),_this._onClickCoverFold=_this._onClickCoverFold.bind(_this),_this._imageLazyLoader=new ImageLazyLoader({root:_this.$container,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}}),_this._render(),_this.options.timeSections&&Array.isArray(_this.options.timeSections)&&_this.updateTimeSections(_this.options.timeSections),_this._applyCssVars(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$1$1(subClass,superClass);}(MobileTimeLine,BaseTimeLine);var _proto=MobileTimeLine.prototype;return _proto._applyCssVars=function(){var opts,_this=this,vars=(opts=this.options,{"--ez-time-line-axis-border-color":String(opts.timeAxisBgColor),"--ez-time-line-section-color":String(opts.timeSectionColor),"--ez-time-line-text-color":String(opts.timeTextColor),"--ez-time-line-point-color":String(opts.timePointColor),"--ez-time-line-current-bg":String(opts.currentTimeBgColor),"--ez-time-line-current-color":String(opts.currentTimeColor),"--ez-time-line-op-btn-border":String(opts.opBtnBorderColor),"--ez-time-line-op-btn-active":String(opts.opBtnActiveColor),"--ez-time-line-op-btn-disabled-border":String(opts.opBtnDisabledBorderColor),"--ez-time-line-picker-header":String(opts.pickerHeaderColor),"--ez-time-line-picker-close":String(opts.pickerCloseColor),"--ez-time-line-picker-close-active":String(opts.pickerCloseActiveColor),"--ez-time-line-picker-item-title":String(opts.pickerItemTitleColor),"--ez-time-line-cover-fold-placeholder-back":String(opts.coverFoldPlaceholderBackColor),"--ez-time-line-cover-fold-placeholder-front":String(opts.coverFoldPlaceholderFrontColor),"--ez-time-line-cover-fold-overlay":String(opts.coverFoldOverlayColor),"--ez-time-line-item-cover-placeholder-start":String(opts.itemCoverPlaceholderStartColor),"--ez-time-line-item-cover-placeholder-end":String(opts.itemCoverPlaceholderEndColor),"--ez-time-line-hover-tip-bg":String(opts.hoverTipBgColor),"--ez-time-line-hover-tip-color":String(opts.hoverTipColor)});Object.entries(vars).forEach(function(param){var name=param[0],value=param[1];return _this.$container.style.setProperty(name,value)});},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._dragScroll&&(this._dragScroll.readonly=readOnly);},_proto.setTimeWidth=function(timeWidth){MOBILE_TIME_WIDTH[timeWidth]&&(BaseTimeLine.prototype.setTimeWidth.call(this,timeWidth),this._matchTimeDot());},_proto.updateTimeSections=function(timeSections,defaultIndex){BaseTimeLine.prototype.updateTimeSections.call(this,timeSections);var list=timeSections.map(function(record){return _extends$1$1({},record,{startTime:distExports$4.DateTime.format(record.startTime,"HH:mm:ss"),endTime:distExports$4.DateTime.format(record.endTime,"HH:mm:ss")})});if(list.length>0){ void 0===defaultIndex&&(defaultIndex=list.length-1);var current=this.state.current;this._setState({availTimeLine:list,start:list[defaultIndex].startTime,end:list[defaultIndex].endTime,current:null===current?list[defaultIndex].startTime:current}),this._matchTimeDot();}else this._setState({availTimeLine:[],current:distExports$4.DateTime.format(this.current||(new Date).getTime(),"HH:mm:ss")}),this._matchTimeDot();},_proto.update=function(time){var _this__dragScroll;time&&!(null==(_this__dragScroll=this._dragScroll)?void 0:_this__dragScroll.isDragging)&&(this._setState({current:distExports$4.DateTime.format(time,"HH:mm:ss")}),this._currentOffsetH());},_proto.destroy=function(){var _this__dragScroll;if(this._scrollTimer&&(clearInterval(this._scrollTimer),this._scrollTimer=null),this._$currentTime)try{this.$container.removeChild(this._$currentTime),this._$currentTime=null;}catch(error){}if(this._$itemContainer&&this._$itemList)try{this._$itemContainer.removeChild(this._$itemList),this._$itemList=null;}catch(error){}if(this._$itemContainer)try{this.$container.removeChild(this._$itemContainer),this._$itemContainer=null;}catch(error){}if(this._$op)try{this.$container.removeChild(this._$op),this._$op=null;}catch(error){}this._picker&&(this._picker.destroy(),this._picker=null),this._imageLazyLoader&&(this._imageLazyLoader.destroy(),this._imageLazyLoader=null),this._imageLazyLoaderPicker&&(this._imageLazyLoaderPicker.destroy(),this._imageLazyLoaderPicker=null),this._removeEventListener(),null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.destroy(),this._dragScroll=null,BaseTimeLine.prototype.destroy.call(this);},_proto._setState=function(obj){var _this=this;Object.keys(obj).forEach(function(key){var _this__dragScroll,_this_timeSections_;"current"===key&&obj[key]?(_this._setCurrentDOM(obj[key]),_this.state.current===obj[key]||(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.isDragging)||(_this.state[key]=obj[key],_this.current=new Date(distExports$4.DateTime.format((null==(_this_timeSections_=_this.timeSections[0])?void 0:_this_timeSections_.endTime)||(new Date).getTime(),"YYYY-MM-DD")+"T"+obj[key]),null==_this.options.onChange||_this.options.onChange.call(_this.options,_this.current))):_this.state[key]=obj[key];});},_proto._setCurrentDOM=function(time){this._$currentTime&&(this._$currentTime.querySelector(".ez-time-line-current-value").innerHTML=time);},_proto._matchTimeDot=function(){for(var scaleWidth=this._scaleWidth,timeArr=[],minute=TimeLineUtil.timeToMinute("24:00:00"),i=minute=Math.floor(minute/scaleWidth)*scaleWidth;i>=0;){var marginTop=0,marginBottom=0;i==minute&&(marginTop=70),0==i&&(marginBottom=this.$container.clientHeight-70);var time=TimeLineUtil.minuteToTime(i);timeArr.push({id:i,current:time,label:"a"+i,marginTop:marginTop,marginBottom:marginBottom,recArr:[],coverArr:this._filterTimeSectionsByTime(time)}),i-=scaleWidth;}this._setState({timeArr:timeArr}),this._matchRecTimeDot();},_proto._matchRecTimeDot=function(){var _this_state=this.state,availTimeLine=_this_state.availTimeLine,timeArr=_this_state.timeArr,scaleWidth=this._scaleWidth,len=availTimeLine.length;if(0===len)for(var j=0;j<timeArr.length;j++)timeArr[j].recArr=[];else {for(var k=0;k<timeArr.length;k++)timeArr[k].recArr=[];for(var i=0;i<len;i++){var stAvailPercent,etAvailPercent,temp=availTimeLine[i],st=TimeLineUtil.timeToSecond(temp.startTime),et=TimeLineUtil.timeToSecond(temp.endTime),stMinute=Math.floor(st/(60*scaleWidth))*scaleWidth;stAvailPercent=(st-60*stMinute)/scaleWidth;var etMinute=Math.floor(et/(60*scaleWidth))*scaleWidth;etAvailPercent=(et-60*etMinute)/scaleWidth;for(var j1=0;j1<timeArr.length;j1++)if(timeArr[j1].id==stMinute&&timeArr[j1].id==etMinute){var height=etAvailPercent-stAvailPercent,top=60-etAvailPercent;timeArr[j1].recArr.push({height:height,top:top});}else timeArr[j1].id==stMinute?timeArr[j1].recArr.push({height:60-stAvailPercent,top:0}):timeArr[j1].id==etMinute?timeArr[j1].recArr.push({height:etAvailPercent,top:60-etAvailPercent}):timeArr[j1].id>stMinute&&timeArr[j1].id<etMinute&&timeArr[j1].recArr.push({height:60,top:0});}}this._setState({timeArr:timeArr}),this._renderDateLine();},_proto._renderDateLine=function(){var _this=this,timeArr=this.state.timeArr,container=this._$itemList;container.innerHTML="",timeArr.forEach(function(item,index){var _this__imageLazyLoader,timeItemDOM=document.createElement("div");timeItemDOM.setAttribute("class","ez-time-line-time-scale-area"),item.marginTop&&(timeItemDOM.style.cssText+="margin-top: "+item.marginTop+"px;"),item.marginBottom&&(timeItemDOM.style.cssText+="margin-bottom: "+item.marginBottom+"px;"),timeItemDOM.style.cssText+="border-right-color: "+String(_this.options.timeAxisBgColor)+";",timeItemDOM.setAttribute("data-time",item.current),timeItemDOM.setAttribute("data-index",index+""),document.createElement("div").setAttribute("class","ez-time-line-scale");var timeItemHtml="";item.coverArr.length&&_this.options.showCoverFold&&(timeItemHtml+='\n <div class="ez-time-line-time-cover-fold '+(item.coverArr.length>1?"ez-time-line-time-cover-fold-multiple":"")+'"\n data-start="'+item.current+'">\n '+(item.coverArr.length>1?'<div class="ez-time-line-cover-fold-placeholder" style="color: #FFF"></div>':"")+'\n <div class="ez-time-line-time-cover-fold-img">\n <img data-src="'+_this._setImageScr(item.coverArr[0].coverPic)+'" class="ez-time-line-img"/>\n <span class="ez-time-line-time-cover-fold-len">\n '+(item.coverArr.length>1?_this.i18n.t("foldTitle",{len:item.coverArr.length,unit:"videos"}):""+distExports$4.DateTime.format(item.coverArr[0].startTime,"HH:mm"))+"\n </span>\n "+(1===item.coverArr.length?'<span class="ez-time-line-time-cover-fold-time">'+TimeLineUtil.tranTimeToString(item.coverArr[0].startTime,item.coverArr[0].endTime)+"</span>":"")+'\n <span class="ez-time-line-time-cover-fold-pause">'+_$TIMELINE_ICONS$__pause+"</span>\n </div>\n </div>"),item.recArr.forEach(function(i){timeItemHtml+='<div class="ez-time-line-time-unavail"\n style="height: '+i.height+"px;background-color:"+String(_this.options.timeSectionColor)+"; top: "+i.top+'px">\n </div>';}),timeItemHtml+="<div id="+item.label+' class="ez-time-line-time-label" style="color: '+String(_this.options.timeTextColor)+'">'+item.current+"</div>",timeItemDOM.innerHTML=timeItemHtml,container.appendChild(timeItemDOM),item.coverArr.length&&_this.options.showCoverFold&&(null==(_this__imageLazyLoader=_this._imageLazyLoader)||_this__imageLazyLoader.addImages(container.querySelectorAll("img.ez-time-line-img")||[]));}),this._currentOffsetH();},_proto._currentOffsetH=function(){var current=this.state.current;if(current){var _this__dragScroll,y=(86400-TimeLineUtil.timeToSecond(current)||0)/this._scaleWidth;null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y+60,false);}},_proto._render=function(){var _this=this;if(this._$currentTime=document.createElement("div"),this._$currentTime.classList.add("ez-time-line-current"),this._$currentTime.innerHTML='<div class="ez-time-line-current-content" style="color: '+String(this.options.currentTimeBgColor)+'">\n <span class="ez-time-line-current-tip">'+_$TIMELINE_ICONS$__tip+'</span>\n <span class="ez-time-line-current-tip-line" style="background-color: '+String(this.options.timePointColor)+';"></span>\n <div class="ez-time-line-current-value" style="color: '+String(this.options.currentTimeColor)+'">00:00:00</div>\n </div>',this.$container.appendChild(this._$currentTime),this._$itemContainer=document.createElement("div"),this._$itemContainer.classList.add("ez-time-line-container"),this.$container.appendChild(this._$itemContainer),this._dragScroll=new DragScroll(this._$itemContainer,{hideScrollbar:true,onChange:function(state){var result=_this._offsetYToTime(state.y);result[1]!==_this.state.current&&_this._setCurrentDOM(result[0]>=86400?"23:59:59":result[1]);},onDragStart:function(e){_this._moveStartX=e.clientX,_this._moveStartY=e.clientY,null==_this.options.onDragStart||_this.options.onDragStart.call(_this.options,_this.state.current);},onDragging:function(){null==_this.options.onDragging||_this.options.onDragging.call(_this.options,_this.state.current);},onDragEnd:function(){var _this__dragScroll,result=_this._offsetYToTime(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.currentY);result[1]!==_this.state.current&&_this._setState({current:result[0]>=86400?"23:59:59":result[1]}),null==_this.options.onDragEnd||_this.options.onDragEnd.call(_this.options,_this.state.current);}}),/\d/.test(this.options.height))this._$itemContainer.style.cssText+="height: "+this.options.height+"px";else if("string"==typeof this.options.height)this._$itemContainer.style.cssText+="height: "+this.options.height;else {var height=this.$container.clientHeight;this._$itemContainer.style.cssText+="height: "+height+"px";}this._$itemList=document.createElement("div"),this._$itemList.classList.add("ez-time-line-item"),this._dragScroll.$content.appendChild(this._$itemList),this.options.showTimeWidthBtn&&(this._$op=document.createElement("div"),this._$op.classList.add("ez-time-line-op"),this._$op.innerHTML='<span class="ez-time-line-op-wrapper"><span class="ez-time-line-icon-plus">'+_$TIMELINE_ICONS$__plus+'</span> <span class="ez-time-line-icon-minus">'+_$TIMELINE_ICONS$__minus+"</span></span>",this.$container.appendChild(this._$op)),this.options.showCoverFold&&(this._picker=new Picker(null,{isMobile:true,wrapClassName:"ez-time-line-picker",onOpenChange:function(isOpen){var _this_options_onPickerOpenChange,_this_options;null==(_this_options=_this.options)||null==(_this_options_onPickerOpenChange=_this_options.onPickerOpenChange)||_this_options_onPickerOpenChange.call(_this_options,isOpen);}}),this._imageLazyLoaderPicker=new ImageLazyLoader({root:this._picker.$body,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}})),this._addEventListener();},_proto._addEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.addEventListener("click",this._plusClick,false),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.addEventListener("click",this._minusClick,false));this._matchTimeDot(),this._picker&&(this._delegatePickerClose=delegate(this._picker.$body,".ez-time-line-picker-close","click",this._onPickerClose,false),this._delegateItemContent=delegate(this._picker.$body,".ez-time-line-picker-item-content","click",this._onClickItem,false),this._delegateCoverFold=delegate(this._$itemList,".ez-time-line-time-cover-fold","click",this._onClickCoverFold,false));},_proto._removeEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1,_this__picker_$body_querySelector,_this__picker_$body;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.removeEventListener("click",this._plusClick),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.removeEventListener("click",this._minusClick));this._picker&&(null==(_this__picker_$body=this._picker.$body)||null==(_this__picker_$body_querySelector=_this__picker_$body.querySelector(".ez-time-line-picker-close"))||_this__picker_$body_querySelector.removeEventListener("click",this._onPickerClose),this._delegateItemContent&&(this._delegateItemContent.forEach(function(delegation){delegation.destroy();}),this._delegateItemContent=null),this._delegatePickerClose&&(this._delegatePickerClose.forEach(function(delegation){delegation.destroy();}),this._delegatePickerClose=null),this._delegateCoverFold&&(this._delegateCoverFold.forEach(function(delegation){delegation.destroy();}),this._delegateCoverFold=null));},_proto._plusClick=function(){var timeWidth=this.timeWidth+1;timeWidth>0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(timeWidth);},_proto._minusClick=function(){var timeWidth=this.timeWidth-1;timeWidth>=0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(Math.floor(timeWidth));},_proto._timeSectionsToGroupsByHour=function(list){var obj={};return list.forEach(function(item,index){var hour=distExports$4.DateTime.format(item.startTime,"HH");obj[+hour]?obj[+hour].push(_extends$1$1({},item,{_index:index})):obj[+hour]=[_extends$1$1({},item,{_index:index})];}),obj},_proto._filterTimeSectionsByTime=function(start){if(!start)return [];var startSecond=TimeLineUtil.timeToSecond(start+":00"),endSecond=TimeLineUtil.timeToSecond(start+":00")+60*this._scaleWidth;return this.timeSections.filter(function(item){var _$start=TimeLineUtil.timeToSecond(distExports$4.DateTime.format(item.startTime,"HH:mm:ss"));return _$start>=startSecond&&_$start<endSecond})},_proto._renderPickerContent=function(start){var _this__picker_innerHTML,_this__picker,_this__picker1,_this__picker2,_this__imageLazyLoaderPicker,_this=this,list=this._filterTimeSectionsByTime(start),hourGroups=this._timeSectionsToGroupsByHour(list);(null==(_this__picker=this._picker)||null==(_this__picker_innerHTML=_this__picker.innerHTML)||_this__picker_innerHTML.call(_this__picker,'<div class="ez-time-line-picker-container">\n <div class="ez-time-line-picker-header">\n <span class="ez-time-line-picker-close">'+_$TIMELINE_ICONS$__close+"</span>\n "+this.i18n.t("title",{len:list.length,unit:list.length>1?"videos":"video"})+'\n </div>\n <div class="ez-time-line-picker-content">\n <div class="ez-time-line-picker-list">\n '+Object.keys(hourGroups).reverse().map(function(key){return '<div class="ez-time-line-picker-item">\n <div class="ez-time-line-picker-item-title">'+key+':00</div>\n <div class="ez-time-line-picker-item-list">\n '+hourGroups[key].reverse().map(function(item){return '<div class="ez-time-line-picker-item-content"\n data-start="'+distExports$4.DateTime.format(item.startTime,"YYYYMMDDTHHmmssZ")+'"\n data-end="'+distExports$4.DateTime.format(item.endTime,"YYYYMMDDTHHmmssZ")+'"\n data-index="'+item._index+'">\n <span class="ez-time-line-picker-item-time">'+distExports$4.DateTime.format(item.startTime,"HH:mm")+'</span>\n <span class="ez-time-line-picker-item-duration">\n '+TimeLineUtil.tranTimeToString(item.startTime,item.endTime)+'\n </span>\n <img class="ez-time-line-picker-item-cover" data-src="'+_this._setImageScr(item.coverPic)+'"/>\n </div>'}).join("")+"\n </div>\n </div>"}).join("")+"\n </div>\n </div>\n </div>\n </div>"),null==(_this__picker1=this._picker)?void 0:_this__picker1.$body)&&(null==(_this__imageLazyLoaderPicker=this._imageLazyLoaderPicker)||_this__imageLazyLoaderPicker.addImages((null==(_this__picker2=this._picker)?void 0:_this__picker2.$body.querySelectorAll("img"))||[]));},_proto._onImageError=function(img){if(!img.hasAttribute("data-error")){var _img_parentNode,placeholder=document.createElement("div");placeholder.classList.add("ez-time-line-item-cover-placeholder"),placeholder.innerHTML=""+_$TIMELINE_ICONS$__picture,null==(_img_parentNode=img.parentNode)||_img_parentNode.appendChild(placeholder),img.setAttribute("data-error","true"),img.remove();}},_proto._onPickerClose=function(){this._picker&&(this._picker.open=false);},_proto._onClickItem=function(e){var _e_delegateTarget_getAttribute,_e_delegateTarget,index=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_getAttribute=_e_delegateTarget.getAttribute)?void 0:_e_delegateTarget_getAttribute.call(_e_delegateTarget,"data-index");this._picker&&(this._picker.open=false),null==this.options.onPickerSelect||this.options.onPickerSelect.call(this.options,this.timeSections[+index]);},_proto._onClickCoverFold=function(e){var _e_delegateTarget_parentElement_getAttribute,_e_delegateTarget_parentElement,_e_delegateTarget;e.preventDefault();var time=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_parentElement=_e_delegateTarget.parentElement)||null==(_e_delegateTarget_parentElement_getAttribute=_e_delegateTarget_parentElement.getAttribute)?void 0:_e_delegateTarget_parentElement_getAttribute.call(_e_delegateTarget_parentElement,"data-time"),moveX=Math.abs(this._moveStartX-e.clientX),moveY=Math.abs(this._moveStartY-e.clientY);this._picker&&time&&!(moveX>=1||moveY>=1)&&(this._renderPickerContent(time),this._picker.open=true);},_proto._setImageScr=function(src){if(src){var query="x=200&"+(this.options.coverQuery||"");return src+(src.includes("?")?"&":"?")+query}return ""},_proto._offsetYToTime=function(offsetY){var _this__dragScroll,y=offsetY;offsetY<60&&(y=60,null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y));var second=86400-Math.floor((y-60)*this._scaleWidth);return [second,distExports$4.DateTime.fillZero(Math.floor(second/3600))+":"+distExports$4.DateTime.fillZero(Math.floor(second%3600/60))+":"+distExports$4.DateTime.fillZero(second%60)]},_create_class$1(MobileTimeLine,[{key:"_scaleWidth",get:function(){return (MOBILE_TIME_WIDTH[this.timeWidth]||MOBILE_TIME_WIDTH[0])[0]}}]),MobileTimeLine}(BaseTimeLine);function isOverlap(a_start,a_end,b_start,b_end){return Math.max(a_start,b_start)<=Math.min(a_end,b_end)}function _extends$5(){return _extends$5=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$5.apply(this,arguments)}function getTouchDistance(touches){var touch1=touches[0],touch2=touches[1],dx=touch2.clientX-touch1.clientX,dy=touch2.clientY-touch1.clientY;return Math.sqrt(dx*dx+dy*dy)}function _create_class$3(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$6(o,p){return _set_prototype_of$6=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$6(o,p)}var _REC_EVENT_KEYS_=[1,2,3,4,5,6,"ALRAM","TIMIING","CAR","HD"],_$TIMELINE_DEFAULT_OPTIONS$_={height:36,dpr:window.devicePixelRatio||2,readOnly:false,scaleOffsetTop:4,showYearMonthDay:true,showHoverTip:true,hoverTipPlacement:"follow",enabledClickToSeek:true,showSectionIcon:true,sectionIconColor:"#FFFFFF",sectionIconSize:14,showSectionCount:true,sectionCountColor:"#FFFFFF",sectionCountBgColor:"#FF4D4F"},TimeLine=function(BaseTimeLine){function TimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$TIMELINE_DEFAULT_OPTIONS$_,options,{clone:true}))||this)._$canvas=null,_this._ctx=null,_this._timeWidthArray=TIME_WIDTH[0],_this._centerPositionX=0,_this._isMouseDown=false,_this._mousePosition=0,_this._oldTime=null,_this._isOver=false,_this._moved=false,_this._lastTouchDist=0,_this._$hoverTip=null,_this._hoverRafId=null,_this._hoverX=0,_this._hoverY=0,_this._hoverActive=false,_this._hoverLineX=0,_this._dragMoved=false,_this._containerRect=null,_this._drawRafId=null,_this._$sectionIconLayer=null,_this._sectionIconPool=[],_this.$container=container,_this._mousemoveFun=_this._mousemoveFun.bind(_this),_this._mouseoverFun=_this._mouseoverFun.bind(_this),_this._mouseleaveFun=_this._mouseleaveFun.bind(_this),_this._mousedownFun=_this._mousedownFun.bind(_this),_this._mouseUpFun=_this._mouseUpFun.bind(_this),_this._mousewheelFun=_this._mousewheelFun.bind(_this),_this._containerWheelFun=_this._containerWheelFun.bind(_this),_this._touchstartFun=_this._touchstartFun.bind(_this),_this._touchmoveFun=_this._touchmoveFun.bind(_this),_this._touchendFun=_this._touchendFun.bind(_this),_this._clickFun=_this._clickFun.bind(_this),_this._init(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$6(subClass,superClass);}(TimeLine,BaseTimeLine);var _proto=TimeLine.prototype;return _proto._init=function(){this._$canvas=document.createElement("canvas"),this._ctx=this._$canvas.getContext("2d"),this.readOnly||(this._$canvas.style.cursor="pointer"),this.$container.appendChild(this._$canvas),this.resize(this.width,this.height),this._initSectionIconLayer(),this._update({current:this.current,timeWidth:this.timeWidth,timeSections:this.timeSections}),this._initHoverTip(),this._applyHoverTipVars(),this._addEventListener();},_proto.resize=function(width,height){BaseTimeLine.prototype.resize.call(this,width,height),this._$canvas&&width&&(this._$canvas.width=this.width*this.options.dpr,this._$canvas.style.width=this.width+"px"),this._$canvas&&height&&(this._$canvas.height=this.height*this.options.dpr,this._$canvas.style.height=this.height+"px"),this._$sectionIconLayer&&(this._$sectionIconLayer.style.width=this.width+"px",this._$sectionIconLayer.style.height=this.height+"px"),this._containerRect=null,this._draw();},_proto.setTimeWidth=function(timeWidth){this._update({timeWidth:timeWidth});},_proto.updateTimeSections=function(timeSections){this._update({timeSections:timeSections});},_proto.update=function(time){time&&!this._isMouseDown&&this._update({current:distExports$4.DateTime.toDate(time)});},_proto._update=function(options){var left,right,_this__$canvas;(void 0===options&&(options={}),(null==options?void 0:options.current)&&(left=options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)&&(this.current=options.current),(null==options?void 0:options.timeSections)&&BaseTimeLine.prototype.updateTimeSections.call(this,function(timeSections){if(0===timeSections.length)return timeSections;for(var normalized=timeSections.map(function(item){var startTime=item.startTime,endTime=item.endTime;return 10===(startTime+"").length&&(startTime*=1e3),10===(endTime+"").length&&(endTime*=1e3),_extends$5({},item,{startTime:startTime,endTime:endTime})}),merged=[normalized[0]],i=1;i<normalized.length;i++){var prev=merged[merged.length-1],curr=normalized[i];prev.endTime>=curr.startTime?prev.endTime=Math.max(prev.endTime,curr.endTime):merged.push(curr);}return merged}(options.timeSections)),"number"==typeof(null==options?void 0:options.timeWidth)&&(null==options?void 0:options.timeWidth)<TIME_WIDTH.length&&(BaseTimeLine.prototype.setTimeWidth.call(this,options.timeWidth),this._timeWidthArray=TIME_WIDTH[Math.floor(this.timeWidth)]),"number"==typeof(null==options?void 0:options.timeWidth)&&this._timeWidthArray)&&(this._timeWidthArray[3]&&(null==(_this__$canvas=this._$canvas)||_this__$canvas.setAttribute("data-title",this._timeWidthArray[3])));this._draw(),this._hoverActive&&this._$hoverTip&&!this._isMouseDown&&this._showHoverTip(this._hoverX,this._hoverY);},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._$canvas&&(this._$canvas.style.cursor=readOnly?"not-allowed":"pointer");},_proto.destroy=function(){this._removeEventListener(),this._hideHoverTip(),null!=this._drawRafId&&(cancelAnimationFrame(this._drawRafId),this._drawRafId=null),this._$hoverTip&&this._$hoverTip.remove(),this._$hoverTip=null,this._$sectionIconLayer&&this._$sectionIconLayer.remove(),this._$sectionIconLayer=null,this._sectionIconPool=[],this._$canvas&&this._$canvas.remove(),this._$canvas=null,this._ctx=null,this._containerRect=null,BaseTimeLine.prototype.destroy.call(this);},_proto._initSectionIconLayer=function(){var _this=this;if(this.options.showSectionIcon){var layer=document.createElement("div");layer.className="ez-time-line-section-icon-layer",layer.style.width=this.width+"px",layer.style.height=this.height+"px",this.$container.appendChild(layer),this._$sectionIconLayer=layer,delegate(layer,".ez-time-line-section-icon","click",function(event){event.stopImmediatePropagation(),event.stopPropagation(),event.preventDefault();var el=event.delegateTarget,startTime=Number(el.dataset.start),count=Number(el.dataset.count),index=Number(el.dataset.index);Number.isNaN(startTime)||null==_this.options.onSectionIconClick||_this.options.onSectionIconClick.call(_this.options,{startTime:startTime,count:Number.isNaN(count)?0:count,index:Number.isNaN(index)?-1:index});});}},_proto._isEventSection=function(section){var type=section.EVENT_TYPE;return void 0!==type&&_REC_EVENT_KEYS_.includes(type)},_proto._collectSectionIcons=function(offsetTop,sectionHeight){var _this_options_sectionIconSize,_this=this,renders=[];if(!this.options.showSectionIcon)return renders;var timeArr=this.timeSections||[],intervalSec=this._timeWidthArray[0];if(!intervalSec)return renders;for(var intervalMs=1e3*intervalSec,buckets=new Map,i=0;i<timeArr.length;i++){var section=timeArr[i];if(section&&"number"==typeof section.startTime&&this._isEventSection(section)){var idx=Math.floor(section.startTime/intervalMs),bucket=buckets.get(idx);bucket?(bucket.count+=1,section.startTime<bucket.startTime&&(bucket.startTime=section.startTime,bucket.index=i)):buckets.set(idx,{count:1,startTime:section.startTime,index:i});}}var dpr=this.options.dpr,iconSizePx=null!=(_this_options_sectionIconSize=this.options.sectionIconSize)?_this_options_sectionIconSize:14,sectionHeightPx=sectionHeight/dpr,offsetTopCss=offsetTop/dpr,size=Math.min(iconSizePx,sectionHeightPx),canvasWidthDpr=this.width*dpr;return buckets.forEach(function(bucket,idx){var bucketStart=idx*intervalMs,position=_this._findPosition({startTime:bucketStart,endTime:bucketStart+intervalMs});if(isOverlap(0,canvasWidthDpr,position.x1,position.x2)){var bucketWidthPx=(position.x2-position.x1)/dpr;renders.push({left:position.x1/dpr+(bucketWidthPx-size)/2,top:offsetTopCss+(sectionHeightPx-size)/2,size:size,count:bucket.count,startTime:bucket.startTime,index:bucket.index});}}),renders},_proto._createSectionIconEl=function(){var _this_options_sectionIconColor,_this_options_sectionCountColor,_this_options_sectionCountBgColor,span=document.createElement("span");span.className="ez-time-line-section-icon",span.style.color=null!=(_this_options_sectionIconColor=this.options.sectionIconColor)?_this_options_sectionIconColor:"#FFFFFF",span.innerHTML=_$TIMELINE_ICONS$__event;var count=document.createElement("span");return count.className="ez-time-line-section-icon-count",count.style.color=null!=(_this_options_sectionCountColor=this.options.sectionCountColor)?_this_options_sectionCountColor:"#FFFFFF",count.style.backgroundColor=null!=(_this_options_sectionCountBgColor=this.options.sectionCountBgColor)?_this_options_sectionCountBgColor:"#FF4D4F",count.style.display="none",span.appendChild(count),span},_proto._renderSectionIcons=function(renders){var layer=this._$sectionIconLayer;if(layer&&this.options.showSectionIcon){for(var pool=this._sectionIconPool,showCount=this.options.showSectionCount,i=0;i<renders.length;i++){var r=renders[i],el=pool[i];el||(el=this._createSectionIconEl(),layer.appendChild(el),pool.push(el)),el.style.display="",el.style.left=r.left+"px",el.style.bottom="0px",el.dataset.start=String(r.startTime),el.dataset.count=String(r.count),el.dataset.index=String(r.index);var countEl=el.lastElementChild;showCount&&r.count>0?(countEl.textContent=r.count>99?"99+":String(r.count),countEl.style.display=""):countEl.style.display="none";}for(;i<pool.length;i++)pool[i].style.display="none";}},_proto._initHoverTip=function(){if(this.options.showHoverTip){var tip=document.createElement("div");tip.className="ez-time-line-hover-tip",this.$container.appendChild(tip),this._$hoverTip=tip,this._applyHoverTipVars();}},_proto._applyHoverTipVars=function(){this.$container.style.setProperty("--ez-time-line-hover-tip-bg",String(this.options.hoverTipBgColor)),this.$container.style.setProperty("--ez-time-line-hover-tip-color",String(this.options.hoverTipColor));},_proto._hoverTimeAt=function(x){var seconds=(x-this.width/2)/this._curScaleSpacing*this._timeWidthArray[0];return new Date(this.current.getTime()+Math.round(1e3*seconds))},_proto._localDayStartSec=function(sec){var d=new Date(1e3*sec);return d.setHours(0,0,0,0),Math.floor(d.getTime()/1e3)},_proto._getContainerRect=function(){return this._containerRect||(this._containerRect=this.$container.getBoundingClientRect()),this._containerRect},_proto._scheduleDraw=function(){var _this=this;null==this._drawRafId&&(this._drawRafId=requestAnimationFrame(function(){_this._drawRafId=null,_this._draw();}));},_proto._formatHoverTime=function(date){if("function"==typeof this.options.renderHoverTip)return this.options.renderHoverTip(date);var fmt=this.options.hoverTipFormat||"yyyy-MM-dd HH:mm:ss";return distExports$4.DateTime.format(date,fmt)},_proto._showHoverTip=function(x,y){var _this=this;this._$hoverTip&&(this._hoverX=x,this._hoverY=y,null==this._hoverRafId&&(this._hoverRafId=requestAnimationFrame(function(){_this._hoverRafId=null,_this._renderHoverTip();})));},_proto._renderHoverTip=function(){var tip=this._$hoverTip;if(tip){var width=this.width,tx=Math.max(0,Math.min(this._hoverX,width)),date=this._hoverTimeAt(tx),content=this._formatHoverTime(date);"function"==typeof this.options.renderHoverTip?tip.innerHTML=content:tip.textContent=content,tip.style.display="inline-flex",tip.style.opacity="1";var left,top,tipW=tip.offsetWidth;if("top"===this.options.hoverTipPlacement)(left=this._hoverX-tipW/2)+tipW>width&&(left=width-tipW),left<0&&(left=0),top=-tip.offsetHeight-2;else {(left=this._hoverX+14)+tipW>width&&(left=this._hoverX-14-tipW),left<0&&(left=0),top=this._hoverY+16;}tip.style.left=left+"px",tip.style.top=top+"px";}},_proto._hideHoverTip=function(){null!=this._hoverRafId&&(cancelAnimationFrame(this._hoverRafId),this._hoverRafId=null),this._$hoverTip&&(this._$hoverTip.style.display="none",this._$hoverTip.style.opacity="0");},_proto._draw=function(){this._ctx&&(this._ctx.fillStyle=this.options.timeAxisBgColor,this._ctx.fillRect(0,0,this.width*this.options.dpr,this.height*this.options.dpr)),this._drawSections(),this._drawScale(),this._drawHoverLine();},_proto._drawHoverLine=function(){if(this._hoverActive&&!this._isMouseDown&&this._ctx){var dpr=this.options.dpr,x=Math.max(0,Math.min(this._hoverLineX,this.width))*dpr,lineWidth=this.options.scaleLineWidth*dpr;this._drawSolidLine(x,0,x,this.height*dpr,lineWidth,this.options.hoverLineColor);}},_proto._drawScale=function(){var lineWidth=this.options.scaleLineWidth*this.options.dpr;this._centerPositionX=parseInt(this.width*this.options.dpr/2+"");for(var centerPosition={x:this.width*this.options.dpr/2,y:this.height*this.options.dpr},curScaleTime=Math.floor(this.current.getTime()/1e3),offsetSecond=(curScaleTime-this._localDayStartSec(curScaleTime))%this._timeWidthArray[0],padding=this.height*this.options.dpr/20,spacing=this._curScaleSpacing*this.options.dpr,rightLastScaleTimeX=Math.floor(this._centerPositionX+(this._timeWidthArray[0]-offsetSecond)/this._timeWidthArray[0]*spacing),leftLastScaleTime=curScaleTime-offsetSecond,rightLastScaleTime=leftLastScaleTime+this._timeWidthArray[0],x=rightLastScaleTimeX-spacing;x>0;x-=spacing){0===(leftLastScaleTime-this._localDayStartSec(leftLastScaleTime))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x,padding,x,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(distExports$4.DateTime.format(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x,padding,x,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),leftLastScaleTime-=this._timeWidthArray[0];}for(var x1=rightLastScaleTimeX;x1<=this.width*this.options.dpr;x1+=spacing){0===(rightLastScaleTime-this._localDayStartSec(rightLastScaleTime))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x1,padding,x1,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(distExports$4.DateTime.format(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x1,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x1,padding,x1,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),rightLastScaleTime+=this._timeWidthArray[0];}this._drawCenterIndicator(centerPosition.x,centerPosition.y);},_proto._drawCenterIndicator=function(centerX,totalHeight){if(this._ctx){var dpr=this.options.dpr,lineW=2*dpr,triH=3*dpr,baseW=6*dpr,baseH=5*dpr,x=centerX;this._ctx.save(),this._ctx.fillStyle=this.options.timePointColor,this._ctx.fillRect(x-lineW/2,0,lineW,totalHeight),this._ctx.beginPath(),this._ctx.moveTo(x-baseW/2,0),this._ctx.lineTo(x+baseW/2,0),this._ctx.lineTo(x+baseW/2,baseH),this._ctx.lineTo(x,baseH+triH),this._ctx.lineTo(x-baseW/2,baseH),this._ctx.closePath(),this._ctx.fill(),this._ctx.beginPath(),this._ctx.moveTo(x-baseW/2,totalHeight),this._ctx.lineTo(x+baseW/2,totalHeight),this._ctx.lineTo(x+baseW/2,totalHeight-baseH),this._ctx.lineTo(x,totalHeight-baseH-triH),this._ctx.lineTo(x-baseW/2,totalHeight-baseH),this._ctx.closePath(),this._ctx.fill(),this._ctx.restore();}},_proto._drawSolidLine=function(startX,startY,endX,endY,lineWidth,color){this._ctx&&(this._ctx.save(),this._ctx.strokeStyle=null!=color?color:this.options.timeScaleColor,this._ctx.lineWidth=lineWidth,this._ctx.beginPath(),this._ctx.moveTo(startX,startY),this._ctx.lineTo(endX,endY),this._ctx.stroke(),this._ctx.restore());},_proto._drawTextString=function(text,x,y,align){if(this._ctx){var timeTexts=text.split(" ");this._ctx.font=(opts=this.options,dpr=this.options.dpr,(null!=(_opts_timeTextFontSize=opts.timeTextFontSize)?_opts_timeTextFontSize:12)*(dpr||1)+"px "+(null!=(_opts_timeTextFontFamily=opts.timeTextFontFamily)?_opts_timeTextFontFamily:"serif")),this._ctx.fillStyle=this.options.timeTextColor,this._ctx.textAlign=align||"left",this._timeWidthArray[0]%60==0&&(timeTexts[1]=timeTexts[1].replace(/:00$/,"")),this._ctx.fillText(timeTexts[1],x,y+8*this.options.dpr),!this.options.showYearMonthDay||"00:00:00"!==timeTexts[1]&&"00:00"!==timeTexts[1]&&this._timeWidthArray[0]*this._timeWidthArray[2]!==86400||(this._ctx.textAlign=align||"left",this._ctx.fillText(timeTexts[0],x,y+18*this.options.dpr));}var opts,dpr,_opts_timeTextFontSize,_opts_timeTextFontFamily;},_proto._drawSections=function(){for(var timeArr=this.timeSections||[],dpr=this.options.dpr,_ref=this.options.timeSectionOffset||[],tmp=_ref[0],offsetTopPx=void 0===tmp?0:tmp,tmp1=_ref[1],offsetTop=offsetTopPx*dpr,offsetBottom=(void 0===tmp1?0:tmp1)*dpr,sectionHeight=this.height*dpr-offsetTop-offsetBottom,i=0;i<timeArr.length;i++){var position=this._findPosition(timeArr[i]);this._ctx&&isOverlap(0,this.width*this.options.dpr,position.x1,position.x2)&&(this._ctx.fillStyle=this.options.timeSectionColor,this._ctx.fillRect(position.x1,offsetTop,position.x2-position.x1,sectionHeight));}this._renderSectionIcons(this._collectSectionIcons(offsetTop,sectionHeight));},_proto._findPosition=function(item){var x1=(parseInt((item.startTime-this.current.getTime())/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing+this.width/2)*this.options.dpr;return {x1:x1,x2:x1+parseInt((item.endTime-item.startTime)/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing*this.options.dpr}},_proto._addEventListener=function(){this._$canvas&&(this._$canvas.addEventListener("mousemove",this._mousemoveFun),this._$canvas.addEventListener("mouseover",this._mouseoverFun),this._$canvas.addEventListener("mouseleave",this._mouseleaveFun),this._$canvas.addEventListener("mousedown",this._mousedownFun),this._$canvas.addEventListener("mouseup",this._mouseUpFun),this._$canvas.addEventListener("click",this._clickFun),this._$canvas.addEventListener("wheel",this._mousewheelFun),this.$container.addEventListener("wheel",this._containerWheelFun,{passive:false}),this._$canvas.addEventListener("touchstart",this._touchstartFun,{passive:false}),this._$canvas.addEventListener("touchmove",this._touchmoveFun,{passive:false}),this._$canvas.addEventListener("touchend",this._touchendFun,{passive:false}));},_proto._removeEventListener=function(){this._$canvas&&(this._$canvas.removeEventListener("mousemove",this._mousemoveFun),this._$canvas.removeEventListener("mouseover",this._mouseoverFun),this._$canvas.removeEventListener("mouseleave",this._mouseleaveFun),this._$canvas.removeEventListener("mousedown",this._mousedownFun),this._$canvas.removeEventListener("mouseup",this._mouseUpFun),this._$canvas.removeEventListener("click",this._clickFun),this._$canvas.removeEventListener("wheel",this._mousewheelFun),this.$container.removeEventListener("wheel",this._containerWheelFun),this._$canvas.removeEventListener("touchstart",this._touchstartFun),this._$canvas.removeEventListener("touchmove",this._touchmoveFun),this._$canvas.removeEventListener("touchend",this._touchendFun));},_proto._mousedownFun=function(e){this.readOnly||(this._isMouseDown=true,this._mousePosition=e.pageX,this._oldTime=this.current,this._dragMoved=false,this._hideHoverTip(),this._hoverActive=false,null==this.options.onDragStart||this.options.onDragStart.call(this.options,this.current));},_proto._mouseoverFun=function(){this.readOnly||(this._isOver=true,this._containerRect=this.$container.getBoundingClientRect());},_proto._mouseleaveFun=function(e){this.readOnly||(this._isOver=false,this._containerRect=null,this._hideHoverTip(),this._hoverActive=false,this._draw(),this._moveEndOrTouchEndFun(e));},_proto._containerWheelFun=function(e){e.target===this._$canvas&&e.preventDefault();},_proto._mouseUpFun=function(e){this._moveEndOrTouchEndFun(e);},_proto._clickFun=function(e){if(!this.readOnly&&this.options.enabledClickToSeek)if(this._dragMoved)this._dragMoved=false;else {var rect=this._getContainerRect(),x=e.clientX-rect.left,date=this._hoverTimeAt(x);this._update({current:date}),null==this.options.onClickSeek||this.options.onClickSeek.call(this.options,date);}},_proto._mousemoveFun=function(e){if(!this.readOnly)if(this._isMouseDown&&this._isOver)this._moveUpdateFun(e.pageX);else {var left=parseInt(this.$container.offsetLeft+"",10);this._mousePosition=e.pageX-left;var rect=this._getContainerRect();this._hoverActive=true,this._hoverLineX=e.clientX-rect.left,this._scheduleDraw(),this._showHoverTip(e.clientX-rect.left,e.clientY-rect.top);}},_proto._mousewheelFun=function(e){e.preventDefault();},_proto._touchstartFun=function(e){if(!this.readOnly)if(this._oldTime=this.current,this._isOver=true,1===e.touches.length){var touch=e.touches[0];this._isMouseDown=true,this._mousePosition=touch.clientX;}else 2===e.touches.length&&(this._lastTouchDist=getTouchDistance(e.touches));},_proto._touchmoveFun=function(e){if(e.preventDefault(),e.stopPropagation(),!this.readOnly)if(1===e.touches.length){var touch=e.touches[0];this._moveUpdateFun(touch.clientX);}else 2===e.touches.length&&(this._lastTouchDist=getTouchDistance(e.touches));},_proto._touchendFun=function(e){this.readOnly||this._moveEndOrTouchEndFun(e);},_proto._moveEndOrTouchEndFun=function(e){e.preventDefault(),this.readOnly||this._isMouseDown&&(this._isMouseDown=false,this._moved&&(this._moved=false,this._update({current:this.current}),this._oldTime=this.current,null==this.options.onDragEnd||this.options.onDragEnd.call(this.options,this.current,this._isOver)),this._isOver&&Math.abs(this._mousePosition-(e.pageX||0))>5&&(null==this.options.onChange||this.options.onChange.call(this.options,this.current)),this._mousePosition=0,this._lastTouchDist=0);},_proto._moveUpdateFun=function(x){var mouseOffset=this._mousePosition-x;if(0!==mouseOffset){if(this._oldTime){var currentTime=this._oldTime.getTime()+1e3*parseInt(mouseOffset/this._curScaleSpacing*this._timeWidthArray[0]+"",10);this._update({current:new Date(currentTime)}),null==this.options.onDragging||this.options.onDragging.call(this.options,new Date(currentTime));}this._moved=true,this._dragMoved=true;}},_create_class$3(TimeLine,[{key:"_curScaleSpacing",get:function(){var _this__timeWidthArray,_this__timeWidthArray1;return Math.floor((null==(_this__timeWidthArray=this._timeWidthArray)?void 0:_this__timeWidthArray[1])-(null==(_this__timeWidthArray1=this._timeWidthArray)?void 0:_this__timeWidthArray1[1])*+(this.timeWidth%1/2).toFixed(2))}}]),TimeLine}(BaseTimeLine);TimeLine.TIME_WIDTH=TIME_WIDTH;
10377
10954
 
10378
10955
  function _extends$4() {
10379
10956
  _extends$4 = Object.assign || function(target) {
@@ -10432,13 +11009,13 @@
10432
11009
  });
10433
11010
  _this.records = ((_this__options = _this._options) == null ? void 0 : (_this__options_props = _this__options.props) == null ? void 0 : _this__options_props.recordList) || [];
10434
11011
  _this._render();
10435
- _this.on(EVENTS.setAllDayRecTimes, function(records) {
11012
+ _this.on(EVENTS$2.setAllDayRecTimes, function(records) {
10436
11013
  var // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
10437
11014
  _this_timeLineUtil_updateTimeSections, _this_timeLineUtil;
10438
11015
  _this.records = records;
10439
11016
  (_this_timeLineUtil = _this.timeLineUtil) == null ? void 0 : (_this_timeLineUtil_updateTimeSections = _this_timeLineUtil.updateTimeSections) == null ? void 0 : _this_timeLineUtil_updateTimeSections.call(_this_timeLineUtil, records);
10440
11017
  });
10441
- _this.on(EVENTS.getOSDTime, function(time) {
11018
+ _this.on(EVENTS$2.getOSDTime, function(time) {
10442
11019
  if (time) {
10443
11020
  var // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
10444
11021
  _this_timeLineUtil_update, _this_timeLineUtil;
@@ -10464,17 +11041,17 @@
10464
11041
  onClickSeek: function(date) {
10465
11042
  if (date == null ? void 0 : date.getTime()) {
10466
11043
  _this._options.onClickSeek == null ? void 0 : _this._options.onClickSeek.call(_this._options, date);
10467
- _this.emit(EVENTS.control.timeLineChange, date);
11044
+ _this.emit(EVENTS$2.control.timeLineChange, date);
10468
11045
  }
10469
11046
  },
10470
11047
  onChange: function(date) {
10471
11048
  if (_this._currentTime !== (date == null ? void 0 : date.getTime())) {
10472
11049
  _this._options.onChange == null ? void 0 : _this._options.onChange.call(_this._options, date);
10473
- _this.emit(EVENTS.control.timeLineChange, date);
11050
+ _this.emit(EVENTS$2.control.timeLineChange, date);
10474
11051
  }
10475
11052
  },
10476
11053
  onPickerOpenChange: function(open) {
10477
- _this.emit(EVENTS.control.timeLinePanelOpenChange, open);
11054
+ _this.emit(EVENTS$2.control.timeLinePanelOpenChange, open);
10478
11055
  },
10479
11056
  // 2025-10-27 仅移动端支持
10480
11057
  onPickerSelect: function(item) {
@@ -10484,9 +11061,12 @@
10484
11061
  else if ((item.startTime + '').length === 13) date = new Date(item.startTime);
10485
11062
  else date = new Date(item.startTime);
10486
11063
  _this._options.onChange == null ? void 0 : _this._options.onChange.call(_this._options, date);
10487
- _this.emit(EVENTS.control.timeLineChange, date);
11064
+ _this.emit(EVENTS$2.control.timeLineChange, date);
10488
11065
  } catch (error) {
10489
11066
  }
11067
+ },
11068
+ onSectionIconClick: function(result) {
11069
+ _this.emit("TimeLine.onSectionIconClick", result);
10490
11070
  }
10491
11071
  });
10492
11072
  if (distExports$4.isMobile()) {
@@ -10639,6 +11219,7 @@
10639
11219
  aiChat: AIChat,
10640
11220
  live: Live,
10641
11221
  recDropdown: RecDropdown,
11222
+ recList: RecList,
10642
11223
  alarmMessage: AlarmMessage,
10643
11224
  zoom: Zoom$1,
10644
11225
  definition: Definition,
@@ -10733,10 +11314,10 @@
10733
11314
  (_this_$popupContainer = this.$popupContainer) == null ? void 0 : (_this_$popupContainer_remove = _this_$popupContainer.remove) == null ? void 0 : _this_$popupContainer_remove.call(_this_$popupContainer);
10734
11315
  this.$popupContainer = null;
10735
11316
  }
10736
- this.emit(EVENTS.theme.recFooterDestroy);
11317
+ this.emit(EVENTS$2.theme.recFooterDestroy);
10737
11318
  };
10738
11319
  return RecFooter;
10739
- }(EventEmitter);
11320
+ }(EventEmitter$1);
10740
11321
 
10741
11322
  function _inherits$2(subClass, superClass) {
10742
11323
  if (typeof superClass !== "function" && superClass !== null) {
@@ -10806,10 +11387,10 @@
10806
11387
  _proto.destroy = function destroy() {
10807
11388
  var _this_$container;
10808
11389
  (_this_$container = this.$container) == null ? void 0 : _this_$container.remove();
10809
- this.emit(EVENTS.theme.mobileExtendDestroy);
11390
+ this.emit(EVENTS$2.theme.mobileExtendDestroy);
10810
11391
  };
10811
11392
  return MobileExtend;
10812
- }(EventEmitter);
11393
+ }(EventEmitter$1);
10813
11394
 
10814
11395
  function _extends$2() {
10815
11396
  _extends$2 = Object.assign || function(target) {
@@ -10944,7 +11525,7 @@
10944
11525
  clearTimeout(_this._timer3);
10945
11526
  _this._timer3 = null;
10946
11527
  }
10947
- _this.emit(EVENTS.control.play, true, 'pause');
11528
+ _this.emit(EVENTS$2.control.play, true, 'pause');
10948
11529
  }, 250);
10949
11530
  }
10950
11531
  };
@@ -10963,7 +11544,7 @@
10963
11544
  theme._interactiveResult = null;
10964
11545
  }
10965
11546
  if (hasControls) {
10966
- theme.emit(EVENTS.control.beforeUnmountControls);
11547
+ theme.emit(EVENTS$2.control.beforeUnmountControls);
10967
11548
  }
10968
11549
  // unmounted Controls
10969
11550
  if (Object.keys(theme.controls).length > 0) {
@@ -11016,7 +11597,7 @@
11016
11597
  theme._onPauseTimingFunc = null;
11017
11598
  }
11018
11599
  if (hasControls) {
11019
- theme.emit(EVENTS.control.unmountedControls);
11600
+ theme.emit(EVENTS$2.control.unmountedControls);
11020
11601
  }
11021
11602
  };
11022
11603
 
@@ -11208,7 +11789,9 @@
11208
11789
  var _theme_options_mobileExtendOptions, // 在移动端支持扩展和窗口区域渲染
11209
11790
  _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions1;
11210
11791
  if (((((_theme_options_mobileExtendOptions = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions.controls) || []).includes(item.iconId) && item.iconId !== "ptz" || ((_theme_options_mobileExtendOptions1 = theme.options.mobileExtendOptions) == null ? void 0 : (_theme_options_mobileExtendOptions_controls = _theme_options_mobileExtendOptions1.controls) == null ? void 0 : _theme_options_mobileExtendOptions_controls.includes('rec')) && REC_GROUP.includes(item.iconId) // 移动端模式下,不渲染在header 中控件, 需要移动到mobileExtend中
11211
- ) && Utils.isMobile) {
11792
+ ) && Utils.isMobile || [
11793
+ "recList"
11794
+ ].includes(item.iconId) && Utils.isMobile) {
11212
11795
  continue;
11213
11796
  }
11214
11797
  if (REC_GROUP.includes(item.iconId) && theme._header) {
@@ -11330,7 +11913,7 @@
11330
11913
  }));
11331
11914
  }
11332
11915
  theme.controls = {}; // 防止为 null
11333
- theme.emit(EVENTS.control.beforeMountControls);
11916
+ theme.emit(EVENTS$2.control.beforeMountControls);
11334
11917
  filterThemeData = _filterControls(themeData);
11335
11918
  theme._themeData = filterThemeData;
11336
11919
  if (filterThemeData.poster) {
@@ -11377,7 +11960,7 @@
11377
11960
  // 监听鼠标移动 , header 和 footer 的交互和动画
11378
11961
  // prettier-ignore
11379
11962
  theme._interactiveResult = interactiveHF(theme.$container, ((themeData == null ? void 0 : themeData.autoFocus) || 3) * 1000, function(open) {
11380
- theme.emit(EVENTS.control.controlsBarOpenChange, open);
11963
+ theme.emit(EVENTS$2.control.controlsBarOpenChange, open);
11381
11964
  });
11382
11965
  // 当移动端 picker 控件打开时需要关闭动画(定时器)
11383
11966
  // 暂停 header footer 的动画(定时器)
@@ -11481,7 +12064,7 @@
11481
12064
  }
11482
12065
  }
11483
12066
  }
11484
- theme.emit(EVENTS.control.mountedControls);
12067
+ theme.emit(EVENTS$2.control.mountedControls);
11485
12068
  if (!theme.playing) theme._disabled(true);
11486
12069
  // 同步 loading 状态(修复:_loadingControl 创建前设置的 loading=true 不生效的问题)
11487
12070
  if (theme._loading && theme._loadingControl) {
@@ -11498,7 +12081,8 @@
11498
12081
  var _renderTimeLine = function(theme, container, props) {
11499
12082
  if (props === void 0) props = {};
11500
12083
  if (!theme.controls.timeLineControl && theme.options.timeLineOptions !== null) {
11501
- var _theme_urlInfo, _theme_options;
12084
+ var _theme_urlInfo, _theme_options, _theme_options1, _this, _theme_options2;
12085
+ var _showSectionIcon;
11502
12086
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
11503
12087
  theme.controls.timeLineControl = new Controls['timeLine'](_extends$1({
11504
12088
  getPopupContainer: function() {
@@ -11508,6 +12092,7 @@
11508
12092
  locales: theme.i18n.translations,
11509
12093
  coverQuery: ((_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.validateCode) ? "decodekey=" + theme.urlInfo.validateCode : ''
11510
12094
  }, ((_theme_options = theme.options) == null ? void 0 : _theme_options["timeLineOptions"]) || {}, {
12095
+ showSectionIcon: ((_theme_options1 = theme.options) == null ? void 0 : _theme_options1["recListOptions"]) !== null ? (_showSectionIcon = (_this = ((_theme_options2 = theme.options) == null ? void 0 : _theme_options2["timeLineOptions"]) || {}) == null ? void 0 : _this.showSectionIcon) != null ? _showSectionIcon : true : true,
11511
12096
  props: props
11512
12097
  }));
11513
12098
  }
@@ -11837,7 +12422,7 @@
11837
12422
  */ _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, /**
11838
12423
  * 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
11839
12424
  * @private
11840
- */ _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, // /**
12425
+ */ _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, /** @private 加载中 */ _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, // /**
11841
12426
  // * 记录回放的月份
11842
12427
  // *
11843
12428
  // * key: {序列号}_{通道号}_{rec | cloud | cloudRecord} 比如:BC7799091_1_rec BC7799091_1_cloud BC7799091_1_cloudRecord
@@ -11862,7 +12447,7 @@
11862
12447
  }
11863
12448
  }
11864
12449
  _this._getRecType(_this.options.url);
11865
- _bindEventLogger(_this, EVENTS);
12450
+ _bindEventLogger(_this, EVENTS$2);
11866
12451
  options.onInitializing == null ? void 0 : options.onInitializing.call(options, _this); // 在初始化时,执行回调 支持 i18n logger
11867
12452
  if (_this.options.autoPlay) {
11868
12453
  _this.playing = true;
@@ -11875,8 +12460,8 @@
11875
12460
  },
11876
12461
  scaleMode: _this.scaleMode
11877
12462
  });
11878
- _this.contentControl.on(EVENTS.control.contentRerender, function(info) {
11879
- _this.emit(EVENTS.control.contentRerender, info);
12463
+ _this.contentControl.on(EVENTS$2.control.contentRerender, function(info) {
12464
+ _this.emit(EVENTS$2.control.contentRerender, info);
11880
12465
  });
11881
12466
  // zoom utils
11882
12467
  __zoom(_this, _this.contentControl.$content, _extends({}, _this.options.zoomOptions || {}, {
@@ -12013,7 +12598,7 @@
12013
12598
  * @returns {void}
12014
12599
  */ _proto.changeTheme = function changeTheme(themeData) {
12015
12600
  this._renderTheme(themeData);
12016
- this.emit == null ? void 0 : this.emit.call(this, EVENTS.changeTheme, themeData);
12601
+ this.emit == null ? void 0 : this.emit.call(this, EVENTS$2.changeTheme, themeData);
12017
12602
  };
12018
12603
  /**
12019
12604
  * 设置封面(仅设置,不会默认展示出来)
@@ -12037,7 +12622,7 @@
12037
12622
  if (options === void 0) options = {};
12038
12623
  var _this_logger, _this;
12039
12624
  (_this_logger = this.logger) == null ? void 0 : _this_logger.setOptions(options);
12040
- (_this = this) == null ? void 0 : _this.emit(EVENTS.setLoggerOptions, options);
12625
+ (_this = this) == null ? void 0 : _this.emit(EVENTS$2.setLoggerOptions, options);
12041
12626
  };
12042
12627
  /**
12043
12628
  * 设置视频画面缩放模式
@@ -12091,7 +12676,7 @@
12091
12676
  // 防止多次销毁
12092
12677
  return;
12093
12678
  }
12094
- this.emit(EVENTS.theme.beforeDestroy);
12679
+ this.emit(EVENTS$2.theme.beforeDestroy);
12095
12680
  this._removeEventListener();
12096
12681
  _unmountedControls(this);
12097
12682
  (_this_contentControl = this.contentControl) == null ? void 0 : _this_contentControl.destroy();
@@ -12112,7 +12697,7 @@
12112
12697
  if (this.i18n) this.i18n = null;
12113
12698
  this.recType = '';
12114
12699
  this.recMonth = []; // 清空数据
12115
- this.emit(EVENTS.theme.destroyed);
12700
+ this.emit(EVENTS$2.theme.destroyed);
12116
12701
  this.removeAllListeners();
12117
12702
  if (this.logger) this.logger = null;
12118
12703
  // 销毁后,将 destroyed 设置为 true
@@ -12244,12 +12829,12 @@
12244
12829
  // 全屏变化
12245
12830
  onChange: function(info) {
12246
12831
  if (info.isCurrentFullscreen) {
12247
- _this.emit(EVENTS.fullscreen);
12832
+ _this.emit(EVENTS$2.fullscreen);
12248
12833
  } else if (_this._isCurrentFullscreen) {
12249
- _this.emit(EVENTS.exitFullscreen);
12834
+ _this.emit(EVENTS$2.exitFullscreen);
12250
12835
  }
12251
12836
  _this._isCurrentFullscreen = info.isCurrentFullscreen;
12252
- _this.emit(EVENTS.fullscreenChange, _extends({}, info, {
12837
+ _this.emit(EVENTS$2.fullscreenChange, _extends({}, info, {
12253
12838
  orientationAngle: _this._orientationAngle
12254
12839
  }));
12255
12840
  _this._isRotated();
@@ -12284,7 +12869,7 @@
12284
12869
  }
12285
12870
  if (_this.orientationAngle !== orientation.angle) {
12286
12871
  // 屏幕方向变换
12287
- _this.emit(EVENTS.orientationChange, orientation.angle);
12872
+ _this.emit(EVENTS$2.orientationChange, orientation.angle);
12288
12873
  }
12289
12874
  _this._orientationAngle = orientation.angle;
12290
12875
  // 旋转过后获取可视内容区的高宽 (防止 window resize(已知 iPad Chrome 有这个问题) 可能获取的最终值不对, 需要旋转完成后再次获取一次)
@@ -12421,7 +13006,7 @@
12421
13006
  ],
12422
13007
  wrapClassName: "" + PREFIX_CLASS + "-header-more",
12423
13008
  onOpenChange: function(open) {
12424
- _this.emit(EVENTS.control.headerMorePanelOpenChange, open);
13009
+ _this.emit(EVENTS$2.control.headerMorePanelOpenChange, open);
12425
13010
  }
12426
13011
  });
12427
13012
  (_this_controls1 = this.controls) == null ? void 0 : (_this_controls_recControl = _this_controls1.recControl) == null ? void 0 : _this_controls_recControl.resetPopupContainer(this._headerMoreControl.$panel);
@@ -12476,7 +13061,7 @@
12476
13061
  ],
12477
13062
  wrapClassName: "" + PREFIX_CLASS + "-footer-more",
12478
13063
  onOpenChange: function(open) {
12479
- _this.emit(EVENTS.control.footerMorePanelOpenChange, open);
13064
+ _this.emit(EVENTS$2.control.footerMorePanelOpenChange, open);
12480
13065
  }
12481
13066
  });
12482
13067
  }
@@ -12761,11 +13346,11 @@
12761
13346
  });
12762
13347
  this._disabled(true);
12763
13348
  }
12764
- this.emit(EVENTS.play, playing);
13349
+ this.emit(EVENTS$2.play, playing);
12765
13350
  if ((_this_controls = this.controls) == null ? void 0 : _this_controls.playControl) {
12766
13351
  if (this.controls.playControl.playing !== playing) {
12767
13352
  var _this_controls1;
12768
- (_this_controls1 = this.controls) == null ? void 0 : _this_controls1.playControl.emit(EVENTS.play, playing);
13353
+ (_this_controls1 = this.controls) == null ? void 0 : _this_controls1.playControl.emit(EVENTS$2.play, playing);
12769
13354
  }
12770
13355
  }
12771
13356
  (_this__pauseControl = this._pauseControl) == null ? void 0 : (_this__pauseControl_show = _this__pauseControl.show) == null ? void 0 : _this__pauseControl_show.call(_this__pauseControl, playing);
@@ -12809,7 +13394,7 @@
12809
13394
  (_this__loadingControl1 = this._loadingControl) == null ? void 0 : _this__loadingControl1.hide();
12810
13395
  }
12811
13396
  if (this._loading !== loading) {
12812
- this.emit(EVENTS.loading, loading);
13397
+ this.emit(EVENTS$2.loading, loading);
12813
13398
  }
12814
13399
  }
12815
13400
  },
@@ -12831,14 +13416,14 @@
12831
13416
  if (this._volume !== volume) {
12832
13417
  var _this_controls;
12833
13418
  this._volume = volume;
12834
- this.emit(EVENTS.volumechange, volume, this._muted);
13419
+ this.emit(EVENTS$2.volumechange, volume, this._muted);
12835
13420
  // prettier-ignore
12836
13421
  if ((_this_controls = this.controls) == null ? void 0 : _this_controls.volumeControl) {
12837
13422
  var _this_controls_volumeControl, _this_controls1;
12838
13423
  // 防止多次触发
12839
13424
  if (((_this_controls1 = this.controls) == null ? void 0 : (_this_controls_volumeControl = _this_controls1.volumeControl) == null ? void 0 : _this_controls_volumeControl.volume) !== volume) {
12840
13425
  // prettier-ignore
12841
- this.controls.volumeControl.emit(EVENTS.volumechange, volume, this._muted);
13426
+ this.controls.volumeControl.emit(EVENTS$2.volumechange, volume, this._muted);
12842
13427
  }
12843
13428
  }
12844
13429
  }
@@ -12864,14 +13449,14 @@
12864
13449
  if (this._muted !== muted) {
12865
13450
  var _this_controls;
12866
13451
  this._muted = muted;
12867
- this.emit(EVENTS.volumechange, this._volume, this._muted);
13452
+ this.emit(EVENTS$2.volumechange, this._volume, this._muted);
12868
13453
  // 防止多次触发
12869
13454
  // prettier-ignore
12870
13455
  if ((_this_controls = this.controls) == null ? void 0 : _this_controls.volumeControl) {
12871
13456
  var _this_controls_volumeControl, _this_controls1;
12872
13457
  if (((_this_controls1 = this.controls) == null ? void 0 : (_this_controls_volumeControl = _this_controls1.volumeControl) == null ? void 0 : _this_controls_volumeControl.muted) !== muted) {
12873
13458
  // prettier-ignore
12874
- this.controls.volumeControl.emit(EVENTS.volumechange, this._volume, muted);
13459
+ this.controls.volumeControl.emit(EVENTS$2.volumechange, this._volume, muted);
12875
13460
  }
12876
13461
  }
12877
13462
  }
@@ -12889,7 +13474,7 @@
12889
13474
  */ function set(zooming) {
12890
13475
  if (this._zooming !== zooming) {
12891
13476
  this._zooming = zooming;
12892
- this.emit(EVENTS.zoomingChange, zooming);
13477
+ this.emit(EVENTS$2.zoomingChange, zooming);
12893
13478
  if (this.zoomUtil) {
12894
13479
  if (zooming) {
12895
13480
  var _this_zoomUtil_setUpEventListeners, _this_zoomUtil, _this_zoomUtil_setAllowZoom, _this_zoomUtil1;
@@ -12973,7 +13558,7 @@
12973
13558
  if (zoom !== this._zoom) {
12974
13559
  var _this_zoomUtil_setZoom, _this_zoomUtil, _this;
12975
13560
  this._zoom = zoom;
12976
- this.emit(EVENTS.zoomChange, zoom);
13561
+ this.emit(EVENTS$2.zoomChange, zoom);
12977
13562
  (_this = this) == null ? void 0 : (_this_zoomUtil = _this.zoomUtil) == null ? void 0 : (_this_zoomUtil_setZoom = _this_zoomUtil.setZoom) == null ? void 0 : _this_zoomUtil_setZoom.call(_this_zoomUtil, zoom);
12978
13563
  }
12979
13564
  }
@@ -12997,7 +13582,7 @@
12997
13582
  speed = +speed;
12998
13583
  if (speed !== this._speed) {
12999
13584
  this._speed = speed;
13000
- this.emit(EVENTS.speedChange, speed);
13585
+ this.emit(EVENTS$2.speedChange, speed);
13001
13586
  }
13002
13587
  }
13003
13588
  },
@@ -13105,14 +13690,14 @@
13105
13690
  }
13106
13691
  ]);
13107
13692
  return Theme;
13108
- }(EventEmitter);
13693
+ }(EventEmitter$1);
13109
13694
  /** 所有私有流的模板 @since 0.0.1 */ Theme.TEMPLATES = TEMPLATES;
13110
- /** 事件名称 @since 0.0.1 */ Theme.EVENTS = EVENTS;
13695
+ /** 事件名称 @since 0.0.1 */ Theme.EVENTS = EVENTS$2;
13111
13696
  /** 语言包 @since 0.0.1 */ Theme.LOCALES = {
13112
13697
  zh: zh,
13113
13698
  en: en
13114
13699
  };
13115
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.0-beta.2';
13700
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.0-beta.3';
13116
13701
 
13117
13702
  // 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
13118
13703