@ezuikit/player-theme 3.0.1-beta.3 → 3.0.2-beta.1

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.0.1-beta.3
3
- * Copyright (c) 2026-05-13 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v3.0.2-beta.1
3
+ * Copyright (c) 2026-05-15 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  (function (global, factory) {
@@ -492,9 +492,6 @@
492
492
  /** 麦克风音量变化 */ talkVolumeChange: 'talkVolumeChange',
493
493
  /** 语音广播状态变化 */ broadcastChange: 'broadcastChange',
494
494
  /** AI对话框状态变化 */ aichatChange: 'aichatChange',
495
- /** 直播模式切换 */ liveChange: 'liveChange',
496
- /** 回放下拉选择变化 */ recDropdownChange: 'recDropdownChange',
497
- /** 告警消息面板状态变化 */ alarmMessageChange: 'alarmMessageChange',
498
495
  /** 动态切换日志配置 */ setLoggerOptions: 'setLoggerOptions',
499
496
  records: 'records',
500
497
  ptzSpeedChange: 'ptzSpeedChange',
@@ -542,12 +539,6 @@
542
539
  /** 语音广播控件销毁 */ broadcastDestroy: 'Control.broadcastDestroy',
543
540
  /** AI对话框状态变化 */ aichatChange: 'Control.aichatChange',
544
541
  /** AI对话框控件销毁 */ aichatDestroy: 'Control.aichatDestroy',
545
- /** 直播按钮点击 */ liveChange: 'Control.liveChange',
546
- /** 直播控件销毁 */ liveDestroy: 'Control.liveDestroy',
547
- /** 回放下拉选择变化 */ recDropdownChange: 'Control.recDropdownChange',
548
- /** 回放下拉控件销毁 */ recDropdownDestroy: 'Control.recDropdownDestroy',
549
- /** 告警消息面板开关 */ alarmMessageChange: 'Control.alarmMessageChange',
550
- /** 告警消息面板销毁 */ alarmMessageDestroy: 'Control.alarmMessageDestroy',
551
542
  /** 缩放比例改变 */ zoomChange: 'Control.zoomChange',
552
543
  /** 音量调节面板 展示隐藏变换 */ zoomPanelOpenChange: 'Control.zoomPanelOpenChange',
553
544
  /** 缩放控件销毁 */ zoomDestroy: 'Control.zoomDestroy',
@@ -599,7 +590,7 @@
599
590
  if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
600
591
  return Constructor;
601
592
  }
602
- function _inherits$w(subClass, superClass) {
593
+ function _inherits$t(subClass, superClass) {
603
594
  if (typeof superClass !== "function" && superClass !== null) {
604
595
  throw new TypeError("Super expression must either be null or a function");
605
596
  }
@@ -610,14 +601,14 @@
610
601
  configurable: true
611
602
  }
612
603
  });
613
- if (superClass) _set_prototype_of$z(subClass, superClass);
604
+ if (superClass) _set_prototype_of$w(subClass, superClass);
614
605
  }
615
- function _set_prototype_of$z(o, p) {
616
- _set_prototype_of$z = Object.setPrototypeOf || function setPrototypeOf(o, p) {
606
+ function _set_prototype_of$w(o, p) {
607
+ _set_prototype_of$w = Object.setPrototypeOf || function setPrototypeOf(o, p) {
617
608
  o.__proto__ = p;
618
609
  return o;
619
610
  };
620
- return _set_prototype_of$z(o, p);
611
+ return _set_prototype_of$w(o, p);
621
612
  }
622
613
  /**
623
614
  * 控件基类
@@ -631,7 +622,7 @@
631
622
  * const myControl = new MyControl({})
632
623
  * ```
633
624
  */ var Control = /*#__PURE__*/ function(EventEmitter) {
634
- _inherits$w(Control, EventEmitter);
625
+ _inherits$t(Control, EventEmitter);
635
626
  function Control(options) {
636
627
  var _this;
637
628
  var _this___options;
@@ -806,8 +797,8 @@
806
797
  return Control;
807
798
  }(EventEmitter);
808
799
 
809
- function _extends$x() {
810
- _extends$x = Object.assign || function(target) {
800
+ function _extends$u() {
801
+ _extends$u = Object.assign || function(target) {
811
802
  for(var i = 1; i < arguments.length; i++){
812
803
  var source = arguments[i];
813
804
  for(var key in source){
@@ -818,9 +809,9 @@
818
809
  }
819
810
  return target;
820
811
  };
821
- return _extends$x.apply(this, arguments);
812
+ return _extends$u.apply(this, arguments);
822
813
  }
823
- function _inherits$v(subClass, superClass) {
814
+ function _inherits$s(subClass, superClass) {
824
815
  if (typeof superClass !== "function" && superClass !== null) {
825
816
  throw new TypeError("Super expression must either be null or a function");
826
817
  }
@@ -831,25 +822,25 @@
831
822
  configurable: true
832
823
  }
833
824
  });
834
- if (superClass) _set_prototype_of$y(subClass, superClass);
825
+ if (superClass) _set_prototype_of$v(subClass, superClass);
835
826
  }
836
- function _set_prototype_of$y(o, p) {
837
- _set_prototype_of$y = Object.setPrototypeOf || function setPrototypeOf(o, p) {
827
+ function _set_prototype_of$v(o, p) {
828
+ _set_prototype_of$v = Object.setPrototypeOf || function setPrototypeOf(o, p) {
838
829
  o.__proto__ = p;
839
830
  return o;
840
831
  };
841
- return _set_prototype_of$y(o, p);
832
+ return _set_prototype_of$v(o, p);
842
833
  }
843
834
  var LOADING_DEFAULT_OPTIONS = {};
844
835
  /**
845
836
  * 加载动画控件
846
837
  * @category Control
847
838
  */ var Loading = /*#__PURE__*/ function(Control) {
848
- _inherits$v(Loading, Control);
839
+ _inherits$s(Loading, Control);
849
840
  function Loading(options) {
850
841
  if (options === void 0) options = {};
851
842
  var _this;
852
- _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$x({}, options, {
843
+ _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$u({}, options, {
853
844
  tagName: 'div',
854
845
  controlType: 'block',
855
846
  classNameSuffix: 'loading'
@@ -887,8 +878,8 @@
887
878
  return Loading;
888
879
  }(Control);
889
880
 
890
- function _extends$w() {
891
- _extends$w = Object.assign || function(target) {
881
+ function _extends$t() {
882
+ _extends$t = Object.assign || function(target) {
892
883
  for(var i = 1; i < arguments.length; i++){
893
884
  var source = arguments[i];
894
885
  for(var key in source){
@@ -899,9 +890,9 @@
899
890
  }
900
891
  return target;
901
892
  };
902
- return _extends$w.apply(this, arguments);
893
+ return _extends$t.apply(this, arguments);
903
894
  }
904
- function _inherits$u(subClass, superClass) {
895
+ function _inherits$r(subClass, superClass) {
905
896
  if (typeof superClass !== "function" && superClass !== null) {
906
897
  throw new TypeError("Super expression must either be null or a function");
907
898
  }
@@ -912,14 +903,14 @@
912
903
  configurable: true
913
904
  }
914
905
  });
915
- if (superClass) _set_prototype_of$x(subClass, superClass);
906
+ if (superClass) _set_prototype_of$u(subClass, superClass);
916
907
  }
917
- function _set_prototype_of$x(o, p) {
918
- _set_prototype_of$x = Object.setPrototypeOf || function setPrototypeOf(o, p) {
908
+ function _set_prototype_of$u(o, p) {
909
+ _set_prototype_of$u = Object.setPrototypeOf || function setPrototypeOf(o, p) {
919
910
  o.__proto__ = p;
920
911
  return o;
921
912
  };
922
- return _set_prototype_of$x(o, p);
913
+ return _set_prototype_of$u(o, p);
923
914
  }
924
915
  // 不放在服务器上 是因为有可能http加载失败
925
916
  // prettier-ignore
@@ -931,11 +922,11 @@
931
922
  * 封面控件
932
923
  * @category Control
933
924
  */ var Poster = /*#__PURE__*/ function(Control) {
934
- _inherits$u(Poster, Control);
925
+ _inherits$r(Poster, Control);
935
926
  function Poster(options) {
936
927
  if (options === void 0) options = {};
937
928
  var _this;
938
- _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$w({}, options, {
929
+ _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$t({}, options, {
939
930
  tagName: 'div',
940
931
  controlType: 'block',
941
932
  classNameSuffix: 'poster'
@@ -1041,10 +1032,7 @@
1041
1032
  warnCircleOutLined: '<svg width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" focusable="false" aria-hidden="true" data-icon="info-circle">\n <path d="M8 1C11.866 1 15 4.13401 15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM7.5 8.875C7.5 8.94375 7.55625 9 7.625 9L8.375 9C8.44375 9 8.5 8.94375 8.5 8.875L8.5 4.625C8.5 4.55625 8.44375 4.5 8.375 4.5L7.625 4.5C7.55625 4.5 7.5 4.55625 7.5 4.625L7.5 8.875ZM7.25 10.75C7.25 11.1642 7.58579 11.5 8 11.5C8.41421 11.5 8.75 11.1642 8.75 10.75C8.75 10.3358 8.41421 10 8 10C7.58579 10 7.25 10.3358 7.25 10.75Z" fill-rule="evenodd" />\n </svg>',
1042
1033
  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>',
1043
1034
  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>',
1044
- 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>',
1045
- /** 直播 */ 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>',
1046
- /** 回放 */ 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>',
1047
- /** 消息/告警 */ 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>'
1035
+ 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>'
1048
1036
  };
1049
1037
 
1050
1038
  /**
@@ -1202,23 +1190,11 @@
1202
1190
  reduce: function(attr) {
1203
1191
  if (attr === void 0) attr = {};
1204
1192
  return createIcon(Icons.reduce, 'reduce', attr);
1205
- },
1206
- /** 直播 */ live: function(attr) {
1207
- if (attr === void 0) attr = {};
1208
- return createIcon(Icons.live, 'live', attr);
1209
- },
1210
- /** 回放 */ recDropdown: function(attr) {
1211
- if (attr === void 0) attr = {};
1212
- return createIcon(Icons.recDropdown, 'rec-dropdown', attr);
1213
- },
1214
- /** 消息 */ alarmMessage: function(attr) {
1215
- if (attr === void 0) attr = {};
1216
- return createIcon(Icons.alarmMessage, 'alarm-message', attr);
1217
1193
  }
1218
1194
  };
1219
1195
 
1220
- function _extends$v() {
1221
- _extends$v = Object.assign || function(target) {
1196
+ function _extends$s() {
1197
+ _extends$s = Object.assign || function(target) {
1222
1198
  for(var i = 1; i < arguments.length; i++){
1223
1199
  var source = arguments[i];
1224
1200
  for(var key in source){
@@ -1229,9 +1205,9 @@
1229
1205
  }
1230
1206
  return target;
1231
1207
  };
1232
- return _extends$v.apply(this, arguments);
1208
+ return _extends$s.apply(this, arguments);
1233
1209
  }
1234
- function _inherits$t(subClass, superClass) {
1210
+ function _inherits$q(subClass, superClass) {
1235
1211
  if (typeof superClass !== "function" && superClass !== null) {
1236
1212
  throw new TypeError("Super expression must either be null or a function");
1237
1213
  }
@@ -1242,25 +1218,25 @@
1242
1218
  configurable: true
1243
1219
  }
1244
1220
  });
1245
- if (superClass) _set_prototype_of$w(subClass, superClass);
1221
+ if (superClass) _set_prototype_of$t(subClass, superClass);
1246
1222
  }
1247
- function _set_prototype_of$w(o, p) {
1248
- _set_prototype_of$w = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1223
+ function _set_prototype_of$t(o, p) {
1224
+ _set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1249
1225
  o.__proto__ = p;
1250
1226
  return o;
1251
1227
  };
1252
- return _set_prototype_of$w(o, p);
1228
+ return _set_prototype_of$t(o, p);
1253
1229
  }
1254
1230
  var MESSAGE_DEFAULT_OPTIONS = {};
1255
1231
  /**
1256
1232
  * 消息控件
1257
1233
  * @category Control
1258
1234
  */ var Message = /*#__PURE__*/ function(Control) {
1259
- _inherits$t(Message, Control);
1235
+ _inherits$q(Message, Control);
1260
1236
  function Message(options) {
1261
1237
  if (options === void 0) options = {};
1262
1238
  var _this;
1263
- _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$v({}, options, {
1239
+ _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$s({}, options, {
1264
1240
  tagName: 'div',
1265
1241
  controlType: 'block'
1266
1242
  }))) || this, _this._$toast = null;
@@ -1413,8 +1389,8 @@
1413
1389
  if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
1414
1390
  return Constructor;
1415
1391
  }
1416
- function _extends$u() {
1417
- _extends$u = Object.assign || function(target) {
1392
+ function _extends$r() {
1393
+ _extends$r = Object.assign || function(target) {
1418
1394
  for(var i = 1; i < arguments.length; i++){
1419
1395
  var source = arguments[i];
1420
1396
  for(var key in source){
@@ -1425,9 +1401,9 @@
1425
1401
  }
1426
1402
  return target;
1427
1403
  };
1428
- return _extends$u.apply(this, arguments);
1404
+ return _extends$r.apply(this, arguments);
1429
1405
  }
1430
- function _inherits$s(subClass, superClass) {
1406
+ function _inherits$p(subClass, superClass) {
1431
1407
  if (typeof superClass !== "function" && superClass !== null) {
1432
1408
  throw new TypeError("Super expression must either be null or a function");
1433
1409
  }
@@ -1438,23 +1414,23 @@
1438
1414
  configurable: true
1439
1415
  }
1440
1416
  });
1441
- if (superClass) _set_prototype_of$v(subClass, superClass);
1417
+ if (superClass) _set_prototype_of$s(subClass, superClass);
1442
1418
  }
1443
- function _set_prototype_of$v(o, p) {
1444
- _set_prototype_of$v = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1419
+ function _set_prototype_of$s(o, p) {
1420
+ _set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1445
1421
  o.__proto__ = p;
1446
1422
  return o;
1447
1423
  };
1448
- return _set_prototype_of$v(o, p);
1424
+ return _set_prototype_of$s(o, p);
1449
1425
  }
1450
1426
  /**
1451
1427
  * 播放/暂停控件
1452
1428
  * @category Control
1453
1429
  */ var Play = /*#__PURE__*/ function(Control) {
1454
- _inherits$s(Play, Control);
1430
+ _inherits$p(Play, Control);
1455
1431
  function Play(options) {
1456
1432
  var _this;
1457
- _this = Control.call(this, _extends$u({}, options, {
1433
+ _this = Control.call(this, _extends$r({}, options, {
1458
1434
  tagName: 'span',
1459
1435
  controlType: 'button',
1460
1436
  classNameSuffix: 'play'
@@ -2972,8 +2948,8 @@
2972
2948
  if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
2973
2949
  return Constructor;
2974
2950
  }
2975
- function _extends$t() {
2976
- _extends$t = Object.assign || function(target) {
2951
+ function _extends$q() {
2952
+ _extends$q = Object.assign || function(target) {
2977
2953
  for(var i = 1; i < arguments.length; i++){
2978
2954
  var source = arguments[i];
2979
2955
  for(var key in source){
@@ -2984,9 +2960,9 @@
2984
2960
  }
2985
2961
  return target;
2986
2962
  };
2987
- return _extends$t.apply(this, arguments);
2963
+ return _extends$q.apply(this, arguments);
2988
2964
  }
2989
- function _inherits$r(subClass, superClass) {
2965
+ function _inherits$o(subClass, superClass) {
2990
2966
  if (typeof superClass !== "function" && superClass !== null) {
2991
2967
  throw new TypeError("Super expression must either be null or a function");
2992
2968
  }
@@ -2997,14 +2973,14 @@
2997
2973
  configurable: true
2998
2974
  }
2999
2975
  });
3000
- if (superClass) _set_prototype_of$u(subClass, superClass);
2976
+ if (superClass) _set_prototype_of$r(subClass, superClass);
3001
2977
  }
3002
- function _set_prototype_of$u(o, p) {
3003
- _set_prototype_of$u = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2978
+ function _set_prototype_of$r(o, p) {
2979
+ _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3004
2980
  o.__proto__ = p;
3005
2981
  return o;
3006
2982
  };
3007
- return _set_prototype_of$u(o, p);
2983
+ return _set_prototype_of$r(o, p);
3008
2984
  }
3009
2985
  var VOLUME_DEFAULT_OPTIONS = {
3010
2986
  volume: 0.8,
@@ -3018,12 +2994,12 @@
3018
2994
  * 音量调节控件
3019
2995
  * @category Control
3020
2996
  */ var Volume = /*#__PURE__*/ function(Control) {
3021
- _inherits$r(Volume, Control);
2997
+ _inherits$o(Volume, Control);
3022
2998
  function Volume(options) {
3023
2999
  if (options === void 0) options = {};
3024
3000
  var _this;
3025
3001
  var _this__options_props, _this__options_props1, _this__options_props2, _this__options_props3;
3026
- _this = Control.call(this, _extends$t({}, options, {
3002
+ _this = Control.call(this, _extends$q({}, options, {
3027
3003
  tagName: 'span',
3028
3004
  classNameSuffix: 'volume',
3029
3005
  controlType: 'button'
@@ -3882,8 +3858,8 @@
3882
3858
  return Fullscreen;
3883
3859
  }();
3884
3860
 
3885
- function _extends$s() {
3886
- _extends$s = Object.assign || function(target) {
3861
+ function _extends$p() {
3862
+ _extends$p = Object.assign || function(target) {
3887
3863
  for(var i = 1; i < arguments.length; i++){
3888
3864
  var source = arguments[i];
3889
3865
  for(var key in source){
@@ -3894,9 +3870,9 @@
3894
3870
  }
3895
3871
  return target;
3896
3872
  };
3897
- return _extends$s.apply(this, arguments);
3873
+ return _extends$p.apply(this, arguments);
3898
3874
  }
3899
- function _inherits$q(subClass, superClass) {
3875
+ function _inherits$n(subClass, superClass) {
3900
3876
  if (typeof superClass !== "function" && superClass !== null) {
3901
3877
  throw new TypeError("Super expression must either be null or a function");
3902
3878
  }
@@ -3907,24 +3883,24 @@
3907
3883
  configurable: true
3908
3884
  }
3909
3885
  });
3910
- if (superClass) _set_prototype_of$t(subClass, superClass);
3886
+ if (superClass) _set_prototype_of$q(subClass, superClass);
3911
3887
  }
3912
- function _set_prototype_of$t(o, p) {
3913
- _set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3888
+ function _set_prototype_of$q(o, p) {
3889
+ _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3914
3890
  o.__proto__ = p;
3915
3891
  return o;
3916
3892
  };
3917
- return _set_prototype_of$t(o, p);
3893
+ return _set_prototype_of$q(o, p);
3918
3894
  }
3919
3895
  /**
3920
3896
  * 全屏控件
3921
3897
  * @category Control
3922
3898
  */ var Fullscreen = /*#__PURE__*/ function(Control) {
3923
- _inherits$q(Fullscreen, Control);
3899
+ _inherits$n(Fullscreen, Control);
3924
3900
  function Fullscreen(options) {
3925
3901
  var _this;
3926
3902
  var _options_props, _this_options;
3927
- _this = Control.call(this, _extends$s({
3903
+ _this = Control.call(this, _extends$p({
3928
3904
  tagName: 'span',
3929
3905
  classNameSuffix: 'fullscreen',
3930
3906
  controlType: 'button'
@@ -3989,8 +3965,8 @@
3989
3965
  return Fullscreen;
3990
3966
  }(Control);
3991
3967
 
3992
- function _extends$r() {
3993
- _extends$r = Object.assign || function(target) {
3968
+ function _extends$o() {
3969
+ _extends$o = Object.assign || function(target) {
3994
3970
  for(var i = 1; i < arguments.length; i++){
3995
3971
  var source = arguments[i];
3996
3972
  for(var key in source){
@@ -4001,9 +3977,9 @@
4001
3977
  }
4002
3978
  return target;
4003
3979
  };
4004
- return _extends$r.apply(this, arguments);
3980
+ return _extends$o.apply(this, arguments);
4005
3981
  }
4006
- function _inherits$p(subClass, superClass) {
3982
+ function _inherits$m(subClass, superClass) {
4007
3983
  if (typeof superClass !== "function" && superClass !== null) {
4008
3984
  throw new TypeError("Super expression must either be null or a function");
4009
3985
  }
@@ -4014,24 +3990,24 @@
4014
3990
  configurable: true
4015
3991
  }
4016
3992
  });
4017
- if (superClass) _set_prototype_of$s(subClass, superClass);
3993
+ if (superClass) _set_prototype_of$p(subClass, superClass);
4018
3994
  }
4019
- function _set_prototype_of$s(o, p) {
4020
- _set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3995
+ function _set_prototype_of$p(o, p) {
3996
+ _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
4021
3997
  o.__proto__ = p;
4022
3998
  return o;
4023
3999
  };
4024
- return _set_prototype_of$s(o, p);
4000
+ return _set_prototype_of$p(o, p);
4025
4001
  }
4026
4002
  /**
4027
4003
  * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
4028
4004
  * @category Control
4029
4005
  */ var Rec = /*#__PURE__*/ function(Control) {
4030
- _inherits$p(Rec, Control);
4006
+ _inherits$m(Rec, Control);
4031
4007
  function Rec(options) {
4032
4008
  var _this;
4033
4009
  var _options_props;
4034
- _this = Control.call(this, _extends$r({}, options, {
4010
+ _this = Control.call(this, _extends$o({}, options, {
4035
4011
  tagName: 'div',
4036
4012
  controlType: 'block',
4037
4013
  classNameSuffix: 'rec'
@@ -4349,12 +4325,6 @@
4349
4325
  BTN_TALK: '对讲',
4350
4326
  BTN_BROADCAST: '语音广播',
4351
4327
  BTN_AICHAT: 'AI对话',
4352
- BTN_LIVE: '直播',
4353
- BTN_REC_DROPDOWN: '回放',
4354
- BTN_ALARM_MESSAGE: '消息',
4355
- REC_DROPDOWN_CLOUD_REC: '云存储',
4356
- REC_DROPDOWN_CLOUD_RECORD: '云录制',
4357
- REC_DROPDOWN_LOCAL_REC: '本地回放',
4358
4328
  BTN_ZOOM: '电子放大',
4359
4329
  BTN_3D_ZOOM: '3D定位',
4360
4330
  BTN_PTZ: '云台控制',
@@ -4627,12 +4597,6 @@
4627
4597
  BTN_TALK: 'Intercom',
4628
4598
  BTN_BROADCAST: 'Voice broadcast',
4629
4599
  BTN_AICHAT: 'AI Chat',
4630
- BTN_LIVE: 'Live',
4631
- BTN_REC_DROPDOWN: 'Playback',
4632
- BTN_ALARM_MESSAGE: 'Messages',
4633
- REC_DROPDOWN_CLOUD_REC: 'Cloud Storage',
4634
- REC_DROPDOWN_CLOUD_RECORD: 'Cloud Recording',
4635
- REC_DROPDOWN_LOCAL_REC: 'Local Playback',
4636
4600
  BTN_ZOOM: 'Electronic zoom',
4637
4601
  BTN_3D_ZOOM: '3D positioning',
4638
4602
  BTN_PTZ: 'PTZ control',
@@ -4788,6 +4752,12 @@
4788
4752
  defaultActive: 0,
4789
4753
  isrender: 1
4790
4754
  },
4755
+ {
4756
+ iconId: 'zoom',
4757
+ part: 'left',
4758
+ defaultActive: 0,
4759
+ isrender: 1
4760
+ },
4791
4761
  {
4792
4762
  iconId: 'fullscreen',
4793
4763
  part: 'right',
@@ -4822,21 +4792,6 @@
4822
4792
  iconId: 'deviceName',
4823
4793
  part: 'left',
4824
4794
  isrender: 1
4825
- },
4826
- {
4827
- iconId: 'live',
4828
- part: 'right',
4829
- isrender: 1
4830
- },
4831
- {
4832
- iconId: 'recDropdown',
4833
- part: 'right',
4834
- isrender: 1
4835
- },
4836
- {
4837
- iconId: 'alarmMessage',
4838
- part: 'right',
4839
- isrender: 1
4840
4795
  }
4841
4796
  ]
4842
4797
  },
@@ -4924,19 +4879,19 @@
4924
4879
  isrender: 1
4925
4880
  },
4926
4881
  {
4927
- iconId: 'live',
4882
+ iconId: 'cloudRec',
4928
4883
  part: 'right',
4929
4884
  defaultActive: 0,
4930
4885
  isrender: 1
4931
4886
  },
4932
4887
  {
4933
- iconId: 'recDropdown',
4888
+ iconId: 'cloudRecord',
4934
4889
  part: 'right',
4935
4890
  defaultActive: 0,
4936
4891
  isrender: 1
4937
4892
  },
4938
4893
  {
4939
- iconId: 'alarmMessage',
4894
+ iconId: 'rec',
4940
4895
  part: 'right',
4941
4896
  defaultActive: 0,
4942
4897
  isrender: 1
@@ -5339,7 +5294,7 @@
5339
5294
  voice: voice
5340
5295
  };
5341
5296
 
5342
- function _inherits$o(subClass, superClass) {
5297
+ function _inherits$l(subClass, superClass) {
5343
5298
  if (typeof superClass !== "function" && superClass !== null) {
5344
5299
  throw new TypeError("Super expression must either be null or a function");
5345
5300
  }
@@ -5350,20 +5305,20 @@
5350
5305
  configurable: true
5351
5306
  }
5352
5307
  });
5353
- if (superClass) _set_prototype_of$r(subClass, superClass);
5308
+ if (superClass) _set_prototype_of$o(subClass, superClass);
5354
5309
  }
5355
- function _set_prototype_of$r(o, p) {
5356
- _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5310
+ function _set_prototype_of$o(o, p) {
5311
+ _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5357
5312
  o.__proto__ = p;
5358
5313
  return o;
5359
5314
  };
5360
- return _set_prototype_of$r(o, p);
5315
+ return _set_prototype_of$o(o, p);
5361
5316
  }
5362
5317
  /**
5363
5318
  * 截图控件
5364
5319
  * @category Content
5365
5320
  */ var Content = /*#__PURE__*/ function(EventEmitter) {
5366
- _inherits$o(Content, EventEmitter);
5321
+ _inherits$l(Content, EventEmitter);
5367
5322
  function Content(options) {
5368
5323
  var _this;
5369
5324
  _this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._cleanUpResizeObserver = null, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
@@ -5478,8 +5433,8 @@
5478
5433
  return Content;
5479
5434
  }(EventEmitter);
5480
5435
 
5481
- function _extends$q() {
5482
- _extends$q = Object.assign || function(target) {
5436
+ function _extends$n() {
5437
+ _extends$n = Object.assign || function(target) {
5483
5438
  for(var i = 1; i < arguments.length; i++){
5484
5439
  var source = arguments[i];
5485
5440
  for(var key in source){
@@ -5490,9 +5445,9 @@
5490
5445
  }
5491
5446
  return target;
5492
5447
  };
5493
- return _extends$q.apply(this, arguments);
5448
+ return _extends$n.apply(this, arguments);
5494
5449
  }
5495
- function _inherits$n(subClass, superClass) {
5450
+ function _inherits$k(subClass, superClass) {
5496
5451
  if (typeof superClass !== "function" && superClass !== null) {
5497
5452
  throw new TypeError("Super expression must either be null or a function");
5498
5453
  }
@@ -5503,23 +5458,23 @@
5503
5458
  configurable: true
5504
5459
  }
5505
5460
  });
5506
- if (superClass) _set_prototype_of$q(subClass, superClass);
5461
+ if (superClass) _set_prototype_of$n(subClass, superClass);
5507
5462
  }
5508
- function _set_prototype_of$q(o, p) {
5509
- _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5463
+ function _set_prototype_of$n(o, p) {
5464
+ _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5510
5465
  o.__proto__ = p;
5511
5466
  return o;
5512
5467
  };
5513
- return _set_prototype_of$q(o, p);
5468
+ return _set_prototype_of$n(o, p);
5514
5469
  }
5515
5470
  /**
5516
5471
  * 更多控件
5517
5472
  * @category Control
5518
5473
  */ var More = /*#__PURE__*/ function(Control) {
5519
- _inherits$n(More, Control);
5474
+ _inherits$k(More, Control);
5520
5475
  function More(options) {
5521
5476
  var _this;
5522
- _this = Control.call(this, _extends$q({}, options, {
5477
+ _this = Control.call(this, _extends$n({}, options, {
5523
5478
  tagName: 'span',
5524
5479
  controlType: 'button',
5525
5480
  classNameSuffix: 'more'
@@ -5735,15 +5690,6 @@
5735
5690
  }
5736
5691
  });
5737
5692
  // =======================================================
5738
- // 告警消息
5739
- // =======================================================
5740
- theme.on(EVENTS.alarmMessageChange, function(active) {
5741
- var _theme_controls;
5742
- if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.alarmMessageControl) {
5743
- theme.controls.alarmMessageControl._panelOpen = active;
5744
- }
5745
- });
5746
- // =======================================================
5747
5693
  // 录制
5748
5694
  // =======================================================
5749
5695
  theme.on(EVENTS.recordingChange, function(recording) {
@@ -5839,7 +5785,7 @@
5839
5785
  *
5840
5786
  * @param theme - Theme
5841
5787
  */ function _controlEventemitter(theme) {
5842
- 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;
5788
+ 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;
5843
5789
  // Controls
5844
5790
  if (theme._recFooter) {
5845
5791
  theme._recFooter.on(EVENTS.theme.recFooterDestroy, function() {
@@ -5950,50 +5896,8 @@
5950
5896
  theme.emit(EVENTS.control.aichatDestroy);
5951
5897
  });
5952
5898
  }
5953
- // 直播按钮
5954
- if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.liveControl) {
5955
- theme.controls.liveControl.on(EVENTS.control.liveChange, function() {
5956
- var _theme_controls;
5957
- // 直接设置回放下拉控件为非激活状态
5958
- if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.recDropdownControl) {
5959
- theme.controls.recDropdownControl.active = false;
5960
- }
5961
- theme.emit(EVENTS.control.liveChange);
5962
- });
5963
- }
5964
- // 回放下拉
5965
- if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.recDropdownControl) {
5966
- theme.controls.recDropdownControl.on(EVENTS.control.recDropdownChange, function(type) {
5967
- var _theme_controls;
5968
- // 直接设置直播控件为非激活状态
5969
- if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.liveControl) {
5970
- theme.controls.liveControl.active = false;
5971
- }
5972
- theme.emit(EVENTS.control.recDropdownChange, type);
5973
- });
5974
- }
5975
- // 告警消息
5976
- if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.alarmMessageControl) {
5977
- theme.controls.alarmMessageControl.on(EVENTS.control.alarmMessageChange, function(active) {
5978
- theme.emit(EVENTS.control.alarmMessageChange, active);
5979
- });
5980
- }
5981
- // 播放地址切换后同步 Live/RecDropdown 激活状态
5982
- // changePlayUrl 后 urlInfo 已更新,firstFrameDisplay 表示新地址播放成功
5983
- if (((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.liveControl) || ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.recDropdownControl)) {
5984
- theme.on(EVENTS.firstFrameDisplay, function() {
5985
- var _theme_controls, _theme_controls1;
5986
- var urlInfo = theme.urlInfo;
5987
- if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.liveControl) {
5988
- theme.controls.liveControl._syncActiveByUrlInfo(urlInfo);
5989
- }
5990
- if ((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1.recDropdownControl) {
5991
- theme.controls.recDropdownControl._syncActiveByUrlInfo(urlInfo);
5992
- }
5993
- });
5994
- }
5995
5899
  // 缩放控件
5996
- if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.zoomControl) {
5900
+ if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.zoomControl) {
5997
5901
  theme.controls.zoomControl.on(EVENTS.control.zoomChange, function(value, _percent, _range) {
5998
5902
  if (theme.zoom !== value) {
5999
5903
  theme.zoom = value;
@@ -6015,7 +5919,7 @@
6015
5919
  });
6016
5920
  }
6017
5921
  // 清晰度控件
6018
- if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.definitionControl) {
5922
+ if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.definitionControl) {
6019
5923
  theme.controls.definitionControl.on(EVENTS.control.definitionPanelOpenChange, function(open, definition, item) {
6020
5924
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, definition);
6021
5925
  theme.emit(EVENTS.control.definitionPanelOpenChange, open, definition, item);
@@ -6028,7 +5932,7 @@
6028
5932
  });
6029
5933
  }
6030
5934
  // 倍速控件
6031
- if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.speedControl) {
5935
+ if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.speedControl) {
6032
5936
  theme.controls.speedControl.on(EVENTS.control.speedPanelOpenChange, function(open, speed, item) {
6033
5937
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, speed);
6034
5938
  theme.emit(EVENTS.control.speedPanelOpenChange, open, speed, item);
@@ -6041,7 +5945,7 @@
6041
5945
  });
6042
5946
  }
6043
5947
  // 截图控件
6044
- if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.capturePictureControl) {
5948
+ if ((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.capturePictureControl) {
6045
5949
  theme.controls.capturePictureControl.on(EVENTS.control.capturePicture, function(options) {
6046
5950
  theme.emit(EVENTS.control.capturePicture, options);
6047
5951
  });
@@ -6050,25 +5954,25 @@
6050
5954
  });
6051
5955
  }
6052
5956
  // 全屏控件
6053
- if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.fullscreenControl) {
5957
+ if ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.fullscreenControl) {
6054
5958
  theme.controls.fullscreenControl.on(EVENTS.control.fullscreenDestroy, function() {
6055
5959
  theme.emit(EVENTS.control.fullscreenDestroy);
6056
5960
  });
6057
5961
  }
6058
5962
  // 全局全屏控件
6059
- if ((_theme_controls17 = theme.controls) == null ? void 0 : _theme_controls17.globalFullscreenControl) {
5963
+ if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.globalFullscreenControl) {
6060
5964
  theme.controls.globalFullscreenControl.on(EVENTS.control.globalFullscreenDestroy, function() {
6061
5965
  theme.emit(EVENTS.control.globalFullscreenDestroy);
6062
5966
  });
6063
5967
  }
6064
5968
  // 设备信息控件
6065
- if ((_theme_controls18 = theme.controls) == null ? void 0 : _theme_controls18.deviceControl) {
5969
+ if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.deviceControl) {
6066
5970
  theme.controls.deviceControl.on(EVENTS.control.deviceDestroy, function() {
6067
5971
  theme.emit(EVENTS.control.deviceDestroy);
6068
5972
  });
6069
5973
  }
6070
5974
  // 回放类型切换控件
6071
- if ((_theme_controls19 = theme.controls) == null ? void 0 : _theme_controls19.recControl) {
5975
+ if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.recControl) {
6072
5976
  // prettier-ignore
6073
5977
  theme.controls.recControl.on(EVENTS.control.recTypeChange, function(type) {
6074
5978
  if (theme.recType !== type) {
@@ -6089,7 +5993,7 @@
6089
5993
  });
6090
5994
  }
6091
5995
  // 时间轴控件
6092
- if ((_theme_controls20 = theme.controls) == null ? void 0 : _theme_controls20.timeLineControl) {
5996
+ if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.timeLineControl) {
6093
5997
  theme.controls.timeLineControl.on(EVENTS.control.timeLineChange, function(date) {
6094
5998
  theme.emit(EVENTS.control.timeLineChange, date);
6095
5999
  });
@@ -6106,7 +6010,7 @@
6106
6010
  });
6107
6011
  }
6108
6012
  // 日历控件
6109
- if ((_theme_controls21 = theme.controls) == null ? void 0 : _theme_controls21.dateControl) {
6013
+ if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.dateControl) {
6110
6014
  theme.controls.dateControl.on(EVENTS.control.datePanelOpenChange, function(open, date) {
6111
6015
  theme.emit(EVENTS.control.datePanelOpenChange, open, date);
6112
6016
  });
@@ -6201,8 +6105,8 @@
6201
6105
  if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
6202
6106
  return Constructor;
6203
6107
  }
6204
- function _extends$p() {
6205
- _extends$p = Object.assign || function(target) {
6108
+ function _extends$m() {
6109
+ _extends$m = Object.assign || function(target) {
6206
6110
  for(var i = 1; i < arguments.length; i++){
6207
6111
  var source = arguments[i];
6208
6112
  for(var key in source){
@@ -6213,9 +6117,9 @@
6213
6117
  }
6214
6118
  return target;
6215
6119
  };
6216
- return _extends$p.apply(this, arguments);
6120
+ return _extends$m.apply(this, arguments);
6217
6121
  }
6218
- function _inherits$m(subClass, superClass) {
6122
+ function _inherits$j(subClass, superClass) {
6219
6123
  if (typeof superClass !== "function" && superClass !== null) {
6220
6124
  throw new TypeError("Super expression must either be null or a function");
6221
6125
  }
@@ -6226,14 +6130,14 @@
6226
6130
  configurable: true
6227
6131
  }
6228
6132
  });
6229
- if (superClass) _set_prototype_of$p(subClass, superClass);
6133
+ if (superClass) _set_prototype_of$m(subClass, superClass);
6230
6134
  }
6231
- function _set_prototype_of$p(o, p) {
6232
- _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6135
+ function _set_prototype_of$m(o, p) {
6136
+ _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6233
6137
  o.__proto__ = p;
6234
6138
  return o;
6235
6139
  };
6236
- return _set_prototype_of$p(o, p);
6140
+ return _set_prototype_of$m(o, p);
6237
6141
  }
6238
6142
  var ZOOM_DEFAULT_OPTIONS = {
6239
6143
  open: false,
@@ -6243,10 +6147,10 @@
6243
6147
  * 电子放大控件
6244
6148
  * @category Control
6245
6149
  */ var Zoom$1 = /*#__PURE__*/ function(Control) {
6246
- _inherits$m(Zoom, Control);
6150
+ _inherits$j(Zoom, Control);
6247
6151
  function Zoom(options) {
6248
6152
  var _this;
6249
- _this = Control.call(this, _extends$p({}, options, {
6153
+ _this = Control.call(this, _extends$m({}, options, {
6250
6154
  tagName: 'span',
6251
6155
  controlType: 'button',
6252
6156
  classNameSuffix: 'zoom'
@@ -6381,8 +6285,8 @@
6381
6285
  */
6382
6286
  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}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$a(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";
6383
6287
 
6384
- function _extends$o() {
6385
- _extends$o = Object.assign || function(target) {
6288
+ function _extends$l() {
6289
+ _extends$l = Object.assign || function(target) {
6386
6290
  for(var i = 1; i < arguments.length; i++){
6387
6291
  var source = arguments[i];
6388
6292
  for(var key in source){
@@ -6393,10 +6297,10 @@
6393
6297
  }
6394
6298
  return target;
6395
6299
  };
6396
- return _extends$o.apply(this, arguments);
6300
+ return _extends$l.apply(this, arguments);
6397
6301
  }
6398
6302
  function __zoom(theme, container, options) {
6399
- theme.zoomUtil = new Zoom(container, _extends$o({}, options || {}, {
6303
+ theme.zoomUtil = new Zoom(container, _extends$l({}, options || {}, {
6400
6304
  min: 1,
6401
6305
  onChange: function(zoom, reset) {
6402
6306
  if (zoom !== theme._zoom) {
@@ -6621,8 +6525,8 @@
6621
6525
  });
6622
6526
  };
6623
6527
  }
6624
- function _extends$n() {
6625
- _extends$n = Object.assign || function(target) {
6528
+ function _extends$k() {
6529
+ _extends$k = Object.assign || function(target) {
6626
6530
  for(var i = 1; i < arguments.length; i++){
6627
6531
  var source = arguments[i];
6628
6532
  for(var key in source){
@@ -6633,7 +6537,7 @@
6633
6537
  }
6634
6538
  return target;
6635
6539
  };
6636
- return _extends$n.apply(this, arguments);
6540
+ return _extends$k.apply(this, arguments);
6637
6541
  }
6638
6542
  function _ts_generator$6(thisArg, body) {
6639
6543
  var f, y, t, _ = {
@@ -6761,7 +6665,7 @@
6761
6665
  }
6762
6666
  if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
6763
6667
  // TODO: 因为回放是一组, 位置以第一个位置为准
6764
- recControls.push(recControls[0] ? _extends$n({}, item, {
6668
+ recControls.push(recControls[0] ? _extends$k({}, item, {
6765
6669
  part: recControls[0].part
6766
6670
  }) : item);
6767
6671
  return false;
@@ -6784,7 +6688,7 @@
6784
6688
  }
6785
6689
  if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
6786
6690
  // TODO: 因为回放是一组, 位置以第一个位置为准
6787
- recControls.push(recControls[0] ? _extends$n({}, item, {
6691
+ recControls.push(recControls[0] ? _extends$k({}, item, {
6788
6692
  part: recControls[0].part
6789
6693
  }) : item);
6790
6694
  return false;
@@ -7035,8 +6939,8 @@
7035
6939
  return Component;
7036
6940
  }();
7037
6941
 
7038
- function _extends$m() {
7039
- _extends$m = Object.assign || function(target) {
6942
+ function _extends$j() {
6943
+ _extends$j = Object.assign || function(target) {
7040
6944
  for(var i = 1; i < arguments.length; i++){
7041
6945
  var source = arguments[i];
7042
6946
  for(var key in source){
@@ -7047,9 +6951,9 @@
7047
6951
  }
7048
6952
  return target;
7049
6953
  };
7050
- return _extends$m.apply(this, arguments);
6954
+ return _extends$j.apply(this, arguments);
7051
6955
  }
7052
- function _inherits$l(subClass, superClass) {
6956
+ function _inherits$i(subClass, superClass) {
7053
6957
  if (typeof superClass !== "function" && superClass !== null) {
7054
6958
  throw new TypeError("Super expression must either be null or a function");
7055
6959
  }
@@ -7060,28 +6964,28 @@
7060
6964
  configurable: true
7061
6965
  }
7062
6966
  });
7063
- if (superClass) _set_prototype_of$o(subClass, superClass);
6967
+ if (superClass) _set_prototype_of$l(subClass, superClass);
7064
6968
  }
7065
- function _set_prototype_of$o(o, p) {
7066
- _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6969
+ function _set_prototype_of$l(o, p) {
6970
+ _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7067
6971
  o.__proto__ = p;
7068
6972
  return o;
7069
6973
  };
7070
- return _set_prototype_of$o(o, p);
6974
+ return _set_prototype_of$l(o, p);
7071
6975
  }
7072
6976
  var Footer = /*#__PURE__*/ function(Component) {
7073
- _inherits$l(Footer, Component);
6977
+ _inherits$i(Footer, Component);
7074
6978
  function Footer(options) {
7075
6979
  if (options === void 0) options = {};
7076
- return Component.call(this, _extends$m({}, options, {
6980
+ return Component.call(this, _extends$j({}, options, {
7077
6981
  cType: 'footer'
7078
6982
  })) || this;
7079
6983
  }
7080
6984
  return Footer;
7081
6985
  }(Component);
7082
6986
 
7083
- function _extends$l() {
7084
- _extends$l = Object.assign || function(target) {
6987
+ function _extends$i() {
6988
+ _extends$i = Object.assign || function(target) {
7085
6989
  for(var i = 1; i < arguments.length; i++){
7086
6990
  var source = arguments[i];
7087
6991
  for(var key in source){
@@ -7092,9 +6996,9 @@
7092
6996
  }
7093
6997
  return target;
7094
6998
  };
7095
- return _extends$l.apply(this, arguments);
6999
+ return _extends$i.apply(this, arguments);
7096
7000
  }
7097
- function _inherits$k(subClass, superClass) {
7001
+ function _inherits$h(subClass, superClass) {
7098
7002
  if (typeof superClass !== "function" && superClass !== null) {
7099
7003
  throw new TypeError("Super expression must either be null or a function");
7100
7004
  }
@@ -7105,20 +7009,20 @@
7105
7009
  configurable: true
7106
7010
  }
7107
7011
  });
7108
- if (superClass) _set_prototype_of$n(subClass, superClass);
7012
+ if (superClass) _set_prototype_of$k(subClass, superClass);
7109
7013
  }
7110
- function _set_prototype_of$n(o, p) {
7111
- _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7014
+ function _set_prototype_of$k(o, p) {
7015
+ _set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7112
7016
  o.__proto__ = p;
7113
7017
  return o;
7114
7018
  };
7115
- return _set_prototype_of$n(o, p);
7019
+ return _set_prototype_of$k(o, p);
7116
7020
  }
7117
7021
  var Header$1 = /*#__PURE__*/ function(Component) {
7118
- _inherits$k(Header, Component);
7022
+ _inherits$h(Header, Component);
7119
7023
  function Header(options) {
7120
7024
  if (options === void 0) options = {};
7121
- return Component.call(this, _extends$l({}, options, {
7025
+ return Component.call(this, _extends$i({}, options, {
7122
7026
  cType: 'header'
7123
7027
  })) || this;
7124
7028
  }
@@ -7284,8 +7188,8 @@
7284
7188
  };
7285
7189
  }
7286
7190
 
7287
- function _extends$k() {
7288
- _extends$k = Object.assign || function(target) {
7191
+ function _extends$h() {
7192
+ _extends$h = Object.assign || function(target) {
7289
7193
  for(var i = 1; i < arguments.length; i++){
7290
7194
  var source = arguments[i];
7291
7195
  for(var key in source){
@@ -7296,9 +7200,9 @@
7296
7200
  }
7297
7201
  return target;
7298
7202
  };
7299
- return _extends$k.apply(this, arguments);
7203
+ return _extends$h.apply(this, arguments);
7300
7204
  }
7301
- function _inherits$j(subClass, superClass) {
7205
+ function _inherits$g(subClass, superClass) {
7302
7206
  if (typeof superClass !== "function" && superClass !== null) {
7303
7207
  throw new TypeError("Super expression must either be null or a function");
7304
7208
  }
@@ -7309,23 +7213,23 @@
7309
7213
  configurable: true
7310
7214
  }
7311
7215
  });
7312
- if (superClass) _set_prototype_of$m(subClass, superClass);
7216
+ if (superClass) _set_prototype_of$j(subClass, superClass);
7313
7217
  }
7314
- function _set_prototype_of$m(o, p) {
7315
- _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7218
+ function _set_prototype_of$j(o, p) {
7219
+ _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7316
7220
  o.__proto__ = p;
7317
7221
  return o;
7318
7222
  };
7319
- return _set_prototype_of$m(o, p);
7223
+ return _set_prototype_of$j(o, p);
7320
7224
  }
7321
7225
  /**
7322
7226
  * 全局全屏
7323
7227
  * 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
7324
7228
  * @category Control
7325
7229
  */ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
7326
- _inherits$j(GlobalFullscreen, Fullscreen);
7230
+ _inherits$g(GlobalFullscreen, Fullscreen);
7327
7231
  function GlobalFullscreen(options) {
7328
- return Fullscreen.call(this, _extends$k({}, options, {
7232
+ return Fullscreen.call(this, _extends$h({}, options, {
7329
7233
  controlType: 'button',
7330
7234
  classNameSuffix: 'global-fullscreen'
7331
7235
  })) || this;
@@ -7356,8 +7260,8 @@
7356
7260
  return GlobalFullscreen;
7357
7261
  }(Fullscreen);
7358
7262
 
7359
- function _extends$j() {
7360
- _extends$j = Object.assign || function(target) {
7263
+ function _extends$g() {
7264
+ _extends$g = Object.assign || function(target) {
7361
7265
  for(var i = 1; i < arguments.length; i++){
7362
7266
  var source = arguments[i];
7363
7267
  for(var key in source){
@@ -7368,9 +7272,9 @@
7368
7272
  }
7369
7273
  return target;
7370
7274
  };
7371
- return _extends$j.apply(this, arguments);
7275
+ return _extends$g.apply(this, arguments);
7372
7276
  }
7373
- function _inherits$i(subClass, superClass) {
7277
+ function _inherits$f(subClass, superClass) {
7374
7278
  if (typeof superClass !== "function" && superClass !== null) {
7375
7279
  throw new TypeError("Super expression must either be null or a function");
7376
7280
  }
@@ -7381,23 +7285,23 @@
7381
7285
  configurable: true
7382
7286
  }
7383
7287
  });
7384
- if (superClass) _set_prototype_of$l(subClass, superClass);
7288
+ if (superClass) _set_prototype_of$i(subClass, superClass);
7385
7289
  }
7386
- function _set_prototype_of$l(o, p) {
7387
- _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7290
+ function _set_prototype_of$i(o, p) {
7291
+ _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7388
7292
  o.__proto__ = p;
7389
7293
  return o;
7390
7294
  };
7391
- return _set_prototype_of$l(o, p);
7295
+ return _set_prototype_of$i(o, p);
7392
7296
  }
7393
7297
  /**
7394
7298
  * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
7395
7299
  * @category Control
7396
7300
  */ var CapturePicture = /*#__PURE__*/ function(Control) {
7397
- _inherits$i(CapturePicture, Control);
7301
+ _inherits$f(CapturePicture, Control);
7398
7302
  function CapturePicture(options) {
7399
7303
  var _this;
7400
- _this = Control.call(this, _extends$j({}, options, {
7304
+ _this = Control.call(this, _extends$g({}, options, {
7401
7305
  tagName: 'span',
7402
7306
  classNameSuffix: 'capture-picture'
7403
7307
  })) || this, _this._timer = null;
@@ -7455,7 +7359,7 @@
7455
7359
  * Copyright (c) 2026-05-04 Ezviz-OpenBiz
7456
7360
  * Released under the MIT License.
7457
7361
  */
7458
- 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$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}function _set_prototype_of$k(o,p){return _set_prototype_of$k=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$k(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$k(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$9(Ptz,[{key:"isRotate",get:function(){return this._isRotate},set:function(isRotate){this._isRotate=isRotate;}}]),Ptz}(BasePtz);
7362
+ 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$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}function _set_prototype_of$h(o,p){return _set_prototype_of$h=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$h(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$h(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$9(Ptz,[{key:"isRotate",get:function(){return this._isRotate},set:function(isRotate){this._isRotate=isRotate;}}]),Ptz}(BasePtz);
7459
7363
 
7460
7364
  function _defineProperties$4(target, props) {
7461
7365
  for(var i = 0; i < props.length; i++){
@@ -7470,8 +7374,8 @@
7470
7374
  if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
7471
7375
  return Constructor;
7472
7376
  }
7473
- function _extends$i() {
7474
- _extends$i = Object.assign || function(target) {
7377
+ function _extends$f() {
7378
+ _extends$f = Object.assign || function(target) {
7475
7379
  for(var i = 1; i < arguments.length; i++){
7476
7380
  var source = arguments[i];
7477
7381
  for(var key in source){
@@ -7482,9 +7386,9 @@
7482
7386
  }
7483
7387
  return target;
7484
7388
  };
7485
- return _extends$i.apply(this, arguments);
7389
+ return _extends$f.apply(this, arguments);
7486
7390
  }
7487
- function _inherits$h(subClass, superClass) {
7391
+ function _inherits$e(subClass, superClass) {
7488
7392
  if (typeof superClass !== "function" && superClass !== null) {
7489
7393
  throw new TypeError("Super expression must either be null or a function");
7490
7394
  }
@@ -7495,23 +7399,23 @@
7495
7399
  configurable: true
7496
7400
  }
7497
7401
  });
7498
- if (superClass) _set_prototype_of$j(subClass, superClass);
7402
+ if (superClass) _set_prototype_of$g(subClass, superClass);
7499
7403
  }
7500
- function _set_prototype_of$j(o, p) {
7501
- _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7404
+ function _set_prototype_of$g(o, p) {
7405
+ _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7502
7406
  o.__proto__ = p;
7503
7407
  return o;
7504
7408
  };
7505
- return _set_prototype_of$j(o, p);
7409
+ return _set_prototype_of$g(o, p);
7506
7410
  }
7507
7411
  /**
7508
7412
  * 云台控件
7509
7413
  * @category Control
7510
7414
  */ var Ptz = /*#__PURE__*/ function(Control) {
7511
- _inherits$h(Ptz, Control);
7415
+ _inherits$e(Ptz, Control);
7512
7416
  function Ptz(options) {
7513
7417
  var _this;
7514
- _this = Control.call(this, _extends$i({}, options, {
7418
+ _this = Control.call(this, _extends$f({}, options, {
7515
7419
  tagName: 'span',
7516
7420
  controlType: 'button',
7517
7421
  classNameSuffix: 'ptz'
@@ -7554,7 +7458,7 @@
7554
7458
  this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
7555
7459
  this.$panel.appendChild(this.$turntable);
7556
7460
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7557
- this._ptzControl = new Ptz$1(this.$turntable, _extends$i({}, this._options, {
7461
+ this._ptzControl = new Ptz$1(this.$turntable, _extends$f({}, this._options, {
7558
7462
  onSpeedChange: this._onSpeedChange.bind(this),
7559
7463
  onDirection: this._onDirection.bind(this)
7560
7464
  }));
@@ -7563,7 +7467,7 @@
7563
7467
  };
7564
7468
  _proto.renderMobileExtend = function renderMobileExtend($container) {
7565
7469
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7566
- if (!this._ptzControl1) this._ptzControl1 = new MobilePtz($container, _extends$i({}, this._options, {
7470
+ if (!this._ptzControl1) this._ptzControl1 = new MobilePtz($container, _extends$f({}, this._options, {
7567
7471
  onSpeedChange: this._onSpeedChange.bind(this),
7568
7472
  onDirection: this._onDirection.bind(this)
7569
7473
  }));
@@ -7666,8 +7570,8 @@
7666
7570
  if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
7667
7571
  return Constructor;
7668
7572
  }
7669
- function _extends$h() {
7670
- _extends$h = Object.assign || function(target) {
7573
+ function _extends$e() {
7574
+ _extends$e = Object.assign || function(target) {
7671
7575
  for(var i = 1; i < arguments.length; i++){
7672
7576
  var source = arguments[i];
7673
7577
  for(var key in source){
@@ -7678,9 +7582,9 @@
7678
7582
  }
7679
7583
  return target;
7680
7584
  };
7681
- return _extends$h.apply(this, arguments);
7585
+ return _extends$e.apply(this, arguments);
7682
7586
  }
7683
- function _inherits$g(subClass, superClass) {
7587
+ function _inherits$d(subClass, superClass) {
7684
7588
  if (typeof superClass !== "function" && superClass !== null) {
7685
7589
  throw new TypeError("Super expression must either be null or a function");
7686
7590
  }
@@ -7691,14 +7595,14 @@
7691
7595
  configurable: true
7692
7596
  }
7693
7597
  });
7694
- if (superClass) _set_prototype_of$i(subClass, superClass);
7598
+ if (superClass) _set_prototype_of$f(subClass, superClass);
7695
7599
  }
7696
- function _set_prototype_of$i(o, p) {
7697
- _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7600
+ function _set_prototype_of$f(o, p) {
7601
+ _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7698
7602
  o.__proto__ = p;
7699
7603
  return o;
7700
7604
  };
7701
- return _set_prototype_of$i(o, p);
7605
+ return _set_prototype_of$f(o, p);
7702
7606
  }
7703
7607
  var RECORD_DEFAULT_OPTIONS = {
7704
7608
  maxDuration: 3600
@@ -7712,10 +7616,10 @@
7712
7616
  * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
7713
7617
  * @category Control
7714
7618
  */ var Record = /*#__PURE__*/ function(Control) {
7715
- _inherits$g(Record, Control);
7619
+ _inherits$d(Record, Control);
7716
7620
  function Record(options) {
7717
7621
  var _this;
7718
- _this = Control.call(this, _extends$h({}, options, {
7622
+ _this = Control.call(this, _extends$e({}, options, {
7719
7623
  tagName: 'span',
7720
7624
  controlType: 'button',
7721
7625
  classNameSuffix: 'record'
@@ -7856,8 +7760,8 @@
7856
7760
  if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
7857
7761
  return Constructor;
7858
7762
  }
7859
- function _extends$g() {
7860
- _extends$g = Object.assign || function(target) {
7763
+ function _extends$d() {
7764
+ _extends$d = Object.assign || function(target) {
7861
7765
  for(var i = 1; i < arguments.length; i++){
7862
7766
  var source = arguments[i];
7863
7767
  for(var key in source){
@@ -7868,9 +7772,9 @@
7868
7772
  }
7869
7773
  return target;
7870
7774
  };
7871
- return _extends$g.apply(this, arguments);
7775
+ return _extends$d.apply(this, arguments);
7872
7776
  }
7873
- function _inherits$f(subClass, superClass) {
7777
+ function _inherits$c(subClass, superClass) {
7874
7778
  if (typeof superClass !== "function" && superClass !== null) {
7875
7779
  throw new TypeError("Super expression must either be null or a function");
7876
7780
  }
@@ -7881,14 +7785,14 @@
7881
7785
  configurable: true
7882
7786
  }
7883
7787
  });
7884
- if (superClass) _set_prototype_of$h(subClass, superClass);
7788
+ if (superClass) _set_prototype_of$e(subClass, superClass);
7885
7789
  }
7886
- function _set_prototype_of$h(o, p) {
7887
- _set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7790
+ function _set_prototype_of$e(o, p) {
7791
+ _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7888
7792
  o.__proto__ = p;
7889
7793
  return o;
7890
7794
  };
7891
- return _set_prototype_of$h(o, p);
7795
+ return _set_prototype_of$e(o, p);
7892
7796
  }
7893
7797
  function _ts_generator$4(thisArg, body) {
7894
7798
  var f, y, t, _ = {
@@ -7990,10 +7894,10 @@
7990
7894
  *
7991
7895
  * @category Control
7992
7896
  */ var Talk = /*#__PURE__*/ function(Control) {
7993
- _inherits$f(Talk, Control);
7897
+ _inherits$c(Talk, Control);
7994
7898
  function Talk(options) {
7995
7899
  var _this;
7996
- _this = Control.call(this, _extends$g({}, options, {
7900
+ _this = Control.call(this, _extends$d({}, options, {
7997
7901
  tagName: 'span',
7998
7902
  controlType: 'button',
7999
7903
  classNameSuffix: 'talk'
@@ -8126,8 +8030,8 @@
8126
8030
  });
8127
8031
  };
8128
8032
  }
8129
- function _extends$f() {
8130
- _extends$f = Object.assign || function(target) {
8033
+ function _extends$c() {
8034
+ _extends$c = Object.assign || function(target) {
8131
8035
  for(var i = 1; i < arguments.length; i++){
8132
8036
  var source = arguments[i];
8133
8037
  for(var key in source){
@@ -8138,9 +8042,9 @@
8138
8042
  }
8139
8043
  return target;
8140
8044
  };
8141
- return _extends$f.apply(this, arguments);
8045
+ return _extends$c.apply(this, arguments);
8142
8046
  }
8143
- function _inherits$e(subClass, superClass) {
8047
+ function _inherits$b(subClass, superClass) {
8144
8048
  if (typeof superClass !== "function" && superClass !== null) {
8145
8049
  throw new TypeError("Super expression must either be null or a function");
8146
8050
  }
@@ -8151,14 +8055,14 @@
8151
8055
  configurable: true
8152
8056
  }
8153
8057
  });
8154
- if (superClass) _set_prototype_of$g(subClass, superClass);
8058
+ if (superClass) _set_prototype_of$d(subClass, superClass);
8155
8059
  }
8156
- function _set_prototype_of$g(o, p) {
8157
- _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8060
+ function _set_prototype_of$d(o, p) {
8061
+ _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8158
8062
  o.__proto__ = p;
8159
8063
  return o;
8160
8064
  };
8161
- return _set_prototype_of$g(o, p);
8065
+ return _set_prototype_of$d(o, p);
8162
8066
  }
8163
8067
  function _ts_generator$3(thisArg, body) {
8164
8068
  var f, y, t, _ = {
@@ -8258,10 +8162,10 @@
8258
8162
  *
8259
8163
  * @category Control
8260
8164
  */ var Broadcast = /*#__PURE__*/ function(Control) {
8261
- _inherits$e(Broadcast, Control);
8165
+ _inherits$b(Broadcast, Control);
8262
8166
  function Broadcast(options) {
8263
8167
  var _this;
8264
- _this = Control.call(this, _extends$f({}, options, {
8168
+ _this = Control.call(this, _extends$c({}, options, {
8265
8169
  tagName: 'span',
8266
8170
  controlType: 'button',
8267
8171
  classNameSuffix: 'broadcast'
@@ -8356,8 +8260,8 @@
8356
8260
  });
8357
8261
  };
8358
8262
  }
8359
- function _extends$e() {
8360
- _extends$e = Object.assign || function(target) {
8263
+ function _extends$b() {
8264
+ _extends$b = Object.assign || function(target) {
8361
8265
  for(var i = 1; i < arguments.length; i++){
8362
8266
  var source = arguments[i];
8363
8267
  for(var key in source){
@@ -8368,9 +8272,9 @@
8368
8272
  }
8369
8273
  return target;
8370
8274
  };
8371
- return _extends$e.apply(this, arguments);
8275
+ return _extends$b.apply(this, arguments);
8372
8276
  }
8373
- function _inherits$d(subClass, superClass) {
8277
+ function _inherits$a(subClass, superClass) {
8374
8278
  if (typeof superClass !== "function" && superClass !== null) {
8375
8279
  throw new TypeError("Super expression must either be null or a function");
8376
8280
  }
@@ -8381,14 +8285,14 @@
8381
8285
  configurable: true
8382
8286
  }
8383
8287
  });
8384
- if (superClass) _set_prototype_of$f(subClass, superClass);
8288
+ if (superClass) _set_prototype_of$c(subClass, superClass);
8385
8289
  }
8386
- function _set_prototype_of$f(o, p) {
8387
- _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8290
+ function _set_prototype_of$c(o, p) {
8291
+ _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8388
8292
  o.__proto__ = p;
8389
8293
  return o;
8390
8294
  };
8391
- return _set_prototype_of$f(o, p);
8295
+ return _set_prototype_of$c(o, p);
8392
8296
  }
8393
8297
  function _ts_generator$2(thisArg, body) {
8394
8298
  var f, y, t, _ = {
@@ -8488,10 +8392,10 @@
8488
8392
  *
8489
8393
  * @category Control
8490
8394
  */ var AIChat = /*#__PURE__*/ function(Control) {
8491
- _inherits$d(AIChat, Control);
8395
+ _inherits$a(AIChat, Control);
8492
8396
  function AIChat(options) {
8493
8397
  var _this;
8494
- _this = Control.call(this, _extends$e({}, options, {
8398
+ _this = Control.call(this, _extends$b({}, options, {
8495
8399
  tagName: 'span',
8496
8400
  controlType: 'button',
8497
8401
  classNameSuffix: 'aichat'
@@ -8557,340 +8461,6 @@
8557
8461
  return AIChat;
8558
8462
  }(Control);
8559
8463
 
8560
- function _extends$d() {
8561
- _extends$d = Object.assign || function(target) {
8562
- for(var i = 1; i < arguments.length; i++){
8563
- var source = arguments[i];
8564
- for(var key in source){
8565
- if (Object.prototype.hasOwnProperty.call(source, key)) {
8566
- target[key] = source[key];
8567
- }
8568
- }
8569
- }
8570
- return target;
8571
- };
8572
- return _extends$d.apply(this, arguments);
8573
- }
8574
- function _inherits$c(subClass, superClass) {
8575
- if (typeof superClass !== "function" && superClass !== null) {
8576
- throw new TypeError("Super expression must either be null or a function");
8577
- }
8578
- subClass.prototype = Object.create(superClass && superClass.prototype, {
8579
- constructor: {
8580
- value: subClass,
8581
- writable: true,
8582
- configurable: true
8583
- }
8584
- });
8585
- if (superClass) _set_prototype_of$e(subClass, superClass);
8586
- }
8587
- function _set_prototype_of$e(o, p) {
8588
- _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8589
- o.__proto__ = p;
8590
- return o;
8591
- };
8592
- return _set_prototype_of$e(o, p);
8593
- }
8594
- /**
8595
- * 直播按钮控件
8596
- *
8597
- * 点击切换到直播模式
8598
- *
8599
- * @category Control
8600
- */ var Live = /*#__PURE__*/ function(Control) {
8601
- _inherits$c(Live, Control);
8602
- function Live(options) {
8603
- var _this;
8604
- var _this___options_props1;
8605
- _this = Control.call(this, _extends$d({}, options, {
8606
- tagName: 'span',
8607
- controlType: 'button',
8608
- classNameSuffix: 'live'
8609
- })) || this;
8610
- _this._options = options;
8611
- _this._render();
8612
- // 初始化时根据当前播放模式确定激活状态
8613
- _this._syncActiveByUrlInfo((_this___options_props1 = _this.__options.props) == null ? void 0 : _this___options_props1.urlInfo);
8614
- return _this;
8615
- }
8616
- var _proto = Live.prototype;
8617
- /**
8618
- * 根据 urlInfo 同步激活状态
8619
- * 在初始化和播放地址切换后调用
8620
- */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
8621
- var shouldBeActive = !!(urlInfo && urlInfo.type === 'live');
8622
- this.active = shouldBeActive;
8623
- };
8624
- _proto._render = function _render() {
8625
- var _this_locale;
8626
- this.$container.innerHTML = IconComponents.live({
8627
- title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_LIVE) || '直播'
8628
- });
8629
- };
8630
- /**
8631
- * 销毁
8632
- */ _proto.destroy = function destroy() {
8633
- Control.prototype.destroy.call(this);
8634
- };
8635
- /**
8636
- * 点击 Control 会触发
8637
- */ _proto._onControlClick = function _onControlClick(e) {
8638
- var _this__options_onChange, _this__options;
8639
- Control.prototype._onControlClick.call(this, e);
8640
- // 已经是直播模式则不触发
8641
- if (this.active) {
8642
- return;
8643
- }
8644
- this.active = true;
8645
- this.emit(EVENTS.control.liveChange);
8646
- (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options);
8647
- };
8648
- return Live;
8649
- }(Control);
8650
-
8651
- function _extends$c() {
8652
- _extends$c = Object.assign || function(target) {
8653
- for(var i = 1; i < arguments.length; i++){
8654
- var source = arguments[i];
8655
- for(var key in source){
8656
- if (Object.prototype.hasOwnProperty.call(source, key)) {
8657
- target[key] = source[key];
8658
- }
8659
- }
8660
- }
8661
- return target;
8662
- };
8663
- return _extends$c.apply(this, arguments);
8664
- }
8665
- function _inherits$b(subClass, superClass) {
8666
- if (typeof superClass !== "function" && superClass !== null) {
8667
- throw new TypeError("Super expression must either be null or a function");
8668
- }
8669
- subClass.prototype = Object.create(superClass && superClass.prototype, {
8670
- constructor: {
8671
- value: subClass,
8672
- writable: true,
8673
- configurable: true
8674
- }
8675
- });
8676
- if (superClass) _set_prototype_of$d(subClass, superClass);
8677
- }
8678
- function _set_prototype_of$d(o, p) {
8679
- _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8680
- o.__proto__ = p;
8681
- return o;
8682
- };
8683
- return _set_prototype_of$d(o, p);
8684
- }
8685
- /**
8686
- * 回放下拉控件
8687
- *
8688
- * 鼠标移入弹出气泡,展示云存储、云录制、本地回放三个选项
8689
- *
8690
- * @category Control
8691
- */ var RecDropdown = /*#__PURE__*/ function(Control) {
8692
- _inherits$b(RecDropdown, Control);
8693
- function RecDropdown(options) {
8694
- var _this;
8695
- var _options_props, _this___options_props1;
8696
- _this = Control.call(this, _extends$c({}, options, {
8697
- tagName: 'span',
8698
- controlType: 'button',
8699
- classNameSuffix: 'rec-dropdown'
8700
- })) || this;
8701
- _this._options = options;
8702
- // 初始化时根据 urlInfo 确定当前回放类型和激活状态
8703
- _this._recType = options.recType || ((_options_props = options.props) == null ? void 0 : _options_props.recType) || 'cloudRec';
8704
- _this._syncActiveByUrlInfo((_this___options_props1 = _this.__options.props) == null ? void 0 : _this___options_props1.urlInfo);
8705
- _this._render();
8706
- _this._initPicker();
8707
- return _this;
8708
- }
8709
- var _proto = RecDropdown.prototype;
8710
- /**
8711
- * 根据 urlInfo 同步激活状态和回放类型
8712
- * 在初始化和播放地址切换后调用
8713
- */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
8714
- if (urlInfo && urlInfo.type === 'rec') {
8715
- var _urlInfo_searchParams1;
8716
- this.active = true;
8717
- if (urlInfo.recType === 'cloud' && ((_urlInfo_searchParams1 = urlInfo.searchParams) == null ? void 0 : _urlInfo_searchParams1.busType) === '7') {
8718
- this._recType = 'cloudRecord';
8719
- } else if (urlInfo.recType === 'cloud') {
8720
- this._recType = 'cloudRec';
8721
- } else {
8722
- this._recType = 'rec';
8723
- }
8724
- this._activeOption(this._recType);
8725
- } else {
8726
- this.active = false;
8727
- }
8728
- };
8729
- _proto._render = function _render() {
8730
- var _this_locale;
8731
- this.$container.innerHTML = IconComponents.recDropdown({
8732
- title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_REC_DROPDOWN) || '回放'
8733
- });
8734
- };
8735
- _proto._initPicker = function _initPicker() {
8736
- var _this = this;
8737
- this._picker = new Picker(this.$container, {
8738
- getPopupContainer: function() {
8739
- return Utils.isMobile ? _this.__options.rootContainer : _this.$container;
8740
- },
8741
- trigger: Utils.isMobile ? 'click' : 'hover',
8742
- isMobile: Utils.isMobile,
8743
- wrapClassName: "" + PREFIX_CLASS + "-rec-dropdown-picker",
8744
- placement: 'bottom',
8745
- offset: [
8746
- 0,
8747
- 4
8748
- ]
8749
- });
8750
- this._picker.innerHTML(this._getPanelHTML());
8751
- this._activeOption(this._recType);
8752
- this._bindPanelEvents();
8753
- };
8754
- _proto._getPanelHTML = function _getPanelHTML() {
8755
- var _this_locale, _this_locale1, _this_locale2;
8756
- var cloudRecLabel = ((_this_locale = this.locale) == null ? void 0 : _this_locale.REC_DROPDOWN_CLOUD_REC) || '云存储';
8757
- var cloudRecordLabel = ((_this_locale1 = this.locale) == null ? void 0 : _this_locale1.REC_DROPDOWN_CLOUD_RECORD) || '云录制';
8758
- var localRecLabel = ((_this_locale2 = this.locale) == null ? void 0 : _this_locale2.REC_DROPDOWN_LOCAL_REC) || '本地回放';
8759
- 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>";
8760
- };
8761
- _proto._bindPanelEvents = function _bindPanelEvents() {
8762
- var _this = this;
8763
- this._delegation = delegate(this._picker.$body, "." + PREFIX_CLASS + "-rec-dropdown-item", 'click', function(e) {
8764
- e.stopPropagation();
8765
- var type = e.delegateTarget.getAttribute('data-type');
8766
- if (type) {
8767
- var _this__options_onChange, _this__options;
8768
- _this._recType = type;
8769
- _this._activeOption(type);
8770
- // 设置自身为激活状态
8771
- _this.active = true;
8772
- _this.emit(EVENTS.control.recDropdownChange, type);
8773
- (_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, type);
8774
- _this._picker.open = false;
8775
- }
8776
- });
8777
- };
8778
- _proto._activeOption = function _activeOption(type) {
8779
- var _this__picker;
8780
- if ((_this__picker = this._picker) == null ? void 0 : _this__picker.$body) {
8781
- var items = this._picker.$body.querySelectorAll("." + PREFIX_CLASS + "-rec-dropdown-item");
8782
- items.forEach(function(item) {
8783
- item.classList.remove("" + PREFIX_CLASS + "-active");
8784
- });
8785
- var target = this._picker.$body.querySelector("." + PREFIX_CLASS + '-rec-dropdown-item[data-type="' + type + '"]');
8786
- target == null ? void 0 : target.classList.add("" + PREFIX_CLASS + "-active");
8787
- }
8788
- };
8789
- /**
8790
- * 销毁
8791
- */ _proto.destroy = function destroy() {
8792
- var _this__delegation_destroy, _this__delegation;
8793
- (_this__delegation = this._delegation) == null ? void 0 : (_this__delegation_destroy = _this__delegation.destroy) == null ? void 0 : _this__delegation_destroy.call(_this__delegation);
8794
- this._delegation = null;
8795
- if (this._picker) {
8796
- this._picker.destroy();
8797
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8798
- this._picker = null;
8799
- }
8800
- Control.prototype.destroy.call(this);
8801
- };
8802
- /**
8803
- * 点击 Control 会触发(移动端 click 触发 picker)
8804
- */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
8805
- _proto._onControlClick = function _onControlClick(_e) {
8806
- // picker 自行处理 click/hover,这里不额外处理
8807
- };
8808
- return RecDropdown;
8809
- }(Control);
8810
-
8811
- function _extends$b() {
8812
- _extends$b = Object.assign || function(target) {
8813
- for(var i = 1; i < arguments.length; i++){
8814
- var source = arguments[i];
8815
- for(var key in source){
8816
- if (Object.prototype.hasOwnProperty.call(source, key)) {
8817
- target[key] = source[key];
8818
- }
8819
- }
8820
- }
8821
- return target;
8822
- };
8823
- return _extends$b.apply(this, arguments);
8824
- }
8825
- function _inherits$a(subClass, superClass) {
8826
- if (typeof superClass !== "function" && superClass !== null) {
8827
- throw new TypeError("Super expression must either be null or a function");
8828
- }
8829
- subClass.prototype = Object.create(superClass && superClass.prototype, {
8830
- constructor: {
8831
- value: subClass,
8832
- writable: true,
8833
- configurable: true
8834
- }
8835
- });
8836
- if (superClass) _set_prototype_of$c(subClass, superClass);
8837
- }
8838
- function _set_prototype_of$c(o, p) {
8839
- _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8840
- o.__proto__ = p;
8841
- return o;
8842
- };
8843
- return _set_prototype_of$c(o, p);
8844
- }
8845
- /**
8846
- * 告警消息按钮控件
8847
- *
8848
- * 点击弹出告警消息列表弹窗(纯触发按钮,无激活状态)
8849
- *
8850
- * @category Control
8851
- */ var AlarmMessage = /*#__PURE__*/ function(Control) {
8852
- _inherits$a(AlarmMessage, Control);
8853
- function AlarmMessage(options) {
8854
- var _this;
8855
- _this = Control.call(this, _extends$b({}, options, {
8856
- tagName: 'span',
8857
- controlType: 'button',
8858
- classNameSuffix: 'alarm-message'
8859
- })) || this, _this._panelOpen = false;
8860
- _this._options = options;
8861
- _this._render();
8862
- _this.on(EVENTS.alarmMessageChange, function(open) {
8863
- _this._panelOpen = open;
8864
- });
8865
- return _this;
8866
- }
8867
- var _proto = AlarmMessage.prototype;
8868
- _proto._render = function _render() {
8869
- var _this_locale;
8870
- this.$container.innerHTML = IconComponents.alarmMessage({
8871
- title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_ALARM_MESSAGE) || '消息'
8872
- });
8873
- };
8874
- /**
8875
- * 销毁
8876
- */ _proto.destroy = function destroy() {
8877
- if (this._panelOpen) {
8878
- this.emit(EVENTS.control.alarmMessageChange, false);
8879
- }
8880
- Control.prototype.destroy.call(this);
8881
- };
8882
- /**
8883
- * 点击 Control 会触发
8884
- */ _proto._onControlClick = function _onControlClick(e) {
8885
- var _this__options_onChange, _this__options;
8886
- Control.prototype._onControlClick.call(this, e);
8887
- this._panelOpen = !this._panelOpen;
8888
- this.emit(EVENTS.control.alarmMessageChange, this._panelOpen);
8889
- (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, this._panelOpen);
8890
- };
8891
- return AlarmMessage;
8892
- }(Control);
8893
-
8894
8464
  function _defineProperties$1(target, props) {
8895
8465
  for(var i = 0; i < props.length; i++){
8896
8466
  var descriptor = props[i];
@@ -10439,9 +10009,6 @@
10439
10009
  talk: Talk,
10440
10010
  broadcast: Broadcast,
10441
10011
  aiChat: AIChat,
10442
- live: Live,
10443
- recDropdown: RecDropdown,
10444
- alarmMessage: AlarmMessage,
10445
10012
  zoom: Zoom$1,
10446
10013
  definition: Definition,
10447
10014
  fullscreen: Fullscreen,
@@ -10975,10 +10542,7 @@
10975
10542
  // 需要权限的控件
10976
10543
  var AUTH_KEY = [
10977
10544
  'ptz',
10978
- 'aiChat',
10979
- 'live',
10980
- 'recDropdown',
10981
- 'alarmMessage'
10545
+ 'aiChat'
10982
10546
  ];
10983
10547
  /**
10984
10548
  * 渲染控件
@@ -11058,7 +10622,7 @@
11058
10622
  }
11059
10623
  function _renderTheme(theme, data) {
11060
10624
  return _async_to_generator$1(function() {
11061
- var _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_urlInfo, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions, themeData, filterThemeData, props, _$_filterLeftRightControls, leftBtns, rightBtns, _theme_controls, _theme_controls1, _$_filterLeftRightControls1, leftBtns1, rightBtns1, _filterThemeData_footer_btnList, list, _needTimeLine, hasPtz, _theme_options_mobileExtendOptions1, _theme_options_mobileExtendOptions2, _theme_controls2, _theme_options_mobileExtendOptions3, _theme_options_mobileExtendOptions_controls1, _theme_options_mobileExtendOptions4, _filterThemeData_header1, _filterThemeData_footer1, _filterThemeData_footer_btnList1, _theme_options;
10625
+ var _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions, themeData, filterThemeData, props, _$_filterLeftRightControls, leftBtns, rightBtns, _theme_controls, _theme_controls1, _$_filterLeftRightControls1, leftBtns1, rightBtns1, _filterThemeData_footer_btnList, list, _needTimeLine, hasPtz, _theme_options_mobileExtendOptions1, _theme_options_mobileExtendOptions2, _theme_options_mobileExtendOptions3, _theme_options_mobileExtendOptions_controls1, _theme_options_mobileExtendOptions4, _filterThemeData_header1, _filterThemeData_footer1, _filterThemeData_footer_btnList1;
11062
10626
  return _ts_generator$1(this, function(_state) {
11063
10627
  switch(_state.label){
11064
10628
  case 0:
@@ -11199,8 +10763,9 @@
11199
10763
  list = [].concat(((_filterThemeData_header = filterThemeData.header) == null ? void 0 : _filterThemeData_header.btnList) || [], (_filterThemeData_footer_btnList = (_filterThemeData_footer = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer.btnList) != null ? _filterThemeData_footer_btnList : []);
11200
10764
  // FIXME: 这个逻辑实际上是有问题的
11201
10765
  _needTimeLine = list.some(function(item) {
11202
- return REC_GROUP.includes(item.iconId) || item.iconId === 'recDropdown';
11203
- }) && ((_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.type) === 'rec';
10766
+ return REC_GROUP.includes(item.iconId);
10767
+ });
10768
+ theme.$container.classList.remove("" + PREFIX_CLASS + "-has-time-line");
11204
10769
  // PC 单独渲染timeLine
11205
10770
  if (!Utils.isMobile && !(theme.options.timeLineOptions === null || theme.options.disabledTimeLine) && _needTimeLine) {
11206
10771
  theme._recFooter = new RecFooter(theme.$container, {
@@ -11210,6 +10775,7 @@
11210
10775
  _renderTimeLine(theme, theme._recFooter.$timeLineContainer, props);
11211
10776
  if (theme._footer) {
11212
10777
  theme._footer.$container.style.cssText += "bottom: 36px;";
10778
+ theme.$container.classList.add("" + PREFIX_CLASS + "-has-time-line");
11213
10779
  }
11214
10780
  if (theme.options.dateOptions !== null) {
11215
10781
  _renderDatePicker(theme, theme._recFooter.$datePickerContainer, props);
@@ -11231,23 +10797,6 @@
11231
10797
  if (REC_GROUP.includes(item.iconId)) _renderRecType(theme, (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight, item.iconId, props);
11232
10798
  });
11233
10799
  }
11234
- // 移动端:在 rec 控件旁渲染 alarmMessage 按钮
11235
- if (theme.options.alarmMessageOptions !== null && !((_theme_controls2 = theme.controls) == null ? void 0 : _theme_controls2['alarmMessageControl'])) {
11236
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
11237
- theme.controls['alarmMessageControl'] = new Controls['alarmMessage'](_extends$1({
11238
- rootContainer: theme.$container,
11239
- getPopupContainer: function() {
11240
- var _theme__mobileExtend;
11241
- return (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight;
11242
- },
11243
- language: theme.options.language || 'zh',
11244
- locales: theme.i18n.translations,
11245
- sdkType: theme.options.sdkType,
11246
- urlInfo: theme.urlInfo
11247
- }, ((_theme_options = theme.options) == null ? void 0 : _theme_options.alarmMessageOptions) || {}, {
11248
- props: props
11249
- }));
11250
- }
11251
10800
  if ((theme.options.timeLineOptions !== null || !theme.options.disabledTimeLine) && ((_theme_options_mobileExtendOptions3 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions3.controls.includes('timeLine')) && _needTimeLine) {
11252
10801
  _renderTimeLine(theme, theme._mobileExtend.$content, props);
11253
10802
  }
@@ -11258,10 +10807,6 @@
11258
10807
  }
11259
10808
  theme.emit(EVENTS.control.mountedControls);
11260
10809
  if (!theme.playing) theme._disabled(true);
11261
- // 同步 loading 状态(修复:_loadingControl 创建前设置的 loading=true 不生效的问题)
11262
- if (theme._loading && theme._loadingControl) {
11263
- theme._loadingControl.show();
11264
- }
11265
10810
  _controlEventemitter(theme);
11266
10811
  return [
11267
10812
  2
@@ -12068,8 +11613,13 @@
12068
11613
  // 这里不要使用 $containerWarp.getBoundingClientRect() 获取宽和高 因为会出现小数导致两次(设置后的值和设置后再次获取的值)的宽高不一致 (因为缩放后取整设置,再次获取还有可能是带小数的然后取整 对比两次不一致,一般在屏幕缩放百分比变化和浏览器页面缩放时出现),致使一直触发 resize 事件
12069
11614
  var width = Math.floor(_this.$container.clientWidth);
12070
11615
  var height = Math.floor(_this.$container.clientHeight);
12071
- if (width > 200 && width <= 375) {
11616
+ if (width > 280 && width <= 375) {
12072
11617
  _this.$container.classList.add("" + PREFIX_CLASS + "-medium-width");
11618
+ _this.$container.classList.remove("" + PREFIX_CLASS + "-small-width");
11619
+ _this.$container.classList.remove("" + PREFIX_CLASS + "-mini-width");
11620
+ } else if (width > 200 && width <= 280) {
11621
+ _this.$container.classList.add("" + PREFIX_CLASS + "-small-width");
11622
+ _this.$container.classList.remove("" + PREFIX_CLASS + "-medium-width");
12073
11623
  _this.$container.classList.remove("" + PREFIX_CLASS + "-mini-width");
12074
11624
  } else {
12075
11625
  if (width <= 200) {
@@ -12077,10 +11627,16 @@
12077
11627
  } else {
12078
11628
  _this.$container.classList.remove("" + PREFIX_CLASS + "-mini-width");
12079
11629
  }
11630
+ _this.$container.classList.remove("" + PREFIX_CLASS + "-small-width");
12080
11631
  _this.$container.classList.remove("" + PREFIX_CLASS + "-medium-width");
12081
11632
  }
12082
- if (height > 200 && height <= 375) {
11633
+ if (height > 280 && height <= 375) {
12083
11634
  _this.$container.classList.add("" + PREFIX_CLASS + "-medium-height");
11635
+ _this.$container.classList.remove("" + PREFIX_CLASS + "-small-height");
11636
+ _this.$container.classList.remove("" + PREFIX_CLASS + "-mini-height");
11637
+ } else if (height > 200 && height <= 280) {
11638
+ _this.$container.classList.add("" + PREFIX_CLASS + "-small-height");
11639
+ _this.$container.classList.remove("" + PREFIX_CLASS + "-medium-height");
12084
11640
  _this.$container.classList.remove("" + PREFIX_CLASS + "-mini-height");
12085
11641
  } else {
12086
11642
  if (height <= 200) {
@@ -12088,6 +11644,7 @@
12088
11644
  } else {
12089
11645
  _this.$container.classList.remove("" + PREFIX_CLASS + "-mini-height");
12090
11646
  }
11647
+ _this.$container.classList.remove("" + PREFIX_CLASS + "-small-height");
12091
11648
  _this.$container.classList.remove("" + PREFIX_CLASS + "-medium-height");
12092
11649
  }
12093
11650
  //
@@ -12857,7 +12414,7 @@
12857
12414
  zh: zh,
12858
12415
  en: en
12859
12416
  };
12860
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.1-beta.3';
12417
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.2-beta.1';
12861
12418
 
12862
12419
  // 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
12863
12420