@ezuikit/player-theme 2.1.4-beta.3 → 3.0.0-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 v2.1.4-beta.3
3
- * Copyright (c) 2026-04-17 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v3.0.0-beta.1
3
+ * Copyright (c) 2026-05-04 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  (function (global, factory) {
@@ -9,6 +9,8 @@
9
9
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Theme = factory());
10
10
  })(this, (function () { 'use strict';
11
11
 
12
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
13
+
12
14
  function getDefaultExportFromCjs (x) {
13
15
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
14
16
  }
@@ -403,18 +405,11 @@
403
405
  * | rec | cloudRec | cloudRecord |
404
406
  * |:---------------------:|:------------:|:---------------:|
405
407
  * | 本地回放(SDK存储回放) | 云存储回放 | 云录制回放 |
406
- */ // export const REC_GROUP: string[] = ['rec', 'cloudRec', 'cloudRecord'] as const;
407
- var REC_GROUP = function(sdkType) {
408
- if (sdkType === void 0) sdkType = 'base';
409
- return sdkType === 'base' ? [
410
- 'rec',
411
- 'cloudRec',
412
- 'cloudRecord'
413
- ] : [
414
- 'rec',
415
- 'cloudRec'
416
- ];
417
- };
408
+ */ var REC_GROUP = [
409
+ 'rec',
410
+ 'cloudRec',
411
+ 'cloudRecord'
412
+ ];
418
413
  /**
419
414
  * 设备信息
420
415
  *
@@ -591,7 +586,7 @@
591
586
  Object.defineProperty(target, descriptor.key, descriptor);
592
587
  }
593
588
  }
594
- function _create_class$9(Constructor, protoProps, staticProps) {
589
+ function _create_class$f(Constructor, protoProps, staticProps) {
595
590
  if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
596
591
  return Constructor;
597
592
  }
@@ -606,14 +601,14 @@
606
601
  configurable: true
607
602
  }
608
603
  });
609
- if (superClass) _set_prototype_of$t(subClass, superClass);
604
+ if (superClass) _set_prototype_of$w(subClass, superClass);
610
605
  }
611
- function _set_prototype_of$t(o, p) {
612
- _set_prototype_of$t = 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) {
613
608
  o.__proto__ = p;
614
609
  return o;
615
610
  };
616
- return _set_prototype_of$t(o, p);
611
+ return _set_prototype_of$w(o, p);
617
612
  }
618
613
  /**
619
614
  * 控件基类
@@ -769,7 +764,7 @@
769
764
  // 这是一个空函数, 子类可以实现重新改方法
770
765
  this.__options.onClick == null ? void 0 : this.__options.onClick.call(this.__options, e);
771
766
  };
772
- _create_class$9(Control, [
767
+ _create_class$f(Control, [
773
768
  {
774
769
  key: "active",
775
770
  get: /**
@@ -802,8 +797,8 @@
802
797
  return Control;
803
798
  }(EventEmitter);
804
799
 
805
- function _extends$s() {
806
- _extends$s = Object.assign || function(target) {
800
+ function _extends$u() {
801
+ _extends$u = Object.assign || function(target) {
807
802
  for(var i = 1; i < arguments.length; i++){
808
803
  var source = arguments[i];
809
804
  for(var key in source){
@@ -814,7 +809,7 @@
814
809
  }
815
810
  return target;
816
811
  };
817
- return _extends$s.apply(this, arguments);
812
+ return _extends$u.apply(this, arguments);
818
813
  }
819
814
  function _inherits$s(subClass, superClass) {
820
815
  if (typeof superClass !== "function" && superClass !== null) {
@@ -827,14 +822,14 @@
827
822
  configurable: true
828
823
  }
829
824
  });
830
- if (superClass) _set_prototype_of$s(subClass, superClass);
825
+ if (superClass) _set_prototype_of$v(subClass, superClass);
831
826
  }
832
- function _set_prototype_of$s(o, p) {
833
- _set_prototype_of$s = 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) {
834
829
  o.__proto__ = p;
835
830
  return o;
836
831
  };
837
- return _set_prototype_of$s(o, p);
832
+ return _set_prototype_of$v(o, p);
838
833
  }
839
834
  var LOADING_DEFAULT_OPTIONS = {};
840
835
  /**
@@ -845,7 +840,7 @@
845
840
  function Loading(options) {
846
841
  if (options === void 0) options = {};
847
842
  var _this;
848
- _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$s({}, options, {
843
+ _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$u({}, options, {
849
844
  tagName: 'div',
850
845
  controlType: 'block',
851
846
  classNameSuffix: 'loading'
@@ -883,8 +878,8 @@
883
878
  return Loading;
884
879
  }(Control);
885
880
 
886
- function _extends$r() {
887
- _extends$r = Object.assign || function(target) {
881
+ function _extends$t() {
882
+ _extends$t = Object.assign || function(target) {
888
883
  for(var i = 1; i < arguments.length; i++){
889
884
  var source = arguments[i];
890
885
  for(var key in source){
@@ -895,7 +890,7 @@
895
890
  }
896
891
  return target;
897
892
  };
898
- return _extends$r.apply(this, arguments);
893
+ return _extends$t.apply(this, arguments);
899
894
  }
900
895
  function _inherits$r(subClass, superClass) {
901
896
  if (typeof superClass !== "function" && superClass !== null) {
@@ -908,14 +903,14 @@
908
903
  configurable: true
909
904
  }
910
905
  });
911
- if (superClass) _set_prototype_of$r(subClass, superClass);
906
+ if (superClass) _set_prototype_of$u(subClass, superClass);
912
907
  }
913
- function _set_prototype_of$r(o, p) {
914
- _set_prototype_of$r = 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) {
915
910
  o.__proto__ = p;
916
911
  return o;
917
912
  };
918
- return _set_prototype_of$r(o, p);
913
+ return _set_prototype_of$u(o, p);
919
914
  }
920
915
  // 不放在服务器上 是因为有可能http加载失败
921
916
  // prettier-ignore
@@ -931,7 +926,7 @@
931
926
  function Poster(options) {
932
927
  if (options === void 0) options = {};
933
928
  var _this;
934
- _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$r({}, options, {
929
+ _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$t({}, options, {
935
930
  tagName: 'div',
936
931
  controlType: 'block',
937
932
  classNameSuffix: 'poster'
@@ -1198,8 +1193,8 @@
1198
1193
  }
1199
1194
  };
1200
1195
 
1201
- function _extends$q() {
1202
- _extends$q = Object.assign || function(target) {
1196
+ function _extends$s() {
1197
+ _extends$s = Object.assign || function(target) {
1203
1198
  for(var i = 1; i < arguments.length; i++){
1204
1199
  var source = arguments[i];
1205
1200
  for(var key in source){
@@ -1210,7 +1205,7 @@
1210
1205
  }
1211
1206
  return target;
1212
1207
  };
1213
- return _extends$q.apply(this, arguments);
1208
+ return _extends$s.apply(this, arguments);
1214
1209
  }
1215
1210
  function _inherits$q(subClass, superClass) {
1216
1211
  if (typeof superClass !== "function" && superClass !== null) {
@@ -1223,14 +1218,14 @@
1223
1218
  configurable: true
1224
1219
  }
1225
1220
  });
1226
- if (superClass) _set_prototype_of$q(subClass, superClass);
1221
+ if (superClass) _set_prototype_of$t(subClass, superClass);
1227
1222
  }
1228
- function _set_prototype_of$q(o, p) {
1229
- _set_prototype_of$q = 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) {
1230
1225
  o.__proto__ = p;
1231
1226
  return o;
1232
1227
  };
1233
- return _set_prototype_of$q(o, p);
1228
+ return _set_prototype_of$t(o, p);
1234
1229
  }
1235
1230
  var MESSAGE_DEFAULT_OPTIONS = {};
1236
1231
  /**
@@ -1241,7 +1236,7 @@
1241
1236
  function Message(options) {
1242
1237
  if (options === void 0) options = {};
1243
1238
  var _this;
1244
- _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$q({}, options, {
1239
+ _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$s({}, options, {
1245
1240
  tagName: 'div',
1246
1241
  controlType: 'block'
1247
1242
  }))) || this;
@@ -1390,12 +1385,12 @@
1390
1385
  Object.defineProperty(target, descriptor.key, descriptor);
1391
1386
  }
1392
1387
  }
1393
- function _create_class$8(Constructor, protoProps, staticProps) {
1388
+ function _create_class$e(Constructor, protoProps, staticProps) {
1394
1389
  if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
1395
1390
  return Constructor;
1396
1391
  }
1397
- function _extends$p() {
1398
- _extends$p = Object.assign || function(target) {
1392
+ function _extends$r() {
1393
+ _extends$r = Object.assign || function(target) {
1399
1394
  for(var i = 1; i < arguments.length; i++){
1400
1395
  var source = arguments[i];
1401
1396
  for(var key in source){
@@ -1406,7 +1401,7 @@
1406
1401
  }
1407
1402
  return target;
1408
1403
  };
1409
- return _extends$p.apply(this, arguments);
1404
+ return _extends$r.apply(this, arguments);
1410
1405
  }
1411
1406
  function _inherits$p(subClass, superClass) {
1412
1407
  if (typeof superClass !== "function" && superClass !== null) {
@@ -1419,14 +1414,14 @@
1419
1414
  configurable: true
1420
1415
  }
1421
1416
  });
1422
- if (superClass) _set_prototype_of$p(subClass, superClass);
1417
+ if (superClass) _set_prototype_of$s(subClass, superClass);
1423
1418
  }
1424
- function _set_prototype_of$p(o, p) {
1425
- _set_prototype_of$p = 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) {
1426
1421
  o.__proto__ = p;
1427
1422
  return o;
1428
1423
  };
1429
- return _set_prototype_of$p(o, p);
1424
+ return _set_prototype_of$s(o, p);
1430
1425
  }
1431
1426
  /**
1432
1427
  * 播放/暂停控件
@@ -1435,7 +1430,7 @@
1435
1430
  _inherits$p(Play, Control);
1436
1431
  function Play(options) {
1437
1432
  var _this;
1438
- _this = Control.call(this, _extends$p({}, options, {
1433
+ _this = Control.call(this, _extends$r({}, options, {
1439
1434
  tagName: 'span',
1440
1435
  controlType: 'button',
1441
1436
  classNameSuffix: 'play'
@@ -1473,7 +1468,7 @@
1473
1468
  });
1474
1469
  }
1475
1470
  };
1476
- _create_class$8(Play, [
1471
+ _create_class$e(Play, [
1477
1472
  {
1478
1473
  key: "playing",
1479
1474
  get: /**
@@ -1489,19 +1484,19 @@
1489
1484
  /**
1490
1485
  * picker component for js framework, support mobile and pc
1491
1486
  *
1492
- * @skax/picker v1.1.7
1493
- * Copyright (c) 2025-12-08 ShineShao <xiaoshaoqq@gmail.com>
1487
+ * @skax/picker v1.1.8
1488
+ * Copyright (c) 2025-12-12 ShineShao <xiaoshaoqq@gmail.com>
1494
1489
  *
1495
1490
  * This source code is licensed under the MIT license found in the
1496
1491
  * LICENSE file in the root directory of this source tree.
1497
1492
  */
1498
1493
 
1499
- var dist$a;
1500
- var hasRequiredDist$a;
1494
+ var dist$5;
1495
+ var hasRequiredDist$5;
1501
1496
 
1502
- function requireDist$a () {
1503
- if (hasRequiredDist$a) return dist$a;
1504
- hasRequiredDist$a = 1;
1497
+ function requireDist$5 () {
1498
+ if (hasRequiredDist$5) return dist$5;
1499
+ hasRequiredDist$5 = 1;
1505
1500
 
1506
1501
  function _array_like_to_array(arr, len) {
1507
1502
  if (len == null || len > arr.length) len = arr.length;
@@ -2076,14 +2071,14 @@
2076
2071
  * Picker.VERSION; // 输出版本号
2077
2072
  * ```
2078
2073
  */
2079
- Picker.VERSION = '1.1.7';
2074
+ Picker.VERSION = '1.1.8';
2080
2075
 
2081
- dist$a = Picker;
2082
- return dist$a;
2076
+ dist$5 = Picker;
2077
+ return dist$5;
2083
2078
  }
2084
2079
 
2085
- var distExports$7 = requireDist$a();
2086
- var Picker = /*@__PURE__*/getDefaultExportFromCjs(distExports$7);
2080
+ var distExports$5 = requireDist$5();
2081
+ var Picker = /*@__PURE__*/getDefaultExportFromCjs(distExports$5);
2087
2082
 
2088
2083
  var delegate$2 = {exports: {}};
2089
2084
 
@@ -2368,7 +2363,7 @@
2368
2363
  var cjsExports = requireCjs();
2369
2364
  var deepmerge = /*@__PURE__*/getDefaultExportFromCjs(cjsExports);
2370
2365
 
2371
- var dist$9 = {};
2366
+ var dist$4 = {};
2372
2367
 
2373
2368
  /*
2374
2369
  * @ezuikit/utils-tools v2.0.2
@@ -2377,16 +2372,16 @@
2377
2372
  * Released under the MIT License.
2378
2373
  */
2379
2374
 
2380
- var hasRequiredDist$9;
2375
+ var hasRequiredDist$4;
2381
2376
 
2382
- function requireDist$9 () {
2383
- if (hasRequiredDist$9) return dist$9;
2384
- hasRequiredDist$9 = 1;
2385
- var getQuery=function(url){var query=url.split("?")[1],obj={};if(query)for(var vars=query.split("&"),i=0;i<vars.length;i++){var pair=vars[i].split("=");obj[pair[0]]=decodeURIComponent(pair[1]);}return obj};function parseEzopenUrl(url){var obj={};if(/^ezopen:\/\//.test(url)){if(url.includes("@")){var endIndex=url.indexOf("@"),startIndex=url.indexOf("//");obj.validateCode=url.substring(startIndex+2,endIndex),url=url.replace(obj.validateCode+"@","");}obj.protocol=url.split("//")[0],obj.search=url.split("?")[1]?"?"+url.split("?")[1]:"",obj.hostname=url.split("/")[2],obj.origin=obj.protocol+"//"+obj.hostname,obj.pathname=url.split("?")[0].replace(obj.origin,""),obj.href=url;var pathnames=obj.pathname.split("/"),lastPath=pathnames[2].split(".");return obj.deviceSerial=pathnames[1],obj.channelNo=lastPath[0],obj.type=lastPath[lastPath.length-1],"live"===obj.type&&(obj.definition=lastPath.length>2?lastPath[1]:"sd"),"rec"===obj.type&&pathnames[2]&&(obj.recType=pathnames[2].includes(".cloud.")?"cloud":""),obj.searchParams=getQuery(url),obj}return {}}var codec={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right}function _create_for_of_iterator_helper_loose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return (it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(o,minLen):void 0}}(o))||allowArrayLike){it&&(o=it);var i=0;return function(){return i>=o.length?{done:true}:{done:false,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var DateTime=function(){function DateTime(){}return DateTime.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},DateTime.format=function(input,format){var date;if(_instanceof(input,Date))date=input;else {if("number"!=typeof input&&"string"!=typeof input)throw new Error("Invalid date input");date=DateTime.toDate(input+"");}for(var _step,result=format,_iterator=_create_for_of_iterator_helper_loose([[/(yyyy|YYYY)/g,function(){return DateTime.fillZero(date.getFullYear(),4)}],[/(yy|YY)/g,function(){return DateTime.fillZero(date.getFullYear()%100,2)}],[/(MM)/g,function(){return DateTime.fillZero(date.getMonth()+1,2)}],[/(M)/g,function(){return (date.getMonth()+1).toString()}],[/(dd|DD)/g,function(){return DateTime.fillZero(date.getDate(),2)}],[/(d|D)/g,function(){return date.getDate().toString()}],[/(HH|hh)/g,function(){return DateTime.fillZero(date.getHours(),2)}],[/(H|h)/g,function(){return date.getHours().toString()}],[/(mm)/g,function(){return DateTime.fillZero(date.getMinutes(),2)}],[/(m)/g,function(){return date.getMinutes().toString()}],[/(ss|SS)/g,function(){return DateTime.fillZero(date.getSeconds(),2)}],[/(s|S)/g,function(){return date.getSeconds().toString()}],[/(fff)/g,function(){return DateTime.fillZero(date.getMilliseconds(),3)}]]);!(_step=_iterator()).done;){var _step_value=_step.value,regexp=_step_value[0],fn=_step_value[1];result=result.replace(regexp,fn);}return result},DateTime.toDate=function(str){if(_instanceof(str,Date))return str;str=(str+"").trim().replace(/\/|\./gi,"-"),/^\d{4}$/.test(str)&&(str+="-01"),/^\d{4}-\d{2}$/.test(str)&&(str+="-01");try{return /^\d{4}-\d{2}-\d{2}$/.test(str)?new Date(+str.slice(0,4),+str.slice(5,7)-1,+str.slice(8,10),0,0,0):/^\d{8}$/.test(str)?(str+="",new Date(+str.slice(0,4),+str.slice(4,6)-1,+str.slice(6,8),0,0,0)):/^\d{14}$/.test(str)?(str+="",new Date(+str.slice(0,4),+str.slice(4,6)-1,+str.slice(6,8),+str.slice(8,10),+str.slice(10,12),+str.slice(12,14))):/^\d{13}$/.test(str)?new Date(Number(str)):/^\d{10}$/.test(str)?new Date(1e3*Number(str)):new Date(str)}catch(error){throw new Error("Invalid date string")}},DateTime.diff=function(date1,date2,type){ void 0===type&&(type="second");var d1=DateTime.toDate(date1),d2=DateTime.toDate(date2);return "second"===type?Math.floor((d1.getTime()-d2.getTime())/1e3):"minute"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60):"hour"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60):"day"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60/24):Math.abs(d1.getTime()-d2.getTime())},DateTime}();dist$9.DateTime=DateTime,dist$9.addVc=function(url,codecs){ void 0===codecs&&(codecs=["h264"]);var vc=(codecs||["h264"]).reduce(function(acc,key){return key=key.toLowerCase(),acc+(codec[key]||0)},0),host=url.split("?")[0],query=url.split("?")[1];return query=(query||"").split("&").filter(function(item){return !/^vc=\d?/.test(item)}).join("&"),host+"?"+(query+=(query?"&":"")+"vc="+vc)},dist$9.getQuery=getQuery,dist$9.getStaticPath=function(path,base){ void 0===base&&(base="");var protocolReg=/^(https?:\/\/|^\/\/)/;if(""===path||void 0===path)return "";if(protocolReg.test(path))return path;path=path.replace(/\/+/g,"/"),base=protocolReg.test(base||"")?base:window.location.href;try{return new URL(path,base).href}catch(error){return path}},dist$9.isHttp=function(url){return /^http[s]?:\/\//.test(url)},dist$9.isMobile=function(agent){var _navigator,_navigator1,_navigator2,_window;return /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent)||/Macintosh/i.test(agent||(null==(_navigator1=navigator)?void 0:_navigator1.userAgent))&&(null==(_navigator2=navigator)?void 0:_navigator2.maxTouchPoints)>1||!!(null==(_window=window)?void 0:_window.__IS_MOBILE_SIMULATOR__)},dist$9.isRealMobile=function(agent){var _navigator,ua=(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent).toLowerCase();if(/ipad|tablet|playbook|silk|android(?!.*mobile)/i.test(ua))return false;var hasTouch="ontouchstart"in window||navigator.maxTouchPoints>0;return /android|webos|iphone|ipod|blackberry|iemobile|opera mini/i.test(ua)&&hasTouch},dist$9.parseEzopenUrl=parseEzopenUrl,dist$9.pick=function(obj,keys){return Object.entries(obj).reduce(function(acc,param){var key=param[0],value=param[1];return keys.includes(key)&&(acc[key]=value),acc},{})},dist$9.switchEzopenUrl=function(url,options){var _ref=null!=options?options:{},type=_ref.type,recType=_ref.recType,search=_ref.search,definition=_ref.definition,channelNo=_ref.channelNo,deviceSerial=_ref.deviceSerial,validateCode=_ref.validateCode,obj=parseEzopenUrl(url);if(search){var ns=Object.assign({},obj.searchParams,getQuery("?"+search.replace("?","")));search=Object.entries(ns).reduce(function(acc,param){var key=param[0],value=param[1];return ""===value?acc:acc+=key+"="+encodeURIComponent(value)+"&"},"?").replace(/&$/,"");}else search=obj.search;return type=type||obj.type,recType=null!=recType?recType:obj.recType,definition=null!=definition?definition:obj.definition,channelNo=channelNo||obj.channelNo,deviceSerial=deviceSerial||obj.deviceSerial,validateCode=null!=validateCode?validateCode:obj.validateCode,obj.protocol+"//"+(validateCode?validateCode+"@":"")+obj.hostname+"/"+deviceSerial+"/"+channelNo+("rec"===type&&recType?"."+recType:"")+("live"===type&&"hd"===definition?"."+definition:"")+"."+type+search};
2386
- return dist$9;
2377
+ function requireDist$4 () {
2378
+ if (hasRequiredDist$4) return dist$4;
2379
+ hasRequiredDist$4 = 1;
2380
+ var getQuery=function(url){var query=url.split("?")[1],obj={};if(query)for(var vars=query.split("&"),i=0;i<vars.length;i++){var pair=vars[i].split("=");obj[pair[0]]=decodeURIComponent(pair[1]);}return obj};function parseEzopenUrl(url){var obj={};if(/^ezopen:\/\//.test(url)){if(url.includes("@")){var endIndex=url.indexOf("@"),startIndex=url.indexOf("//");obj.validateCode=url.substring(startIndex+2,endIndex),url=url.replace(obj.validateCode+"@","");}obj.protocol=url.split("//")[0],obj.search=url.split("?")[1]?"?"+url.split("?")[1]:"",obj.hostname=url.split("/")[2],obj.origin=obj.protocol+"//"+obj.hostname,obj.pathname=url.split("?")[0].replace(obj.origin,""),obj.href=url;var pathnames=obj.pathname.split("/"),lastPath=pathnames[2].split(".");return obj.deviceSerial=pathnames[1],obj.channelNo=lastPath[0],obj.type=lastPath[lastPath.length-1],"live"===obj.type&&(obj.definition=lastPath.length>2?lastPath[1]:"sd"),"rec"===obj.type&&pathnames[2]&&(obj.recType=pathnames[2].includes(".cloud.")?"cloud":""),obj.searchParams=getQuery(url),obj}return {}}var codec={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right}function _create_for_of_iterator_helper_loose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return (it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(o,minLen):void 0}}(o))||allowArrayLike){it&&(o=it);var i=0;return function(){return i>=o.length?{done:true}:{done:false,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var DateTime=function(){function DateTime(){}return DateTime.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},DateTime.format=function(input,format){var date;if(_instanceof(input,Date))date=input;else {if("number"!=typeof input&&"string"!=typeof input)throw new Error("Invalid date input");date=DateTime.toDate(input+"");}for(var _step,result=format,_iterator=_create_for_of_iterator_helper_loose([[/(yyyy|YYYY)/g,function(){return DateTime.fillZero(date.getFullYear(),4)}],[/(yy|YY)/g,function(){return DateTime.fillZero(date.getFullYear()%100,2)}],[/(MM)/g,function(){return DateTime.fillZero(date.getMonth()+1,2)}],[/(M)/g,function(){return (date.getMonth()+1).toString()}],[/(dd|DD)/g,function(){return DateTime.fillZero(date.getDate(),2)}],[/(d|D)/g,function(){return date.getDate().toString()}],[/(HH|hh)/g,function(){return DateTime.fillZero(date.getHours(),2)}],[/(H|h)/g,function(){return date.getHours().toString()}],[/(mm)/g,function(){return DateTime.fillZero(date.getMinutes(),2)}],[/(m)/g,function(){return date.getMinutes().toString()}],[/(ss|SS)/g,function(){return DateTime.fillZero(date.getSeconds(),2)}],[/(s|S)/g,function(){return date.getSeconds().toString()}],[/(fff)/g,function(){return DateTime.fillZero(date.getMilliseconds(),3)}]]);!(_step=_iterator()).done;){var _step_value=_step.value,regexp=_step_value[0],fn=_step_value[1];result=result.replace(regexp,fn);}return result},DateTime.toDate=function(str){if(_instanceof(str,Date))return str;str=(str+"").trim().replace(/\/|\./gi,"-"),/^\d{4}$/.test(str)&&(str+="-01"),/^\d{4}-\d{2}$/.test(str)&&(str+="-01");try{return /^\d{4}-\d{2}-\d{2}$/.test(str)?new Date(+str.slice(0,4),+str.slice(5,7)-1,+str.slice(8,10),0,0,0):/^\d{8}$/.test(str)?(str+="",new Date(+str.slice(0,4),+str.slice(4,6)-1,+str.slice(6,8),0,0,0)):/^\d{14}$/.test(str)?(str+="",new Date(+str.slice(0,4),+str.slice(4,6)-1,+str.slice(6,8),+str.slice(8,10),+str.slice(10,12),+str.slice(12,14))):/^\d{13}$/.test(str)?new Date(Number(str)):/^\d{10}$/.test(str)?new Date(1e3*Number(str)):new Date(str)}catch(error){throw new Error("Invalid date string")}},DateTime.diff=function(date1,date2,type){ void 0===type&&(type="second");var d1=DateTime.toDate(date1),d2=DateTime.toDate(date2);return "second"===type?Math.floor((d1.getTime()-d2.getTime())/1e3):"minute"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60):"hour"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60):"day"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60/24):Math.abs(d1.getTime()-d2.getTime())},DateTime}();dist$4.DateTime=DateTime,dist$4.addVc=function(url,codecs){ void 0===codecs&&(codecs=["h264"]);var vc=(codecs||["h264"]).reduce(function(acc,key){return key=key.toLowerCase(),acc+(codec[key]||0)},0),host=url.split("?")[0],query=url.split("?")[1];return query=(query||"").split("&").filter(function(item){return !/^vc=\d?/.test(item)}).join("&"),host+"?"+(query+=(query?"&":"")+"vc="+vc)},dist$4.getQuery=getQuery,dist$4.getStaticPath=function(path,base){ void 0===base&&(base="");var protocolReg=/^(https?:\/\/|^\/\/)/;if(""===path||void 0===path)return "";if(protocolReg.test(path))return path;path=path.replace(/\/+/g,"/"),base=protocolReg.test(base||"")?base:window.location.href;try{return new URL(path,base).href}catch(error){return path}},dist$4.isHttp=function(url){return /^http[s]?:\/\//.test(url)},dist$4.isMobile=function(agent){var _navigator,_navigator1,_navigator2,_window;return /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent)||/Macintosh/i.test(agent||(null==(_navigator1=navigator)?void 0:_navigator1.userAgent))&&(null==(_navigator2=navigator)?void 0:_navigator2.maxTouchPoints)>1||!!(null==(_window=window)?void 0:_window.__IS_MOBILE_SIMULATOR__)},dist$4.isRealMobile=function(agent){var _navigator,ua=(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent).toLowerCase();if(/ipad|tablet|playbook|silk|android(?!.*mobile)/i.test(ua))return false;var hasTouch="ontouchstart"in window||navigator.maxTouchPoints>0;return /android|webos|iphone|ipod|blackberry|iemobile|opera mini/i.test(ua)&&hasTouch},dist$4.parseEzopenUrl=parseEzopenUrl,dist$4.pick=function(obj,keys){return Object.entries(obj).reduce(function(acc,param){var key=param[0],value=param[1];return keys.includes(key)&&(acc[key]=value),acc},{})},dist$4.switchEzopenUrl=function(url,options){var _ref=null!=options?options:{},type=_ref.type,recType=_ref.recType,search=_ref.search,definition=_ref.definition,channelNo=_ref.channelNo,deviceSerial=_ref.deviceSerial,validateCode=_ref.validateCode,obj=parseEzopenUrl(url);if(search){var ns=Object.assign({},obj.searchParams,getQuery("?"+search.replace("?","")));search=Object.entries(ns).reduce(function(acc,param){var key=param[0],value=param[1];return ""===value?acc:acc+=key+"="+encodeURIComponent(value)+"&"},"?").replace(/&$/,"");}else search=obj.search;return type=type||obj.type,recType=null!=recType?recType:obj.recType,definition=null!=definition?definition:obj.definition,channelNo=channelNo||obj.channelNo,deviceSerial=deviceSerial||obj.deviceSerial,validateCode=null!=validateCode?validateCode:obj.validateCode,obj.protocol+"//"+(validateCode?validateCode+"@":"")+obj.hostname+"/"+deviceSerial+"/"+channelNo+("rec"===type&&recType?"."+recType:"")+("live"===type&&"hd"===definition?"."+definition:"")+"."+type+search};
2381
+ return dist$4;
2387
2382
  }
2388
2383
 
2389
- var distExports$6 = requireDist$9();
2384
+ var distExports$4 = requireDist$4();
2390
2385
 
2391
2386
  /**
2392
2387
  * 节流函数
@@ -2614,7 +2609,7 @@
2614
2609
  * ```ts
2615
2610
  * Utils.isMobile // true | false
2616
2611
  * ```
2617
- */ Utils.isMobile = distExports$6.isMobile();
2612
+ */ Utils.isMobile = distExports$4.isMobile();
2618
2613
 
2619
2614
  function _defineProperties$7(target, props) {
2620
2615
  for(var i = 0; i < props.length; i++){
@@ -2625,7 +2620,7 @@
2625
2620
  Object.defineProperty(target, descriptor.key, descriptor);
2626
2621
  }
2627
2622
  }
2628
- function _create_class$7(Constructor, protoProps, staticProps) {
2623
+ function _create_class$d(Constructor, protoProps, staticProps) {
2629
2624
  if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
2630
2625
  return Constructor;
2631
2626
  }
@@ -2892,7 +2887,7 @@
2892
2887
  });
2893
2888
  });
2894
2889
  };
2895
- _create_class$7(Progress, [
2890
+ _create_class$d(Progress, [
2896
2891
  {
2897
2892
  key: "disabled",
2898
2893
  get: function get() {
@@ -2949,12 +2944,12 @@
2949
2944
  Object.defineProperty(target, descriptor.key, descriptor);
2950
2945
  }
2951
2946
  }
2952
- function _create_class$6(Constructor, protoProps, staticProps) {
2947
+ function _create_class$c(Constructor, protoProps, staticProps) {
2953
2948
  if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
2954
2949
  return Constructor;
2955
2950
  }
2956
- function _extends$o() {
2957
- _extends$o = Object.assign || function(target) {
2951
+ function _extends$q() {
2952
+ _extends$q = Object.assign || function(target) {
2958
2953
  for(var i = 1; i < arguments.length; i++){
2959
2954
  var source = arguments[i];
2960
2955
  for(var key in source){
@@ -2965,7 +2960,7 @@
2965
2960
  }
2966
2961
  return target;
2967
2962
  };
2968
- return _extends$o.apply(this, arguments);
2963
+ return _extends$q.apply(this, arguments);
2969
2964
  }
2970
2965
  function _inherits$o(subClass, superClass) {
2971
2966
  if (typeof superClass !== "function" && superClass !== null) {
@@ -2978,14 +2973,14 @@
2978
2973
  configurable: true
2979
2974
  }
2980
2975
  });
2981
- if (superClass) _set_prototype_of$o(subClass, superClass);
2976
+ if (superClass) _set_prototype_of$r(subClass, superClass);
2982
2977
  }
2983
- function _set_prototype_of$o(o, p) {
2984
- _set_prototype_of$o = 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) {
2985
2980
  o.__proto__ = p;
2986
2981
  return o;
2987
2982
  };
2988
- return _set_prototype_of$o(o, p);
2983
+ return _set_prototype_of$r(o, p);
2989
2984
  }
2990
2985
  var VOLUME_DEFAULT_OPTIONS = {
2991
2986
  volume: 0.8,
@@ -3004,7 +2999,7 @@
3004
2999
  if (options === void 0) options = {};
3005
3000
  var _this;
3006
3001
  var _this__options_props, _this__options_props1, _this__options_props2, _this__options_props3;
3007
- _this = Control.call(this, _extends$o({}, options, {
3002
+ _this = Control.call(this, _extends$q({}, options, {
3008
3003
  tagName: 'span',
3009
3004
  classNameSuffix: 'volume',
3010
3005
  controlType: 'button'
@@ -3144,7 +3139,7 @@
3144
3139
  }
3145
3140
  });
3146
3141
  };
3147
- _create_class$6(Volume, [
3142
+ _create_class$c(Volume, [
3148
3143
  {
3149
3144
  key: "muted",
3150
3145
  get: /**
@@ -3419,7 +3414,7 @@
3419
3414
  var screenfullExports = requireScreenfull();
3420
3415
  var screenfull = /*@__PURE__*/getDefaultExportFromCjs(screenfullExports);
3421
3416
 
3422
- function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
3417
+ function asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, key, arg) {
3423
3418
  try {
3424
3419
  var info = gen[key](arg);
3425
3420
  var value = info.value;
@@ -3433,22 +3428,22 @@
3433
3428
  Promise.resolve(value).then(_next, _throw);
3434
3429
  }
3435
3430
  }
3436
- function _async_to_generator$7(fn) {
3431
+ function _async_to_generator$8(fn) {
3437
3432
  return function() {
3438
3433
  var self = this, args = arguments;
3439
3434
  return new Promise(function(resolve, reject) {
3440
3435
  var gen = fn.apply(self, args);
3441
3436
  function _next(value) {
3442
- asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "next", value);
3437
+ asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, "next", value);
3443
3438
  }
3444
3439
  function _throw(err) {
3445
- asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "throw", err);
3440
+ asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, "throw", err);
3446
3441
  }
3447
3442
  _next(undefined);
3448
3443
  });
3449
3444
  };
3450
3445
  }
3451
- function _ts_generator$7(thisArg, body) {
3446
+ function _ts_generator$8(thisArg, body) {
3452
3447
  var f, y, t, _ = {
3453
3448
  label: 0,
3454
3449
  sent: function() {
@@ -3662,8 +3657,8 @@
3662
3657
  * 全屏
3663
3658
  * @returns Promise<void>
3664
3659
  */ _proto.fullscreen = function fullscreen() {
3665
- return _async_to_generator$7(function() {
3666
- return _ts_generator$7(this, function(_state) {
3660
+ return _async_to_generator$8(function() {
3661
+ return _ts_generator$8(this, function(_state) {
3667
3662
  switch(_state.label){
3668
3663
  case 0:
3669
3664
  if (!Utils.isMobile) return [
@@ -3698,8 +3693,8 @@
3698
3693
  * 退出全屏
3699
3694
  * @returns Promise<void>
3700
3695
  */ _proto.exitFullscreen = function exitFullscreen() {
3701
- return _async_to_generator$7(function() {
3702
- return _ts_generator$7(this, function(_state) {
3696
+ return _async_to_generator$8(function() {
3697
+ return _ts_generator$8(this, function(_state) {
3703
3698
  switch(_state.label){
3704
3699
  case 0:
3705
3700
  if (!Utils.isMobile) return [
@@ -3738,8 +3733,8 @@
3738
3733
  * 全屏切换
3739
3734
  * @returns Promise<void>
3740
3735
  */ _proto.toggle = function toggle() {
3741
- return _async_to_generator$7(function() {
3742
- return _ts_generator$7(this, function(_state) {
3736
+ return _async_to_generator$8(function() {
3737
+ return _ts_generator$8(this, function(_state) {
3743
3738
  switch(_state.label){
3744
3739
  case 0:
3745
3740
  if (!Utils.isMobile) return [
@@ -3862,8 +3857,8 @@
3862
3857
  return Fullscreen;
3863
3858
  }();
3864
3859
 
3865
- function _extends$n() {
3866
- _extends$n = Object.assign || function(target) {
3860
+ function _extends$p() {
3861
+ _extends$p = Object.assign || function(target) {
3867
3862
  for(var i = 1; i < arguments.length; i++){
3868
3863
  var source = arguments[i];
3869
3864
  for(var key in source){
@@ -3874,7 +3869,7 @@
3874
3869
  }
3875
3870
  return target;
3876
3871
  };
3877
- return _extends$n.apply(this, arguments);
3872
+ return _extends$p.apply(this, arguments);
3878
3873
  }
3879
3874
  function _inherits$n(subClass, superClass) {
3880
3875
  if (typeof superClass !== "function" && superClass !== null) {
@@ -3887,14 +3882,14 @@
3887
3882
  configurable: true
3888
3883
  }
3889
3884
  });
3890
- if (superClass) _set_prototype_of$n(subClass, superClass);
3885
+ if (superClass) _set_prototype_of$q(subClass, superClass);
3891
3886
  }
3892
- function _set_prototype_of$n(o, p) {
3893
- _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3887
+ function _set_prototype_of$q(o, p) {
3888
+ _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3894
3889
  o.__proto__ = p;
3895
3890
  return o;
3896
3891
  };
3897
- return _set_prototype_of$n(o, p);
3892
+ return _set_prototype_of$q(o, p);
3898
3893
  }
3899
3894
  /**
3900
3895
  * 全屏控件
@@ -3904,7 +3899,7 @@
3904
3899
  function Fullscreen(options) {
3905
3900
  var _this;
3906
3901
  var _options_props, _this_options;
3907
- _this = Control.call(this, _extends$n({
3902
+ _this = Control.call(this, _extends$p({
3908
3903
  tagName: 'span',
3909
3904
  classNameSuffix: 'fullscreen',
3910
3905
  controlType: 'button'
@@ -3969,8 +3964,8 @@
3969
3964
  return Fullscreen;
3970
3965
  }(Control);
3971
3966
 
3972
- function _extends$m() {
3973
- _extends$m = Object.assign || function(target) {
3967
+ function _extends$o() {
3968
+ _extends$o = Object.assign || function(target) {
3974
3969
  for(var i = 1; i < arguments.length; i++){
3975
3970
  var source = arguments[i];
3976
3971
  for(var key in source){
@@ -3981,7 +3976,7 @@
3981
3976
  }
3982
3977
  return target;
3983
3978
  };
3984
- return _extends$m.apply(this, arguments);
3979
+ return _extends$o.apply(this, arguments);
3985
3980
  }
3986
3981
  function _inherits$m(subClass, superClass) {
3987
3982
  if (typeof superClass !== "function" && superClass !== null) {
@@ -3994,14 +3989,14 @@
3994
3989
  configurable: true
3995
3990
  }
3996
3991
  });
3997
- if (superClass) _set_prototype_of$m(subClass, superClass);
3992
+ if (superClass) _set_prototype_of$p(subClass, superClass);
3998
3993
  }
3999
- function _set_prototype_of$m(o, p) {
4000
- _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3994
+ function _set_prototype_of$p(o, p) {
3995
+ _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
4001
3996
  o.__proto__ = p;
4002
3997
  return o;
4003
3998
  };
4004
- return _set_prototype_of$m(o, p);
3999
+ return _set_prototype_of$p(o, p);
4005
4000
  }
4006
4001
  /**
4007
4002
  * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
@@ -4011,7 +4006,7 @@
4011
4006
  function Rec(options) {
4012
4007
  var _this;
4013
4008
  var _options_props;
4014
- _this = Control.call(this, _extends$m({}, options, {
4009
+ _this = Control.call(this, _extends$o({}, options, {
4015
4010
  tagName: 'div',
4016
4011
  controlType: 'block',
4017
4012
  classNameSuffix: 'rec'
@@ -4103,185 +4098,46 @@
4103
4098
  return Rec;
4104
4099
  }(Control);
4105
4100
 
4106
- var dist$8 = {exports: {}};
4107
-
4108
- var hasRequiredDist$8;
4101
+ var dist$3 = {exports: {}};
4109
4102
 
4110
- function requireDist$8 () {
4111
- if (hasRequiredDist$8) return dist$8.exports;
4112
- hasRequiredDist$8 = 1;
4103
+ /*
4104
+ * @ezuikit/utils-i18n v2.0.0
4105
+ * i18n utils
4106
+ * Copyright (c) 2026-01-16 Ezviz-OpenBiz
4107
+ * Released under the MIT License.
4108
+ */
4113
4109
 
4114
- var deepmerge = requireCjs();
4110
+ var hasRequiredDist$3;
4115
4111
 
4116
- function _create_class(Constructor, protoProps, staticProps) {
4117
- return protoProps && function(target, props) {
4118
- for (var i = 0; i < props.length; i++) {
4119
- var descriptor = props[i];
4120
- descriptor.enumerable = descriptor.enumerable || false, descriptor.configurable = true,
4121
- "value" in descriptor && (descriptor.writable = true), Object.defineProperty(target, descriptor.key, descriptor);
4122
- }
4123
- }(Constructor.prototype, protoProps), Constructor;
4124
- }
4112
+ function requireDist$3 () {
4113
+ if (hasRequiredDist$3) return dist$3.exports;
4114
+ hasRequiredDist$3 = 1;
4115
+ var deepmerge=requireCjs();function _create_class(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 _type_of(obj){return obj&&"undefined"!=typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj}var I18n=function(){function I18n(translations,options){this._translations={},this._locale=null==options?void 0:options.defaultLocale,translations&&(this._translations=translations,(null==options?void 0:options.defaultLocale)||(this._locale=Object.keys(translations)[0])),this.options=options||{};}var _proto=I18n.prototype;return _proto.t=function(scope,variables){var value,translation=this._translations[this._locale];if(!translation)return "function"==typeof this.options.customizeMissing?this.options.customizeMissing(scope,variables):'[missing "'+this._locale+'" locale]';if("string"==typeof scope&&scope.includes(".")&&!(scope in translation)){var _this__findChainValue=this._findChainValue(translation,scope),v=_this__findChainValue[0];if(_this__findChainValue[1])value=v;else {if(void 0===(null==variables?void 0:variables.defaultvalue))return "function"==typeof this.options.customizeMissing?this.options.customizeMissing(scope,variables):'[missing "'+this._locale+"."+scope+'" translation]';value=variables.defaultvalue;}}else if(scope in translation)value=translation[scope];else {if(void 0===(null==variables?void 0:variables.defaultvalue))return "function"==typeof this.options.customizeMissing?this.options.customizeMissing(scope,variables):'[missing "'+this._locale+"."+scope+'" translation]';value=variables.defaultvalue;}return "string"==typeof value&&variables&&/\{\{\s*(\w+)\s*\}\}/.test(value)?value.replace(/\{\{\s*(\w+)\s*\}\}/g,(function(_,varName){return String(variables[varName])||""})):value},_proto.appendTranslations=function(translations){this._translations=deepmerge(this._translations,translations,{clone:false}),this._locale||(this._locale=Object.keys(this._translations)[0]),this._onChange();},_proto.switchLocale=function(locale){locale in this._translations&&(this._locale=locale,this._onChange());},_proto.switchTranslation=function(locale){this.switchLocale(locale);},_proto.getCurrentLocale=function(){return this._locale},_proto.getCurrentTranslation=function(){return this._translations[this._locale]},_proto.getVersion=function(){return "2.0.0"},_proto._onChange=function(){return null==this.options.onChange?void 0:this.options.onChange.call(this.options,this)},_proto._findChainValue=function(obj,path){for(var paths=path.split("."),translation=obj,i=0;i<paths.length;i++){if(!paths[i])return [void 0,false];if("object"!==(void 0===translation?"undefined":_type_of(translation))||null===translation)return [void 0,false];if(!(paths[i]in translation))return [void 0,false];if(translation=translation[paths[i]],i+1===paths.length)return [translation,true]}return [void 0,false]},_create_class(I18n,[{key:"locale",get:function(){return this._locale}},{key:"translations",get:function(){return this._translations}}]),I18n}();I18n.VERSION="2.0.0",dist$3.exports=I18n;
4116
+ return dist$3.exports;
4117
+ }
4125
4118
 
4126
- var I18n = function() {
4127
- function I18n(translations, options) {
4128
- this._translations = {}, this._locale = null == options ? void 0 : options.defaultLocale,
4129
- translations && (this._translations = translations, (null == options ? void 0 : options.defaultLocale) || (this._locale = Object.keys(translations)[0])),
4130
- this.options = options || {};
4131
- }
4132
- var _proto = I18n.prototype;
4133
- return _proto.t = function(scope, variables) {
4134
- var value, translation = this._translations[this._locale];
4135
- if (!translation) return "function" == typeof this.options.customizeMissing ? this.options.customizeMissing(scope, variables) : '[missing "' + this._locale + '" locale]';
4136
- if ("string" == typeof scope && scope.includes(".") && !(scope in translation)) {
4137
- var _this__findChainValue = this._findChainValue(translation, scope), v = _this__findChainValue[0];
4138
- if (_this__findChainValue[1]) value = v; else {
4139
- if (void 0 === (null == variables ? void 0 : variables.defaultvalue)) return "function" == typeof this.options.customizeMissing ? this.options.customizeMissing(scope, variables) : '[missing "' + this._locale + "." + scope + '" translation]';
4140
- value = variables.defaultvalue;
4141
- }
4142
- } else if (scope in translation) value = translation[scope]; else {
4143
- if (void 0 === (null == variables ? void 0 : variables.defaultvalue)) return "function" == typeof this.options.customizeMissing ? this.options.customizeMissing(scope, variables) : '[missing "' + this._locale + "." + scope + '" translation]';
4144
- value = variables.defaultvalue;
4145
- }
4146
- return "string" == typeof value && variables && /\{\{\s*(\w+)\s*\}\}/.test(value) ? value.replace(/\{\{\s*(\w+)\s*\}\}/g, function(_, varName) {
4147
- return String(variables[varName]) || "";
4148
- }) : value;
4149
- }, _proto.appendTranslations = function(translations) {
4150
- this._translations = deepmerge(this._translations, translations, {
4151
- clone: false
4152
- }), this._locale || (this._locale = Object.keys(this._translations)[0]), this._onChange();
4153
- }, _proto.switchLocale = function(locale) {
4154
- locale in this._translations && (this._locale = locale, this._onChange());
4155
- }, _proto.switchTranslation = function(locale) {
4156
- this.switchLocale(locale);
4157
- }, _proto.getCurrentLocale = function() {
4158
- return this._locale;
4159
- }, _proto.getCurrentTranslation = function() {
4160
- return this._translations[this._locale];
4161
- }, _proto.getVersion = function() {
4162
- return "2.0.0";
4163
- }, _proto._onChange = function() {
4164
- return null == this.options.onChange ? void 0 : this.options.onChange.call(this.options, this);
4165
- }, _proto._findChainValue = function(obj, path) {
4166
- for (var paths = path.split("."), translation = obj, i = 0; i < paths.length; i++) {
4167
- if (!(paths[i] in translation)) return [ void 0, false ];
4168
- if (translation = translation[paths[i]], i + 1 === paths.length) return [ translation[paths[i]], true ];
4169
- }
4170
- return [ void 0, false ];
4171
- }, _create_class(I18n, [ {
4172
- key: "locale",
4173
- get: function() {
4174
- return this._locale;
4175
- }
4176
- }, {
4177
- key: "translations",
4178
- get: function() {
4179
- return this._translations;
4180
- }
4181
- } ]), I18n;
4182
- }();
4119
+ var distExports$3 = requireDist$3();
4120
+ var I18n$1 = /*@__PURE__*/getDefaultExportFromCjs(distExports$3);
4183
4121
 
4184
- I18n.VERSION = "2.0.0", dist$8.exports = I18n;
4185
- return dist$8.exports;
4186
- }
4187
-
4188
- var distExports$5 = requireDist$8();
4189
- var I18n = /*@__PURE__*/getDefaultExportFromCjs(distExports$5);
4190
-
4191
- var dist$7;
4192
- var hasRequiredDist$7;
4193
-
4194
- function requireDist$7 () {
4195
- if (hasRequiredDist$7) return dist$7;
4196
- hasRequiredDist$7 = 1;
4197
-
4198
- var _$LoggerStyle$_ = {
4199
- info: "",
4200
- log: "background: #4096ff; color: #FFF;",
4201
- warn: "background: yellow; color: #FFF;",
4202
- error: "background: red; color: #FFF;"
4203
- }, LoggerCls = function() {
4204
- function LoggerCls(options) {
4205
- void 0 === options && (options = {}), this._options = {
4206
- level: "INFO",
4207
- showTime: false
4208
- }, this._levelNum = 3, this.info = this._loggerFactory("info", this._levelNum >= 3),
4209
- this.log = this._loggerFactory("log", this._levelNum >= 2), this.warn = this._loggerFactory("warn", this._levelNum >= 1),
4210
- this.error = this._loggerFactory("error", this._levelNum >= 0), this.setOptions(options);
4211
- }
4212
- var _proto = LoggerCls.prototype;
4213
- return _proto.setOptions = function(options) {
4214
- var _this__options_level;
4215
- this._options = Object.assign({}, this._options, options), this._levelNum = this._matchLevel(null != (_this__options_level = this._options.level) ? _this__options_level : "INFO"),
4216
- this.info = this._loggerFactory("info", this._levelNum >= 3), this.log = this._loggerFactory("log", this._levelNum >= 2),
4217
- this.warn = this._loggerFactory("warn", this._levelNum >= 1), this.error = this._loggerFactory("error", this._levelNum >= 0);
4218
- }, _proto._matchLevel = function(level) {
4219
- var logLevel = 3;
4220
- switch (level) {
4221
- case "INFO":
4222
- logLevel = 3;
4223
- break;
4224
-
4225
- case "LOG":
4226
- logLevel = 2;
4227
- break;
4228
-
4229
- case "WARN":
4230
- logLevel = 1;
4231
- break;
4232
-
4233
- case "ERROR":
4234
- logLevel = 0;
4235
- }
4236
- return logLevel;
4237
- }, _proto._loggerFactory = function(type, bool) {
4238
- var fn = console[type];
4239
- if (bool && fn) {
4240
- var _fn, args0 = this._options.name ? "%c[" + this._options.name + "]%c %c[" + type.toUpperCase() + "]" : "%c[" + type.toUpperCase() + "]", color = [ this._options.name ? "background: green;color: #fff" : null, this._options.name ? "" : null, _$LoggerStyle$_[type] ].filter(function(color) {
4241
- return null != color;
4242
- });
4243
- return (_fn = fn).bind.apply(_fn, [].concat([ console, args0 ], color));
4244
- }
4245
- return LoggerCls.noop;
4246
- }, _proto.getOptions = function() {
4247
- return this._options;
4248
- }, _proto.getVersion = function() {
4249
- return "2.0.0";
4250
- }, LoggerCls;
4251
- }();
4122
+ /*
4123
+ * @ezuikit/utils-logger v2.0.0
4124
+ * logger utils
4125
+ * Copyright (c) 2026-01-16 Ezviz-OpenBiz
4126
+ * Released under the MIT License.
4127
+ */
4252
4128
 
4253
- function __fillTen__(num) {
4254
- return (num = +num) < 10 && (num = "0" + num), num + "";
4255
- }
4129
+ var dist$2;
4130
+ var hasRequiredDist$2;
4256
4131
 
4257
- LoggerCls.noop = function() {}, LoggerCls.VERSION = "2.0.0";
4258
-
4259
- var __$list$__ = [ "info", "log", "warn", "error" ];
4260
-
4261
- dist$7 = function(options) {
4262
- var logger = new LoggerCls(options);
4263
- return new Proxy(logger, {
4264
- get: function(target, prop) {
4265
- if (__$list$__.includes(prop)) {
4266
- var _target__options;
4267
- if (null == (_target__options = target._options) ? void 0 : _target__options.showTime) {
4268
- var time = (now = new Date(Date.now()), year = now.getFullYear(), month = now.getMonth() + 1,
4269
- day = now.getDate(), hour = now.getHours(), min = now.getMinutes(), sec = now.getSeconds(),
4270
- ms = now.getMilliseconds(), year + "/" + __fillTen__(month) + "/" + __fillTen__(day) + " " + __fillTen__(hour) + ":" + __fillTen__(min) + ":" + __fillTen__(sec) + ":" + ms);
4271
- return target[prop].bind(console, "[" + time + "]");
4272
- }
4273
- return target[prop].bind(console);
4274
- }
4275
- var now, year, month, day, hour, min, sec, ms;
4276
- return Reflect.get(target, prop);
4277
- }
4278
- });
4279
- };
4280
- return dist$7;
4132
+ function requireDist$2 () {
4133
+ if (hasRequiredDist$2) return dist$2;
4134
+ hasRequiredDist$2 = 1;
4135
+ var globalThis_1,hasRequiredGlobalThis,commonjsGlobal$1="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{},es_object_toString={};function requireGlobalThis(){if(hasRequiredGlobalThis)return globalThis_1;hasRequiredGlobalThis=1;var check=function(it){return it&&it.Math===Math&&it};return globalThis_1=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal$1&&commonjsGlobal$1)||check("object"==typeof globalThis_1&&globalThis_1)||function(){return this}()||Function("return this")()}var isPure,hasRequiredIsPure,defineGlobalProperty,hasRequiredDefineGlobalProperty,hasRequiredSharedStore,shared,hasRequiredShared,fails,hasRequiredFails,functionBindNative,hasRequiredFunctionBindNative,functionUncurryThis,hasRequiredFunctionUncurryThis,isNullOrUndefined,hasRequiredIsNullOrUndefined,requireObjectCoercible,hasRequiredRequireObjectCoercible,toObject,hasRequiredToObject,hasOwnProperty_1,hasRequiredHasOwnProperty,uid,hasRequiredUid,environmentUserAgent,hasRequiredEnvironmentUserAgent,environmentV8Version,hasRequiredEnvironmentV8Version,symbolConstructorDetection,hasRequiredSymbolConstructorDetection,useSymbolAsUid,hasRequiredUseSymbolAsUid,wellKnownSymbol,hasRequiredWellKnownSymbol,toStringTagSupport,hasRequiredToStringTagSupport,isCallable,hasRequiredIsCallable,sharedStore={exports:{}};function requireDefineGlobalProperty(){if(hasRequiredDefineGlobalProperty)return defineGlobalProperty;hasRequiredDefineGlobalProperty=1;var globalThis=requireGlobalThis(),defineProperty=Object.defineProperty;return defineGlobalProperty=function(key,value){try{defineProperty(globalThis,key,{value:value,configurable:!0,writable:!0});}catch(error){globalThis[key]=value;}return value}}function requireSharedStore(){if(hasRequiredSharedStore)return sharedStore.exports;hasRequiredSharedStore=1;var IS_PURE=hasRequiredIsPure?isPure:(hasRequiredIsPure=1,isPure=false),globalThis=requireGlobalThis(),defineGlobalProperty=requireDefineGlobalProperty(),store=sharedStore.exports=globalThis["__core-js_shared__"]||defineGlobalProperty("__core-js_shared__",{});return (store.versions||(store.versions=[])).push({version:"3.46.0",mode:IS_PURE?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"}),sharedStore.exports}function requireShared(){if(hasRequiredShared)return shared;hasRequiredShared=1;var store=requireSharedStore();return shared=function(key,value){return store[key]||(store[key]=value||{})}}function requireFails(){return hasRequiredFails?fails:(hasRequiredFails=1,fails=function(exec){try{return !!exec()}catch(error){return true}})}function requireFunctionBindNative(){if(hasRequiredFunctionBindNative)return functionBindNative;hasRequiredFunctionBindNative=1;var fails=requireFails();return functionBindNative=!fails((function(){var test=function(){}.bind();return "function"!=typeof test||test.hasOwnProperty("prototype")}))}function requireFunctionUncurryThis(){if(hasRequiredFunctionUncurryThis)return functionUncurryThis;hasRequiredFunctionUncurryThis=1;var NATIVE_BIND=requireFunctionBindNative(),FunctionPrototype=Function.prototype,call=FunctionPrototype.call,uncurryThisWithBind=NATIVE_BIND&&FunctionPrototype.bind.bind(call,call);return functionUncurryThis=NATIVE_BIND?uncurryThisWithBind:function(fn){return function(){return call.apply(fn,arguments)}},functionUncurryThis}function requireIsNullOrUndefined(){return hasRequiredIsNullOrUndefined?isNullOrUndefined:(hasRequiredIsNullOrUndefined=1,isNullOrUndefined=function(it){return null==it})}function requireRequireObjectCoercible(){if(hasRequiredRequireObjectCoercible)return requireObjectCoercible;hasRequiredRequireObjectCoercible=1;var isNullOrUndefined=requireIsNullOrUndefined(),$TypeError=TypeError;return requireObjectCoercible=function(it){if(isNullOrUndefined(it))throw new $TypeError("Can't call method on "+it);return it}}function requireToObject(){if(hasRequiredToObject)return toObject;hasRequiredToObject=1;var requireObjectCoercible=requireRequireObjectCoercible(),$Object=Object;return toObject=function(argument){return $Object(requireObjectCoercible(argument))}}function requireHasOwnProperty(){if(hasRequiredHasOwnProperty)return hasOwnProperty_1;hasRequiredHasOwnProperty=1;var uncurryThis=requireFunctionUncurryThis(),toObject=requireToObject(),hasOwnProperty=uncurryThis({}.hasOwnProperty);return hasOwnProperty_1=Object.hasOwn||function(it,key){return hasOwnProperty(toObject(it),key)}}function requireUid(){if(hasRequiredUid)return uid;hasRequiredUid=1;var uncurryThis=requireFunctionUncurryThis(),id=0,postfix=Math.random(),toString=uncurryThis(1.1.toString);return uid=function(key){return "Symbol("+(void 0===key?"":key)+")_"+toString(++id+postfix,36)}}function requireEnvironmentV8Version(){if(hasRequiredEnvironmentV8Version)return environmentV8Version;hasRequiredEnvironmentV8Version=1;var match,version,globalThis=requireGlobalThis(),userAgent=function(){if(hasRequiredEnvironmentUserAgent)return environmentUserAgent;hasRequiredEnvironmentUserAgent=1;var navigator=requireGlobalThis().navigator,userAgent=navigator&&navigator.userAgent;return environmentUserAgent=userAgent?String(userAgent):""}(),process=globalThis.process,Deno=globalThis.Deno,versions=process&&process.versions||Deno&&Deno.version,v8=versions&&versions.v8;return v8&&(version=(match=v8.split("."))[0]>0&&match[0]<4?1:+(match[0]+match[1])),!version&&userAgent&&(!(match=userAgent.match(/Edge\/(\d+)/))||match[1]>=74)&&(match=userAgent.match(/Chrome\/(\d+)/))&&(version=+match[1]),environmentV8Version=version}function requireSymbolConstructorDetection(){if(hasRequiredSymbolConstructorDetection)return symbolConstructorDetection;hasRequiredSymbolConstructorDetection=1;var V8_VERSION=requireEnvironmentV8Version(),fails=requireFails(),$String=requireGlobalThis().String;return symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails((function(){var symbol=Symbol("symbol detection");return !$String(symbol)||!(Object(symbol)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}))}function requireUseSymbolAsUid(){if(hasRequiredUseSymbolAsUid)return useSymbolAsUid;hasRequiredUseSymbolAsUid=1;var NATIVE_SYMBOL=requireSymbolConstructorDetection();return useSymbolAsUid=NATIVE_SYMBOL&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function requireWellKnownSymbol(){if(hasRequiredWellKnownSymbol)return wellKnownSymbol;hasRequiredWellKnownSymbol=1;var globalThis=requireGlobalThis(),shared=requireShared(),hasOwn=requireHasOwnProperty(),uid=requireUid(),NATIVE_SYMBOL=requireSymbolConstructorDetection(),USE_SYMBOL_AS_UID=requireUseSymbolAsUid(),Symbol=globalThis.Symbol,WellKnownSymbolsStore=shared("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol.for||Symbol:Symbol&&Symbol.withoutSetter||uid;return wellKnownSymbol=function(name){return hasOwn(WellKnownSymbolsStore,name)||(WellKnownSymbolsStore[name]=NATIVE_SYMBOL&&hasOwn(Symbol,name)?Symbol[name]:createWellKnownSymbol("Symbol."+name)),WellKnownSymbolsStore[name]}}function requireToStringTagSupport(){if(hasRequiredToStringTagSupport)return toStringTagSupport;hasRequiredToStringTagSupport=1;var test={};return test[requireWellKnownSymbol()("toStringTag")]="z",toStringTagSupport="[object z]"===String(test)}function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var documentAll="object"==typeof document&&document.all;return isCallable=void 0===documentAll&&void 0!==documentAll?function(argument){return "function"==typeof argument||argument===documentAll}:function(argument){return "function"==typeof argument}}var descriptors,hasRequiredDescriptors,isObject,hasRequiredIsObject,documentCreateElement,hasRequiredDocumentCreateElement,ie8DomDefine,hasRequiredIe8DomDefine,v8PrototypeDefineBug,hasRequiredV8PrototypeDefineBug,anObject,hasRequiredAnObject,functionCall,hasRequiredFunctionCall,getBuiltIn,hasRequiredGetBuiltIn,objectIsPrototypeOf,hasRequiredObjectIsPrototypeOf,isSymbol,hasRequiredIsSymbol,tryToString,hasRequiredTryToString,aCallable,hasRequiredACallable,getMethod,hasRequiredGetMethod,ordinaryToPrimitive,hasRequiredOrdinaryToPrimitive,toPrimitive,hasRequiredToPrimitive,toPropertyKey,hasRequiredToPropertyKey,hasRequiredObjectDefineProperty,objectDefineProperty={};function requireDescriptors(){if(hasRequiredDescriptors)return descriptors;hasRequiredDescriptors=1;var fails=requireFails();return descriptors=!fails((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function requireIsObject(){if(hasRequiredIsObject)return isObject;hasRequiredIsObject=1;var isCallable=requireIsCallable();return isObject=function(it){return "object"==typeof it?null!==it:isCallable(it)}}function requireDocumentCreateElement(){if(hasRequiredDocumentCreateElement)return documentCreateElement;hasRequiredDocumentCreateElement=1;var globalThis=requireGlobalThis(),isObject=requireIsObject(),document=globalThis.document,EXISTS=isObject(document)&&isObject(document.createElement);return documentCreateElement=function(it){return EXISTS?document.createElement(it):{}}}function requireIe8DomDefine(){if(hasRequiredIe8DomDefine)return ie8DomDefine;hasRequiredIe8DomDefine=1;var DESCRIPTORS=requireDescriptors(),fails=requireFails(),createElement=requireDocumentCreateElement();return ie8DomDefine=!DESCRIPTORS&&!fails((function(){return 7!==Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a}))}function requireV8PrototypeDefineBug(){if(hasRequiredV8PrototypeDefineBug)return v8PrototypeDefineBug;hasRequiredV8PrototypeDefineBug=1;var DESCRIPTORS=requireDescriptors(),fails=requireFails();return v8PrototypeDefineBug=DESCRIPTORS&&fails((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:false}).prototype}))}function requireAnObject(){if(hasRequiredAnObject)return anObject;hasRequiredAnObject=1;var isObject=requireIsObject(),$String=String,$TypeError=TypeError;return anObject=function(argument){if(isObject(argument))return argument;throw new $TypeError($String(argument)+" is not an object")}}function requireFunctionCall(){if(hasRequiredFunctionCall)return functionCall;hasRequiredFunctionCall=1;var NATIVE_BIND=requireFunctionBindNative(),call=Function.prototype.call;return functionCall=NATIVE_BIND?call.bind(call):function(){return call.apply(call,arguments)},functionCall}function requireGetBuiltIn(){if(hasRequiredGetBuiltIn)return getBuiltIn;hasRequiredGetBuiltIn=1;var globalThis=requireGlobalThis(),isCallable=requireIsCallable();return getBuiltIn=function(namespace,method){return arguments.length<2?(argument=globalThis[namespace],isCallable(argument)?argument:void 0):globalThis[namespace]&&globalThis[namespace][method];var argument;},getBuiltIn}function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol;hasRequiredIsSymbol=1;var getBuiltIn=requireGetBuiltIn(),isCallable=requireIsCallable(),isPrototypeOf=function(){if(hasRequiredObjectIsPrototypeOf)return objectIsPrototypeOf;hasRequiredObjectIsPrototypeOf=1;var uncurryThis=requireFunctionUncurryThis();return objectIsPrototypeOf=uncurryThis({}.isPrototypeOf)}(),USE_SYMBOL_AS_UID=requireUseSymbolAsUid(),$Object=Object;return isSymbol=USE_SYMBOL_AS_UID?function(it){return "symbol"==typeof it}:function(it){var $Symbol=getBuiltIn("Symbol");return isCallable($Symbol)&&isPrototypeOf($Symbol.prototype,$Object(it))}}function requireTryToString(){if(hasRequiredTryToString)return tryToString;hasRequiredTryToString=1;var $String=String;return tryToString=function(argument){try{return $String(argument)}catch(error){return "Object"}}}function requireACallable(){if(hasRequiredACallable)return aCallable;hasRequiredACallable=1;var isCallable=requireIsCallable(),tryToString=requireTryToString(),$TypeError=TypeError;return aCallable=function(argument){if(isCallable(argument))return argument;throw new $TypeError(tryToString(argument)+" is not a function")}}function requireGetMethod(){if(hasRequiredGetMethod)return getMethod;hasRequiredGetMethod=1;var aCallable=requireACallable(),isNullOrUndefined=requireIsNullOrUndefined();return getMethod=function(V,P){var func=V[P];return isNullOrUndefined(func)?void 0:aCallable(func)}}function requireOrdinaryToPrimitive(){if(hasRequiredOrdinaryToPrimitive)return ordinaryToPrimitive;hasRequiredOrdinaryToPrimitive=1;var call=requireFunctionCall(),isCallable=requireIsCallable(),isObject=requireIsObject(),$TypeError=TypeError;return ordinaryToPrimitive=function(input,pref){var fn,val;if("string"===pref&&isCallable(fn=input.toString)&&!isObject(val=call(fn,input)))return val;if(isCallable(fn=input.valueOf)&&!isObject(val=call(fn,input)))return val;if("string"!==pref&&isCallable(fn=input.toString)&&!isObject(val=call(fn,input)))return val;throw new $TypeError("Can't convert object to primitive value")}}function requireToPrimitive(){if(hasRequiredToPrimitive)return toPrimitive;hasRequiredToPrimitive=1;var call=requireFunctionCall(),isObject=requireIsObject(),isSymbol=requireIsSymbol(),getMethod=requireGetMethod(),ordinaryToPrimitive=requireOrdinaryToPrimitive(),wellKnownSymbol=requireWellKnownSymbol(),$TypeError=TypeError,TO_PRIMITIVE=wellKnownSymbol("toPrimitive");return toPrimitive=function(input,pref){if(!isObject(input)||isSymbol(input))return input;var result,exoticToPrim=getMethod(input,TO_PRIMITIVE);if(exoticToPrim){if(void 0===pref&&(pref="default"),result=call(exoticToPrim,input,pref),!isObject(result)||isSymbol(result))return result;throw new $TypeError("Can't convert object to primitive value")}return void 0===pref&&(pref="number"),ordinaryToPrimitive(input,pref)}}function requireToPropertyKey(){if(hasRequiredToPropertyKey)return toPropertyKey;hasRequiredToPropertyKey=1;var toPrimitive=requireToPrimitive(),isSymbol=requireIsSymbol();return toPropertyKey=function(argument){var key=toPrimitive(argument,"string");return isSymbol(key)?key:key+""}}function requireObjectDefineProperty(){if(hasRequiredObjectDefineProperty)return objectDefineProperty;hasRequiredObjectDefineProperty=1;var DESCRIPTORS=requireDescriptors(),IE8_DOM_DEFINE=requireIe8DomDefine(),V8_PROTOTYPE_DEFINE_BUG=requireV8PrototypeDefineBug(),anObject=requireAnObject(),toPropertyKey=requireToPropertyKey(),$TypeError=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;return objectDefineProperty.f=DESCRIPTORS?V8_PROTOTYPE_DEFINE_BUG?function(O,P,Attributes){if(anObject(O),P=toPropertyKey(P),anObject(Attributes),"function"==typeof O&&"prototype"===P&&"value"in Attributes&&"writable"in Attributes&&!Attributes.writable){var current=$getOwnPropertyDescriptor(O,P);current&&current.writable&&(O[P]=Attributes.value,Attributes={configurable:"configurable"in Attributes?Attributes.configurable:current.configurable,enumerable:"enumerable"in Attributes?Attributes.enumerable:current.enumerable,writable:false});}return $defineProperty(O,P,Attributes)}:$defineProperty:function(O,P,Attributes){if(anObject(O),P=toPropertyKey(P),anObject(Attributes),IE8_DOM_DEFINE)try{return $defineProperty(O,P,Attributes)}catch(error){}if("get"in Attributes||"set"in Attributes)throw new $TypeError("Accessors not supported");return "value"in Attributes&&(O[P]=Attributes.value),O},objectDefineProperty}var functionName,hasRequiredFunctionName,inspectSource,hasRequiredInspectSource,weakMapBasicDetection,hasRequiredWeakMapBasicDetection,createPropertyDescriptor,hasRequiredCreatePropertyDescriptor,createNonEnumerableProperty,hasRequiredCreateNonEnumerableProperty,sharedKey,hasRequiredSharedKey,hiddenKeys,hasRequiredHiddenKeys,internalState,hasRequiredInternalState,hasRequiredMakeBuiltIn,defineBuiltIn,hasRequiredDefineBuiltIn,classofRaw,hasRequiredClassofRaw,classof,hasRequiredClassof,objectToString,hasRequiredObjectToString,hasRequiredEs_object_toString,makeBuiltIn={exports:{}};function requireInspectSource(){if(hasRequiredInspectSource)return inspectSource;hasRequiredInspectSource=1;var uncurryThis=requireFunctionUncurryThis(),isCallable=requireIsCallable(),store=requireSharedStore(),functionToString=uncurryThis(Function.toString);return isCallable(store.inspectSource)||(store.inspectSource=function(it){return functionToString(it)}),inspectSource=store.inspectSource}function requireCreatePropertyDescriptor(){return hasRequiredCreatePropertyDescriptor?createPropertyDescriptor:(hasRequiredCreatePropertyDescriptor=1,createPropertyDescriptor=function(bitmap,value){return {enumerable:!(1&bitmap),configurable:!(2&bitmap),writable:!(4&bitmap),value:value}})}function requireCreateNonEnumerableProperty(){if(hasRequiredCreateNonEnumerableProperty)return createNonEnumerableProperty;hasRequiredCreateNonEnumerableProperty=1;var DESCRIPTORS=requireDescriptors(),definePropertyModule=requireObjectDefineProperty(),createPropertyDescriptor=requireCreatePropertyDescriptor();return createNonEnumerableProperty=DESCRIPTORS?function(object,key,value){return definePropertyModule.f(object,key,createPropertyDescriptor(1,value))}:function(object,key,value){return object[key]=value,object}}function requireSharedKey(){if(hasRequiredSharedKey)return sharedKey;hasRequiredSharedKey=1;var shared=requireShared(),uid=requireUid(),keys=shared("keys");return sharedKey=function(key){return keys[key]||(keys[key]=uid(key))}}function requireHiddenKeys(){return hasRequiredHiddenKeys?hiddenKeys:(hasRequiredHiddenKeys=1,hiddenKeys={})}function requireInternalState(){if(hasRequiredInternalState)return internalState;hasRequiredInternalState=1;var set,get,has,NATIVE_WEAK_MAP=function(){if(hasRequiredWeakMapBasicDetection)return weakMapBasicDetection;hasRequiredWeakMapBasicDetection=1;var globalThis=requireGlobalThis(),isCallable=requireIsCallable(),WeakMap=globalThis.WeakMap;return weakMapBasicDetection=isCallable(WeakMap)&&/native code/.test(String(WeakMap))}(),globalThis=requireGlobalThis(),isObject=requireIsObject(),createNonEnumerableProperty=requireCreateNonEnumerableProperty(),hasOwn=requireHasOwnProperty(),shared=requireSharedStore(),sharedKey=requireSharedKey(),hiddenKeys=requireHiddenKeys(),TypeError=globalThis.TypeError,WeakMap=globalThis.WeakMap;if(NATIVE_WEAK_MAP||shared.state){var store=shared.state||(shared.state=new WeakMap);store.get=store.get,store.has=store.has,store.set=store.set,set=function(it,metadata){if(store.has(it))throw new TypeError("Object already initialized");return metadata.facade=it,store.set(it,metadata),metadata},get=function(it){return store.get(it)||{}},has=function(it){return store.has(it)};}else {var STATE=sharedKey("state");hiddenKeys[STATE]=true,set=function(it,metadata){if(hasOwn(it,STATE))throw new TypeError("Object already initialized");return metadata.facade=it,createNonEnumerableProperty(it,STATE,metadata),metadata},get=function(it){return hasOwn(it,STATE)?it[STATE]:{}},has=function(it){return hasOwn(it,STATE)};}return internalState={set:set,get:get,has:has,enforce:function(it){return has(it)?get(it):set(it,{})},getterFor:function(TYPE){return function(it){var state;if(!isObject(it)||(state=get(it)).type!==TYPE)throw new TypeError("Incompatible receiver, "+TYPE+" required");return state}}}}function requireMakeBuiltIn(){if(hasRequiredMakeBuiltIn)return makeBuiltIn.exports;hasRequiredMakeBuiltIn=1;var uncurryThis=requireFunctionUncurryThis(),fails=requireFails(),isCallable=requireIsCallable(),hasOwn=requireHasOwnProperty(),DESCRIPTORS=requireDescriptors(),CONFIGURABLE_FUNCTION_NAME=function(){if(hasRequiredFunctionName)return functionName;hasRequiredFunctionName=1;var DESCRIPTORS=requireDescriptors(),hasOwn=requireHasOwnProperty(),FunctionPrototype=Function.prototype,getDescriptor=DESCRIPTORS&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn(FunctionPrototype,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS||DESCRIPTORS&&getDescriptor(FunctionPrototype,"name").configurable);return functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE}}().CONFIGURABLE,inspectSource=requireInspectSource(),InternalStateModule=requireInternalState(),enforceInternalState=InternalStateModule.enforce,getInternalState=InternalStateModule.get,$String=String,defineProperty=Object.defineProperty,stringSlice=uncurryThis("".slice),replace=uncurryThis("".replace),join=uncurryThis([].join),CONFIGURABLE_LENGTH=DESCRIPTORS&&!fails((function(){return 8!==defineProperty((function(){}),"length",{value:8}).length})),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn.exports=function(value,name,options){"Symbol("===stringSlice($String(name),0,7)&&(name="["+replace($String(name),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),options&&options.getter&&(name="get "+name),options&&options.setter&&(name="set "+name),(!hasOwn(value,"name")||CONFIGURABLE_FUNCTION_NAME&&value.name!==name)&&(DESCRIPTORS?defineProperty(value,"name",{value:name,configurable:true}):value.name=name),CONFIGURABLE_LENGTH&&options&&hasOwn(options,"arity")&&value.length!==options.arity&&defineProperty(value,"length",{value:options.arity});try{options&&hasOwn(options,"constructor")&&options.constructor?DESCRIPTORS&&defineProperty(value,"prototype",{writable:!1}):value.prototype&&(value.prototype=void 0);}catch(error){}var state=enforceInternalState(value);return hasOwn(state,"source")||(state.source=join(TEMPLATE,"string"==typeof name?name:"")),value};return Function.prototype.toString=makeBuiltIn$1((function(){return isCallable(this)&&getInternalState(this).source||inspectSource(this)}),"toString"),makeBuiltIn.exports}function requireDefineBuiltIn(){if(hasRequiredDefineBuiltIn)return defineBuiltIn;hasRequiredDefineBuiltIn=1;var isCallable=requireIsCallable(),definePropertyModule=requireObjectDefineProperty(),makeBuiltIn=requireMakeBuiltIn(),defineGlobalProperty=requireDefineGlobalProperty();return defineBuiltIn=function(O,key,value,options){options||(options={});var simple=options.enumerable,name=void 0!==options.name?options.name:key;if(isCallable(value)&&makeBuiltIn(value,name,options),options.global)simple?O[key]=value:defineGlobalProperty(key,value);else {try{options.unsafe?O[key]&&(simple=!0):delete O[key];}catch(error){}simple?O[key]=value:definePropertyModule.f(O,key,{value:value,enumerable:false,configurable:!options.nonConfigurable,writable:!options.nonWritable});}return O}}function requireClassofRaw(){if(hasRequiredClassofRaw)return classofRaw;hasRequiredClassofRaw=1;var uncurryThis=requireFunctionUncurryThis(),toString=uncurryThis({}.toString),stringSlice=uncurryThis("".slice);return classofRaw=function(it){return stringSlice(toString(it),8,-1)}}function requireClassof(){if(hasRequiredClassof)return classof;hasRequiredClassof=1;var TO_STRING_TAG_SUPPORT=requireToStringTagSupport(),isCallable=requireIsCallable(),classofRaw=requireClassofRaw(),TO_STRING_TAG=requireWellKnownSymbol()("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"===classofRaw(function(){return arguments}());return classof=TO_STRING_TAG_SUPPORT?classofRaw:function(it){var O,tag,result;return void 0===it?"Undefined":null===it?"Null":"string"==typeof(tag=function(it,key){try{return it[key]}catch(error){}}(O=$Object(it),TO_STRING_TAG))?tag:CORRECT_ARGUMENTS?classofRaw(O):"Object"===(result=classofRaw(O))&&isCallable(O.callee)?"Arguments":result}}function requireEs_object_toString(){if(hasRequiredEs_object_toString)return es_object_toString;hasRequiredEs_object_toString=1;var TO_STRING_TAG_SUPPORT=requireToStringTagSupport(),defineBuiltIn=requireDefineBuiltIn(),toString=function(){if(hasRequiredObjectToString)return objectToString;hasRequiredObjectToString=1;var TO_STRING_TAG_SUPPORT=requireToStringTagSupport(),classof=requireClassof();return objectToString=TO_STRING_TAG_SUPPORT?{}.toString:function(){return "[object "+classof(this)+"]"}}();return TO_STRING_TAG_SUPPORT||defineBuiltIn(Object.prototype,"toString",toString,{unsafe:true}),es_object_toString}var hasRequiredObjectPropertyIsEnumerable,indexedObject,hasRequiredIndexedObject,toIndexedObject,hasRequiredToIndexedObject,hasRequiredObjectGetOwnPropertyDescriptor,es_reflect_apply={},objectGetOwnPropertyDescriptor={},objectPropertyIsEnumerable={};function requireToIndexedObject(){if(hasRequiredToIndexedObject)return toIndexedObject;hasRequiredToIndexedObject=1;var IndexedObject=function(){if(hasRequiredIndexedObject)return indexedObject;hasRequiredIndexedObject=1;var uncurryThis=requireFunctionUncurryThis(),fails=requireFails(),classof=requireClassofRaw(),$Object=Object,split=uncurryThis("".split);return indexedObject=fails((function(){return !$Object("z").propertyIsEnumerable(0)}))?function(it){return "String"===classof(it)?split(it,""):$Object(it)}:$Object}(),requireObjectCoercible=requireRequireObjectCoercible();return toIndexedObject=function(it){return IndexedObject(requireObjectCoercible(it))}}function requireObjectGetOwnPropertyDescriptor(){if(hasRequiredObjectGetOwnPropertyDescriptor)return objectGetOwnPropertyDescriptor;hasRequiredObjectGetOwnPropertyDescriptor=1;var DESCRIPTORS=requireDescriptors(),call=requireFunctionCall(),propertyIsEnumerableModule=function(){if(hasRequiredObjectPropertyIsEnumerable)return objectPropertyIsEnumerable;hasRequiredObjectPropertyIsEnumerable=1;var $propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor&&!$propertyIsEnumerable.call({1:2},1);return objectPropertyIsEnumerable.f=NASHORN_BUG?function(V){var descriptor=getOwnPropertyDescriptor(this,V);return !!descriptor&&descriptor.enumerable}:$propertyIsEnumerable,objectPropertyIsEnumerable}(),createPropertyDescriptor=requireCreatePropertyDescriptor(),toIndexedObject=requireToIndexedObject(),toPropertyKey=requireToPropertyKey(),hasOwn=requireHasOwnProperty(),IE8_DOM_DEFINE=requireIe8DomDefine(),$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;return objectGetOwnPropertyDescriptor.f=DESCRIPTORS?$getOwnPropertyDescriptor:function(O,P){if(O=toIndexedObject(O),P=toPropertyKey(P),IE8_DOM_DEFINE)try{return $getOwnPropertyDescriptor(O,P)}catch(error){}if(hasOwn(O,P))return createPropertyDescriptor(!call(propertyIsEnumerableModule.f,O,P),O[P])},objectGetOwnPropertyDescriptor}var mathTrunc,hasRequiredMathTrunc,toIntegerOrInfinity,hasRequiredToIntegerOrInfinity,toAbsoluteIndex,hasRequiredToAbsoluteIndex,toLength,hasRequiredToLength,lengthOfArrayLike,hasRequiredLengthOfArrayLike,arrayIncludes,hasRequiredArrayIncludes,objectKeysInternal,hasRequiredObjectKeysInternal,enumBugKeys,hasRequiredEnumBugKeys,hasRequiredObjectGetOwnPropertyNames,objectGetOwnPropertyNames={};function requireToIntegerOrInfinity(){if(hasRequiredToIntegerOrInfinity)return toIntegerOrInfinity;hasRequiredToIntegerOrInfinity=1;var trunc=function(){if(hasRequiredMathTrunc)return mathTrunc;hasRequiredMathTrunc=1;var ceil=Math.ceil,floor=Math.floor;return mathTrunc=Math.trunc||function(x){var n=+x;return (n>0?floor:ceil)(n)}}();return toIntegerOrInfinity=function(argument){var number=+argument;return number!=number||0===number?0:trunc(number)}}function requireToAbsoluteIndex(){if(hasRequiredToAbsoluteIndex)return toAbsoluteIndex;hasRequiredToAbsoluteIndex=1;var toIntegerOrInfinity=requireToIntegerOrInfinity(),max=Math.max,min=Math.min;return toAbsoluteIndex=function(index,length){var integer=toIntegerOrInfinity(index);return integer<0?max(integer+length,0):min(integer,length)}}function requireToLength(){if(hasRequiredToLength)return toLength;hasRequiredToLength=1;var toIntegerOrInfinity=requireToIntegerOrInfinity(),min=Math.min;return toLength=function(argument){var len=toIntegerOrInfinity(argument);return len>0?min(len,9007199254740991):0}}function requireLengthOfArrayLike(){if(hasRequiredLengthOfArrayLike)return lengthOfArrayLike;hasRequiredLengthOfArrayLike=1;var toLength=requireToLength();return lengthOfArrayLike=function(obj){return toLength(obj.length)}}function requireObjectKeysInternal(){if(hasRequiredObjectKeysInternal)return objectKeysInternal;hasRequiredObjectKeysInternal=1;var uncurryThis=requireFunctionUncurryThis(),hasOwn=requireHasOwnProperty(),toIndexedObject=requireToIndexedObject(),indexOf=function(){if(hasRequiredArrayIncludes)return arrayIncludes;hasRequiredArrayIncludes=1;var toIndexedObject=requireToIndexedObject(),toAbsoluteIndex=requireToAbsoluteIndex(),lengthOfArrayLike=requireLengthOfArrayLike(),createMethod=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIndexedObject($this),length=lengthOfArrayLike(O);if(0===length)return !IS_INCLUDES&&-1;var value,index=toAbsoluteIndex(fromIndex,length);if(IS_INCLUDES&&el!=el){for(;length>index;)if((value=O[index++])!=value)return true}else for(;length>index;index++)if((IS_INCLUDES||index in O)&&O[index]===el)return IS_INCLUDES||index||0;return !IS_INCLUDES&&-1}};return arrayIncludes={includes:createMethod(true),indexOf:createMethod(false)}}().indexOf,hiddenKeys=requireHiddenKeys(),push=uncurryThis([].push);return objectKeysInternal=function(object,names){var key,O=toIndexedObject(object),i=0,result=[];for(key in O)!hasOwn(hiddenKeys,key)&&hasOwn(O,key)&&push(result,key);for(;names.length>i;)hasOwn(O,key=names[i++])&&(~indexOf(result,key)||push(result,key));return result}}function requireEnumBugKeys(){return hasRequiredEnumBugKeys?enumBugKeys:(hasRequiredEnumBugKeys=1,enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}var hasRequiredObjectGetOwnPropertySymbols,ownKeys,hasRequiredOwnKeys,copyConstructorProperties,hasRequiredCopyConstructorProperties,isForced_1,hasRequiredIsForced,_export,hasRequired_export,functionApply,hasRequiredFunctionApply,hasRequiredEs_reflect_apply,objectGetOwnPropertySymbols={};function requireOwnKeys(){if(hasRequiredOwnKeys)return ownKeys;hasRequiredOwnKeys=1;var getBuiltIn=requireGetBuiltIn(),uncurryThis=requireFunctionUncurryThis(),getOwnPropertyNamesModule=function(){if(hasRequiredObjectGetOwnPropertyNames)return objectGetOwnPropertyNames;hasRequiredObjectGetOwnPropertyNames=1;var internalObjectKeys=requireObjectKeysInternal(),hiddenKeys=requireEnumBugKeys().concat("length","prototype");return objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(O){return internalObjectKeys(O,hiddenKeys)},objectGetOwnPropertyNames}(),getOwnPropertySymbolsModule=(hasRequiredObjectGetOwnPropertySymbols||(hasRequiredObjectGetOwnPropertySymbols=1,objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols),objectGetOwnPropertySymbols),anObject=requireAnObject(),concat=uncurryThis([].concat);return ownKeys=getBuiltIn("Reflect","ownKeys")||function(it){var keys=getOwnPropertyNamesModule.f(anObject(it)),getOwnPropertySymbols=getOwnPropertySymbolsModule.f;return getOwnPropertySymbols?concat(keys,getOwnPropertySymbols(it)):keys}}function requireCopyConstructorProperties(){if(hasRequiredCopyConstructorProperties)return copyConstructorProperties;hasRequiredCopyConstructorProperties=1;var hasOwn=requireHasOwnProperty(),ownKeys=requireOwnKeys(),getOwnPropertyDescriptorModule=requireObjectGetOwnPropertyDescriptor(),definePropertyModule=requireObjectDefineProperty();return copyConstructorProperties=function(target,source,exceptions){for(var keys=ownKeys(source),defineProperty=definePropertyModule.f,getOwnPropertyDescriptor=getOwnPropertyDescriptorModule.f,i=0;i<keys.length;i++){var key=keys[i];hasOwn(target,key)||exceptions&&hasOwn(exceptions,key)||defineProperty(target,key,getOwnPropertyDescriptor(source,key));}}}function require_export(){if(hasRequired_export)return _export;hasRequired_export=1;var globalThis=requireGlobalThis(),getOwnPropertyDescriptor=requireObjectGetOwnPropertyDescriptor().f,createNonEnumerableProperty=requireCreateNonEnumerableProperty(),defineBuiltIn=requireDefineBuiltIn(),defineGlobalProperty=requireDefineGlobalProperty(),copyConstructorProperties=requireCopyConstructorProperties(),isForced=function(){if(hasRequiredIsForced)return isForced_1;hasRequiredIsForced=1;var fails=requireFails(),isCallable=requireIsCallable(),replacement=/#|\.prototype\./,isForced=function(feature,detection){var value=data[normalize(feature)];return value===POLYFILL||value!==NATIVE&&(isCallable(detection)?fails(detection):!!detection)},normalize=isForced.normalize=function(string){return String(string).replace(replacement,".").toLowerCase()},data=isForced.data={},NATIVE=isForced.NATIVE="N",POLYFILL=isForced.POLYFILL="P";return isForced_1=isForced}();return _export=function(options,source){var target,key,targetProperty,sourceProperty,descriptor,TARGET=options.target,GLOBAL=options.global,STATIC=options.stat;if(target=GLOBAL?globalThis:STATIC?globalThis[TARGET]||defineGlobalProperty(TARGET,{}):globalThis[TARGET]&&globalThis[TARGET].prototype)for(key in source){if(sourceProperty=source[key],targetProperty=options.dontCallGetSet?(descriptor=getOwnPropertyDescriptor(target,key))&&descriptor.value:target[key],!isForced(GLOBAL?key:TARGET+(STATIC?".":"#")+key,options.forced)&&void 0!==targetProperty){if(typeof sourceProperty==typeof targetProperty)continue;copyConstructorProperties(sourceProperty,targetProperty);}(options.sham||targetProperty&&targetProperty.sham)&&createNonEnumerableProperty(sourceProperty,"sham",true),defineBuiltIn(target,key,sourceProperty,options);}}}function requireFunctionApply(){if(hasRequiredFunctionApply)return functionApply;hasRequiredFunctionApply=1;var NATIVE_BIND=requireFunctionBindNative(),FunctionPrototype=Function.prototype,apply=FunctionPrototype.apply,call=FunctionPrototype.call;return functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND?call.bind(apply):function(){return call.apply(apply,arguments)}),functionApply}var arraySlice,hasRequiredArraySlice,functionBind,hasRequiredFunctionBind,isConstructor,hasRequiredIsConstructor,aConstructor,hasRequiredAConstructor,es_reflect_construct={};function requireArraySlice(){if(hasRequiredArraySlice)return arraySlice;hasRequiredArraySlice=1;var uncurryThis=requireFunctionUncurryThis();return arraySlice=uncurryThis([].slice)}function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var uncurryThis=requireFunctionUncurryThis(),aCallable=requireACallable(),isObject=requireIsObject(),hasOwn=requireHasOwnProperty(),arraySlice=requireArraySlice(),NATIVE_BIND=requireFunctionBindNative(),$Function=Function,concat=uncurryThis([].concat),join=uncurryThis([].join),factories={};return functionBind=NATIVE_BIND?$Function.bind:function(that){var F=aCallable(this),Prototype=F.prototype,partArgs=arraySlice(arguments,1),boundFunction=function(){var args=concat(partArgs,arraySlice(arguments));return this instanceof boundFunction?function(C,argsLength,args){if(!hasOwn(factories,argsLength)){for(var list=[],i=0;i<argsLength;i++)list[i]="a["+i+"]";factories[argsLength]=$Function("C,a","return new C("+join(list,",")+")");}return factories[argsLength](C,args)}(F,args.length,args):F.apply(that,args)};return isObject(Prototype)&&(boundFunction.prototype=Prototype),boundFunction},functionBind}function requireIsConstructor(){if(hasRequiredIsConstructor)return isConstructor;hasRequiredIsConstructor=1;var uncurryThis=requireFunctionUncurryThis(),fails=requireFails(),isCallable=requireIsCallable(),classof=requireClassof(),getBuiltIn=requireGetBuiltIn(),inspectSource=requireInspectSource(),noop=function(){},construct=getBuiltIn("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=uncurryThis(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.test(noop),isConstructorModern=function(argument){if(!isCallable(argument))return false;try{return construct(noop,[],argument),!0}catch(error){return false}},isConstructorLegacy=function(argument){if(!isCallable(argument))return false;switch(classof(argument)){case "AsyncFunction":case "GeneratorFunction":case "AsyncGeneratorFunction":return false}try{return INCORRECT_TO_STRING||!!exec(constructorRegExp,inspectSource(argument))}catch(error){return true}};return isConstructorLegacy.sham=true,isConstructor=!construct||fails((function(){var called;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){called=true;}))||called}))?isConstructorLegacy:isConstructorModern}function requireAConstructor(){if(hasRequiredAConstructor)return aConstructor;hasRequiredAConstructor=1;var isConstructor=requireIsConstructor(),tryToString=requireTryToString(),$TypeError=TypeError;return aConstructor=function(argument){if(isConstructor(argument))return argument;throw new $TypeError(tryToString(argument)+" is not a constructor")}}var objectKeys,hasRequiredObjectKeys,hasRequiredObjectDefineProperties,html,hasRequiredHtml,objectCreate,hasRequiredObjectCreate,hasRequiredEs_reflect_construct,objectDefineProperties={};function requireObjectKeys(){if(hasRequiredObjectKeys)return objectKeys;hasRequiredObjectKeys=1;var internalObjectKeys=requireObjectKeysInternal(),enumBugKeys=requireEnumBugKeys();return objectKeys=Object.keys||function(O){return internalObjectKeys(O,enumBugKeys)}}function requireHtml(){if(hasRequiredHtml)return html;hasRequiredHtml=1;var getBuiltIn=requireGetBuiltIn();return html=getBuiltIn("document","documentElement")}function requireObjectCreate(){if(hasRequiredObjectCreate)return objectCreate;hasRequiredObjectCreate=1;var activeXDocument,anObject=requireAnObject(),definePropertiesModule=function(){if(hasRequiredObjectDefineProperties)return objectDefineProperties;hasRequiredObjectDefineProperties=1;var DESCRIPTORS=requireDescriptors(),V8_PROTOTYPE_DEFINE_BUG=requireV8PrototypeDefineBug(),definePropertyModule=requireObjectDefineProperty(),anObject=requireAnObject(),toIndexedObject=requireToIndexedObject(),objectKeys=requireObjectKeys();return objectDefineProperties.f=DESCRIPTORS&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(O,Properties){anObject(O);for(var key,props=toIndexedObject(Properties),keys=objectKeys(Properties),length=keys.length,index=0;length>index;)definePropertyModule.f(O,key=keys[index++],props[key]);return O},objectDefineProperties}(),enumBugKeys=requireEnumBugKeys(),hiddenKeys=requireHiddenKeys(),html=requireHtml(),documentCreateElement=requireDocumentCreateElement(),sharedKey=requireSharedKey(),IE_PROTO=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(content){return "<script>"+content+"<\/script>"},NullProtoObjectViaActiveX=function(activeXDocument){activeXDocument.write(scriptTag("")),activeXDocument.close();var temp=activeXDocument.parentWindow.Object;return activeXDocument=null,temp},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile");}catch(error){}var iframeDocument,iframe;NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):((iframe=documentCreateElement("iframe")).style.display="none",html.appendChild(iframe),iframe.src=String("javascript:"),(iframeDocument=iframe.contentWindow.document).open(),iframeDocument.write(scriptTag("document.F=Object")),iframeDocument.close(),iframeDocument.F):NullProtoObjectViaActiveX(activeXDocument);for(var length=enumBugKeys.length;length--;)delete NullProtoObject.prototype[enumBugKeys[length]];return NullProtoObject()};return hiddenKeys[IE_PROTO]=true,objectCreate=Object.create||function(O,Properties){var result;return null!==O?(EmptyConstructor.prototype=anObject(O),result=new EmptyConstructor,EmptyConstructor.prototype=null,result[IE_PROTO]=O):result=NullProtoObject(),void 0===Properties?result:definePropertiesModule.f(result,Properties)}}var hasRequiredEs_reflect_defineProperty,es_reflect_defineProperty={};var hasRequiredEs_reflect_deleteProperty,es_reflect_deleteProperty={};var isDataDescriptor,hasRequiredIsDataDescriptor,correctPrototypeGetter,hasRequiredCorrectPrototypeGetter,objectGetPrototypeOf,hasRequiredObjectGetPrototypeOf,hasRequiredEs_reflect_get,es_reflect_get={};function requireIsDataDescriptor(){if(hasRequiredIsDataDescriptor)return isDataDescriptor;hasRequiredIsDataDescriptor=1;var hasOwn=requireHasOwnProperty();return isDataDescriptor=function(descriptor){return void 0!==descriptor&&(hasOwn(descriptor,"value")||hasOwn(descriptor,"writable"))}}function requireCorrectPrototypeGetter(){if(hasRequiredCorrectPrototypeGetter)return correctPrototypeGetter;hasRequiredCorrectPrototypeGetter=1;var fails=requireFails();return correctPrototypeGetter=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype}))}function requireObjectGetPrototypeOf(){if(hasRequiredObjectGetPrototypeOf)return objectGetPrototypeOf;hasRequiredObjectGetPrototypeOf=1;var hasOwn=requireHasOwnProperty(),isCallable=requireIsCallable(),toObject=requireToObject(),sharedKey=requireSharedKey(),CORRECT_PROTOTYPE_GETTER=requireCorrectPrototypeGetter(),IE_PROTO=sharedKey("IE_PROTO"),$Object=Object,ObjectPrototype=$Object.prototype;return objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object.getPrototypeOf:function(O){var object=toObject(O);if(hasOwn(object,IE_PROTO))return object[IE_PROTO];var constructor=object.constructor;return isCallable(constructor)&&object instanceof constructor?constructor.prototype:object instanceof $Object?ObjectPrototype:null}}var hasRequiredEs_reflect_getOwnPropertyDescriptor,es_reflect_getOwnPropertyDescriptor={};var hasRequiredEs_reflect_getPrototypeOf,es_reflect_getPrototypeOf={};var hasRequiredEs_reflect_has;var arrayBufferNonExtensible,hasRequiredArrayBufferNonExtensible,objectIsExtensible,hasRequiredObjectIsExtensible,hasRequiredEs_reflect_isExtensible,es_reflect_isExtensible={};function requireObjectIsExtensible(){if(hasRequiredObjectIsExtensible)return objectIsExtensible;hasRequiredObjectIsExtensible=1;var fails=requireFails(),isObject=requireIsObject(),classof=requireClassofRaw(),ARRAY_BUFFER_NON_EXTENSIBLE=function(){if(hasRequiredArrayBufferNonExtensible)return arrayBufferNonExtensible;hasRequiredArrayBufferNonExtensible=1;var fails=requireFails();return arrayBufferNonExtensible=fails((function(){if("function"==typeof ArrayBuffer){var buffer=new ArrayBuffer(8);Object.isExtensible(buffer)&&Object.defineProperty(buffer,"a",{value:8});}}))}(),$isExtensible=Object.isExtensible,FAILS_ON_PRIMITIVES=fails((function(){}));return objectIsExtensible=FAILS_ON_PRIMITIVES||ARRAY_BUFFER_NON_EXTENSIBLE?function(it){return !!isObject(it)&&((!ARRAY_BUFFER_NON_EXTENSIBLE||"ArrayBuffer"!==classof(it))&&(!$isExtensible||$isExtensible(it)))}:$isExtensible}var hasRequiredEs_reflect_ownKeys;var freezing,hasRequiredFreezing,hasRequiredEs_reflect_preventExtensions,es_reflect_preventExtensions={};function requireEs_reflect_preventExtensions(){if(hasRequiredEs_reflect_preventExtensions)return es_reflect_preventExtensions;hasRequiredEs_reflect_preventExtensions=1;var $=require_export(),getBuiltIn=requireGetBuiltIn(),anObject=requireAnObject(),FREEZING=function(){if(hasRequiredFreezing)return freezing;hasRequiredFreezing=1;var fails=requireFails();return freezing=!fails((function(){return Object.isExtensible(Object.preventExtensions({}))}))}();return $({target:"Reflect",stat:true,sham:!FREEZING},{preventExtensions:function(target){anObject(target);try{var objectPreventExtensions=getBuiltIn("Object","preventExtensions");return objectPreventExtensions&&objectPreventExtensions(target),!0}catch(error){return false}}}),es_reflect_preventExtensions}var hasRequiredEs_reflect_set,es_reflect_set={};var isPossiblePrototype,hasRequiredIsPossiblePrototype,aPossiblePrototype,hasRequiredAPossiblePrototype,functionUncurryThisAccessor,hasRequiredFunctionUncurryThisAccessor,objectSetPrototypeOf,hasRequiredObjectSetPrototypeOf,hasRequiredEs_reflect_setPrototypeOf,es_reflect_setPrototypeOf={};function requireIsPossiblePrototype(){if(hasRequiredIsPossiblePrototype)return isPossiblePrototype;hasRequiredIsPossiblePrototype=1;var isObject=requireIsObject();return isPossiblePrototype=function(argument){return isObject(argument)||null===argument}}function requireAPossiblePrototype(){if(hasRequiredAPossiblePrototype)return aPossiblePrototype;hasRequiredAPossiblePrototype=1;var isPossiblePrototype=requireIsPossiblePrototype(),$String=String,$TypeError=TypeError;return aPossiblePrototype=function(argument){if(isPossiblePrototype(argument))return argument;throw new $TypeError("Can't set "+$String(argument)+" as a prototype")}}function requireObjectSetPrototypeOf(){if(hasRequiredObjectSetPrototypeOf)return objectSetPrototypeOf;hasRequiredObjectSetPrototypeOf=1;var uncurryThisAccessor=function(){if(hasRequiredFunctionUncurryThisAccessor)return functionUncurryThisAccessor;hasRequiredFunctionUncurryThisAccessor=1;var uncurryThis=requireFunctionUncurryThis(),aCallable=requireACallable();return functionUncurryThisAccessor=function(object,key,method){try{return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object,key)[method]))}catch(error){}}}(),isObject=requireIsObject(),requireObjectCoercible=requireRequireObjectCoercible(),aPossiblePrototype=requireAPossiblePrototype();return objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var setter,CORRECT_SETTER=false,test={};try{(setter=uncurryThisAccessor(Object.prototype,"__proto__","set"))(test,[]),CORRECT_SETTER=test instanceof Array;}catch(error){}return function(O,proto){return requireObjectCoercible(O),aPossiblePrototype(proto),isObject(O)?(CORRECT_SETTER?setter(O,proto):O.__proto__=proto,O):O}}():void 0)}var setToStringTag,hasRequiredSetToStringTag,hasRequiredEs_reflect_toStringTag,path,hasRequiredPath,reflect$1,hasRequiredReflect$1,reflect,hasRequiredReflect,es_reflect_toStringTag={};function requireSetToStringTag(){if(hasRequiredSetToStringTag)return setToStringTag;hasRequiredSetToStringTag=1;var defineProperty=requireObjectDefineProperty().f,hasOwn=requireHasOwnProperty(),TO_STRING_TAG=requireWellKnownSymbol()("toStringTag");return setToStringTag=function(target,TAG,STATIC){target&&!STATIC&&(target=target.prototype),target&&!hasOwn(target,TO_STRING_TAG)&&defineProperty(target,TO_STRING_TAG,{configurable:true,value:TAG});}}function requirePath(){if(hasRequiredPath)return path;hasRequiredPath=1;var globalThis=requireGlobalThis();return path=globalThis}function requireReflect$1(){if(hasRequiredReflect$1)return reflect$1;hasRequiredReflect$1=1,requireEs_object_toString(),function(){if(hasRequiredEs_reflect_apply)return es_reflect_apply;hasRequiredEs_reflect_apply=1;var $=require_export(),functionApply=requireFunctionApply(),aCallable=requireACallable(),anObject=requireAnObject();$({target:"Reflect",stat:true,forced:!requireFails()((function(){Reflect.apply((function(){}));}))},{apply:function(target,thisArgument,argumentsList){return functionApply(aCallable(target),thisArgument,anObject(argumentsList))}});}(),function(){if(hasRequiredEs_reflect_construct)return es_reflect_construct;hasRequiredEs_reflect_construct=1;var $=require_export(),getBuiltIn=requireGetBuiltIn(),apply=requireFunctionApply(),bind=requireFunctionBind(),aConstructor=requireAConstructor(),anObject=requireAnObject(),isObject=requireIsObject(),create=requireObjectCreate(),fails=requireFails(),nativeConstruct=getBuiltIn("Reflect","construct"),ObjectPrototype=Object.prototype,push=[].push,NEW_TARGET_BUG=fails((function(){function F(){}return !(nativeConstruct((function(){}),[],F)instanceof F)})),ARGS_BUG=!fails((function(){nativeConstruct((function(){}));})),FORCED=NEW_TARGET_BUG||ARGS_BUG;$({target:"Reflect",stat:true,forced:FORCED,sham:FORCED},{construct:function(Target,args){aConstructor(Target),anObject(args);var newTarget=arguments.length<3?Target:aConstructor(arguments[2]);if(ARGS_BUG&&!NEW_TARGET_BUG)return nativeConstruct(Target,args,newTarget);if(Target===newTarget){switch(args.length){case 0:return new Target;case 1:return new Target(args[0]);case 2:return new Target(args[0],args[1]);case 3:return new Target(args[0],args[1],args[2]);case 4:return new Target(args[0],args[1],args[2],args[3])}var $args=[null];return apply(push,$args,args),new(apply(bind,Target,$args))}var proto=newTarget.prototype,instance=create(isObject(proto)?proto:ObjectPrototype),result=apply(Target,instance,args);return isObject(result)?result:instance}});}(),function(){if(hasRequiredEs_reflect_defineProperty)return es_reflect_defineProperty;hasRequiredEs_reflect_defineProperty=1;var $=require_export(),DESCRIPTORS=requireDescriptors(),anObject=requireAnObject(),toPropertyKey=requireToPropertyKey(),definePropertyModule=requireObjectDefineProperty();$({target:"Reflect",stat:true,forced:requireFails()((function(){Reflect.defineProperty(definePropertyModule.f({},1,{value:1}),1,{value:2});})),sham:!DESCRIPTORS},{defineProperty:function(target,propertyKey,attributes){anObject(target);var key=toPropertyKey(propertyKey);anObject(attributes);try{return definePropertyModule.f(target,key,attributes),!0}catch(error){return false}}});}(),function(){if(hasRequiredEs_reflect_deleteProperty)return es_reflect_deleteProperty;hasRequiredEs_reflect_deleteProperty=1;var $=require_export(),anObject=requireAnObject(),getOwnPropertyDescriptor=requireObjectGetOwnPropertyDescriptor().f;$({target:"Reflect",stat:true},{deleteProperty:function(target,propertyKey){var descriptor=getOwnPropertyDescriptor(anObject(target),propertyKey);return !(descriptor&&!descriptor.configurable)&&delete target[propertyKey]}});}(),function(){if(hasRequiredEs_reflect_get)return es_reflect_get;hasRequiredEs_reflect_get=1;var $=require_export(),call=requireFunctionCall(),isObject=requireIsObject(),anObject=requireAnObject(),isDataDescriptor=requireIsDataDescriptor(),getOwnPropertyDescriptorModule=requireObjectGetOwnPropertyDescriptor(),getPrototypeOf=requireObjectGetPrototypeOf();$({target:"Reflect",stat:true},{get:function get(target,propertyKey){var descriptor,prototype,receiver=arguments.length<3?target:arguments[2];return anObject(target)===receiver?target[propertyKey]:(descriptor=getOwnPropertyDescriptorModule.f(target,propertyKey))?isDataDescriptor(descriptor)?descriptor.value:void 0===descriptor.get?void 0:call(descriptor.get,receiver):isObject(prototype=getPrototypeOf(target))?get(prototype,propertyKey,receiver):void 0}});}(),function(){if(hasRequiredEs_reflect_getOwnPropertyDescriptor)return es_reflect_getOwnPropertyDescriptor;hasRequiredEs_reflect_getOwnPropertyDescriptor=1;var $=require_export(),DESCRIPTORS=requireDescriptors(),anObject=requireAnObject(),getOwnPropertyDescriptorModule=requireObjectGetOwnPropertyDescriptor();$({target:"Reflect",stat:true,sham:!DESCRIPTORS},{getOwnPropertyDescriptor:function(target,propertyKey){return getOwnPropertyDescriptorModule.f(anObject(target),propertyKey)}});}(),function(){if(hasRequiredEs_reflect_getPrototypeOf)return es_reflect_getPrototypeOf;hasRequiredEs_reflect_getPrototypeOf=1;var $=require_export(),anObject=requireAnObject(),objectGetPrototypeOf=requireObjectGetPrototypeOf();$({target:"Reflect",stat:true,sham:!requireCorrectPrototypeGetter()},{getPrototypeOf:function(target){return objectGetPrototypeOf(anObject(target))}});}(),hasRequiredEs_reflect_has||(hasRequiredEs_reflect_has=1,require_export()({target:"Reflect",stat:true},{has:function(target,propertyKey){return propertyKey in target}})),function(){if(hasRequiredEs_reflect_isExtensible)return es_reflect_isExtensible;hasRequiredEs_reflect_isExtensible=1;var $=require_export(),anObject=requireAnObject(),$isExtensible=requireObjectIsExtensible();$({target:"Reflect",stat:true},{isExtensible:function(target){return anObject(target),$isExtensible(target)}});}(),hasRequiredEs_reflect_ownKeys||(hasRequiredEs_reflect_ownKeys=1,require_export()({target:"Reflect",stat:true},{ownKeys:requireOwnKeys()})),requireEs_reflect_preventExtensions(),function(){if(hasRequiredEs_reflect_set)return es_reflect_set;hasRequiredEs_reflect_set=1;var $=require_export(),call=requireFunctionCall(),anObject=requireAnObject(),isObject=requireIsObject(),isDataDescriptor=requireIsDataDescriptor(),fails=requireFails(),definePropertyModule=requireObjectDefineProperty(),getOwnPropertyDescriptorModule=requireObjectGetOwnPropertyDescriptor(),getPrototypeOf=requireObjectGetPrototypeOf(),createPropertyDescriptor=requireCreatePropertyDescriptor();$({target:"Reflect",stat:true,forced:fails((function(){var Constructor=function(){},object=definePropertyModule.f(new Constructor,"a",{configurable:true});return false!==Reflect.set(Constructor.prototype,"a",1,object)}))},{set:function set(target,propertyKey,V){var existingDescriptor,prototype,setter,receiver=arguments.length<4?target:arguments[3],ownDescriptor=getOwnPropertyDescriptorModule.f(anObject(target),propertyKey);if(!ownDescriptor){if(isObject(prototype=getPrototypeOf(target)))return set(prototype,propertyKey,V,receiver);ownDescriptor=createPropertyDescriptor(0);}if(isDataDescriptor(ownDescriptor)){if(false===ownDescriptor.writable||!isObject(receiver))return false;if(existingDescriptor=getOwnPropertyDescriptorModule.f(receiver,propertyKey)){if(existingDescriptor.get||existingDescriptor.set||false===existingDescriptor.writable)return false;existingDescriptor.value=V,definePropertyModule.f(receiver,propertyKey,existingDescriptor);}else definePropertyModule.f(receiver,propertyKey,createPropertyDescriptor(0,V));}else {if(void 0===(setter=ownDescriptor.set))return false;call(setter,receiver,V);}return true}});}(),function(){if(hasRequiredEs_reflect_setPrototypeOf)return es_reflect_setPrototypeOf;hasRequiredEs_reflect_setPrototypeOf=1;var $=require_export(),anObject=requireAnObject(),aPossiblePrototype=requireAPossiblePrototype(),objectSetPrototypeOf=requireObjectSetPrototypeOf();objectSetPrototypeOf&&$({target:"Reflect",stat:true},{setPrototypeOf:function(target,proto){anObject(target),aPossiblePrototype(proto);try{return objectSetPrototypeOf(target,proto),!0}catch(error){return false}}});}(),function(){if(hasRequiredEs_reflect_toStringTag)return es_reflect_toStringTag;hasRequiredEs_reflect_toStringTag=1;var $=require_export(),globalThis=requireGlobalThis(),setToStringTag=requireSetToStringTag();$({global:true},{Reflect:{}}),setToStringTag(globalThis.Reflect,"Reflect",true);}();var path=requirePath();return reflect$1=path.Reflect}!function(){if(hasRequiredReflect)return reflect;hasRequiredReflect=1;var parent=requireReflect$1();reflect=parent;}();var _$LoggerStyle$_={info:"",log:"background: #4096ff; color: #FFF;",warn:"background: yellow; color: #FFF;",error:"background: red; color: #FFF;"},LoggerCls=function(){function LoggerCls(options){ void 0===options&&(options={}),this._options={level:"INFO",showTime:false},this._levelNum=3,this.info=this._loggerFactory("info",this._levelNum>=3),this.log=this._loggerFactory("log",this._levelNum>=2),this.warn=this._loggerFactory("warn",this._levelNum>=1),this.error=this._loggerFactory("error",this._levelNum>=0),this.setOptions(options);}var _proto=LoggerCls.prototype;return _proto.setOptions=function(options){var _this__options_level;this._options=Object.assign({},this._options,options),this._levelNum=this._matchLevel(null!=(_this__options_level=this._options.level)?_this__options_level:"INFO"),this.info=this._loggerFactory("info",this._levelNum>=3),this.log=this._loggerFactory("log",this._levelNum>=2),this.warn=this._loggerFactory("warn",this._levelNum>=1),this.error=this._loggerFactory("error",this._levelNum>=0);},_proto._matchLevel=function(level){var logLevel=3;switch(level){case "INFO":logLevel=3;break;case "LOG":logLevel=2;break;case "WARN":logLevel=1;break;case "ERROR":logLevel=0;}return logLevel},_proto._loggerFactory=function(type,bool){var fn=console[type];if(bool&&fn){var _fn,args0=this._options.name?"%c["+this._options.name+"]%c %c["+type.toUpperCase()+"]":"%c["+type.toUpperCase()+"]",color=[this._options.name?"background: green;color: #fff":null,this._options.name?"":null,_$LoggerStyle$_[type]].filter((function(color){return null!=color}));return (_fn=fn).bind.apply(_fn,[].concat([console,args0],color))}return LoggerCls.noop},_proto.getOptions=function(){return this._options},_proto.getVersion=function(){return "2.0.0"},LoggerCls}();function __$fillTen(num){return (num=+num)<10&&(num="0"+num),num+""}LoggerCls.noop=function(){},LoggerCls.VERSION="2.0.0";var __$CONSOLE_LIST$__=["info","log","warn","error"];dist$2=function(options){var logger=new LoggerCls(options);return new Proxy(logger,{get:function(target,prop){if(__$CONSOLE_LIST$__.includes(prop)){var _target__options;if(null==(_target__options=target._options)?void 0:_target__options.showTime){var time=(now=new Date(Date.now()),year=now.getFullYear(),month=now.getMonth()+1,day=now.getDate(),hour=now.getHours(),min=now.getMinutes(),sec=now.getSeconds(),ms=now.getMilliseconds(),year+"/"+__$fillTen(month)+"/"+__$fillTen(day)+" "+__$fillTen(hour)+":"+__$fillTen(min)+":"+__$fillTen(sec)+":"+ms);return target[prop].bind(console,"["+time+"]")}return target[prop].bind(console)}var now,year,month,day,hour,min,sec,ms;return Reflect.get(target,prop)}})};
4136
+ return dist$2;
4281
4137
  }
4282
4138
 
4283
- var distExports$4 = requireDist$7();
4284
- var Logger = /*@__PURE__*/getDefaultExportFromCjs(distExports$4);
4139
+ var distExports$2 = requireDist$2();
4140
+ var Logger = /*@__PURE__*/getDefaultExportFromCjs(distExports$2);
4285
4141
 
4286
4142
  var zh = {
4287
4143
  391001: '取流地址或端口非法',
@@ -5442,14 +5298,14 @@
5442
5298
  configurable: true
5443
5299
  }
5444
5300
  });
5445
- if (superClass) _set_prototype_of$l(subClass, superClass);
5301
+ if (superClass) _set_prototype_of$o(subClass, superClass);
5446
5302
  }
5447
- function _set_prototype_of$l(o, p) {
5448
- _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5303
+ function _set_prototype_of$o(o, p) {
5304
+ _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5449
5305
  o.__proto__ = p;
5450
5306
  return o;
5451
5307
  };
5452
- return _set_prototype_of$l(o, p);
5308
+ return _set_prototype_of$o(o, p);
5453
5309
  }
5454
5310
  /**
5455
5311
  * 截图控件
@@ -5570,8 +5426,8 @@
5570
5426
  return Content;
5571
5427
  }(EventEmitter);
5572
5428
 
5573
- function _extends$l() {
5574
- _extends$l = Object.assign || function(target) {
5429
+ function _extends$n() {
5430
+ _extends$n = Object.assign || function(target) {
5575
5431
  for(var i = 1; i < arguments.length; i++){
5576
5432
  var source = arguments[i];
5577
5433
  for(var key in source){
@@ -5582,7 +5438,7 @@
5582
5438
  }
5583
5439
  return target;
5584
5440
  };
5585
- return _extends$l.apply(this, arguments);
5441
+ return _extends$n.apply(this, arguments);
5586
5442
  }
5587
5443
  function _inherits$k(subClass, superClass) {
5588
5444
  if (typeof superClass !== "function" && superClass !== null) {
@@ -5595,14 +5451,14 @@
5595
5451
  configurable: true
5596
5452
  }
5597
5453
  });
5598
- if (superClass) _set_prototype_of$k(subClass, superClass);
5454
+ if (superClass) _set_prototype_of$n(subClass, superClass);
5599
5455
  }
5600
- function _set_prototype_of$k(o, p) {
5601
- _set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5456
+ function _set_prototype_of$n(o, p) {
5457
+ _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5602
5458
  o.__proto__ = p;
5603
5459
  return o;
5604
5460
  };
5605
- return _set_prototype_of$k(o, p);
5461
+ return _set_prototype_of$n(o, p);
5606
5462
  }
5607
5463
  /**
5608
5464
  * 更多控件
@@ -5611,7 +5467,7 @@
5611
5467
  _inherits$k(More, Control);
5612
5468
  function More(options) {
5613
5469
  var _this;
5614
- _this = Control.call(this, _extends$l({}, options, {
5470
+ _this = Control.call(this, _extends$n({}, options, {
5615
5471
  tagName: 'span',
5616
5472
  controlType: 'button',
5617
5473
  classNameSuffix: 'more'
@@ -6238,12 +6094,12 @@
6238
6094
  Object.defineProperty(target, descriptor.key, descriptor);
6239
6095
  }
6240
6096
  }
6241
- function _create_class$5(Constructor, protoProps, staticProps) {
6097
+ function _create_class$b(Constructor, protoProps, staticProps) {
6242
6098
  if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
6243
6099
  return Constructor;
6244
6100
  }
6245
- function _extends$k() {
6246
- _extends$k = Object.assign || function(target) {
6101
+ function _extends$m() {
6102
+ _extends$m = Object.assign || function(target) {
6247
6103
  for(var i = 1; i < arguments.length; i++){
6248
6104
  var source = arguments[i];
6249
6105
  for(var key in source){
@@ -6254,7 +6110,7 @@
6254
6110
  }
6255
6111
  return target;
6256
6112
  };
6257
- return _extends$k.apply(this, arguments);
6113
+ return _extends$m.apply(this, arguments);
6258
6114
  }
6259
6115
  function _inherits$j(subClass, superClass) {
6260
6116
  if (typeof superClass !== "function" && superClass !== null) {
@@ -6267,14 +6123,14 @@
6267
6123
  configurable: true
6268
6124
  }
6269
6125
  });
6270
- if (superClass) _set_prototype_of$j(subClass, superClass);
6126
+ if (superClass) _set_prototype_of$m(subClass, superClass);
6271
6127
  }
6272
- function _set_prototype_of$j(o, p) {
6273
- _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6128
+ function _set_prototype_of$m(o, p) {
6129
+ _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6274
6130
  o.__proto__ = p;
6275
6131
  return o;
6276
6132
  };
6277
- return _set_prototype_of$j(o, p);
6133
+ return _set_prototype_of$m(o, p);
6278
6134
  }
6279
6135
  var ZOOM_DEFAULT_OPTIONS = {
6280
6136
  open: false,
@@ -6287,7 +6143,7 @@
6287
6143
  _inherits$j(Zoom, Control);
6288
6144
  function Zoom(options) {
6289
6145
  var _this;
6290
- _this = Control.call(this, _extends$k({}, options, {
6146
+ _this = Control.call(this, _extends$m({}, options, {
6291
6147
  tagName: 'span',
6292
6148
  controlType: 'button',
6293
6149
  classNameSuffix: 'zoom'
@@ -6365,7 +6221,7 @@
6365
6221
  this.active = !this.active;
6366
6222
  Control.prototype._onControlClick.call(this, e);
6367
6223
  };
6368
- _create_class$5(Zoom, [
6224
+ _create_class$b(Zoom, [
6369
6225
  {
6370
6226
  key: "value",
6371
6227
  get: function get() {
@@ -6416,732 +6272,14 @@
6416
6272
  }(Control);
6417
6273
 
6418
6274
  /*
6419
- * @ezuikit/control-zoom v0.0.2
6420
- * Copyright (c) 2026-04-02 Ezviz-OpenBiz
6275
+ * @ezuikit/control-zoom v1.0.0-beta.1
6276
+ * Copyright (c) 2026-05-03 Ezviz-OpenBiz
6421
6277
  * Released under the MIT License.
6422
6278
  */
6279
+ 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.1";
6423
6280
 
6424
- var dist$6;
6425
- var hasRequiredDist$6;
6426
-
6427
- function requireDist$6 () {
6428
- if (hasRequiredDist$6) return dist$6;
6429
- hasRequiredDist$6 = 1;
6430
-
6431
- /**
6432
- * Zoom position
6433
- *
6434
- */ function _defineProperties(target, props) {
6435
- for(var i = 0; i < props.length; i++){
6436
- var descriptor = props[i];
6437
- descriptor.enumerable = descriptor.enumerable || false;
6438
- descriptor.configurable = true;
6439
- if ("value" in descriptor) descriptor.writable = true;
6440
- Object.defineProperty(target, descriptor.key, descriptor);
6441
- }
6442
- }
6443
- function _create_class(Constructor, protoProps, staticProps) {
6444
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
6445
- return Constructor;
6446
- }
6447
- var ZOOM_DEFAULT_POSITION = [
6448
- 0,
6449
- 0
6450
- ];
6451
- /**
6452
- * 默认值
6453
- */ var DefaultOptions = {
6454
- initialZoom: 1,
6455
- defaultCursor: 'pointer',
6456
- scrollVelocity: 0.1,
6457
- animDuration: 0.25,
6458
- allowZoom: true,
6459
- allowPan: true,
6460
- onChange: function() {},
6461
- onTranslateChange: function() {},
6462
- onTap: function() {},
6463
- max: 8,
6464
- min: 1,
6465
- zoomStep: 0.1,
6466
- allowTouchEvents: false,
6467
- allowWheel: true,
6468
- ignoredMouseButtons: [],
6469
- doubleTouchMaxDelay: 300,
6470
- decelerationDuration: 750
6471
- };
6472
- /**
6473
- * dom 节点放大和拖动
6474
- *
6475
- */ var Zoom = /*#__PURE__*/ function() {
6476
- function Zoom(container, options) {
6477
- var _this = this;
6478
- this._dragging = false;
6479
- /**
6480
- * 销毁
6481
- * destroy
6482
- */ this.destroy = function() {
6483
- _this.setAllowZoom(false);
6484
- _this.reset();
6485
- _this.removeEventListeners();
6486
- };
6487
- /**
6488
- * 设置是否旋转
6489
- * @param trans - 是否transform
6490
- */ this.setTransform = function(trans) {
6491
- _this.transform = trans;
6492
- };
6493
- /**
6494
- * 获取是否旋转
6495
- * @returns
6496
- */ this.getTransform = function() {
6497
- return _this.transform;
6498
- };
6499
- /**
6500
- * 更新x轴和Y轴平移值
6501
- */ this.updateTranslate = function() {
6502
- var translateX = 0;
6503
- var translateY = 0;
6504
- if (_this.percentPos[0] < 0) {
6505
- translateX = _this.percentPos[0] < -(0.5 * (_this.zoom - 1)) ? -(0.5 * (_this.zoom - 1)) : _this.percentPos[0];
6506
- } else {
6507
- translateX = _this.percentPos[0] > 0.5 * (_this.zoom - 1) ? 0.5 * (_this.zoom - 1) : _this.percentPos[0];
6508
- }
6509
- if (_this.percentPos[1] < 0) {
6510
- translateY = _this.percentPos[1] < -(0.5 * (_this.zoom - 1)) ? -(0.5 * (_this.zoom - 1)) : _this.percentPos[1];
6511
- } else {
6512
- translateY = _this.percentPos[1] > 0.5 * (_this.zoom - 1) ? 0.5 * (_this.zoom - 1) : _this.percentPos[1];
6513
- }
6514
- _this.percentPos = [
6515
- translateX,
6516
- translateY
6517
- ];
6518
- };
6519
- /**
6520
- * 更新容器样式
6521
- */ this.update = function() {
6522
- if (!_this.container) return;
6523
- _this.updateTranslate();
6524
- _this.container.style.transition = "transform ease-out " + _this.transition + "s";
6525
- _this.container.style.transform = "translate3d(" + _this.percentPos[0] * 100 + "%, " + _this.percentPos[1] * 100 + "%, 0) scale(" + _this.zoom + ")";
6526
- };
6527
- /**
6528
- * 设置支持缩放
6529
- * @param allow
6530
- */ this.setAllowZoom = function(allow) {
6531
- _this.options.allowZoom = allow;
6532
- };
6533
- /**
6534
- * 设置缩放值
6535
- * @param zoom - 缩放值
6536
- * @param reset - 是否重置
6537
- */ this.setZoom = function(zoom, reset) {
6538
- zoom = parseFloat(zoom.toFixed(_this.getPrecision(_this.options.zoomStep)));
6539
- if (_this.zoom !== zoom) {
6540
- _this.zoom = zoom;
6541
- _this.update();
6542
- _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, +_this.zoom.toFixed(_this.getPrecision(_this.options.zoomStep)), reset);
6543
- }
6544
- };
6545
- /**
6546
- * 获取缩放值
6547
- * @returns
6548
- */ this.getZoom = function() {
6549
- return _this.zoom;
6550
- };
6551
- /**
6552
- * 设置位置
6553
- * @param pos - 位置 [X轴坐标转换, Y轴坐标转换]
6554
- */ this.setPos = function(pos) {
6555
- var _this_container, _this_container1;
6556
- var containerWidth = (_this_container = _this.container) == null ? void 0 : _this_container.clientWidth;
6557
- var containerHeight = (_this_container1 = _this.container) == null ? void 0 : _this_container1.clientHeight;
6558
- if (+_this.pos[0] !== pos[0] || +_this.pos[1] !== pos[1]) {
6559
- _this.percentPos = [
6560
- pos[0] / containerWidth,
6561
- pos[1] / containerHeight
6562
- ];
6563
- _this.update();
6564
- _this.options.onTranslateChange == null ? void 0 : _this.options.onTranslateChange.call(_this.options, {
6565
- posX: pos[0],
6566
- posY: pos[1]
6567
- });
6568
- }
6569
- };
6570
- /**
6571
- * 设置过渡时间
6572
- * @param duration - 过渡时间, 单位秒
6573
- */ this.setTransitionDuration = function(duration) {
6574
- _this.transition = duration;
6575
- _this.update();
6576
- };
6577
- /**
6578
- * 设置鼠标样式
6579
- * @param cursor
6580
- * @returns
6581
- */ this.setCursor = function(cursor) {
6582
- if (!_this.container) return;
6583
- _this.container.style.cssText += "cursor:" + cursor + ";";
6584
- _this.cursor = cursor;
6585
- };
6586
- this.zoomIn = function(value) {
6587
- var newPosX = _this.pos[0];
6588
- var newPosY = _this.pos[1];
6589
- var prevZoom = _this.zoom;
6590
- var _this_options_max, _this_options_max1;
6591
- var newZoom = prevZoom + value < ((_this_options_max = _this.options.max) != null ? _this_options_max : 8) ? prevZoom + value : (_this_options_max1 = _this.options.max) != null ? _this_options_max1 : 8;
6592
- if (newZoom !== prevZoom) {
6593
- newPosX = newPosX * (newZoom - 1) / (prevZoom > 1 ? prevZoom - 1 : prevZoom);
6594
- newPosY = newPosY * (newZoom - 1) / (prevZoom > 1 ? prevZoom - 1 : prevZoom);
6595
- }
6596
- _this.setZoom(newZoom);
6597
- _this.setPos([
6598
- newPosX,
6599
- newPosY
6600
- ]);
6601
- _this.setTransitionDuration(_this.options.animDuration);
6602
- };
6603
- this.zoomOut = function(value) {
6604
- var newPosX = _this.pos[0];
6605
- var newPosY = _this.pos[1];
6606
- var prevZoom = _this.zoom;
6607
- var _this_options_min, _this_options_min1;
6608
- var newZoom = prevZoom - value > ((_this_options_min = _this.options.min) != null ? _this_options_min : 1) ? prevZoom - value : (_this_options_min1 = _this.options.min) != null ? _this_options_min1 : 1;
6609
- if (newZoom !== prevZoom) {
6610
- newPosX = newPosX * (newZoom - 1) / (prevZoom - 1);
6611
- newPosY = newPosY * (newZoom - 1) / (prevZoom - 1);
6612
- }
6613
- _this.setZoom(newZoom);
6614
- _this.setPos([
6615
- newPosX,
6616
- newPosY
6617
- ]);
6618
- _this.setTransitionDuration(_this.options.animDuration);
6619
- };
6620
- this.zoomToZone = function(relX, relY, relWidth, relHeight) {
6621
- var _this_container;
6622
- if (!_this.container) return;
6623
- var newPosX = _this.pos[0];
6624
- var newPosY = _this.pos[1];
6625
- var parentRect = ((_this_container = _this.container) == null ? void 0 : _this_container.parentNode).getBoundingClientRect();
6626
- var prevZoom = _this.zoom;
6627
- // Calculate zoom factor to scale the zone
6628
- var optimalZoomX = parentRect.width / relWidth;
6629
- var optimalZoomY = parentRect.height / relHeight;
6630
- var _this_options_max;
6631
- var newZoom = Math.min(optimalZoomX, optimalZoomY, (_this_options_max = _this.options.max) != null ? _this_options_max : 8);
6632
- // Calculate new position to center the zone
6633
- var rect = _this.container.getBoundingClientRect();
6634
- var _ref = [
6635
- rect.width / prevZoom / 2,
6636
- rect.height / prevZoom / 2
6637
- ], centerX = _ref[0], centerY = _ref[1];
6638
- var _ref1 = [
6639
- relX + relWidth / 2,
6640
- relY + relHeight / 2
6641
- ], zoneCenterX = _ref1[0], zoneCenterY = _ref1[1];
6642
- newPosX = (centerX - zoneCenterX) * newZoom;
6643
- newPosY = (centerY - zoneCenterY) * newZoom;
6644
- _this.setZoom(newZoom);
6645
- _this.setPos([
6646
- newPosX,
6647
- newPosY
6648
- ]);
6649
- _this.setTransitionDuration(_this.options.animDuration);
6650
- };
6651
- this.getNewPosition = function(x, y, newZoom) {
6652
- var _ref = [
6653
- _this.zoom,
6654
- _this.pos[0],
6655
- _this.pos[1]
6656
- ], prevZoom = _ref[0];
6657
- if (newZoom === 1 || !_this) return ZOOM_DEFAULT_POSITION;
6658
- var _ref1 = [
6659
- _this.container.clientWidth,
6660
- _this.container.clientHeight
6661
- ], clientWidth = _ref1[0], clientHeight = _ref1[1];
6662
- if (newZoom > prevZoom) {
6663
- return [
6664
- 0,
6665
- 0
6666
- ];
6667
- } else {
6668
- // 放到最大
6669
- var w = -((x - clientWidth / 2) / (clientWidth / 2)) * newZoom / 2;
6670
- var h = -((y - clientHeight / 2) / (clientHeight / 2)) * newZoom / 2;
6671
- if (w > newZoom / 2 - 0.5) {
6672
- w = 3.5;
6673
- }
6674
- if (h > newZoom / 2 - 0.5) {
6675
- h = 3.5;
6676
- }
6677
- return [
6678
- clientWidth * w,
6679
- clientHeight * h
6680
- ];
6681
- }
6682
- };
6683
- /**
6684
- * 缩放到最大
6685
- * @param x - 点击点X坐标
6686
- * @param y - 点击点Y坐标
6687
- */ this.fullZoomInOnPosition = function(x, y) {
6688
- var _this_options_max;
6689
- var zoom = (_this_options_max = _this.options.max) != null ? _this_options_max : DefaultOptions.max;
6690
- _this.setZoom(zoom != null ? zoom : DefaultOptions.max);
6691
- _this.setPos(_this.getNewPosition(x, y, zoom));
6692
- _this.setTransitionDuration(_this.options.animDuration);
6693
- };
6694
- this.getLimitedShift = function(shift, minLimit, maxLimit, minElement, maxElement) {
6695
- if (shift > 0) {
6696
- if (minElement > minLimit) {
6697
- return 0;
6698
- } else if (minElement + shift > minLimit) {
6699
- return minLimit - minElement;
6700
- }
6701
- } else if (shift < 0) {
6702
- if (maxElement < maxLimit) {
6703
- return 0;
6704
- } else if (maxElement + shift < maxLimit) {
6705
- return maxLimit - maxElement;
6706
- }
6707
- }
6708
- return shift;
6709
- };
6710
- this.getCursor = function(canMoveOnX, canMoveOnY) {
6711
- if (canMoveOnX && canMoveOnY) {
6712
- return 'move';
6713
- } else if (canMoveOnX) {
6714
- return 'ew-resize';
6715
- } else if (canMoveOnY) {
6716
- return 'ns-resize';
6717
- } else {
6718
- return 'auto';
6719
- }
6720
- };
6721
- this.move = function(shiftX, shiftY, transitionDuration) {
6722
- if (transitionDuration === void 0) transitionDuration = 0;
6723
- if (!_this.container) return;
6724
- var newPosX = _this.pos[0];
6725
- var newPosY = _this.pos[1];
6726
- // let canMoveOnX: boolean, canMoveOnY: boolean;
6727
- var rect = _this.container.getBoundingClientRect();
6728
- var parentRect = _this.container.parentNode.getBoundingClientRect();
6729
- // 根据是否进行了伪横屏旋转,决定是使用 shiftX 还是 shiftY 来对画面进行移动
6730
- var shiftHorizontal = _this.transform ? shiftY : shiftX;
6731
- var shiftVertical = _this.transform ? shiftX : shiftY;
6732
- var _ref = _this.transform ? [
6733
- rect.height > parentRect.bottom - parentRect.top,
6734
- shiftVertical > 0 && rect.top - parentRect.top < 0,
6735
- shiftVertical < 0 && rect.bottom - parentRect.bottom > 0
6736
- ] : [
6737
- rect.width > parentRect.right - parentRect.left,
6738
- shiftHorizontal > 0 && rect.left - parentRect.left < 0,
6739
- shiftHorizontal < 0 && rect.right - parentRect.right > 0
6740
- ], isLargerHor = _ref[0], isOutLeftBoundary = _ref[1], isOutRightBoundary = _ref[2];
6741
- var canMoveOnX = isLargerHor || isOutLeftBoundary || isOutRightBoundary;
6742
- if (canMoveOnX) {
6743
- if (_this.transform) {
6744
- newPosX += _this.getLimitedShift(shiftVertical, parentRect.top, parentRect.bottom, rect.top, rect.bottom);
6745
- } else {
6746
- newPosX += _this.getLimitedShift(shiftHorizontal, parentRect.left, parentRect.right, rect.left, rect.right);
6747
- }
6748
- }
6749
- var _ref1 = _this.transform ? [
6750
- rect.width > parentRect.right - parentRect.left,
6751
- shiftHorizontal > 0 && rect.right - parentRect.right < 0,
6752
- shiftHorizontal < 0 && rect.left - parentRect.left > 0
6753
- ] : [
6754
- rect.height > parentRect.bottom - parentRect.top,
6755
- shiftVertical > 0 && rect.top - parentRect.top < 0,
6756
- shiftVertical < 0 && rect.bottom - parentRect.bottom > 0
6757
- ], isLargerVer = _ref1[0], isOutTopBoundary = _ref1[1], isOutBottomBoundary = _ref1[2];
6758
- var canMoveOnY = isLargerVer || isOutTopBoundary || isOutBottomBoundary;
6759
- if (canMoveOnY) {
6760
- if (_this.transform) {
6761
- var transformGetLimitedShift = function(shift, minLimit, maxLimit, minElement, maxElement) {
6762
- // css伪横屏边界判断特殊处理
6763
- if (shift > 0) {
6764
- if (maxElement < maxLimit + 1) {
6765
- return 0;
6766
- } else if (maxElement + shift < maxLimit + 1) {
6767
- return maxLimit - maxElement;
6768
- }
6769
- } else if (shift < 0) {
6770
- if (minElement + 1 > minLimit) {
6771
- return 0;
6772
- } else if (minElement + 1 + shift > minLimit) {
6773
- return minLimit - minElement;
6774
- }
6775
- }
6776
- return shift;
6777
- };
6778
- newPosY += transformGetLimitedShift(shiftHorizontal, parentRect.left, parentRect.right, rect.left, rect.right);
6779
- } else {
6780
- newPosY += _this.getLimitedShift(shiftVertical, parentRect.top, parentRect.bottom, rect.top, rect.bottom);
6781
- }
6782
- }
6783
- var cursor = _this.getCursor(canMoveOnX, canMoveOnY);
6784
- _this.setPos([
6785
- newPosX,
6786
- newPosY
6787
- ]);
6788
- _this.setCursor(cursor);
6789
- _this.setTransitionDuration(transitionDuration);
6790
- };
6791
- /**
6792
- * 移动端双击
6793
- * @returns
6794
- */ this.isDoubleTapping = function() {
6795
- var touchTime = new Date().getTime();
6796
- var _this_lastTouchTime, _this_options_doubleTouchMaxDelay, _this_lastDoubleTapTime, _this_options_doubleTouchMaxDelay1;
6797
- var isDoubleTap = touchTime - ((_this_lastTouchTime = _this.lastTouchTime) != null ? _this_lastTouchTime : 0) < ((_this_options_doubleTouchMaxDelay = _this.options.doubleTouchMaxDelay) != null ? _this_options_doubleTouchMaxDelay : 300) && touchTime - ((_this_lastDoubleTapTime = _this.lastDoubleTapTime) != null ? _this_lastDoubleTapTime : 0) > ((_this_options_doubleTouchMaxDelay1 = _this.options.doubleTouchMaxDelay) != null ? _this_options_doubleTouchMaxDelay1 : 750);
6798
- if (isDoubleTap) {
6799
- _this.lastDoubleTapTime = touchTime;
6800
- return true;
6801
- }
6802
- _this.lastTouchTime = touchTime;
6803
- return false;
6804
- };
6805
- this.startDeceleration = function(lastShiftOnX, lastShiftOnY) {
6806
- var startTimestamp = null;
6807
- var startDecelerationMove = function(timestamp) {
6808
- if (startTimestamp === null) startTimestamp = timestamp;
6809
- var progress = timestamp - startTimestamp;
6810
- var _this_options_decelerationDuration, _this_options_decelerationDuration1;
6811
- var ratio = (((_this_options_decelerationDuration = _this.options.decelerationDuration) != null ? _this_options_decelerationDuration : 750) - progress) / ((_this_options_decelerationDuration1 = _this.options.decelerationDuration) != null ? _this_options_decelerationDuration1 : 750);
6812
- var _ref = [
6813
- lastShiftOnX * ratio,
6814
- lastShiftOnY * ratio
6815
- ], shiftX = _ref[0], shiftY = _ref[1];
6816
- var _this_options_decelerationDuration2;
6817
- if (progress < ((_this_options_decelerationDuration2 = _this.options.decelerationDuration) != null ? _this_options_decelerationDuration2 : 750) && Math.max(Math.abs(shiftX), Math.abs(shiftY)) > 1) {
6818
- _this.move(shiftX, shiftY, 0);
6819
- _this.lastRequestAnimationId = requestAnimationFrame(startDecelerationMove);
6820
- } else {
6821
- _this.lastRequestAnimationId = null;
6822
- }
6823
- };
6824
- _this.lastRequestAnimationId = requestAnimationFrame(startDecelerationMove);
6825
- };
6826
- this.reset = function() {
6827
- _this.setZoom(_this.options.initialZoom, true);
6828
- _this.cursor = _this.options.defaultCursor;
6829
- _this.setTransitionDuration(_this.options.animDuration);
6830
- _this.setPos(ZOOM_DEFAULT_POSITION);
6831
- };
6832
- // api向前兼容
6833
- this.addScale = function(scale) {
6834
- if (scale === void 0) scale = 1;
6835
- _this.handleZoomAdd(scale);
6836
- };
6837
- this.handleZoomAdd = function(scale) {
6838
- if (scale === void 0) scale = 1;
6839
- if (!_this.options.allowZoom || !_this.options.allowWheel) return;
6840
- var newZoom = parseFloat((_this.zoom + scale).toFixed(_this.getPrecision(_this.options.zoomStep)));
6841
- var _this_options_max;
6842
- if (newZoom > ((_this_options_max = _this.options.max) != null ? _this_options_max : 8)) {
6843
- newZoom = 8;
6844
- }
6845
- _this.setZoom(newZoom);
6846
- _this.setPos(_this.pos);
6847
- _this.setTransitionDuration(0.05);
6848
- };
6849
- // api向前兼容
6850
- this.subScale = function(scale) {
6851
- if (scale === void 0) scale = 1;
6852
- _this.handleZoomSub(scale);
6853
- };
6854
- this.handleZoomSub = function(scale) {
6855
- if (scale === void 0) scale = 1;
6856
- if (!_this.options.allowZoom || !_this.options.allowWheel) return;
6857
- var newZoom = parseFloat((_this.zoom - scale).toFixed(_this.getPrecision(_this.options.zoomStep)));
6858
- if (newZoom < 1) {
6859
- newZoom = 1;
6860
- }
6861
- _this.setZoom(newZoom);
6862
- _this.setPos(_this.pos);
6863
- _this.setTransitionDuration(0.05);
6864
- };
6865
- this.handleMouseWheel = function(event) {
6866
- event.preventDefault();
6867
- if (!_this.options.allowZoom || !_this.options.allowWheel) return;
6868
- var velocity = event.deltaY < 0 ? _this.options.scrollVelocity : 0 - _this.options.scrollVelocity;
6869
- var _this_options_max, _this_options_min;
6870
- var newZoom = parseFloat(Math.max(Math.min(_this.zoom + velocity, (_this_options_max = _this.options.max) != null ? _this_options_max : 8), (_this_options_min = _this.options.min) != null ? _this_options_min : 1).toFixed(_this.getPrecision(_this.options.zoomStep)));
6871
- _this.setZoom(newZoom);
6872
- // this.setPos(this.getNewPosition(posX, posY, newZoom));
6873
- _this.setTransitionDuration(0.05);
6874
- };
6875
- this.handleMouseStart = function(event) {
6876
- var _this_options_ignoredMouseButtons;
6877
- event.preventDefault();
6878
- if (!_this.options.allowPan || ((_this_options_ignoredMouseButtons = _this.options.ignoredMouseButtons) == null ? void 0 : _this_options_ignoredMouseButtons.includes(event.button))) return;
6879
- _this._dragging = true;
6880
- if (_this.lastRequestAnimationId) cancelAnimationFrame(_this.lastRequestAnimationId);
6881
- _this.lastCursor = _this.getCoordinates(event);
6882
- };
6883
- this.handleMouseMove = function(event) {
6884
- event.preventDefault();
6885
- if (!_this.options.allowPan || !_this.lastCursor || !_this._dragging) return;
6886
- _this._touchOrMouseDrag(event);
6887
- };
6888
- this.handleMouseStop = function(event) {
6889
- event.preventDefault();
6890
- if (_this.lastShift) {
6891
- _this.startDeceleration(_this.lastShift[0], _this.lastShift[1]);
6892
- _this.lastShift = null;
6893
- }
6894
- _this.lastCursor = null;
6895
- _this.setCursor('auto');
6896
- _this._dragging = false;
6897
- };
6898
- this.handleTouchStart = function(event) {
6899
- var isThisDoubleTapping = _this.isDoubleTapping();
6900
- _this.isMultiTouch = event.touches.length;
6901
- if (!_this.options.allowTouchEvents) event.preventDefault();
6902
- if (_this.lastRequestAnimationId) cancelAnimationFrame(_this.lastRequestAnimationId);
6903
- var _this_getCoordinates = _this.getCoordinates(event.touches[0]), posX = _this_getCoordinates[0], posY = _this_getCoordinates[1];
6904
- if (_this.isMultiTouch > 1) {
6905
- _this.lastCursor = [
6906
- posX,
6907
- posY
6908
- ];
6909
- return;
6910
- }
6911
- if (isThisDoubleTapping && _this.options.allowZoom) {
6912
- if (_this.zoom === 1) {
6913
- var _this_container_getBoundingClientRect = _this.container.getBoundingClientRect(); _this_container_getBoundingClientRect.top; _this_container_getBoundingClientRect.left; var x = _this_container_getBoundingClientRect.x, y = _this_container_getBoundingClientRect.y;
6914
- var ref;
6915
- ref = _this.transform ? [
6916
- y,
6917
- x
6918
- ] : [
6919
- x,
6920
- y
6921
- ], x = ref[0], y = ref[1];
6922
- var ref1;
6923
- ref1 = [
6924
- posX - x,
6925
- posY - y
6926
- ], posX = ref1[0], posY = ref1[1];
6927
- // 双击放大到最大
6928
- _this.fullZoomInOnPosition(posX, posY);
6929
- } else {
6930
- _this.reset();
6931
- }
6932
- return;
6933
- }
6934
- _this._tapStartTime = new Date().getTime();
6935
- if (_this.options.allowPan) _this.lastCursor = [
6936
- posX,
6937
- posY
6938
- ];
6939
- };
6940
- this.handleTouchMove = function(event) {
6941
- if (!_this.options.allowTouchEvents) event.preventDefault();
6942
- if (!_this.lastCursor) return;
6943
- if (_this.isMultiTouch === 1) {
6944
- _this._touchOrMouseDrag(event.touches[0]);
6945
- _this.lastTouchDistance = null;
6946
- } else if (_this.isMultiTouch > 1) {
6947
- var newZoom = _this.zoom;
6948
- // If we detect two points, we shall zoom up or down
6949
- var _this_getCoordinates = _this.getCoordinates(event.touches[0]), pos1X = _this_getCoordinates[0], pos1Y = _this_getCoordinates[1];
6950
- var _this_getCoordinates1 = _this.getCoordinates(event.touches[1]), pos2X = _this_getCoordinates1[0], pos2Y = _this_getCoordinates1[1];
6951
- var distance = Math.sqrt(Math.pow(pos2X - pos1X, 2) + Math.pow(pos2Y - pos1Y, 2));
6952
- if (_this.lastTouchDistance && distance && distance !== _this.lastTouchDistance) {
6953
- if (_this.options.allowZoom) {
6954
- newZoom += (distance - _this.lastTouchDistance) / 100;
6955
- var _this_options_max, _this_options_min;
6956
- if (newZoom > ((_this_options_max = _this.options.max) != null ? _this_options_max : 8)) {
6957
- var _this_options_max1;
6958
- newZoom = (_this_options_max1 = _this.options.max) != null ? _this_options_max1 : 8;
6959
- } else if (newZoom < ((_this_options_min = _this.options.min) != null ? _this_options_min : 1)) {
6960
- var _this_options_min1;
6961
- newZoom = (_this_options_min1 = _this.options.min) != null ? _this_options_min1 : 1;
6962
- }
6963
- }
6964
- // 不要做移动,因为会有冲突
6965
- _this.setZoom(newZoom);
6966
- _this.setTransitionDuration(0);
6967
- }
6968
- // Save data for the next move
6969
- _this.lastCursor = [
6970
- pos1X,
6971
- pos1Y
6972
- ];
6973
- _this.lastTouchDistance = distance;
6974
- }
6975
- };
6976
- this.handleTouchStop = function() {
6977
- if (_this.lastShift) {
6978
- // Use the last shift to make a decelerating movement effect
6979
- _this.startDeceleration(_this.lastShift[0], _this.lastShift[1]);
6980
- _this.lastShift = null;
6981
- }
6982
- if (_this._tapStartTime && new Date().getTime() - _this._tapStartTime < 200) {
6983
- _this.options.onTap == null ? void 0 : _this.options.onTap.call(_this.options);
6984
- }
6985
- _this._tapStartTime = undefined;
6986
- _this.lastCursor = null;
6987
- _this.lastTouchDistance = null;
6988
- _this.isMultiTouch = 0;
6989
- };
6990
- this.container = container;
6991
- this.options = Object.assign({}, DefaultOptions, options || {});
6992
- this.percentPos = ZOOM_DEFAULT_POSITION;
6993
- this.transition = this.options.animDuration;
6994
- this.zoom = 1;
6995
- this.cursor = 'auto';
6996
- this.lastCursor = [
6997
- 0,
6998
- 0
6999
- ];
7000
- this.lastShift = null;
7001
- this.lastTouchDistance = null;
7002
- this.lastRequestAnimationId = null;
7003
- this.lastTouchTime = new Date().getTime();
7004
- this.lastDoubleTapTime = new Date().getTime();
7005
- this.transform = false; // 是否为横屏模式
7006
- this.isMultiTouch = 1;
7007
- this.handleMouseMove = this.handleMouseMove.bind(this);
7008
- this.handleMouseStart = this.handleMouseStart.bind(this);
7009
- this.handleMouseStop = this.handleMouseStop.bind(this);
7010
- this.handleMouseWheel = this.handleMouseWheel.bind(this);
7011
- this.handleTouchStart = this.handleTouchStart.bind(this);
7012
- this.handleTouchMove = this.handleTouchMove.bind(this);
7013
- this.handleTouchStop = this.handleTouchStop.bind(this);
7014
- this.getZoom = this.getZoom.bind(this);
7015
- this.setZoom = this.setZoom.bind(this);
7016
- }
7017
- var _proto = Zoom.prototype;
7018
- // 设置事件侦听器
7019
- _proto.setUpEventListeners = function setUpEventListeners() {
7020
- var refCurrentValue = this.container;
7021
- var hasMouseDevice = window.matchMedia('(pointer: fine)').matches;
7022
- if (hasMouseDevice) {
7023
- if (this.options.allowWheel) {
7024
- refCurrentValue == null ? void 0 : refCurrentValue.addEventListener('wheel', this.handleMouseWheel, {
7025
- passive: false
7026
- });
7027
- }
7028
- // Apply mouse events only to devices which include an accurate pointing device
7029
- refCurrentValue == null ? void 0 : refCurrentValue.addEventListener('mousedown', this.handleMouseStart, {
7030
- passive: false
7031
- });
7032
- refCurrentValue == null ? void 0 : refCurrentValue.addEventListener('mousemove', this.handleMouseMove, {
7033
- passive: false
7034
- });
7035
- refCurrentValue == null ? void 0 : refCurrentValue.addEventListener('mouseup', this.handleMouseStop, {
7036
- passive: false
7037
- });
7038
- refCurrentValue == null ? void 0 : refCurrentValue.addEventListener('mouseleave', this.handleMouseStop, {
7039
- passive: false
7040
- });
7041
- } else {
7042
- // Apply touch events to all other devices
7043
- refCurrentValue == null ? void 0 : refCurrentValue.addEventListener('touchstart', this.handleTouchStart, {
7044
- passive: false
7045
- });
7046
- refCurrentValue == null ? void 0 : refCurrentValue.addEventListener('touchmove', this.handleTouchMove, {
7047
- passive: false
7048
- });
7049
- refCurrentValue == null ? void 0 : refCurrentValue.addEventListener('touchend', this.handleTouchStop, {
7050
- passive: false
7051
- });
7052
- refCurrentValue == null ? void 0 : refCurrentValue.addEventListener('touchcancel', this.handleTouchStop, {
7053
- passive: false
7054
- });
7055
- }
7056
- };
7057
- // 移除事件侦听器
7058
- _proto.removeEventListeners = function removeEventListeners() {
7059
- var refCurrentValue = this.container;
7060
- var hasMouseDevice = window.matchMedia('(pointer: fine)').matches;
7061
- if (hasMouseDevice) {
7062
- if (this.options.allowWheel) {
7063
- refCurrentValue == null ? void 0 : refCurrentValue.removeEventListener('wheel', this.handleMouseWheel);
7064
- }
7065
- refCurrentValue == null ? void 0 : refCurrentValue.removeEventListener('mousedown', this.handleMouseStart);
7066
- refCurrentValue == null ? void 0 : refCurrentValue.removeEventListener('mousemove', this.handleMouseMove);
7067
- refCurrentValue == null ? void 0 : refCurrentValue.removeEventListener('mouseup', this.handleMouseStop);
7068
- refCurrentValue == null ? void 0 : refCurrentValue.removeEventListener('mouseleave', this.handleMouseStop);
7069
- } else {
7070
- refCurrentValue == null ? void 0 : refCurrentValue.removeEventListener('touchstart', this.handleTouchStart);
7071
- refCurrentValue == null ? void 0 : refCurrentValue.removeEventListener('touchmove', this.handleTouchMove);
7072
- refCurrentValue == null ? void 0 : refCurrentValue.removeEventListener('touchend', this.handleTouchStop);
7073
- refCurrentValue == null ? void 0 : refCurrentValue.removeEventListener('touchcancel', this.handleTouchStop);
7074
- }
7075
- };
7076
- _proto.getPrecision = function getPrecision(value) {
7077
- if (value === void 0) value = 1;
7078
- var valueStr = value.toString();
7079
- if (valueStr.includes('.')) {
7080
- return valueStr.split('.')[1].length;
7081
- } else {
7082
- return 1;
7083
- }
7084
- };
7085
- /**
7086
- * 获取坐标 (伪横屏X、Y轴坐标转换, 相对值)
7087
- * @param event
7088
- * @returns
7089
- */ _proto.getCoordinates = function getCoordinates(event) {
7090
- var clientHeight = this.container.clientHeight;
7091
- var clientTop = this.container.clientTop;
7092
- var clientLeft = this.container.clientLeft;
7093
- var _ref = this.transform ? [
7094
- event.clientY,
7095
- clientHeight - event.clientX
7096
- ] : [
7097
- event.clientX - clientTop,
7098
- event.clientY - clientLeft
7099
- ], x1 = _ref[0], y1 = _ref[1];
7100
- return [
7101
- x1,
7102
- y1
7103
- ];
7104
- };
7105
- _proto._touchOrMouseDrag = function _touchOrMouseDrag(event) {
7106
- if (this.lastCursor) {
7107
- var _this_getCoordinates = this.getCoordinates(event), posX = _this_getCoordinates[0], posY = _this_getCoordinates[1];
7108
- var shiftX = posX - this.lastCursor[0];
7109
- var shiftY = posY - this.lastCursor[1];
7110
- this.move(shiftX, shiftY, 0);
7111
- this.lastCursor = [
7112
- posX,
7113
- posY
7114
- ];
7115
- this.lastShift = [
7116
- shiftX,
7117
- shiftY
7118
- ];
7119
- }
7120
- };
7121
- _create_class(Zoom, [
7122
- {
7123
- key: "pos",
7124
- get: function get() {
7125
- return [
7126
- this.container.clientWidth * this.percentPos[0],
7127
- this.container.clientHeight * this.percentPos[1]
7128
- ];
7129
- }
7130
- }
7131
- ]);
7132
- return Zoom;
7133
- }();
7134
- Zoom.VERSION = '0.0.2';
7135
-
7136
- dist$6 = Zoom;
7137
- return dist$6;
7138
- }
7139
-
7140
- var distExports$3 = requireDist$6();
7141
- var Zoom = /*@__PURE__*/getDefaultExportFromCjs(distExports$3);
7142
-
7143
- function _extends$j() {
7144
- _extends$j = Object.assign || function(target) {
6281
+ function _extends$l() {
6282
+ _extends$l = Object.assign || function(target) {
7145
6283
  for(var i = 1; i < arguments.length; i++){
7146
6284
  var source = arguments[i];
7147
6285
  for(var key in source){
@@ -7152,10 +6290,10 @@
7152
6290
  }
7153
6291
  return target;
7154
6292
  };
7155
- return _extends$j.apply(this, arguments);
6293
+ return _extends$l.apply(this, arguments);
7156
6294
  }
7157
6295
  function __zoom(theme, container, options) {
7158
- theme.zoomUtil = new Zoom(container, _extends$j({}, options || {}, {
6296
+ theme.zoomUtil = new Zoom(container, _extends$l({}, options || {}, {
7159
6297
  min: 1,
7160
6298
  onChange: function(zoom, reset) {
7161
6299
  if (zoom !== theme._zoom) {
@@ -7173,7 +6311,7 @@
7173
6311
  }));
7174
6312
  }
7175
6313
 
7176
- function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
6314
+ function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
7177
6315
  try {
7178
6316
  var info = gen[key](arg);
7179
6317
  var value = info.value;
@@ -7187,22 +6325,22 @@
7187
6325
  Promise.resolve(value).then(_next, _throw);
7188
6326
  }
7189
6327
  }
7190
- function _async_to_generator$6(fn) {
6328
+ function _async_to_generator$7(fn) {
7191
6329
  return function() {
7192
6330
  var self = this, args = arguments;
7193
6331
  return new Promise(function(resolve, reject) {
7194
6332
  var gen = fn.apply(self, args);
7195
6333
  function _next(value) {
7196
- asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "next", value);
6334
+ asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "next", value);
7197
6335
  }
7198
6336
  function _throw(err) {
7199
- asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "throw", err);
6337
+ asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "throw", err);
7200
6338
  }
7201
6339
  _next(undefined);
7202
6340
  });
7203
6341
  };
7204
6342
  }
7205
- function _ts_generator$6(thisArg, body) {
6343
+ function _ts_generator$7(thisArg, body) {
7206
6344
  var f, y, t, _ = {
7207
6345
  label: 0,
7208
6346
  sent: function() {
@@ -7294,9 +6432,9 @@
7294
6432
  }
7295
6433
  }
7296
6434
  function getThemeDataByTemplate(theme, id) {
7297
- return _async_to_generator$6(function() {
6435
+ return _async_to_generator$7(function() {
7298
6436
  var _theme_options_token_httpToken, _theme_options_token, url;
7299
- return _ts_generator$6(this, function(_state) {
6437
+ return _ts_generator$7(this, function(_state) {
7300
6438
  switch(_state.label){
7301
6439
  case 0:
7302
6440
  url = theme.options.env.domain + "/api/service/media/template/getDetail?accessToken=" + (theme.options.accessToken || ((_theme_options_token = theme.options.token) == null ? void 0 : (_theme_options_token_httpToken = _theme_options_token.httpToken) == null ? void 0 : _theme_options_token_httpToken.url)) + "&id=" + id;
@@ -7305,8 +6443,8 @@
7305
6443
  fetch(url, {
7306
6444
  method: 'GET'
7307
6445
  }).then(function(response) {
7308
- return _async_to_generator$6(function() {
7309
- return _ts_generator$6(this, function(_state) {
6446
+ return _async_to_generator$7(function() {
6447
+ return _ts_generator$7(this, function(_state) {
7310
6448
  switch(_state.label){
7311
6449
  case 0:
7312
6450
  return [
@@ -7351,7 +6489,7 @@
7351
6489
  })();
7352
6490
  }
7353
6491
 
7354
- function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
6492
+ function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
7355
6493
  try {
7356
6494
  var info = gen[key](arg);
7357
6495
  var value = info.value;
@@ -7365,23 +6503,23 @@
7365
6503
  Promise.resolve(value).then(_next, _throw);
7366
6504
  }
7367
6505
  }
7368
- function _async_to_generator$5(fn) {
6506
+ function _async_to_generator$6(fn) {
7369
6507
  return function() {
7370
6508
  var self = this, args = arguments;
7371
6509
  return new Promise(function(resolve, reject) {
7372
6510
  var gen = fn.apply(self, args);
7373
6511
  function _next(value) {
7374
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
6512
+ asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "next", value);
7375
6513
  }
7376
6514
  function _throw(err) {
7377
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
6515
+ asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "throw", err);
7378
6516
  }
7379
6517
  _next(undefined);
7380
6518
  });
7381
6519
  };
7382
6520
  }
7383
- function _extends$i() {
7384
- _extends$i = Object.assign || function(target) {
6521
+ function _extends$k() {
6522
+ _extends$k = Object.assign || function(target) {
7385
6523
  for(var i = 1; i < arguments.length; i++){
7386
6524
  var source = arguments[i];
7387
6525
  for(var key in source){
@@ -7392,9 +6530,9 @@
7392
6530
  }
7393
6531
  return target;
7394
6532
  };
7395
- return _extends$i.apply(this, arguments);
6533
+ return _extends$k.apply(this, arguments);
7396
6534
  }
7397
- function _ts_generator$5(thisArg, body) {
6535
+ function _ts_generator$6(thisArg, body) {
7398
6536
  var f, y, t, _ = {
7399
6537
  label: 0,
7400
6538
  sent: function() {
@@ -7518,9 +6656,9 @@
7518
6656
  deviceControls.push(item);
7519
6657
  return false;
7520
6658
  }
7521
- if (item.isrender !== 0 && REC_GROUP().includes(item.iconId)) {
6659
+ if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
7522
6660
  // TODO: 因为回放是一组, 位置以第一个位置为准
7523
- recControls.push(recControls[0] ? _extends$i({}, item, {
6661
+ recControls.push(recControls[0] ? _extends$k({}, item, {
7524
6662
  part: recControls[0].part
7525
6663
  }) : item);
7526
6664
  return false;
@@ -7541,9 +6679,9 @@
7541
6679
  deviceControls.push(item);
7542
6680
  return false;
7543
6681
  }
7544
- if (item.isrender !== 0 && REC_GROUP().includes(item.iconId)) {
6682
+ if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
7545
6683
  // TODO: 因为回放是一组, 位置以第一个位置为准
7546
- recControls.push(recControls[0] ? _extends$i({}, item, {
6684
+ recControls.push(recControls[0] ? _extends$k({}, item, {
7547
6685
  part: recControls[0].part
7548
6686
  }) : item);
7549
6687
  return false;
@@ -7605,9 +6743,9 @@
7605
6743
  * @param data
7606
6744
  * @returns
7607
6745
  */ function getThemeData(theme, data) {
7608
- return _async_to_generator$5(function() {
6746
+ return _async_to_generator$6(function() {
7609
6747
  var themeData, _theme_logger, template;
7610
- return _ts_generator$5(this, function(_state) {
6748
+ return _ts_generator$6(this, function(_state) {
7611
6749
  switch(_state.label){
7612
6750
  case 0:
7613
6751
  themeData = data;
@@ -7794,8 +6932,8 @@
7794
6932
  return Component;
7795
6933
  }();
7796
6934
 
7797
- function _extends$h() {
7798
- _extends$h = Object.assign || function(target) {
6935
+ function _extends$j() {
6936
+ _extends$j = Object.assign || function(target) {
7799
6937
  for(var i = 1; i < arguments.length; i++){
7800
6938
  var source = arguments[i];
7801
6939
  for(var key in source){
@@ -7806,7 +6944,7 @@
7806
6944
  }
7807
6945
  return target;
7808
6946
  };
7809
- return _extends$h.apply(this, arguments);
6947
+ return _extends$j.apply(this, arguments);
7810
6948
  }
7811
6949
  function _inherits$i(subClass, superClass) {
7812
6950
  if (typeof superClass !== "function" && superClass !== null) {
@@ -7819,28 +6957,28 @@
7819
6957
  configurable: true
7820
6958
  }
7821
6959
  });
7822
- if (superClass) _set_prototype_of$i(subClass, superClass);
6960
+ if (superClass) _set_prototype_of$l(subClass, superClass);
7823
6961
  }
7824
- function _set_prototype_of$i(o, p) {
7825
- _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6962
+ function _set_prototype_of$l(o, p) {
6963
+ _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7826
6964
  o.__proto__ = p;
7827
6965
  return o;
7828
6966
  };
7829
- return _set_prototype_of$i(o, p);
6967
+ return _set_prototype_of$l(o, p);
7830
6968
  }
7831
6969
  var Footer = /*#__PURE__*/ function(Component) {
7832
6970
  _inherits$i(Footer, Component);
7833
6971
  function Footer(options) {
7834
6972
  if (options === void 0) options = {};
7835
- return Component.call(this, _extends$h({}, options, {
6973
+ return Component.call(this, _extends$j({}, options, {
7836
6974
  cType: 'footer'
7837
6975
  })) || this;
7838
6976
  }
7839
6977
  return Footer;
7840
6978
  }(Component);
7841
6979
 
7842
- function _extends$g() {
7843
- _extends$g = Object.assign || function(target) {
6980
+ function _extends$i() {
6981
+ _extends$i = Object.assign || function(target) {
7844
6982
  for(var i = 1; i < arguments.length; i++){
7845
6983
  var source = arguments[i];
7846
6984
  for(var key in source){
@@ -7851,7 +6989,7 @@
7851
6989
  }
7852
6990
  return target;
7853
6991
  };
7854
- return _extends$g.apply(this, arguments);
6992
+ return _extends$i.apply(this, arguments);
7855
6993
  }
7856
6994
  function _inherits$h(subClass, superClass) {
7857
6995
  if (typeof superClass !== "function" && superClass !== null) {
@@ -7864,20 +7002,20 @@
7864
7002
  configurable: true
7865
7003
  }
7866
7004
  });
7867
- if (superClass) _set_prototype_of$h(subClass, superClass);
7005
+ if (superClass) _set_prototype_of$k(subClass, superClass);
7868
7006
  }
7869
- function _set_prototype_of$h(o, p) {
7870
- _set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7007
+ function _set_prototype_of$k(o, p) {
7008
+ _set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7871
7009
  o.__proto__ = p;
7872
7010
  return o;
7873
7011
  };
7874
- return _set_prototype_of$h(o, p);
7012
+ return _set_prototype_of$k(o, p);
7875
7013
  }
7876
- var Header = /*#__PURE__*/ function(Component) {
7014
+ var Header$1 = /*#__PURE__*/ function(Component) {
7877
7015
  _inherits$h(Header, Component);
7878
7016
  function Header(options) {
7879
7017
  if (options === void 0) options = {};
7880
- return Component.call(this, _extends$g({}, options, {
7018
+ return Component.call(this, _extends$i({}, options, {
7881
7019
  cType: 'header'
7882
7020
  })) || this;
7883
7021
  }
@@ -8043,8 +7181,8 @@
8043
7181
  };
8044
7182
  }
8045
7183
 
8046
- function _extends$f() {
8047
- _extends$f = Object.assign || function(target) {
7184
+ function _extends$h() {
7185
+ _extends$h = Object.assign || function(target) {
8048
7186
  for(var i = 1; i < arguments.length; i++){
8049
7187
  var source = arguments[i];
8050
7188
  for(var key in source){
@@ -8055,7 +7193,7 @@
8055
7193
  }
8056
7194
  return target;
8057
7195
  };
8058
- return _extends$f.apply(this, arguments);
7196
+ return _extends$h.apply(this, arguments);
8059
7197
  }
8060
7198
  function _inherits$g(subClass, superClass) {
8061
7199
  if (typeof superClass !== "function" && superClass !== null) {
@@ -8068,14 +7206,14 @@
8068
7206
  configurable: true
8069
7207
  }
8070
7208
  });
8071
- if (superClass) _set_prototype_of$g(subClass, superClass);
7209
+ if (superClass) _set_prototype_of$j(subClass, superClass);
8072
7210
  }
8073
- function _set_prototype_of$g(o, p) {
8074
- _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7211
+ function _set_prototype_of$j(o, p) {
7212
+ _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8075
7213
  o.__proto__ = p;
8076
7214
  return o;
8077
7215
  };
8078
- return _set_prototype_of$g(o, p);
7216
+ return _set_prototype_of$j(o, p);
8079
7217
  }
8080
7218
  /**
8081
7219
  * 全局全屏
@@ -8084,7 +7222,7 @@
8084
7222
  */ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
8085
7223
  _inherits$g(GlobalFullscreen, Fullscreen);
8086
7224
  function GlobalFullscreen(options) {
8087
- return Fullscreen.call(this, _extends$f({}, options, {
7225
+ return Fullscreen.call(this, _extends$h({}, options, {
8088
7226
  controlType: 'button',
8089
7227
  classNameSuffix: 'global-fullscreen'
8090
7228
  })) || this;
@@ -8115,8 +7253,8 @@
8115
7253
  return GlobalFullscreen;
8116
7254
  }(Fullscreen);
8117
7255
 
8118
- function _extends$e() {
8119
- _extends$e = Object.assign || function(target) {
7256
+ function _extends$g() {
7257
+ _extends$g = Object.assign || function(target) {
8120
7258
  for(var i = 1; i < arguments.length; i++){
8121
7259
  var source = arguments[i];
8122
7260
  for(var key in source){
@@ -8127,7 +7265,7 @@
8127
7265
  }
8128
7266
  return target;
8129
7267
  };
8130
- return _extends$e.apply(this, arguments);
7268
+ return _extends$g.apply(this, arguments);
8131
7269
  }
8132
7270
  function _inherits$f(subClass, superClass) {
8133
7271
  if (typeof superClass !== "function" && superClass !== null) {
@@ -8140,14 +7278,14 @@
8140
7278
  configurable: true
8141
7279
  }
8142
7280
  });
8143
- if (superClass) _set_prototype_of$f(subClass, superClass);
7281
+ if (superClass) _set_prototype_of$i(subClass, superClass);
8144
7282
  }
8145
- function _set_prototype_of$f(o, p) {
8146
- _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7283
+ function _set_prototype_of$i(o, p) {
7284
+ _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8147
7285
  o.__proto__ = p;
8148
7286
  return o;
8149
7287
  };
8150
- return _set_prototype_of$f(o, p);
7288
+ return _set_prototype_of$i(o, p);
8151
7289
  }
8152
7290
  /**
8153
7291
  * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
@@ -8156,7 +7294,7 @@
8156
7294
  _inherits$f(CapturePicture, Control);
8157
7295
  function CapturePicture(options) {
8158
7296
  var _this;
8159
- _this = Control.call(this, _extends$e({}, options, {
7297
+ _this = Control.call(this, _extends$g({}, options, {
8160
7298
  tagName: 'span',
8161
7299
  classNameSuffix: 'capture-picture'
8162
7300
  })) || this, _this._timer = null;
@@ -8209,966 +7347,12 @@
8209
7347
  return CapturePicture;
8210
7348
  }(Control);
8211
7349
 
8212
- var dist$5 = {};
8213
-
8214
- var dist$4 = {};
8215
-
8216
- /*
8217
- * @ezuikit/utils-tools v2.0.1
8218
- * tools utils
8219
- * Copyright (c) 2025-12-02 Ezviz-OpenBiz
8220
- * Released under the MIT License.
8221
- */
8222
-
8223
- var hasRequiredDist$5;
8224
-
8225
- function requireDist$5 () {
8226
- if (hasRequiredDist$5) return dist$4;
8227
- hasRequiredDist$5 = 1;
8228
- var getQuery=function(url){var query=url.split("?")[1],obj={};if(query)for(var vars=query.split("&"),i=0;i<vars.length;i++){var pair=vars[i].split("=");obj[pair[0]]=decodeURIComponent(pair[1]);}return obj};function parseEzopenUrl(url){var obj={};if(/^ezopen:\/\//.test(url)){if(url.includes("@")){var endIndex=url.indexOf("@"),startIndex=url.indexOf("//");obj.validateCode=url.substring(startIndex+2,endIndex),url=url.replace(obj.validateCode+"@","");}obj.protocol=url.split("//")[0],obj.search=url.split("?")[1]?"?"+url.split("?")[1]:"",obj.hostname=url.split("/")[2],obj.origin=obj.protocol+"//"+obj.hostname,obj.pathname=url.split("?")[0].replace(obj.origin,""),obj.href=url;var pathnames=obj.pathname.split("/"),lastPath=pathnames[2].split(".");return obj.deviceSerial=pathnames[1],obj.channelNo=lastPath[0],obj.type=lastPath[lastPath.length-1],"live"===obj.type&&(obj.definition=lastPath.length>2?lastPath[1]:"sd"),"rec"===obj.type&&pathnames[2]&&(obj.recType=pathnames[2].includes(".cloud.")?"cloud":""),obj.searchParams=getQuery(url),obj}return {}}var codec={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right}function _create_for_of_iterator_helper_loose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return (it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(o,minLen):void 0}}(o))||allowArrayLike){it&&(o=it);var i=0;return function(){return i>=o.length?{done:true}:{done:false,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var DateTime=function(){function DateTime(){}return DateTime.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},DateTime.format=function(input,format){var date;if(_instanceof(input,Date))date=input;else {if("number"!=typeof input&&"string"!=typeof input)throw new Error("Invalid date input");date=DateTime.toDate(input+"");}for(var _step,result=format,_iterator=_create_for_of_iterator_helper_loose([[/(yyyy|YYYY)/g,function(){return DateTime.fillZero(date.getFullYear(),4)}],[/(yy|YY)/g,function(){return DateTime.fillZero(date.getFullYear()%100,2)}],[/(MM)/g,function(){return DateTime.fillZero(date.getMonth()+1,2)}],[/(M)/g,function(){return (date.getMonth()+1).toString()}],[/(dd|DD)/g,function(){return DateTime.fillZero(date.getDate(),2)}],[/(d|D)/g,function(){return date.getDate().toString()}],[/(HH|hh)/g,function(){return DateTime.fillZero(date.getHours(),2)}],[/(H|h)/g,function(){return date.getHours().toString()}],[/(mm)/g,function(){return DateTime.fillZero(date.getMinutes(),2)}],[/(m)/g,function(){return date.getMinutes().toString()}],[/(ss|SS)/g,function(){return DateTime.fillZero(date.getSeconds(),2)}],[/(s|S)/g,function(){return date.getSeconds().toString()}],[/(fff)/g,function(){return DateTime.fillZero(date.getMilliseconds(),3)}]]);!(_step=_iterator()).done;){var _step_value=_step.value,regexp=_step_value[0],fn=_step_value[1];result=result.replace(regexp,fn);}return result},DateTime.toDate=function(str){if(_instanceof(str,Date))return str;str=(str+"").trim().replace(/\/|\./gi,"-"),/^\d{4}$/.test(str)&&(str+="-01"),/^\d{4}-\d{2}$/.test(str)&&(str+="-01");try{return /^\d{4}-\d{2}-\d{2}$/.test(str)?new Date(str+"T00:00:00"):/^\d{8}$/.test(str)?(str+="",new Date(str.slice(0,4)+"-"+str.slice(4,6)+"-"+str.slice(6,8)+"T00:00:00")):/^\d{14}$/.test(str)?(str+="",new Date(str.slice(0,4)+"-"+str.slice(4,6)+"-"+str.slice(6,8)+"T"+str.slice(8,10)+":"+str.slice(10,12)+":"+str.slice(12,14))):/^\d{13}$/.test(str)?new Date(Number(str)):/^\d{10}$/.test(str)?new Date(1e3*Number(str)):new Date(str)}catch(error){throw new Error("Invalid date string")}},DateTime.diff=function(date1,date2,type){ void 0===type&&(type="second");var d1=DateTime.toDate(date1),d2=DateTime.toDate(date2);return "second"===type?Math.floor((d1.getTime()-d2.getTime())/1e3):"minute"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60):"hour"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60):"day"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60/24):Math.abs(d1.getTime()-d2.getTime())},DateTime}();dist$4.DateTime=DateTime,dist$4.addVc=function(url,codecs){ void 0===codecs&&(codecs=["h264"]);var vc=(codecs||["h264"]).reduce((function(acc,key){return key=key.toLowerCase(),acc+(codec[key]||0)}),0),host=url.split("?")[0],query=url.split("?")[1];return query=(query||"").split("&").filter((function(item){return !/^vc=\d?/.test(item)})).join("&"),host+"?"+(query+=(query?"&":"")+"vc="+vc)},dist$4.getQuery=getQuery,dist$4.getStaticPath=function(path,base){ void 0===base&&(base="");var protocolReg=/^(https?:\/\/|^\/\/)/;if(""===path||void 0===path)return "";if(protocolReg.test(path))return path;path=path.replace(/\/+/g,"/"),base=protocolReg.test(base||"")?base:window.location.href;try{return new URL(path,base).href}catch(error){return path}},dist$4.isHttp=function(url){return /^http[s]?:\/\//.test(url)},dist$4.isMobile=function(agent){var _navigator,_navigator1,_navigator2,_window;return /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent)||/Macintosh/i.test(agent||(null==(_navigator1=navigator)?void 0:_navigator1.userAgent))&&(null==(_navigator2=navigator)?void 0:_navigator2.maxTouchPoints)>1||!!(null==(_window=window)?void 0:_window.__IS_MOBILE_SIMULATOR__)},dist$4.parseEzopenUrl=parseEzopenUrl,dist$4.pick=function(obj,keys){return Object.entries(obj).reduce((function(acc,param){var key=param[0],value=param[1];return keys.includes(key)&&(acc[key]=value),acc}),{})},dist$4.switchEzopenUrl=function(url,options){var _ref=null!=options?options:{},type=_ref.type,recType=_ref.recType,search=_ref.search,definition=_ref.definition,channelNo=_ref.channelNo,deviceSerial=_ref.deviceSerial,validateCode=_ref.validateCode,obj=parseEzopenUrl(url);if(search){var ns=Object.assign({},obj.searchParams,getQuery("?"+search.replace("?","")));search=Object.entries(ns).reduce((function(acc,param){var key=param[0],value=param[1];return ""===value?acc:acc+=key+"="+encodeURIComponent(value)+"&"}),"?").replace(/&$/,"");}else search=obj.search;return type=type||obj.type,recType=null!=recType?recType:obj.recType,definition=null!=definition?definition:obj.definition,channelNo=channelNo||obj.channelNo,deviceSerial=deviceSerial||obj.deviceSerial,validateCode=null!=validateCode?validateCode:obj.validateCode,obj.protocol+"//"+(validateCode?validateCode+"@":"")+obj.hostname+"/"+deviceSerial+"/"+channelNo+("rec"===type&&recType?"."+recType:"")+("live"===type&&"hd"===definition?"."+definition:"")+"."+type+search};
8229
- return dist$4;
8230
- }
8231
-
8232
7350
  /*
8233
- * @ezuikit/control-ptz v0.0.1
8234
- * Copyright (c) 2026-04-02 Ezviz-OpenBiz
7351
+ * @ezuikit/control-ptz v1.0.0-beta.3
7352
+ * Copyright (c) 2026-05-03 Ezviz-OpenBiz
8235
7353
  * Released under the MIT License.
8236
7354
  */
8237
-
8238
- var hasRequiredDist$4;
8239
-
8240
- function requireDist$4 () {
8241
- if (hasRequiredDist$4) return dist$5;
8242
- hasRequiredDist$4 = 1;
8243
-
8244
- var deepmerge = requireCjs();
8245
- var utilsTools = requireDist$5();
8246
-
8247
- var en_US = {
8248
- GET_PTZ_STATUS: 'Get current PTZ status',
8249
- GET_PTZ_STATUS_FAILED: 'Theme module is not loaded, PTZ status cannot be obtained',
8250
- MOBILE_HIDE_PTZ: 'Mobile terminal, PTZ is not displayed in non-full screen state',
8251
- OPTION_PTZ_FAILED: 'Theme module is not loaded, PTZ cannot be operated',
8252
- MOBILE_PTZ_TIPS: 'Adjust camera angle by manipulating gimbal',
8253
- PTZ_FAST: 'F',
8254
- PTZ_MID: 'M',
8255
- PTZ_SLOW: 'S',
8256
- PTZ_SPEED: 'Adjust the PTZ rotation speed',
8257
- DEVICE_ZOOM: 'Control the device to zoom in/out of the screen',
8258
- DEVICE_FOCUS: "Adjusting the device's focal length"
8259
- };
8260
-
8261
- var zh_CN = {
8262
- GET_PTZ_STATUS: '获取当前云台状态',
8263
- GET_PTZ_STATUS_FAILED: '未加载Theme模块,无法获取云台状态',
8264
- MOBILE_HIDE_PTZ: '移动端,非全屏状态不展示云台',
8265
- OPTION_PTZ_FAILED: '未加载Theme模块,无法操作云台',
8266
- MOBILE_PTZ_TIPS: '请通过操控云台来调整摄像机视角',
8267
- PTZ_FAST: '快',
8268
- PTZ_MID: '中',
8269
- PTZ_SLOW: '慢',
8270
- PTZ_SPEED: '调整云台转动速度',
8271
- DEVICE_ZOOM: '控制设备放大/缩小画面',
8272
- DEVICE_FOCUS: '调整设备焦距'
8273
- };
8274
-
8275
- var PTZ_DEFAULT_OPTIONS = {
8276
- language: 'zh',
8277
- env: {
8278
- domain: 'https://open.ys7.com'
8279
- },
8280
- accessToken: '',
8281
- speed: 2,
8282
- locales: {
8283
- zh: zh_CN,
8284
- en: en_US
8285
- }
8286
- };
8287
- var PTZ_SPEED = {
8288
- 1: 1,
8289
- 2: 3,
8290
- 3: 7,
8291
- slow: 1,
8292
- mid: 3,
8293
- fast: 7
8294
- };
8295
- var PTZ_PREFIX = 'ez-ptz';
8296
- var PTZ_MOBILE_PREFIX = 'ez-mobile-ptz';
8297
- var PTZ_SPEED_ACTIVE_PREFIX = PTZ_PREFIX + '-speed-active';
8298
- var PTZ_DIRECTION_PREFIX = PTZ_PREFIX + '-direction';
8299
-
8300
- var BasePtz = /*#__PURE__*/ function() {
8301
- function BasePtz(container, options) {
8302
- if (options === void 0) options = {};
8303
- var _this_options_locales;
8304
- if (!container) throw new Error('Ptz container is required');
8305
- this.options = deepmerge(PTZ_DEFAULT_OPTIONS, options, {
8306
- clone: false
8307
- });
8308
- if ((_this_options_locales = this.options.locales) == null ? void 0 : _this_options_locales[this.options.language]) {
8309
- var _this_options_locales1;
8310
- this.locale = (_this_options_locales1 = this.options.locales) == null ? void 0 : _this_options_locales1[this.options.language];
8311
- } else {
8312
- var _this_options_locales2;
8313
- this.locale = (_this_options_locales2 = this.options.locales) == null ? void 0 : _this_options_locales2['zh'];
8314
- }
8315
- this.$container = container;
8316
- this.speed = PTZ_SPEED[this.options.speed || 2];
8317
- }
8318
- var _proto = BasePtz.prototype;
8319
- _proto.updateOptions = function updateOptions(options) {
8320
- this.options = deepmerge(this.options, options, {
8321
- clone: false
8322
- });
8323
- };
8324
- _proto.destroy = function destroy() {};
8325
- return BasePtz;
8326
- }();
8327
-
8328
- function _inherits$1(subClass, superClass) {
8329
- if (typeof superClass !== "function" && superClass !== null) {
8330
- throw new TypeError("Super expression must either be null or a function");
8331
- }
8332
- subClass.prototype = Object.create(superClass && superClass.prototype, {
8333
- constructor: {
8334
- value: subClass,
8335
- writable: true,
8336
- configurable: true
8337
- }
8338
- });
8339
- if (superClass) _set_prototype_of$1(subClass, superClass);
8340
- }
8341
- function _set_prototype_of$1(o, p) {
8342
- _set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8343
- o.__proto__ = p;
8344
- return o;
8345
- };
8346
- return _set_prototype_of$1(o, p);
8347
- }
8348
- var MobilePtz = /*#__PURE__*/ function(BasePtz) {
8349
- _inherits$1(MobilePtz, BasePtz);
8350
- function MobilePtz(container, options) {
8351
- var _this;
8352
- _this = BasePtz.call(this, container, options) || this;
8353
- _this._touchstart = _this._touchstart.bind(_this);
8354
- _this._touchend = _this._touchend.bind(_this);
8355
- _this._render();
8356
- return _this;
8357
- }
8358
- var _proto = MobilePtz.prototype;
8359
- _proto.destroy = function destroy() {
8360
- this._removeEventListener();
8361
- if (this.$content) {
8362
- this.$content.remove();
8363
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8364
- this.$content = null;
8365
- }
8366
- BasePtz.prototype.destroy.call(this);
8367
- };
8368
- _proto._render = function _render() {
8369
- this.$content = document.createElement('div');
8370
- this.$content.classList.add(PTZ_MOBILE_PREFIX + '-content');
8371
- this.$content.innerHTML = '\n <div class="' + PTZ_MOBILE_PREFIX + '-wrap">\n <div class="' + PTZ_MOBILE_PREFIX + '-container">\n <div class="' + PTZ_MOBILE_PREFIX + "-center " + PTZ_MOBILE_PREFIX + '-center"></div>\n <div class="' + PTZ_MOBILE_PREFIX + "-icon " + PTZ_MOBILE_PREFIX + "-top " + PTZ_MOBILE_PREFIX + '-default"></div>\n <div class="' + PTZ_MOBILE_PREFIX + "-icon " + PTZ_MOBILE_PREFIX + "-left " + PTZ_MOBILE_PREFIX + '-default"></div>\n <div class="' + PTZ_MOBILE_PREFIX + "-icon " + PTZ_MOBILE_PREFIX + "-bottom " + PTZ_MOBILE_PREFIX + '-default"></div>\n <div class="' + PTZ_MOBILE_PREFIX + "-icon " + PTZ_MOBILE_PREFIX + "-right " + PTZ_MOBILE_PREFIX + '-default"></div>\n </div>\n </div>\n ';
8372
- this.$container.appendChild(this.$content);
8373
- this._addEventListener();
8374
- };
8375
- _proto._addEventListener = function _addEventListener() {
8376
- // 云台控制事件绑定
8377
- var $warp = this.$content.querySelector("." + PTZ_MOBILE_PREFIX + "-wrap");
8378
- var touchstart = 'PointerEvent' in window ? 'pointerdown' : 'touchstart';
8379
- var touchend = 'PointerEvent' in window ? 'pointerup' : 'touchend';
8380
- if ($warp) {
8381
- $warp.addEventListener(touchstart, this._touchstart);
8382
- $warp.addEventListener(touchend, this._touchend);
8383
- }
8384
- };
8385
- _proto._touchstart = function _touchstart(e) {
8386
- e.preventDefault();
8387
- this._handlePtzTouch(e, 'start');
8388
- };
8389
- _proto._touchend = function _touchend(e) {
8390
- e.preventDefault();
8391
- this._handlePtzTouch(e, 'stop');
8392
- };
8393
- _proto._removeEventListener = function _removeEventListener() {
8394
- var $warp = this.$content.querySelector("." + PTZ_MOBILE_PREFIX + "-wrap");
8395
- var touchstart = 'PointerEvent' in window ? 'pointerdown' : 'touchstart';
8396
- var touchend = 'PointerEvent' in window ? 'pointerup' : 'touchend';
8397
- if ($warp) {
8398
- $warp.removeEventListener(touchstart, this._touchstart);
8399
- $warp.removeEventListener(touchend, this._touchend);
8400
- }
8401
- };
8402
- _proto._handlePtzTouch = function _handlePtzTouch(e, type) {
8403
- var _this_options_token_deviceToken, _this_options_token, _e_changedTouches_, _e_changedTouches_1, _this_options_env, _this_options_token_deviceToken1, _this_options_token1;
8404
- if (!(this.options.accessToken || ((_this_options_token = this.options.token) == null ? void 0 : (_this_options_token_deviceToken = _this_options_token.deviceToken) == null ? void 0 : _this_options_token_deviceToken.video))) throw new Error('Ptz accessToken or token.deviceToken.video is required');
8405
- var $warp = this.$content.querySelector("." + PTZ_MOBILE_PREFIX + "-wrap");
8406
- var rect = $warp.getBoundingClientRect();
8407
- var containerCenterX = rect.left + 130;
8408
- var containerCenterY = rect.top + 130;
8409
- var eventX = e.x || ((_e_changedTouches_ = e.changedTouches[0]) == null ? void 0 : _e_changedTouches_.clientX);
8410
- var eventY = e.y || ((_e_changedTouches_1 = e.changedTouches[0]) == null ? void 0 : _e_changedTouches_1.clientY);
8411
- var left = eventX - containerCenterX;
8412
- var top = eventY - containerCenterY;
8413
- var direction = 0; // 操作命令:0-上,1-下,2-左,3右,4-左上,5-左下,6-右上,7-右下,8-放大,9-缩小,10-近焦距,11-远焦距
8414
- var url = ((_this_options_env = this.options.env) == null ? void 0 : _this_options_env.domain) + '/api/lapp/device/ptz/start';
8415
- var token = this.options.accessToken || ((_this_options_token1 = this.options.token) == null ? void 0 : (_this_options_token_deviceToken1 = _this_options_token1.deviceToken) == null ? void 0 : _this_options_token_deviceToken1.video);
8416
- var $icons = $warp.querySelectorAll("." + PTZ_MOBILE_PREFIX + "-icon");
8417
- // 判读方位
8418
- if (Math.abs(left) > Math.abs(top)) {
8419
- if (left > 0) {
8420
- direction = 3;
8421
- $icons[3].className = $icons[3].className.replace("" + PTZ_MOBILE_PREFIX + "-default", "" + PTZ_MOBILE_PREFIX + "-active");
8422
- } else {
8423
- direction = 2;
8424
- $icons[1].className = $icons[1].className.replace("" + PTZ_MOBILE_PREFIX + "-default", "" + PTZ_MOBILE_PREFIX + "-active");
8425
- }
8426
- } else {
8427
- if (top > 0) {
8428
- direction = 1;
8429
- $icons[2].className = $icons[2].className.replace("" + PTZ_MOBILE_PREFIX + "-default", "" + PTZ_MOBILE_PREFIX + "-active");
8430
- } else {
8431
- direction = 0;
8432
- $icons[0].className = $icons[0].className.replace("" + PTZ_MOBILE_PREFIX + "-default", "" + PTZ_MOBILE_PREFIX + "-active");
8433
- }
8434
- }
8435
- $warp.style.cssText = "background-image:linear-gradient(" + (direction === 0 ? 180 : direction === 1 ? 0 : direction === 2 ? 90 : 270) + "deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)";
8436
- if (type === 'stop') {
8437
- var _this_options_env1;
8438
- url = ((_this_options_env1 = this.options.env) == null ? void 0 : _this_options_env1.domain) + '/api/lapp/device/ptz/stop';
8439
- $warp.style.cssText = '';
8440
- $icons[3].className = $icons[3].className.replace("" + PTZ_MOBILE_PREFIX + "-active", "" + PTZ_MOBILE_PREFIX + "-default");
8441
- $icons[1].className = $icons[1].className.replace("" + PTZ_MOBILE_PREFIX + "-active", "" + PTZ_MOBILE_PREFIX + "-default");
8442
- $icons[2].className = $icons[2].className.replace("" + PTZ_MOBILE_PREFIX + "-active", "" + PTZ_MOBILE_PREFIX + "-default");
8443
- $icons[0].className = $icons[0].className.replace("" + PTZ_MOBILE_PREFIX + "-active", "" + PTZ_MOBILE_PREFIX + "-default");
8444
- }
8445
- // 这个控件暂时没有 ptzSpeed 和areaId 和backDeg 的值
8446
- // this.jSPlugin?.eventEmitter?.emit(EVENTS.ptz.ptzDirection, {
8447
- // type,
8448
- // direction,
8449
- // isRotate: false,
8450
- // ptzSpeed: 1,
8451
- // });
8452
- var operationResultCb = this.options.onDirection == null ? void 0 : this.options.onDirection.call(this.options, {
8453
- direction: direction,
8454
- speed: this.speed,
8455
- type: type
8456
- });
8457
- var data = new FormData();
8458
- data.append('deviceSerial', this.options.deviceSerial + '');
8459
- data.append('channelNo', this.options.channelNo + '');
8460
- data.append('speed', '1');
8461
- data.append('direction', direction + '');
8462
- data.append('accessToken', token);
8463
- // prettier-ignore
8464
- // eslint-disable-next-line @typescript-eslint/promise-function-async
8465
- fetch(url, {
8466
- method: 'POST',
8467
- body: data
8468
- }).then(function(response) {
8469
- return response.json();
8470
- }).then(function(rt) {
8471
- if (rt.code === 200) ; else {
8472
- // this.jSPlugin?.logger?.error('[errors]', this.jSPlugin.i18n.t('38' + rt.code) + `(${rt.code})`);
8473
- // const msg = this.jSPlugin.i18n.t('38' + rt.code) || rt.msg;
8474
- // this.pluginStatus.loadingSetText({
8475
- // text: msg,
8476
- // color: 'red',
8477
- // delayClear: 2000,
8478
- // });
8479
- if ([
8480
- 60005,
8481
- 60002,
8482
- 60003,
8483
- 60004
8484
- ].includes(+rt.code)) {
8485
- $warp.style.cssText = "background-image:linear-gradient(" + (direction === 0 ? 180 : direction === 1 ? 0 : direction === 2 ? 90 : 270) + "deg, #f45656 0%, rgba(100,143,252,0.00) 50%)";
8486
- }
8487
- }
8488
- operationResultCb == null ? void 0 : operationResultCb(rt);
8489
- }).catch(function(err) {
8490
- }).finally(function() {
8491
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8492
- operationResultCb = null;
8493
- });
8494
- };
8495
- return MobilePtz;
8496
- }(BasePtz);
8497
-
8498
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
8499
- try {
8500
- var info = gen[key](arg);
8501
- var value = info.value;
8502
- } catch (error) {
8503
- reject(error);
8504
- return;
8505
- }
8506
- if (info.done) {
8507
- resolve(value);
8508
- } else {
8509
- Promise.resolve(value).then(_next, _throw);
8510
- }
8511
- }
8512
- function _async_to_generator(fn) {
8513
- return function() {
8514
- var self = this, args = arguments;
8515
- return new Promise(function(resolve, reject) {
8516
- var gen = fn.apply(self, args);
8517
- function _next(value) {
8518
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
8519
- }
8520
- function _throw(err) {
8521
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
8522
- }
8523
- _next(undefined);
8524
- });
8525
- };
8526
- }
8527
- function _defineProperties(target, props) {
8528
- for(var i = 0; i < props.length; i++){
8529
- var descriptor = props[i];
8530
- descriptor.enumerable = descriptor.enumerable || false;
8531
- descriptor.configurable = true;
8532
- if ("value" in descriptor) descriptor.writable = true;
8533
- Object.defineProperty(target, descriptor.key, descriptor);
8534
- }
8535
- }
8536
- function _create_class(Constructor, protoProps, staticProps) {
8537
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
8538
- return Constructor;
8539
- }
8540
- function _inherits(subClass, superClass) {
8541
- if (typeof superClass !== "function" && superClass !== null) {
8542
- throw new TypeError("Super expression must either be null or a function");
8543
- }
8544
- subClass.prototype = Object.create(superClass && superClass.prototype, {
8545
- constructor: {
8546
- value: subClass,
8547
- writable: true,
8548
- configurable: true
8549
- }
8550
- });
8551
- if (superClass) _set_prototype_of(subClass, superClass);
8552
- }
8553
- function _set_prototype_of(o, p) {
8554
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8555
- o.__proto__ = p;
8556
- return o;
8557
- };
8558
- return _set_prototype_of(o, p);
8559
- }
8560
- function _ts_generator(thisArg, body) {
8561
- var f, y, t, _ = {
8562
- label: 0,
8563
- sent: function() {
8564
- if (t[0] & 1) throw t[1];
8565
- return t[1];
8566
- },
8567
- trys: [],
8568
- ops: []
8569
- }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
8570
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
8571
- return this;
8572
- }), g;
8573
- function verb(n) {
8574
- return function(v) {
8575
- return step([
8576
- n,
8577
- v
8578
- ]);
8579
- };
8580
- }
8581
- function step(op) {
8582
- if (f) throw new TypeError("Generator is already executing.");
8583
- while(g && (g = 0, op[0] && (_ = 0)), _)try {
8584
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
8585
- if (y = 0, t) op = [
8586
- op[0] & 2,
8587
- t.value
8588
- ];
8589
- switch(op[0]){
8590
- case 0:
8591
- case 1:
8592
- t = op;
8593
- break;
8594
- case 4:
8595
- _.label++;
8596
- return {
8597
- value: op[1],
8598
- done: false
8599
- };
8600
- case 5:
8601
- _.label++;
8602
- y = op[1];
8603
- op = [
8604
- 0
8605
- ];
8606
- continue;
8607
- case 7:
8608
- op = _.ops.pop();
8609
- _.trys.pop();
8610
- continue;
8611
- default:
8612
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
8613
- _ = 0;
8614
- continue;
8615
- }
8616
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
8617
- _.label = op[1];
8618
- break;
8619
- }
8620
- if (op[0] === 6 && _.label < t[1]) {
8621
- _.label = t[1];
8622
- t = op;
8623
- break;
8624
- }
8625
- if (t && _.label < t[2]) {
8626
- _.label = t[2];
8627
- _.ops.push(op);
8628
- break;
8629
- }
8630
- if (t[2]) _.ops.pop();
8631
- _.trys.pop();
8632
- continue;
8633
- }
8634
- op = body.call(thisArg, _);
8635
- } catch (e) {
8636
- op = [
8637
- 6,
8638
- e
8639
- ];
8640
- y = 0;
8641
- } finally{
8642
- f = t = 0;
8643
- }
8644
- if (op[0] & 5) throw op[1];
8645
- return {
8646
- value: op[0] ? op[1] : void 0,
8647
- done: true
8648
- };
8649
- }
8650
- }
8651
- /**
8652
- * @class Ptz
8653
- * @classdesc 云台控制
8654
- *
8655
- * @example
8656
- * // 初始化云台控制
8657
- * // 显示云台控制
8658
- * ptz.show()
8659
- * // 隐藏云台控制
8660
- * ptz.hide()
8661
- */ var Ptz = /*#__PURE__*/ function(BasePtz) {
8662
- _inherits(Ptz, BasePtz);
8663
- function Ptz(container, options) {
8664
- if (options === void 0) options = {};
8665
- var _this;
8666
- _this = BasePtz.call(this, container, options) || this, _this._isMobile = utilsTools.isMobile(), _this._isRotate = false, _this._clearTimer = null;
8667
- _this._$wrapper = document.createElement('div');
8668
- _this._$wrapper.className = PTZ_PREFIX + '-container-wrap';
8669
- _this._$directionCircleContainer = document.createElement('div');
8670
- _this._$directionCircleContainer.classList.add(PTZ_PREFIX + '-container');
8671
- _this._$directionCircleContainer.innerHTML = '\n <div class="' + PTZ_PREFIX + "-main " + PTZ_DIRECTION_PREFIX + '-center"></div>\n <div class="' + PTZ_PREFIX + "-icon " + PTZ_DIRECTION_PREFIX + '-top" data-direction="0"></div>\n <div class="' + PTZ_PREFIX + "-icon " + PTZ_DIRECTION_PREFIX + '-top-left" data-direction="4"></div>\n <div class="' + PTZ_PREFIX + "-icon " + PTZ_DIRECTION_PREFIX + '-left" data-direction="2"></div>\n <div class="' + PTZ_PREFIX + "-icon " + PTZ_DIRECTION_PREFIX + '-left-bottom" data-direction="5"></div>\n <div class="' + PTZ_PREFIX + "-icon " + PTZ_DIRECTION_PREFIX + '-bottom" data-direction="1"></div>\n <div class="' + PTZ_PREFIX + "-icon " + PTZ_DIRECTION_PREFIX + '-bottom-right" data-direction="7"></div>\n <div class="' + PTZ_PREFIX + "-icon " + PTZ_DIRECTION_PREFIX + '-right" data-direction="3"></div>\n <div class="' + PTZ_PREFIX + "-icon " + PTZ_DIRECTION_PREFIX + '-right-top" data-direction="6"></div>\n ';
8672
- _this._$wrapper.appendChild(_this._$directionCircleContainer);
8673
- _this._$speedContainer = document.createElement('div');
8674
- _this._$speedContainer.classList.add(PTZ_PREFIX + '-speed-container');
8675
- _this._$speedContainer.innerHTML = '\n <div class="' + PTZ_PREFIX + '-speed-progress" title="' + _this.locale['PTZ_SPEED'] + '">\n <div class="' + PTZ_PREFIX + '-speed-progress-line">\n <div class="' + PTZ_PREFIX + "-speed-progress-line-dot " + (_this.speed === 1 ? PTZ_SPEED_ACTIVE_PREFIX : '') + '" data-id="slow" data-index="1" data-value="1"></div>\n <div class="' + PTZ_PREFIX + "-speed-progress-line-dot " + (_this.speed === 3 ? PTZ_SPEED_ACTIVE_PREFIX : '') + '" data-id="mid" data-index="2" data-value="3"></div>\n <div class="' + PTZ_PREFIX + "-speed-progress-line-dot " + (_this.speed === 7 ? PTZ_SPEED_ACTIVE_PREFIX : '') + '" data-id="fast" data-index="3" data-value="7"></div>\n </div>\n <div class="' + PTZ_PREFIX + '-speed-progress-points">\n <div class="' + PTZ_PREFIX + '-speed-progress-points-slow">\n ' + _this.locale['PTZ_SLOW'] + '\n </div>\n <div class="' + PTZ_PREFIX + '-speed-progress-points-mid">\n ' + _this.locale['PTZ_MID'] + '\n </div>\n <div class="' + PTZ_PREFIX + '-speed-progress-points-fast">\n ' + _this.locale['PTZ_FAST'] + "\n </div>\n </div>\n </div>\n ";
8676
- _this._$wrapper.appendChild(_this._$speedContainer);
8677
- _this._$btnContainer = document.createElement('div');
8678
- _this._$btnContainer.classList.add(PTZ_PREFIX + '-btn-container');
8679
- _this._$btnContainer.innerHTML = '\n <div class="' + PTZ_PREFIX + '-btn-zoom" title="' + _this.locale['DEVICE_ZOOM'] + '" style="user-select: none;">\n <div class="' + PTZ_PREFIX + '-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="' + PTZ_PREFIX + '-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="' + PTZ_PREFIX + '-btn-focal" title="' + _this.locale['DEVICE_FOCUS'] + '" style="user-select: none;">\n <div class="' + PTZ_PREFIX + '-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="' + PTZ_PREFIX + '-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 ';
8680
- _this._$wrapper.appendChild(_this._$btnContainer);
8681
- container.appendChild(_this._$wrapper);
8682
- // 云台控制事件绑定
8683
- // 云台控制
8684
- _this._$directionCircleContainer.onmousedown = function(e) {
8685
- e.preventDefault();
8686
- e.stopPropagation();
8687
- _this._handlePtzTouch(e, 'start');
8688
- };
8689
- _this._$directionCircleContainer.onmouseup = function(e) {
8690
- e.preventDefault();
8691
- e.stopPropagation();
8692
- _this._handlePtzTouch(e, 'stop');
8693
- };
8694
- _this._$directionCircleContainer.ontouchstart = function(e) {
8695
- e.preventDefault();
8696
- e.stopPropagation();
8697
- _this._handlePtzTouch(e, 'start');
8698
- };
8699
- _this._$directionCircleContainer.ontouchend = function(e) {
8700
- e.preventDefault();
8701
- e.stopPropagation();
8702
- _this._handlePtzTouch(e, 'stop');
8703
- };
8704
- _this._onSwitchSpeed = function(e) {
8705
- var list = Array.from(_this._$speedContainer.querySelectorAll("." + PTZ_PREFIX + "-speed-progress-line-dot"));
8706
- if (list.includes(e.target) && !e.target.classList.contains(PTZ_SPEED_ACTIVE_PREFIX)) {
8707
- list.forEach(function(item) {
8708
- if (item === e.target) {
8709
- item.classList.add(PTZ_SPEED_ACTIVE_PREFIX);
8710
- } else {
8711
- item.classList.remove(PTZ_SPEED_ACTIVE_PREFIX);
8712
- }
8713
- });
8714
- var value = e.target.getAttribute('data-value');
8715
- var index = e.target.getAttribute('data-index');
8716
- _this.speed = +value;
8717
- _this.options.onSpeedChange == null ? void 0 : _this.options.onSpeedChange.call(_this.options, +index);
8718
- }
8719
- };
8720
- // mouse 事件绑定
8721
- // 云台速度变化事件绑定
8722
- _this._$speedContainer.onmouseup = _this._onSwitchSpeed;
8723
- if (_this._isMobile) {
8724
- _this._$speedContainer.ontouchend = _this._onSwitchSpeed;
8725
- }
8726
- if (_this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-zoom-add")) {
8727
- // 物理缩放、变焦按钮事件监听
8728
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-zoom-add").onmousedown = function(e) {
8729
- e.preventDefault();
8730
- e.stopPropagation();
8731
- _this._handleBtnTouch('zoom', 'add', 'start');
8732
- };
8733
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-zoom-add").onmouseup = function(e) {
8734
- e.preventDefault();
8735
- e.stopPropagation();
8736
- _this._handleBtnTouch('zoom', 'add', 'stop');
8737
- };
8738
- }
8739
- if (_this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-zoom-sub")) {
8740
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-zoom-sub").onmousedown = function(e) {
8741
- e.preventDefault();
8742
- e.stopPropagation();
8743
- _this._handleBtnTouch('zoom', 'sub', 'start');
8744
- };
8745
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-zoom-sub").onmouseup = function(e) {
8746
- e.preventDefault();
8747
- e.stopPropagation();
8748
- _this._handleBtnTouch('zoom', 'sub', 'stop');
8749
- };
8750
- }
8751
- if (_this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-focal-add")) {
8752
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-focal-add").onmousedown = function(e) {
8753
- e.preventDefault();
8754
- e.stopPropagation();
8755
- _this._handleBtnTouch('focal', 'add', 'start');
8756
- };
8757
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-focal-add").onmouseup = function(e) {
8758
- e.preventDefault();
8759
- e.stopPropagation();
8760
- _this._handleBtnTouch('focal', 'add', 'stop');
8761
- };
8762
- }
8763
- if (_this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-focal-sub")) {
8764
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-focal-sub").onmousedown = function(e) {
8765
- e.preventDefault();
8766
- e.stopPropagation();
8767
- _this._handleBtnTouch('focal', 'sub', 'start');
8768
- };
8769
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-focal-sub").onmouseup = function(e) {
8770
- e.preventDefault();
8771
- e.stopPropagation();
8772
- _this._handleBtnTouch('focal', 'sub', 'stop');
8773
- };
8774
- }
8775
- // mobile touch 事件监听
8776
- if (_this._isMobile) {
8777
- if (_this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-zoom-add")) {
8778
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-zoom-add").ontouchstart = function(e) {
8779
- e.preventDefault();
8780
- e.stopPropagation();
8781
- _this._handleBtnTouch('zoom', 'add', 'start');
8782
- };
8783
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-zoom-add").ontouchend = function(e) {
8784
- e.preventDefault();
8785
- e.stopPropagation();
8786
- _this._handleBtnTouch('zoom', 'add', 'stop');
8787
- };
8788
- }
8789
- if (_this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-zoom-sub")) {
8790
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-zoom-sub").ontouchstart = function(e) {
8791
- e.preventDefault();
8792
- e.stopPropagation();
8793
- _this._handleBtnTouch('zoom', 'sub', 'start');
8794
- };
8795
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-zoom-sub").ontouchend = function(e) {
8796
- e.preventDefault();
8797
- e.stopPropagation();
8798
- _this._handleBtnTouch('zoom', 'sub', 'stop');
8799
- };
8800
- }
8801
- if (_this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-focal-add")) {
8802
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-focal-add").ontouchstart = function(e) {
8803
- e.preventDefault();
8804
- e.stopPropagation();
8805
- _this._handleBtnTouch('focal', 'add', 'start');
8806
- };
8807
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-focal-add").ontouchend = function(e) {
8808
- e.preventDefault();
8809
- e.stopPropagation();
8810
- _this._handleBtnTouch('focal', 'add', 'stop');
8811
- };
8812
- }
8813
- if (_this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-focal-sub")) {
8814
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-focal-sub").ontouchstart = function(e) {
8815
- e.preventDefault();
8816
- e.stopPropagation();
8817
- _this._handleBtnTouch('focal', 'sub', 'start');
8818
- };
8819
- _this._$btnContainer.querySelector("." + PTZ_PREFIX + "-btn-focal-sub").ontouchend = function(e) {
8820
- e.preventDefault();
8821
- e.stopPropagation();
8822
- _this._handleBtnTouch('focal', 'sub', 'stop');
8823
- };
8824
- }
8825
- }
8826
- return _this;
8827
- }
8828
- var _proto = Ptz.prototype;
8829
- _proto.destroy = function destroy() {
8830
- if (this._clearTimer) {
8831
- clearTimeout(this._clearTimer);
8832
- this._clearTimer = null;
8833
- }
8834
- if (this._$directionCircleContainer) {
8835
- this._$directionCircleContainer.remove();
8836
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8837
- this._$directionCircleContainer = null;
8838
- }
8839
- if (this._$speedContainer) {
8840
- this._onSwitchSpeed = null;
8841
- this._$speedContainer.remove();
8842
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8843
- this._$speedContainer = null;
8844
- }
8845
- if (this._$btnContainer) {
8846
- this._$btnContainer.remove();
8847
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8848
- this._$btnContainer = null;
8849
- }
8850
- if (this._$wrapper) {
8851
- this._$wrapper.remove();
8852
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8853
- this._$wrapper = null;
8854
- }
8855
- BasePtz.prototype.destroy.call(this);
8856
- };
8857
- _proto._handlePtzTouch = function _handlePtzTouch(e, type) {
8858
- var _this = this;
8859
- var _this_options_token_deviceToken, _this_options_token, _this_options_env, _this_options_token_deviceToken1, _this_options_token1;
8860
- if (!(this.options.accessToken || ((_this_options_token = this.options.token) == null ? void 0 : (_this_options_token_deviceToken = _this_options_token.deviceToken) == null ? void 0 : _this_options_token_deviceToken.video))) throw new Error('Ptz accessToken or token.deviceToken.video is required');
8861
- // 初始化或获取当前PTZ操作队列
8862
- if (!this._ptzQueue) {
8863
- this._ptzQueue = Promise.resolve();
8864
- }
8865
- var container = this._$directionCircleContainer.getBoundingClientRect();
8866
- var containerCenterX = container.left + (this._$directionCircleContainer.clientWidth + 2) / 2;
8867
- var containerCenterY = container.top + (this._$directionCircleContainer.clientHeight + 2) / 2;
8868
- var eventX = e.x || e.changedTouches[0].clientX;
8869
- var eventY = e.y || e.changedTouches[0].clientY;
8870
- var direction = 0;
8871
- var url = ((_this_options_env = this.options.env) == null ? void 0 : _this_options_env.domain) + '/api/lapp/device/ptz/start';
8872
- var token = this.options.accessToken || ((_this_options_token1 = this.options.token) == null ? void 0 : (_this_options_token_deviceToken1 = _this_options_token1.deviceToken) == null ? void 0 : _this_options_token_deviceToken1.video);
8873
- var backDeg = 0;
8874
- function getAreaId(x, y) {
8875
- // 获取当前点击位置相对于圆心的角度
8876
- var rad = Math.atan2(y, x);
8877
- if (rad < 0) rad += 2 * Math.PI;
8878
- var deg = rad * (180 / Math.PI) - 225 - 12.5;
8879
- if (deg < 0) deg += 360;
8880
- return Math.floor(deg / 45) + 1;
8881
- }
8882
- // 兼容画面旋转90度
8883
- // const isRotate = false; // /^rotate\(90/.test(document.getElementById(`${this.jSPlugin.id}-wrap`).style.transform);
8884
- var left = eventX - containerCenterX;
8885
- var top = eventY - containerCenterY;
8886
- if (this.isRotate) {
8887
- switch(getAreaId(left, top)){
8888
- case 1:
8889
- direction = 2;
8890
- backDeg = 90;
8891
- break;
8892
- case 2:
8893
- direction = 4;
8894
- backDeg = 135;
8895
- break;
8896
- case 3:
8897
- direction = 0;
8898
- backDeg = 180;
8899
- break;
8900
- case 4:
8901
- direction = 6;
8902
- backDeg = 225;
8903
- break;
8904
- case 5:
8905
- direction = 3;
8906
- backDeg = 270;
8907
- break;
8908
- case 6:
8909
- direction = 7;
8910
- backDeg = 315;
8911
- break;
8912
- case 7:
8913
- direction = 1;
8914
- backDeg = 0;
8915
- break;
8916
- case 8:
8917
- direction = 5;
8918
- backDeg = 45;
8919
- break;
8920
- }
8921
- } else {
8922
- switch(getAreaId(left, top)){
8923
- case 1:
8924
- direction = 0;
8925
- backDeg = 180;
8926
- break;
8927
- case 2:
8928
- direction = 6;
8929
- backDeg = 225;
8930
- break;
8931
- case 3:
8932
- direction = 3;
8933
- backDeg = 270;
8934
- break;
8935
- case 4:
8936
- direction = 7;
8937
- backDeg = 315;
8938
- break;
8939
- case 5:
8940
- direction = 1;
8941
- backDeg = 0;
8942
- break;
8943
- case 6:
8944
- direction = 5;
8945
- backDeg = 45;
8946
- break;
8947
- case 7:
8948
- direction = 2;
8949
- backDeg = 90;
8950
- break;
8951
- case 8:
8952
- direction = 4;
8953
- backDeg = 135;
8954
- break;
8955
- }
8956
- }
8957
- if (this._clearTimer) {
8958
- clearTimeout(this._clearTimer);
8959
- this._clearTimer = null;
8960
- }
8961
- if (type === 'start') {
8962
- this._$directionCircleContainer.style.cssText = "background-image:linear-gradient(" + backDeg + "deg, #4277FF 0%, rgba(100,143,252,0.00) 30%)";
8963
- } else {
8964
- this._$directionCircleContainer.style.cssText = '';
8965
- }
8966
- if (type === 'stop') {
8967
- var _this_options_env1;
8968
- url = ((_this_options_env1 = this.options.env) == null ? void 0 : _this_options_env1.domain) + '/api/lapp/device/ptz/stop';
8969
- }
8970
- var operationResultCb = this.options.onDirection == null ? void 0 : this.options.onDirection.call(this.options, {
8971
- areaId: getAreaId(left, top),
8972
- direction: direction,
8973
- backDeg: backDeg,
8974
- isRotate: this.isRotate,
8975
- speed: this.speed,
8976
- type: type
8977
- });
8978
- var data = new FormData();
8979
- data.append('deviceSerial', this.options.deviceSerial + '');
8980
- data.append('channelNo', this.options.channelNo + '');
8981
- data.append('speed', this.speed + '');
8982
- data.append('direction', direction + '');
8983
- data.append('accessToken', token);
8984
- // 将操作加入队列
8985
- this._ptzQueue = this._ptzQueue.then(function() {
8986
- return _async_to_generator(function() {
8987
- var _this;
8988
- return _ts_generator(this, function(_state) {
8989
- switch(_state.label){
8990
- case 0:
8991
- _this = this;
8992
- return [
8993
- 4,
8994
- fetch(url, {
8995
- method: 'POST',
8996
- body: data
8997
- }).then(function(response) {
8998
- return _async_to_generator(function() {
8999
- return _ts_generator(this, function(_state) {
9000
- switch(_state.label){
9001
- case 0:
9002
- return [
9003
- 4,
9004
- response.json()
9005
- ];
9006
- case 1:
9007
- return [
9008
- 2,
9009
- _state.sent()
9010
- ];
9011
- }
9012
- });
9013
- })();
9014
- }).then(function(rt) {
9015
- var _rt_result;
9016
- operationResultCb == null ? void 0 : operationResultCb(rt);
9017
- var code = rt.code || (rt == null ? void 0 : (_rt_result = rt.result) == null ? void 0 : _rt_result.code);
9018
- if ([
9019
- 60000,
9020
- 60001,
9021
- 60002,
9022
- 60003,
9023
- 60004,
9024
- 60005,
9025
- 60006,
9026
- 10002
9027
- ].includes(+code)) {
9028
- _this._$directionCircleContainer.style.cssText = "background-image:linear-gradient(" + backDeg + "deg, #f45656 0%, rgba(100,143,252,0.00) 30%)";
9029
- }
9030
- return rt;
9031
- }).catch(function(err) {
9032
- }).finally(function() {
9033
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
9034
- operationResultCb = null;
9035
- if (type === 'stop') {
9036
- _this._clearTimer = setTimeout(function() {
9037
- _this._$directionCircleContainer.style.cssText = '';
9038
- }, 1000);
9039
- }
9040
- })
9041
- ];
9042
- case 1:
9043
- // prettier-ignore
9044
- return [
9045
- 2,
9046
- _state.sent()
9047
- ];
9048
- }
9049
- });
9050
- }).call(_this);
9051
- });
9052
- if (type === 'stop') {
9053
- this._ptzQueue = this._ptzQueue.finally(function() {});
9054
- }
9055
- // this.jSPlugin?.eventEmitter?.emit(EVENTS.ptzDirection, {
9056
- // areaId: getAreaId(left, top),
9057
- // direction,
9058
- // backDeg,
9059
- // isRotate,
9060
- // ptzSpeed: this.jSPlugin.ptzSpeed,
9061
- // type,
9062
- // });
9063
- };
9064
- _proto._handleBtnTouch = function _handleBtnTouch(btn, option, type) {
9065
- var _this = this;
9066
- var _this_options_token, _this_options_env, _this_options_token_deviceToken, _this_options_token1;
9067
- if (!(this.options.accessToken || ((_this_options_token = this.options.token) == null ? void 0 : _this_options_token.deviceToken.video))) throw new Error('Ptz accessToken or token.deviceToken.video is required');
9068
- // 使用Promise来跟踪当前操作状态
9069
- if (!this._ptzOperation) {
9070
- this._ptzOperation = Promise.resolve();
9071
- }
9072
- var direction = 8;
9073
- if (btn === 'zoom') {
9074
- direction = option === 'add' ? 8 : 9;
9075
- } else {
9076
- direction = option === 'add' ? 10 : 11;
9077
- }
9078
- var url = ((_this_options_env = this.options.env) == null ? void 0 : _this_options_env.domain) + '/api/lapp/device/ptz/start';
9079
- var token = this.options.accessToken || ((_this_options_token1 = this.options.token) == null ? void 0 : (_this_options_token_deviceToken = _this_options_token1.deviceToken) == null ? void 0 : _this_options_token_deviceToken.video);
9080
- if (type === 'stop') {
9081
- var _this_options_env1;
9082
- url = ((_this_options_env1 = this.options.env) == null ? void 0 : _this_options_env1.domain) + '/api/lapp/device/ptz/stop';
9083
- }
9084
- var operationResultCb = this.options.onDirection == null ? void 0 : this.options.onDirection.call(this.options, {
9085
- btn: btn,
9086
- option: option,
9087
- type: type
9088
- });
9089
- var data = new FormData();
9090
- data.append('deviceSerial', this.options.deviceSerial + '');
9091
- data.append('channelNo', this.options.channelNo + '');
9092
- data.append('speed', this.speed + '');
9093
- data.append('direction', direction + '');
9094
- data.append('accessToken', token);
9095
- // 将当前操作加入Promise链
9096
- this._ptzOperation = this._ptzOperation.then(function() {
9097
- return _async_to_generator(function() {
9098
- return _ts_generator(this, function(_state) {
9099
- switch(_state.label){
9100
- case 0:
9101
- return [
9102
- 4,
9103
- fetch(url, {
9104
- method: 'POST',
9105
- body: data
9106
- }).then(function(response) {
9107
- return _async_to_generator(function() {
9108
- return _ts_generator(this, function(_state) {
9109
- switch(_state.label){
9110
- case 0:
9111
- return [
9112
- 4,
9113
- response.json()
9114
- ];
9115
- case 1:
9116
- return [
9117
- 2,
9118
- _state.sent()
9119
- ];
9120
- }
9121
- });
9122
- })();
9123
- }).then(function(rt) {
9124
- operationResultCb == null ? void 0 : operationResultCb(rt);
9125
- return rt;
9126
- }).catch(function(err) {
9127
- }).finally(function() {
9128
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
9129
- operationResultCb = null;
9130
- })
9131
- ];
9132
- case 1:
9133
- // prettier-ignore
9134
- return [
9135
- 2,
9136
- _state.sent()
9137
- ];
9138
- }
9139
- });
9140
- })();
9141
- });
9142
- // 如果是stop操作,添加一个清理操作
9143
- if (type === 'stop') {
9144
- this._ptzOperation = this._ptzOperation.finally(function() {
9145
- _this._ptzOperation = null; // 重置操作链
9146
- });
9147
- }
9148
- };
9149
- _create_class(Ptz, [
9150
- {
9151
- key: "isRotate",
9152
- get: function get() {
9153
- return this._isRotate;
9154
- },
9155
- set: /**
9156
- * 是否旋转了
9157
- */ function set(isRotate) {
9158
- this._isRotate = isRotate;
9159
- }
9160
- }
9161
- ]);
9162
- return Ptz;
9163
- }(BasePtz);
9164
-
9165
- dist$5.BasePtz = BasePtz;
9166
- dist$5.MobilePtz = MobilePtz;
9167
- dist$5.Ptz = Ptz;
9168
- return dist$5;
9169
- }
9170
-
9171
- var distExports$2 = requireDist$4();
7355
+ 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);
9172
7356
 
9173
7357
  function _defineProperties$4(target, props) {
9174
7358
  for(var i = 0; i < props.length; i++){
@@ -9179,12 +7363,12 @@
9179
7363
  Object.defineProperty(target, descriptor.key, descriptor);
9180
7364
  }
9181
7365
  }
9182
- function _create_class$4(Constructor, protoProps, staticProps) {
7366
+ function _create_class$8(Constructor, protoProps, staticProps) {
9183
7367
  if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
9184
7368
  return Constructor;
9185
7369
  }
9186
- function _extends$d() {
9187
- _extends$d = Object.assign || function(target) {
7370
+ function _extends$f() {
7371
+ _extends$f = Object.assign || function(target) {
9188
7372
  for(var i = 1; i < arguments.length; i++){
9189
7373
  var source = arguments[i];
9190
7374
  for(var key in source){
@@ -9195,7 +7379,7 @@
9195
7379
  }
9196
7380
  return target;
9197
7381
  };
9198
- return _extends$d.apply(this, arguments);
7382
+ return _extends$f.apply(this, arguments);
9199
7383
  }
9200
7384
  function _inherits$e(subClass, superClass) {
9201
7385
  if (typeof superClass !== "function" && superClass !== null) {
@@ -9208,14 +7392,14 @@
9208
7392
  configurable: true
9209
7393
  }
9210
7394
  });
9211
- if (superClass) _set_prototype_of$e(subClass, superClass);
7395
+ if (superClass) _set_prototype_of$g(subClass, superClass);
9212
7396
  }
9213
- function _set_prototype_of$e(o, p) {
9214
- _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7397
+ function _set_prototype_of$g(o, p) {
7398
+ _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
9215
7399
  o.__proto__ = p;
9216
7400
  return o;
9217
7401
  };
9218
- return _set_prototype_of$e(o, p);
7402
+ return _set_prototype_of$g(o, p);
9219
7403
  }
9220
7404
  /**
9221
7405
  * 云台控件
@@ -9224,7 +7408,7 @@
9224
7408
  _inherits$e(Ptz, Control);
9225
7409
  function Ptz(options) {
9226
7410
  var _this;
9227
- _this = Control.call(this, _extends$d({}, options, {
7411
+ _this = Control.call(this, _extends$f({}, options, {
9228
7412
  tagName: 'span',
9229
7413
  controlType: 'button',
9230
7414
  classNameSuffix: 'ptz'
@@ -9267,7 +7451,7 @@
9267
7451
  this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
9268
7452
  this.$panel.appendChild(this.$turntable);
9269
7453
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
9270
- this._ptzControl = new distExports$2.Ptz(this.$turntable, _extends$d({}, this._options, {
7454
+ this._ptzControl = new Ptz$1(this.$turntable, _extends$f({}, this._options, {
9271
7455
  onSpeedChange: this._onSpeedChange.bind(this),
9272
7456
  onDirection: this._onDirection.bind(this)
9273
7457
  }));
@@ -9276,7 +7460,7 @@
9276
7460
  };
9277
7461
  _proto.renderMobileExtend = function renderMobileExtend($container) {
9278
7462
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
9279
- if (!this._ptzControl1) this._ptzControl1 = new distExports$2.MobilePtz($container, _extends$d({}, this._options, {
7463
+ if (!this._ptzControl1) this._ptzControl1 = new MobilePtz($container, _extends$f({}, this._options, {
9280
7464
  onSpeedChange: this._onSpeedChange.bind(this),
9281
7465
  onDirection: this._onDirection.bind(this)
9282
7466
  }));
@@ -9321,7 +7505,7 @@
9321
7505
  _proto.reset = function reset(hide) {
9322
7506
  this.active = false;
9323
7507
  };
9324
- _create_class$4(Ptz, [
7508
+ _create_class$8(Ptz, [
9325
7509
  {
9326
7510
  key: "isRotated",
9327
7511
  get: function get() {
@@ -9375,12 +7559,12 @@
9375
7559
  Object.defineProperty(target, descriptor.key, descriptor);
9376
7560
  }
9377
7561
  }
9378
- function _create_class$3(Constructor, protoProps, staticProps) {
7562
+ function _create_class$7(Constructor, protoProps, staticProps) {
9379
7563
  if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
9380
7564
  return Constructor;
9381
7565
  }
9382
- function _extends$c() {
9383
- _extends$c = Object.assign || function(target) {
7566
+ function _extends$e() {
7567
+ _extends$e = Object.assign || function(target) {
9384
7568
  for(var i = 1; i < arguments.length; i++){
9385
7569
  var source = arguments[i];
9386
7570
  for(var key in source){
@@ -9391,7 +7575,7 @@
9391
7575
  }
9392
7576
  return target;
9393
7577
  };
9394
- return _extends$c.apply(this, arguments);
7578
+ return _extends$e.apply(this, arguments);
9395
7579
  }
9396
7580
  function _inherits$d(subClass, superClass) {
9397
7581
  if (typeof superClass !== "function" && superClass !== null) {
@@ -9404,14 +7588,14 @@
9404
7588
  configurable: true
9405
7589
  }
9406
7590
  });
9407
- if (superClass) _set_prototype_of$d(subClass, superClass);
7591
+ if (superClass) _set_prototype_of$f(subClass, superClass);
9408
7592
  }
9409
- function _set_prototype_of$d(o, p) {
9410
- _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7593
+ function _set_prototype_of$f(o, p) {
7594
+ _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
9411
7595
  o.__proto__ = p;
9412
7596
  return o;
9413
7597
  };
9414
- return _set_prototype_of$d(o, p);
7598
+ return _set_prototype_of$f(o, p);
9415
7599
  }
9416
7600
  var RECORD_DEFAULT_OPTIONS = {
9417
7601
  maxDuration: 3600
@@ -9428,7 +7612,7 @@
9428
7612
  _inherits$d(Record, Control);
9429
7613
  function Record(options) {
9430
7614
  var _this;
9431
- _this = Control.call(this, _extends$c({}, options, {
7615
+ _this = Control.call(this, _extends$e({}, options, {
9432
7616
  tagName: 'span',
9433
7617
  controlType: 'button',
9434
7618
  classNameSuffix: 'record'
@@ -9498,7 +7682,7 @@
9498
7682
  this.active = !this.active;
9499
7683
  Control.prototype._onControlClick.call(this, e);
9500
7684
  };
9501
- _create_class$3(Record, [
7685
+ _create_class$7(Record, [
9502
7686
  {
9503
7687
  key: "active",
9504
7688
  get: /**
@@ -9565,12 +7749,12 @@
9565
7749
  Object.defineProperty(target, descriptor.key, descriptor);
9566
7750
  }
9567
7751
  }
9568
- function _create_class$2(Constructor, protoProps, staticProps) {
7752
+ function _create_class$6(Constructor, protoProps, staticProps) {
9569
7753
  if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
9570
7754
  return Constructor;
9571
7755
  }
9572
- function _extends$b() {
9573
- _extends$b = Object.assign || function(target) {
7756
+ function _extends$d() {
7757
+ _extends$d = Object.assign || function(target) {
9574
7758
  for(var i = 1; i < arguments.length; i++){
9575
7759
  var source = arguments[i];
9576
7760
  for(var key in source){
@@ -9581,7 +7765,7 @@
9581
7765
  }
9582
7766
  return target;
9583
7767
  };
9584
- return _extends$b.apply(this, arguments);
7768
+ return _extends$d.apply(this, arguments);
9585
7769
  }
9586
7770
  function _inherits$c(subClass, superClass) {
9587
7771
  if (typeof superClass !== "function" && superClass !== null) {
@@ -9594,14 +7778,14 @@
9594
7778
  configurable: true
9595
7779
  }
9596
7780
  });
9597
- if (superClass) _set_prototype_of$c(subClass, superClass);
7781
+ if (superClass) _set_prototype_of$e(subClass, superClass);
9598
7782
  }
9599
- function _set_prototype_of$c(o, p) {
9600
- _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7783
+ function _set_prototype_of$e(o, p) {
7784
+ _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
9601
7785
  o.__proto__ = p;
9602
7786
  return o;
9603
7787
  };
9604
- return _set_prototype_of$c(o, p);
7788
+ return _set_prototype_of$e(o, p);
9605
7789
  }
9606
7790
  function _ts_generator$4(thisArg, body) {
9607
7791
  var f, y, t, _ = {
@@ -9706,7 +7890,7 @@
9706
7890
  _inherits$c(Talk, Control);
9707
7891
  function Talk(options) {
9708
7892
  var _this;
9709
- _this = Control.call(this, _extends$b({}, options, {
7893
+ _this = Control.call(this, _extends$d({}, options, {
9710
7894
  tagName: 'span',
9711
7895
  controlType: 'button',
9712
7896
  classNameSuffix: 'talk'
@@ -9770,7 +7954,7 @@
9770
7954
  });
9771
7955
  }).call(this);
9772
7956
  };
9773
- _create_class$2(Talk, [
7957
+ _create_class$6(Talk, [
9774
7958
  {
9775
7959
  key: "value",
9776
7960
  get: /**
@@ -9839,8 +8023,8 @@
9839
8023
  });
9840
8024
  };
9841
8025
  }
9842
- function _extends$a() {
9843
- _extends$a = Object.assign || function(target) {
8026
+ function _extends$c() {
8027
+ _extends$c = Object.assign || function(target) {
9844
8028
  for(var i = 1; i < arguments.length; i++){
9845
8029
  var source = arguments[i];
9846
8030
  for(var key in source){
@@ -9851,7 +8035,7 @@
9851
8035
  }
9852
8036
  return target;
9853
8037
  };
9854
- return _extends$a.apply(this, arguments);
8038
+ return _extends$c.apply(this, arguments);
9855
8039
  }
9856
8040
  function _inherits$b(subClass, superClass) {
9857
8041
  if (typeof superClass !== "function" && superClass !== null) {
@@ -9864,14 +8048,14 @@
9864
8048
  configurable: true
9865
8049
  }
9866
8050
  });
9867
- if (superClass) _set_prototype_of$b(subClass, superClass);
8051
+ if (superClass) _set_prototype_of$d(subClass, superClass);
9868
8052
  }
9869
- function _set_prototype_of$b(o, p) {
9870
- _set_prototype_of$b = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8053
+ function _set_prototype_of$d(o, p) {
8054
+ _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
9871
8055
  o.__proto__ = p;
9872
8056
  return o;
9873
8057
  };
9874
- return _set_prototype_of$b(o, p);
8058
+ return _set_prototype_of$d(o, p);
9875
8059
  }
9876
8060
  function _ts_generator$3(thisArg, body) {
9877
8061
  var f, y, t, _ = {
@@ -9974,23 +8158,23 @@
9974
8158
  _inherits$b(Broadcast, Control);
9975
8159
  function Broadcast(options) {
9976
8160
  var _this;
9977
- _this = Control.call(this, _extends$a({}, options, {
8161
+ _this = Control.call(this, _extends$c({}, options, {
9978
8162
  tagName: 'span',
9979
8163
  controlType: 'button',
9980
8164
  classNameSuffix: 'broadcast'
9981
8165
  })) || this;
9982
8166
  _this._options = options;
9983
- if (options.sdkType === "base") {
9984
- _this._render();
9985
- _this.on(EVENTS.broadcastChange, function(active) {
9986
- if (_this.active !== active) {
9987
- _this.active = active;
9988
- _this._render();
9989
- }
9990
- });
9991
- _this.$container.style.removeProperty("display");
8167
+ _this._render();
8168
+ _this.on(EVENTS.broadcastChange, function(active) {
8169
+ if (_this.active !== active) {
8170
+ _this.active = active;
8171
+ _this._render();
8172
+ }
8173
+ });
8174
+ if (options.sdkType === 'base') {
8175
+ _this.$container.style.removeProperty('display');
9992
8176
  } else {
9993
- _this.$container.style.display = "none";
8177
+ _this.$container.style.display = 'none';
9994
8178
  }
9995
8179
  return _this;
9996
8180
  }
@@ -10010,16 +8194,16 @@
10010
8194
  }
10011
8195
  };
10012
8196
  /**
10013
- * 销毁语音广播控件
10014
- */ _proto.destroy = function destroy() {
8197
+ * 销毁语音广播控件
8198
+ */ _proto.destroy = function destroy() {
10015
8199
  if (this.active) {
10016
8200
  this.reset();
10017
8201
  }
10018
8202
  Control.prototype.destroy.call(this);
10019
8203
  };
10020
8204
  /**
10021
- * 点击 Control 会触发
10022
- */ _proto._onControlClick = function _onControlClick(e) {
8205
+ * 点击 Control 会触发
8206
+ */ _proto._onControlClick = function _onControlClick(e) {
10023
8207
  var _this = this, _superprop_get__onControlClick = function() {
10024
8208
  return Control.prototype._onControlClick;
10025
8209
  };
@@ -10069,8 +8253,8 @@
10069
8253
  });
10070
8254
  };
10071
8255
  }
10072
- function _extends$9() {
10073
- _extends$9 = Object.assign || function(target) {
8256
+ function _extends$b() {
8257
+ _extends$b = Object.assign || function(target) {
10074
8258
  for(var i = 1; i < arguments.length; i++){
10075
8259
  var source = arguments[i];
10076
8260
  for(var key in source){
@@ -10081,7 +8265,7 @@
10081
8265
  }
10082
8266
  return target;
10083
8267
  };
10084
- return _extends$9.apply(this, arguments);
8268
+ return _extends$b.apply(this, arguments);
10085
8269
  }
10086
8270
  function _inherits$a(subClass, superClass) {
10087
8271
  if (typeof superClass !== "function" && superClass !== null) {
@@ -10094,14 +8278,14 @@
10094
8278
  configurable: true
10095
8279
  }
10096
8280
  });
10097
- if (superClass) _set_prototype_of$a(subClass, superClass);
8281
+ if (superClass) _set_prototype_of$c(subClass, superClass);
10098
8282
  }
10099
- function _set_prototype_of$a(o, p) {
10100
- _set_prototype_of$a = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8283
+ function _set_prototype_of$c(o, p) {
8284
+ _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
10101
8285
  o.__proto__ = p;
10102
8286
  return o;
10103
8287
  };
10104
- return _set_prototype_of$a(o, p);
8288
+ return _set_prototype_of$c(o, p);
10105
8289
  }
10106
8290
  function _ts_generator$2(thisArg, body) {
10107
8291
  var f, y, t, _ = {
@@ -10204,23 +8388,23 @@
10204
8388
  _inherits$a(AIChat, Control);
10205
8389
  function AIChat(options) {
10206
8390
  var _this;
10207
- _this = Control.call(this, _extends$9({}, options, {
8391
+ _this = Control.call(this, _extends$b({}, options, {
10208
8392
  tagName: 'span',
10209
8393
  controlType: 'button',
10210
8394
  classNameSuffix: 'aichat'
10211
8395
  })) || this;
10212
8396
  _this._options = options;
10213
- if (options.urlInfo.search === "" && options.urlInfo.recType === "cloud" && options.sdkType === "base") {
10214
- _this._render();
10215
- _this.on(EVENTS.aichatChange, function(active) {
10216
- if (_this.active !== active) {
10217
- _this.active = active;
10218
- _this._render();
10219
- }
10220
- });
10221
- _this.$container.style.removeProperty("display");
8397
+ _this._render();
8398
+ _this.on(EVENTS.aichatChange, function(active) {
8399
+ if (_this.active !== active) {
8400
+ _this.active = active;
8401
+ _this._render();
8402
+ }
8403
+ });
8404
+ if (options.urlInfo.searchParams.busType !== '7' && options.urlInfo.recType === 'cloud' && options.sdkType === 'base') {
8405
+ _this.$container.style.removeProperty('display');
10222
8406
  } else {
10223
- _this.$container.style.display = "none";
8407
+ _this.$container.style.display = 'none';
10224
8408
  }
10225
8409
  return _this;
10226
8410
  }
@@ -10240,16 +8424,16 @@
10240
8424
  }
10241
8425
  };
10242
8426
  /**
10243
- * 销毁AI对话框控件
10244
- */ _proto.destroy = function destroy() {
8427
+ * 销毁AI对话框控件
8428
+ */ _proto.destroy = function destroy() {
10245
8429
  if (this.active) {
10246
8430
  this.reset();
10247
8431
  }
10248
8432
  Control.prototype.destroy.call(this);
10249
8433
  };
10250
8434
  /**
10251
- * 点击 Control 会触发
10252
- */ _proto._onControlClick = function _onControlClick(e) {
8435
+ * 点击 Control 会触发
8436
+ */ _proto._onControlClick = function _onControlClick(e) {
10253
8437
  var _this = this, _superprop_get__onControlClick = function() {
10254
8438
  return Control.prototype._onControlClick;
10255
8439
  };
@@ -10279,12 +8463,12 @@
10279
8463
  Object.defineProperty(target, descriptor.key, descriptor);
10280
8464
  }
10281
8465
  }
10282
- function _create_class$1(Constructor, protoProps, staticProps) {
8466
+ function _create_class$5(Constructor, protoProps, staticProps) {
10283
8467
  if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
10284
8468
  return Constructor;
10285
8469
  }
10286
- function _extends$8() {
10287
- _extends$8 = Object.assign || function(target) {
8470
+ function _extends$a() {
8471
+ _extends$a = Object.assign || function(target) {
10288
8472
  for(var i = 1; i < arguments.length; i++){
10289
8473
  var source = arguments[i];
10290
8474
  for(var key in source){
@@ -10295,7 +8479,7 @@
10295
8479
  }
10296
8480
  return target;
10297
8481
  };
10298
- return _extends$8.apply(this, arguments);
8482
+ return _extends$a.apply(this, arguments);
10299
8483
  }
10300
8484
  function _inherits$9(subClass, superClass) {
10301
8485
  if (typeof superClass !== "function" && superClass !== null) {
@@ -10308,14 +8492,14 @@
10308
8492
  configurable: true
10309
8493
  }
10310
8494
  });
10311
- if (superClass) _set_prototype_of$9(subClass, superClass);
8495
+ if (superClass) _set_prototype_of$b(subClass, superClass);
10312
8496
  }
10313
- function _set_prototype_of$9(o, p) {
10314
- _set_prototype_of$9 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8497
+ function _set_prototype_of$b(o, p) {
8498
+ _set_prototype_of$b = Object.setPrototypeOf || function setPrototypeOf(o, p) {
10315
8499
  o.__proto__ = p;
10316
8500
  return o;
10317
8501
  };
10318
- return _set_prototype_of$9(o, p);
8502
+ return _set_prototype_of$b(o, p);
10319
8503
  }
10320
8504
  var SELECT_DEFAULT_OPTIONS = {
10321
8505
  fieldNames: {
@@ -10381,7 +8565,7 @@
10381
8565
  function Select(options) {
10382
8566
  var _this;
10383
8567
  var _this__options_fieldNames, _this__picker_$body;
10384
- _this = Control.call(this, _extends$8({
8568
+ _this = Control.call(this, _extends$a({
10385
8569
  tagName: 'span',
10386
8570
  type: 'button',
10387
8571
  controlType: 'button'
@@ -10543,7 +8727,7 @@
10543
8727
  */ _proto._onControlClick = function _onControlClick(e) {
10544
8728
  this._options.onClick == null ? void 0 : this._options.onClick.call(this._options, e);
10545
8729
  };
10546
- _create_class$1(Select, [
8730
+ _create_class$5(Select, [
10547
8731
  {
10548
8732
  key: "value",
10549
8733
  get: function get() {
@@ -10579,8 +8763,8 @@
10579
8763
  }
10580
8764
  return self;
10581
8765
  }
10582
- function _extends$7() {
10583
- _extends$7 = Object.assign || function(target) {
8766
+ function _extends$9() {
8767
+ _extends$9 = Object.assign || function(target) {
10584
8768
  for(var i = 1; i < arguments.length; i++){
10585
8769
  var source = arguments[i];
10586
8770
  for(var key in source){
@@ -10591,7 +8775,7 @@
10591
8775
  }
10592
8776
  return target;
10593
8777
  };
10594
- return _extends$7.apply(this, arguments);
8778
+ return _extends$9.apply(this, arguments);
10595
8779
  }
10596
8780
  function _inherits$8(subClass, superClass) {
10597
8781
  if (typeof superClass !== "function" && superClass !== null) {
@@ -10604,14 +8788,14 @@
10604
8788
  configurable: true
10605
8789
  }
10606
8790
  });
10607
- if (superClass) _set_prototype_of$8(subClass, superClass);
8791
+ if (superClass) _set_prototype_of$a(subClass, superClass);
10608
8792
  }
10609
- function _set_prototype_of$8(o, p) {
10610
- _set_prototype_of$8 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8793
+ function _set_prototype_of$a(o, p) {
8794
+ _set_prototype_of$a = Object.setPrototypeOf || function setPrototypeOf(o, p) {
10611
8795
  o.__proto__ = p;
10612
8796
  return o;
10613
8797
  };
10614
- return _set_prototype_of$8(o, p);
8798
+ return _set_prototype_of$a(o, p);
10615
8799
  }
10616
8800
  function _type_of(obj) {
10617
8801
  "@swc/helpers - typeof";
@@ -10666,7 +8850,7 @@
10666
8850
  if (options === void 0) options = {};
10667
8851
  var _this;
10668
8852
  var _options_props, _options_props1, _options_locales_options_language;
10669
- _this = Select.call(this, _extends$7({}, DEFINITION_DEFAULT_OPTIONS, {
8853
+ _this = Select.call(this, _extends$9({}, DEFINITION_DEFAULT_OPTIONS, {
10670
8854
  value: (_options_props = options.props) == null ? void 0 : _options_props.videoLevel
10671
8855
  }, options, {
10672
8856
  fieldNames: {
@@ -10740,8 +8924,8 @@
10740
8924
  }
10741
8925
  return self;
10742
8926
  }
10743
- function _extends$6() {
10744
- _extends$6 = Object.assign || function(target) {
8927
+ function _extends$8() {
8928
+ _extends$8 = Object.assign || function(target) {
10745
8929
  for(var i = 1; i < arguments.length; i++){
10746
8930
  var source = arguments[i];
10747
8931
  for(var key in source){
@@ -10752,7 +8936,7 @@
10752
8936
  }
10753
8937
  return target;
10754
8938
  };
10755
- return _extends$6.apply(this, arguments);
8939
+ return _extends$8.apply(this, arguments);
10756
8940
  }
10757
8941
  function _inherits$7(subClass, superClass) {
10758
8942
  if (typeof superClass !== "function" && superClass !== null) {
@@ -10765,14 +8949,14 @@
10765
8949
  configurable: true
10766
8950
  }
10767
8951
  });
10768
- if (superClass) _set_prototype_of$7(subClass, superClass);
8952
+ if (superClass) _set_prototype_of$9(subClass, superClass);
10769
8953
  }
10770
- function _set_prototype_of$7(o, p) {
10771
- _set_prototype_of$7 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8954
+ function _set_prototype_of$9(o, p) {
8955
+ _set_prototype_of$9 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
10772
8956
  o.__proto__ = p;
10773
8957
  return o;
10774
8958
  };
10775
- return _set_prototype_of$7(o, p);
8959
+ return _set_prototype_of$9(o, p);
10776
8960
  }
10777
8961
  // 支持的倍速列表, 需要是 2 的指数,不能小于 0.5, 最大 16 倍
10778
8962
  var SUPPORT_SPEED = [
@@ -10810,7 +8994,7 @@
10810
8994
  function Speed(options) {
10811
8995
  var _this;
10812
8996
  var _options_locales_options_language, _options_locales;
10813
- _this = Select.call(this, _extends$6({}, SPEED_DEFAULT_OPTIONS, options, {
8997
+ _this = Select.call(this, _extends$8({}, SPEED_DEFAULT_OPTIONS, options, {
10814
8998
  value: (options.props.speed || 1) + '',
10815
8999
  classNameSuffix: 'speed',
10816
9000
  controlType: 'button',
@@ -10864,45 +9048,15 @@
10864
9048
  return Speed;
10865
9049
  }(Select);
10866
9050
 
10867
- var dist$3 = {};
10868
-
10869
- var dist$2 = {};
10870
-
10871
- /*
10872
- * @ezuikit/utils-tools v2.0.2
10873
- * tools utils
10874
- * Copyright (c) 2026-01-05 Ezviz-OpenBiz
10875
- * Released under the MIT License.
10876
- */
10877
-
10878
- var hasRequiredDist$3;
10879
-
10880
- function requireDist$3 () {
10881
- if (hasRequiredDist$3) return dist$2;
10882
- hasRequiredDist$3 = 1;
10883
- var getQuery=function(url){var query=url.split("?")[1],obj={};if(query)for(var vars=query.split("&"),i=0;i<vars.length;i++){var pair=vars[i].split("=");obj[pair[0]]=decodeURIComponent(pair[1]);}return obj};function parseEzopenUrl(url){var obj={};if(/^ezopen:\/\//.test(url)){if(url.includes("@")){var endIndex=url.indexOf("@"),startIndex=url.indexOf("//");obj.validateCode=url.substring(startIndex+2,endIndex),url=url.replace(obj.validateCode+"@","");}obj.protocol=url.split("//")[0],obj.search=url.split("?")[1]?"?"+url.split("?")[1]:"",obj.hostname=url.split("/")[2],obj.origin=obj.protocol+"//"+obj.hostname,obj.pathname=url.split("?")[0].replace(obj.origin,""),obj.href=url;var pathnames=obj.pathname.split("/"),lastPath=pathnames[2].split(".");return obj.deviceSerial=pathnames[1],obj.channelNo=lastPath[0],obj.type=lastPath[lastPath.length-1],"live"===obj.type&&(obj.definition=lastPath.length>2?lastPath[1]:"sd"),"rec"===obj.type&&pathnames[2]&&(obj.recType=pathnames[2].includes(".cloud.")?"cloud":""),obj.searchParams=getQuery(url),obj}return {}}var codec={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right}function _create_for_of_iterator_helper_loose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return (it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(o,minLen):void 0}}(o))||allowArrayLike){it&&(o=it);var i=0;return function(){return i>=o.length?{done:true}:{done:false,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var DateTime=function(){function DateTime(){}return DateTime.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},DateTime.format=function(input,format){var date;if(_instanceof(input,Date))date=input;else {if("number"!=typeof input&&"string"!=typeof input)throw new Error("Invalid date input");date=DateTime.toDate(input+"");}for(var _step,result=format,_iterator=_create_for_of_iterator_helper_loose([[/(yyyy|YYYY)/g,function(){return DateTime.fillZero(date.getFullYear(),4)}],[/(yy|YY)/g,function(){return DateTime.fillZero(date.getFullYear()%100,2)}],[/(MM)/g,function(){return DateTime.fillZero(date.getMonth()+1,2)}],[/(M)/g,function(){return (date.getMonth()+1).toString()}],[/(dd|DD)/g,function(){return DateTime.fillZero(date.getDate(),2)}],[/(d|D)/g,function(){return date.getDate().toString()}],[/(HH|hh)/g,function(){return DateTime.fillZero(date.getHours(),2)}],[/(H|h)/g,function(){return date.getHours().toString()}],[/(mm)/g,function(){return DateTime.fillZero(date.getMinutes(),2)}],[/(m)/g,function(){return date.getMinutes().toString()}],[/(ss|SS)/g,function(){return DateTime.fillZero(date.getSeconds(),2)}],[/(s|S)/g,function(){return date.getSeconds().toString()}],[/(fff)/g,function(){return DateTime.fillZero(date.getMilliseconds(),3)}]]);!(_step=_iterator()).done;){var _step_value=_step.value,regexp=_step_value[0],fn=_step_value[1];result=result.replace(regexp,fn);}return result},DateTime.toDate=function(str){if(_instanceof(str,Date))return str;str=(str+"").trim().replace(/\/|\./gi,"-"),/^\d{4}$/.test(str)&&(str+="-01"),/^\d{4}-\d{2}$/.test(str)&&(str+="-01");try{return /^\d{4}-\d{2}-\d{2}$/.test(str)?new Date(+str.slice(0,4),+str.slice(5,7)-1,+str.slice(8,10),0,0,0):/^\d{8}$/.test(str)?(str+="",new Date(+str.slice(0,4),+str.slice(4,6)-1,+str.slice(6,8),0,0)):/^\d{14}$/.test(str)?(str+="",new Date(+str.slice(0,4),+str.slice(4,6)-1,+str.slice(6,8),+str.slice(8,10),+str.slice(10,12),+str.slice(12,14))):/^\d{13}$/.test(str)?new Date(Number(str)):/^\d{10}$/.test(str)?new Date(1e3*Number(str)):new Date(str)}catch(error){throw new Error("Invalid date string")}},DateTime.diff=function(date1,date2,type){ void 0===type&&(type="second");var d1=DateTime.toDate(date1),d2=DateTime.toDate(date2);return "second"===type?Math.floor((d1.getTime()-d2.getTime())/1e3):"minute"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60):"hour"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60):"day"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60/24):Math.abs(d1.getTime()-d2.getTime())},DateTime}();dist$2.DateTime=DateTime,dist$2.addVc=function(url,codecs){ void 0===codecs&&(codecs=["h264"]);var vc=(codecs||["h264"]).reduce(function(acc,key){return key=key.toLowerCase(),acc+(codec[key]||0)},0),host=url.split("?")[0],query=url.split("?")[1];return query=(query||"").split("&").filter(function(item){return !/^vc=\d?/.test(item)}).join("&"),host+"?"+(query+=(query?"&":"")+"vc="+vc)},dist$2.getQuery=getQuery,dist$2.getStaticPath=function(path,base){ void 0===base&&(base="");var protocolReg=/^(https?:\/\/|^\/\/)/;if(""===path||void 0===path)return "";if(protocolReg.test(path))return path;path=path.replace(/\/+/g,"/"),base=protocolReg.test(base||"")?base:window.location.href;try{return new URL(path,base).href}catch(error){return path}},dist$2.isHttp=function(url){return /^http[s]?:\/\//.test(url)},dist$2.isMobile=function(agent){var _navigator,_navigator1,_navigator2,_window;return /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent)||/Macintosh/i.test(agent||(null==(_navigator1=navigator)?void 0:_navigator1.userAgent))&&(null==(_navigator2=navigator)?void 0:_navigator2.maxTouchPoints)>1||!!(null==(_window=window)?void 0:_window.__IS_MOBILE_SIMULATOR__)},dist$2.isRealMobile=function(agent){var _navigator,ua=(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent).toLowerCase();if(/ipad|tablet|playbook|silk|android(?!.*mobile)/i.test(ua))return false;var hasTouch="ontouchstart"in window||navigator.maxTouchPoints>0;return /android|webos|iphone|ipod|blackberry|iemobile|opera mini/i.test(ua)&&hasTouch},dist$2.parseEzopenUrl=parseEzopenUrl,dist$2.pick=function(obj,keys){return Object.entries(obj).reduce(function(acc,param){var key=param[0],value=param[1];return keys.includes(key)&&(acc[key]=value),acc},{})},dist$2.switchEzopenUrl=function(url,options){var _ref=null!=options?options:{},type=_ref.type,recType=_ref.recType,search=_ref.search,definition=_ref.definition,channelNo=_ref.channelNo,deviceSerial=_ref.deviceSerial,validateCode=_ref.validateCode,obj=parseEzopenUrl(url);if(search){var ns=Object.assign({},obj.searchParams,getQuery("?"+search.replace("?","")));search=Object.entries(ns).reduce(function(acc,param){var key=param[0],value=param[1];return ""===value?acc:acc+=key+"="+encodeURIComponent(value)+"&"},"?").replace(/&$/,"");}else search=obj.search;return type=type||obj.type,recType=null!=recType?recType:obj.recType,definition=null!=definition?definition:obj.definition,channelNo=channelNo||obj.channelNo,deviceSerial=deviceSerial||obj.deviceSerial,validateCode=null!=validateCode?validateCode:obj.validateCode,obj.protocol+"//"+(validateCode?validateCode+"@":"")+obj.hostname+"/"+deviceSerial+"/"+channelNo+("rec"===type&&recType?"."+recType:"")+("live"===type&&"hd"===definition?"."+definition:"")+"."+type+search};
10884
- return dist$2;
10885
- }
10886
-
10887
9051
  /*
10888
- * @ezuikit/control-date-picker v1.0.5
10889
- * Copyright (c) 2026-01-05 Ezviz-OpenBiz
9052
+ * @ezuikit/control-date-picker v2.0.0-beta.2
9053
+ * Copyright (c) 2026-05-04 Ezviz-OpenBiz
10890
9054
  * Released under the MIT License.
10891
9055
  */
9056
+ var Util=function(){function Util(){}return Util.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},Util.chunkBySize=function(arr,size){return Array.from({length:Math.ceil(arr.length/size)}).map(function(_,index){return arr.slice(index*size,(index+1)*size)})},Util.generateYears=function(year){for(var years=[],i=year%10+1;i>=0;i--)years.push(year-i);for(var i1=1;years.length<12;i1++)years.push(year+i1);return years},Util.getDaysInMonth=function(year,month){return new Date(year,month+1,0).getDate()},Util.getFirstDayOfMonth=function(year,month,startOfWeek){return void 0===startOfWeek&&(startOfWeek=0),(new Date(year,month).getDay()-startOfWeek+7)%7},Util.generateWeeksByYearMonth=function(year,month,startOfWeek){ void 0===startOfWeek&&(startOfWeek=0),month-=1;for(var daysInMonth=Util.getDaysInMonth(year,month),firstDay=Util.getFirstDayOfMonth(year,month,startOfWeek),weeks=[],i=1;i<=firstDay+daysInMonth;i++){var day=i-firstDay;day<1?weeks.push((0===month?year-1:year)+"-"+Util.fillZero((month+12-1)%12+1)+"-"+Util.fillZero(Util.getDaysInMonth(year,month-1)+day)):day>daysInMonth?weeks.push((11===month?year+1:year)+"-"+Util.fillZero((month+1)%12+1)+"-"+(day-daysInMonth)):weeks.push(year+"-"+Util.fillZero(month+1)+"-"+Util.fillZero(day));}for(var nextDay=1;weeks.length<42;)weeks.push((11===month?year+1:year)+"-"+Util.fillZero((month+1)%12+1)+"-"+Util.fillZero(nextDay++));return weeks},Util.generateHours=function(){for(var hours=[],i=0;i<24;i++)hours.push(Util.fillZero(i));return hours},Util.generateMinutesOrSeconds=function(){for(var hours=[],i=0;i<=59;i++)hours.push(Util.fillZero(i));return hours},Util}(),__$CALENDAR_LOCALES$__={en:{year:"",month:"",weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],today:"Today",ok:"OK",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},zh:{year:"年",month:"月",weeks:["日","一","二","三","四","五","六"],today:"今天",ok:"确定",months:["01","02","03","04","05","06","07","08","09","10","11","12"]}},__DEFAULT_COMPONENTS_OPTIONS__={showSuperPrevIcon:false,showSuperNextIcon:false,showPrevIcon:false,showNextIcon:false,showHeaderClose:false,showHeaderOk:false,renderSuperPrevIcon:'<span class="edate-super-prev-icon"></span>',renderSuperNextIcon:'<span class="edate-super-next-icon"></span>',renderPrevIcon:'<span class="edate-prev-icon"></span>',renderNextIcon:'<span class="edate-next-icon"></span>',renderHeaderCloseIcon:'<span class="edate-close-icon">\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n </span>',renderHeaderOkIcon:function(locale){return '<span class="edate-btn-text">'+((null==locale?void 0:locale.ok)||"确定")+"</span>"}},Header=function(){function Header(options){this.$header=null,this.options=deepmerge.all([{},__DEFAULT_COMPONENTS_OPTIONS__,options],{clone:false}),this.$header=document.createElement("div"),this.$header.classList.add("edate-header",options.prefixCls+"-header"),options.className&&this.$header.classList.add(options.className),this._render(),this._eventListeners();}var _proto=Header.prototype;return _proto._render=function(){var _this__getStrOrFunToStr,_this__getStrOrFunToStr1,_this__getStrOrFunToStr2,_this__getStrOrFunToStr3,_this__getStrOrFunToStr4,_this__getStrOrFunToStr5;this.$header&&(this.$header.innerHTML="\n "+(this.options.showHeaderClose?'<div class="edate-close-btn">\n '+(null!=(_this__getStrOrFunToStr=this._getStrOrFunToStr(this.options.renderHeaderCloseIcon))?_this__getStrOrFunToStr:__DEFAULT_COMPONENTS_OPTIONS__.renderHeaderCloseIcon)+"\n </div>":this.options.showHeaderOk?"<span></span>":"")+"\n "+(this.options.showSuperPrevIcon||this.options.showPrevIcon?'\n <div class="edate-prev-btns">\n '+(this.options.showSuperPrevIcon?'<div class="edate-super-prev-btn '+this.options.prefixCls+'-super-prev-btn">\n '+(null!=(_this__getStrOrFunToStr1=this._getStrOrFunToStr(this.options.renderSuperPrevIcon))?_this__getStrOrFunToStr1:__DEFAULT_COMPONENTS_OPTIONS__.renderSuperPrevIcon)+"\n </div>":"")+"\n "+(this.options.showPrevIcon?'<div class="edate-prev-btn '+this.options.prefixCls+'-prev-btn">\n '+(null!=(_this__getStrOrFunToStr2=this._getStrOrFunToStr(this.options.renderPrevIcon))?_this__getStrOrFunToStr2:__DEFAULT_COMPONENTS_OPTIONS__.renderPrevIcon)+"\n </div>":"")+"\n </div>\n ":"")+'\n\n <div class="edate-header-view '+this.options.prefixCls+'-header-view"></div>\n\n '+(this.options.showNextIcon||this.options.showSuperNextIcon?'\n <div class="edate-next-btns">\n '+(this.options.showNextIcon?'<div class="edate-next-btn '+this.options.prefixCls+'-next-btn">\n '+(null!=(_this__getStrOrFunToStr3=this._getStrOrFunToStr(this.options.renderNextIcon))?_this__getStrOrFunToStr3:__DEFAULT_COMPONENTS_OPTIONS__.renderNextIcon)+"\n </div>":"")+"\n "+(this.options.showSuperNextIcon?'<div class="edate-super-next-btn '+this.options.prefixCls+'-super-next-btn">\n '+(null!=(_this__getStrOrFunToStr4=this._getStrOrFunToStr(this.options.renderSuperNextIcon))?_this__getStrOrFunToStr4:__DEFAULT_COMPONENTS_OPTIONS__.renderSuperNextIcon)+"\n </div>":"")+"\n </div>\n ":"")+"\n "+(this.options.showHeaderOk?'<div class="edate-ok-btn">\n '+(null!=(_this__getStrOrFunToStr5=this._getStrOrFunToStr(this.options.renderHeaderOkIcon))?_this__getStrOrFunToStr5:__DEFAULT_COMPONENTS_OPTIONS__.renderHeaderOkIcon)+"\n </div>":this.options.showHeaderClose?"<span></span>":""));},_proto._getStrOrFunToStr=function(value){if(null!=value){var _this_options;if("function"==typeof value)return this._getStrOrFunToStr(null==value?void 0:value(null==(_this_options=this.options)?void 0:_this_options.locale));if("string"==typeof value)return value}},_proto.renderContent=function(html){if(this.$header){var _$content=this.$header.querySelector(".edate-header-view");if(!_$content)return;_$content.innerHTML=html;}},_proto.destroy=function(){this.$header&&this.$header.remove();},_proto._eventListeners=function(){var _this=this;_this.$header&&(delegate(_this.$header,".edate-super-prev-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onSuperPrev||_this.options.onSuperPrev.call(_this.options);}),delegate(_this.$header,".edate-prev-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onPrev||_this.options.onPrev.call(_this.options);}),delegate(_this.$header,".edate-next-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onNext||_this.options.onNext.call(_this.options);}),delegate(_this.$header,".edate-super-next-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onSuperNext||_this.options.onSuperNext.call(_this.options);}),delegate(_this.$header,".edate-close-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==_this.options.onClose||_this.options.onClose.call(_this.options),event.stopPropagation(),event.preventDefault());}),delegate(_this.$header,".edate-ok-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==_this.options.onOk||_this.options.onOk.call(_this.options),event.stopPropagation(),event.preventDefault());}));},Header}();function _extends$2$1(){return _extends$2$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$2$1.apply(this,arguments)}var _CONTAINER_DEFAULT_OPTIONS_={prefixCls:"edate",locales:__$CALENDAR_LOCALES$__,showHeader:true},Container=function(){function Container(popupContainer,options){this.$panel=document.createElement("div"),this.$body=document.createElement("div"),this.$container=document.createElement("div"),this.language="zh",this.header=null,this.locale=__$CALENDAR_LOCALES$__.zh,this.options=deepmerge.all([{},_CONTAINER_DEFAULT_OPTIONS_,options],{clone:false}),this.$popupContainer=popupContainer?"function"==typeof popupContainer?popupContainer():popupContainer:document.body,this._setLocale(),this.$container.classList.add("edate-container",(this.options.prefixCls||"edate")+"-container"),options.isMobile&&this.$container.classList.add("edate-mobile",this.options.prefixCls+"-mobile"),this.options.wrapClassName&&this.$container.classList.add(this.options.wrapClassName),this.$panel.classList.add("edate-panel",(this.options.prefixCls||"edate")+"-panel"),this.options.showHeader&&(this.header=new Header(_extends$2$1({},this.options,{locale:this.locale,onPrev:this._onPrev.bind(this),onNext:this._onNext.bind(this),onSuperPrev:this._onSuperPrev.bind(this),onSuperNext:this._onSuperNext.bind(this),onClose:this._onClose.bind(this),onOk:this._onOk.bind(this)})),this.$panel.appendChild(this.header.$header)),this.$body.classList.add("edate-body",(this.options.prefixCls||"edate")+"-body"),this.$container.appendChild(this.$panel),this.$popupContainer.appendChild(this.$container);}var _proto=Container.prototype;return _proto._setLocale=function(){if(this.options.locales)if("string"==typeof this.options.language){var language=this.options.language||navigator.language;this.options.locales[language]?this.locale=this.options.locales[language]:this.locale=this.options.locales.zh;}else this.locale=this.options.locales.zh;},_proto.destroy=function(){var _this_$container;(null==(_this_$container=this.$container)?void 0:_this_$container.parentNode)&&this.$container.parentNode.removeChild(this.$container),this.header=null,this.$container=null;},_proto.setLocale=function(locale){"string"==typeof locale?this._setLocale():this.locale=locale;},_proto._onSuperPrev=function(){},_proto._onSuperNext=function(){},_proto._onPrev=function(){},_proto._onNext=function(){},_proto._onClose=function(){},_proto._onOk=function(){},Container}();function _create_class$3$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1$2(){return _extends$1$2=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1$2.apply(this,arguments)}function _set_prototype_of$3$1(o,p){return _set_prototype_of$3$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$3$1(o,p)}var _CALENDAR_DEFAULT_OPTIONS_={startOfWeek:0,showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,showPrevIcon:true,showNextIcon:true,language:"zh",renderBadge:'<span class="ecalendar-badge"></span>',badges:[]},Calendar=function(Container){function Calendar(container,options){var _this,_this_options_badges,_this_options,_this_options1,_this_options2;return (_this=Container.call(this,container,_extends$1$2({},_CALENDAR_DEFAULT_OPTIONS_,options,{prefixCls:"ecalendar"}))||this).badges=[],(null==(_this_options_badges=_this.options.badges)?void 0:_this_options_badges.length)&&_this._updateBadges(_this.options.badges,false),(null==(_this_options=_this.options)?void 0:_this_options.startOfWeek)&&((null==(_this_options1=_this.options)?void 0:_this_options1.startOfWeek)>6||(null==(_this_options2=_this.options)?void 0:_this_options2.startOfWeek)<0)&&(_this.options.startOfWeek=0),_this._render(),_this.setCurrent(_this.options.current,false),_this._onHeader(),_this._onCell(),_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$3$1(subClass,superClass);}(Calendar,Container);var _proto=Calendar.prototype;return _proto.setCurrent=function(date,change){if(void 0===change&&(change=true),"string"==typeof date||(left=date,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right))try{if(date="string"==typeof date?distExports$4.DateTime.toDate(date):date,(!this._current||distExports$4.DateTime.format(date,"YYYY-MM-DD")!==distExports$4.DateTime.format(this._current,"YYYY-MM-DD"))&&(this._current=date,change&&(null==this.options.onChange||this.options.onChange.call(this.options,date,distExports$4.DateTime.format(date,"YYYY-MM-DD"))),this.$body)){var _this_$body_querySelector,_this_$body_querySelector1;null==(_this_$body_querySelector=this.$body.querySelector(".ecalendar-cell-selected"))||_this_$body_querySelector.classList.remove("ecalendar-cell-selected");var title=distExports$4.DateTime.format(this._current,"YYYY-MM-DD");null==(_this_$body_querySelector1=this.$body.querySelector(".ecalendar-cell-in-view[title='"+title+"']"))||_this_$body_querySelector1.classList.add("ecalendar-cell-selected");}this._setRenderCurrent(this._current);}catch(error){this._setRenderCurrent(new Date);}else this._setRenderCurrent(new Date);var left,right;},_proto.updateBadges=function(badges){this._updateBadges(badges);},_proto._updateBadges=function(badges,rerender){ void 0===rerender&&(rerender=true),(null==badges?void 0:badges.length)>=0&&(this.badges=badges.map(function(date){return distExports$4.DateTime.format(date,"YYYY-MM-DD")}),rerender&&this._renderDate());},_proto._setRenderCurrent=function(date){(!this._renderCurrent||date&&distExports$4.DateTime.format(this._renderCurrent,"YYYY-MM")!==distExports$4.DateTime.format(date,"YYYY-MM"))&&(this._renderCurrent=date||new Date,this._renderDate());},_proto._onCell=function(){var _this=this;delegate(this.$body,".ecalendar-cell","click",function(event){var date=new Date(event.delegateTarget.getAttribute("title").replace(/\//gi,"/")),disabled=event.delegateTarget.classList.contains("edate-disabled");disabled||_this.setCurrent(date),null==_this.options.onCell||_this.options.onCell.call(_this.options,date,distExports$4.DateTime.format(_this._renderCurrent,"YYYY-MM-DD"),disabled),event.stopPropagation(),event.preventDefault();});},_proto._onSuperPrev=function(){var date=new Date(this._renderCurrent);date.setFullYear(date.getFullYear()-1,date.getMonth(),date.getDate()),this._setRenderCurrent(date),null==this.options.onPrevMonth||this.options.onPrevMonth.call(this.options,this._current,this._renderCurrent);},_proto._onSuperNext=function(){var date=new Date(this._renderCurrent);date.setFullYear(date.getFullYear()+1,date.getMonth(),date.getDate()),this._setRenderCurrent(date),null==this.options.onNextMonth||this.options.onNextMonth.call(this.options,this._current,this._renderCurrent);},_proto._onPrev=function(){var date=new Date(this._renderCurrent);date.setMonth(date.getMonth()-1,date.getDate()),this._setRenderCurrent(date),null==this.options.onPrevMonth||this.options.onPrevMonth.call(this.options,this._current,this._renderCurrent);},_proto._onNext=function(){var date=new Date(this._renderCurrent);date.setMonth(date.getMonth()+1,date.getDate()),this._setRenderCurrent(date),null==this.options.onNextMonth||this.options.onNextMonth.call(this.options,this._current,this._renderCurrent);},_proto._onHeader=function(){var _this=this;delegate(this.$panel,".ecalendar-header-month-btn","click",function(){null==_this.options.onMonth||_this.options.onMonth.call(_this.options,_this._current,_this._renderCurrent);}),delegate(this.$panel,".ecalendar-header-year-btn","click",function(){null==_this.options.onYear||_this.options.onYear.call(_this.options,_this._current,_this._renderCurrent);});},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._render=function(){var _this_locale,_this_locale1,shiftedCustomDays=[].concat(((null==(_this_locale=this.locale)?void 0:_this_locale.weeks)||[]).slice(this.options.startOfWeek),((null==(_this_locale1=this.locale)?void 0:_this_locale1.weeks)||[]).slice(0,this.options.startOfWeek));this.$body.innerHTML='<table class="ecalendar-content">\n <thead><tr>'+shiftedCustomDays.map(function(day){return "<th>"+day+"</th>"}).join("")+"</tr></thead>\n <tbody></tbody>\n </table>",this.$panel.appendChild(this.$body);},_proto._renderDate=function(){var _this_header,_this_$body_querySelector,_this=this;if(this.$body){var _this_locale_months,_this_locale,_this_locale1,_this_locale2,_this_locale3,_this_locale_months1,_this_locale4,_this_locale5,_this_$body_querySelector1,todayStr=distExports$4.DateTime.format(new Date,"YYYY-MM-DD"),year=this._renderCurrent.getFullYear(),month=this._renderCurrent.getMonth()+1,dayGroupArray=Util.chunkBySize(Util.generateWeeksByYearMonth(year,month,this.options.startOfWeek),7),allowMonthClick="function"==typeof this.options.onMonth,allowYearClick="function"==typeof this.options.onYear;if(null==(_this_header=this.header)?void 0:_this_header.$header)this.header.renderContent("\n "+("zh"!==this.options.language?'<span class="ecalendar-header-month-btn '+(allowMonthClick?"edate-header-title-hover":"")+'">'+(null==(_this_locale=this.locale)||null==(_this_locale_months=_this_locale.months)?void 0:_this_locale_months[+(month-1)])+((null==(_this_locale1=this.locale)?void 0:_this_locale1.month)||"")+'</span> <span class="ecalendar-header-year-btn '+(allowYearClick?"edate-header-title-hover":"")+'">'+year+((null==(_this_locale2=this.locale)?void 0:_this_locale2.year)||"")+"</span>":'<span class="ecalendar-header-year-btn '+(allowYearClick?"edate-header-title-hover":"")+'">'+year+((null==(_this_locale3=this.locale)?void 0:_this_locale3.year)||"")+'</span> <span class="ecalendar-header-month-btn '+(allowMonthClick?"edate-header-title-hover":"")+'">'+(null==(_this_locale4=this.locale)||null==(_this_locale_months1=_this_locale4.months)?void 0:_this_locale_months1[+(month-1)])+((null==(_this_locale5=this.locale)?void 0:_this_locale5.month)||"")+"</span>"));if(null==(_this_$body_querySelector=this.$body.querySelector(".ecalendar-content"))?void 0:_this_$body_querySelector.querySelector("tbody"))(null==(_this_$body_querySelector1=this.$body.querySelector(".ecalendar-content"))?void 0:_this_$body_querySelector1.querySelector("tbody")).innerHTML="\n "+dayGroupArray.slice(0,7).map(function(dates){return "<tr>\n "+dates.map(function(dateStr){var _this_options,_dateStr_split=dateStr.split("-"),y=_dateStr_split[0],m=_dateStr_split[1],d=_dateStr_split[2],date=new Date(+y,+m,+d),classNames=[month===+m?"ecalendar-cell-in-view":"",todayStr===dateStr?"ecalendar-cell-today":"",_this._current&&distExports$4.DateTime.format(_this._current,"YYYY-MM-DD")===dateStr?"ecalendar-cell-selected":"","function"==typeof(null==(_this_options=_this.options)?void 0:_this_options.disabledDate)&&_this.options.disabledDate(distExports$4.DateTime.toDate(dateStr),dateStr)?"edate-disabled":""].filter(Boolean),badgeHtml=_this._renderBadge(date,dateStr);return '<td title="'+dateStr+'" class="ecalendar-cell '+classNames.join(" ")+'">\n '+("function"==typeof _this.options.renderDate?_this.options.renderDate(date,dateStr):'<span class="ecalendar-cell-inner">'+Util.fillZero(+d)+"</span>")+"\n "+badgeHtml+"\n </td>"}).join("")+"\n </tr>"}).join("");}},_proto._renderBadge=function(date,dateStr){var badgeHtml="";badgeHtml="function"==typeof this.options.renderBadge?this.options.renderBadge(date,dateStr):"string"==typeof this.options.renderBadge?this.options.renderBadge:"";var showBadge="function"==typeof this.options.showBadge&&this.options.showBadge(date,dateStr);return this.badges.includes(dateStr)||showBadge||(badgeHtml=""),badgeHtml},_create_class$3$1(Calendar,[{key:"current",get:function(){return this._current}}]),Calendar}(Container);function _create_class$2$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$2$1(o,p){return _set_prototype_of$2$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$2$1(o,p)}Calendar.DateTime=distExports$4.DateTime;var _Month_DEFAULT_OPTIONS_={showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,language:"zh"},Month=function(Container){function Month(popupContainer,options){var _this;return (_this=Container.call(this,popupContainer,deepmerge.all([{},_Month_DEFAULT_OPTIONS_,options||{},{showPrevIcon:false,showNextIcon:false,prefixCls:"emonth"}],{clone:false}))||this)._render(),_this.setCurrent(_this.options.current,false),_this._onHeaderTitle(),_this._onCell(),_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$2$1(subClass,superClass);}(Month,Container);var _proto=Month.prototype;return _proto.setCurrent=function(date,change){ void 0===change&&(change=true),this._setCurrent(date,change);},_proto._setCurrent=function(date,change){if("string"==typeof date||(left=date,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right))try{var d=date;"string"==typeof d&&(d=distExports$4.DateTime.toDate(d));var current=d;this._current&&distExports$4.DateTime.format(current,"YYYY-MM-DD")===distExports$4.DateTime.format(this._current,"YYYY-MM-DD")||(this._current=current,"function"==typeof this.options.onChange&&change&&(null==this.options.onChange||this.options.onChange.call(this.options,current,distExports$4.DateTime.format(current,"YYYY-MM")))),this._setRenderCurrent(current);}catch(error){this._setRenderCurrent(new Date);}else this._setRenderCurrent(new Date);var left,right;},_proto._setRenderCurrent=function(date){if((!this._renderCurrent||this._renderCurrent&&distExports$4.DateTime.format(date,"YYYY")!==distExports$4.DateTime.format(this._renderCurrent,"YYYY"))&&(this._renderCurrent=date,this._renderMonths(date.getFullYear())),this._current){var _this_$body_querySelector,_this_$body_querySelector1;null==(_this_$body_querySelector=this.$body.querySelector(".emonth-cell-selected"))||_this_$body_querySelector.classList.remove("emonth-cell-selected");var selectedTitle=distExports$4.DateTime.format(this._current,"YYYY-MM");null==(_this_$body_querySelector1=this.$body.querySelector(".emonth-cell-in-view[title='"+selectedTitle+"']"))||_this_$body_querySelector1.classList.add("emonth-cell-selected");}this._setHeader();},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._onCell=function(){var _this=this;delegate(this.$body,".emonth-cell","click",function(e){e.stopPropagation(),e.preventDefault();var month=+e.delegateTarget.getAttribute("data-month"),newDate=distExports$4.DateTime.toDate(distExports$4.DateTime.format(_this._current,"yyyy-MM-dd HH:mm:ss"));newDate.setMonth(month-1);var disabled=e.delegateTarget.classList.contains("edate-disabled");disabled||_this.setCurrent(newDate),null==_this.options.onCell||_this.options.onCell.call(_this.options,newDate,distExports$4.DateTime.format(newDate,"YYYY-MM"),disabled);});},_proto._onSuperPrev=function(){var year=this._renderCurrent.getFullYear()-1,date=distExports$4.DateTime.toDate(year+distExports$4.DateTime.format(this._renderCurrent,"-MM-DDTHH:mm:ss"));this._setRenderCurrent(date),null==this.options.onSuperPrev||this.options.onSuperPrev.call(this.options,this._current,this._renderCurrent);},_proto._onSuperNext=function(){var year=this._renderCurrent.getFullYear()+1,date=distExports$4.DateTime.toDate(year+distExports$4.DateTime.format(this._renderCurrent,"-MM-DDTHH:mm:ss"));this._setRenderCurrent(date),null==this.options.onSuperNext||this.options.onSuperNext.call(this.options,this._current,this._renderCurrent);},_proto._onHeaderTitle=function(){var _this=this;delegate(this.$panel,".edate-header-title-hover","click",function(){null==_this.options.onYear||_this.options.onYear.call(_this.options,_this._current,_this._renderCurrent);});},_proto._setHeader=function(){if(this.$panel.querySelector(".emonth-header-view")){var allowClick="function"==typeof this.options.onYear;this.$panel.querySelector(".emonth-header-view").innerHTML='<span class="'+(allowClick?"edate-header-title-hover":"")+'">'+this._renderCurrent.getFullYear()+this.locale.year+"</span>";}},_proto._setDisabled=function(){for(var year=this._renderCurrent.getFullYear(),i=0;i<12;i++){var $cell=this.$body.querySelector(".emonth-cell[title='"+year+"-"+Util.fillZero(i+1)+"']");if($cell){var date=distExports$4.DateTime.toDate(year+"-"+Util.fillZero(i+1)+"-"+distExports$4.DateTime.format(this._renderCurrent,"DDTHH:mm:ss"));"function"==typeof this.options.disabledMonth&&this.options.disabledMonth(date,distExports$4.DateTime.format(date,"YYYY-MM"))?$cell.classList.add("edate-disabled"):$cell.classList.remove("edate-disabled");}}},_proto._render=function(){this.$body.innerHTML='<table class="emonth-content"></table>',this.$panel.appendChild(this.$body);},_proto._renderMonths=function(year){var _this=this;this.$body.querySelector(".emonth-content")&&(this.$body.querySelector(".emonth-content").innerHTML="\n <tbody>\n "+Util.chunkBySize(this.locale.months,3).slice(0,4).map(function(month,index){return "<tr>\n "+month.map(function(m,i){return '<td title="'+year+"-"+Util.fillZero(3*index+i+1)+'" data-month="'+Util.fillZero(3*index+i+1)+'" class="emonth-cell emonth-cell-in-view">\n <span class="emonth-cell-inner">'+(_this.options.monthRender&&"function"==typeof _this.options.monthRender?_this.options.monthRender(distExports$4.DateTime.toDate(year+"-"+Util.fillZero(3*index+i+1)),year+"-"+Util.fillZero(3*index+i+1))||"":m)+"</span>\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>"),this._setDisabled();},_create_class$2$1(Month,[{key:"current",get:function(){return this._current}}]),Month}(Container);function _create_class$1$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$1$2(o,p){return _set_prototype_of$1$2=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$2(o,p)}var _YEAR_DEFAULT_OPTIONS_={showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,language:"zh",prefixCls:"eyear"},Year=function(Container){function Year(popupContainer,options){var _this;return (_this=Container.call(this,popupContainer,deepmerge.all([{},_YEAR_DEFAULT_OPTIONS_,options||{},{showPrevIcon:false,showNextIcon:false,renderPrevIcon:"",renderNextIcon:""}],{clone:false}))||this)._render(),_this._setCurrent(_this.options.current,false),_this._onCell(),_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$2(subClass,superClass);}(Year,Container);var _proto=Year.prototype;return _proto.setCurrent=function(year,change){ void 0===change&&(change=true),this._setCurrent(year,change);},_proto._setCurrent=function(year,change){ void 0===change&&(change=true);var left,right,_year="number"==typeof year?distExports$4.DateTime.toDate(year):(left=year,(null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?year:new Date);this._current&&distExports$4.DateTime.format(_year,"YYYY-MM-DD")===distExports$4.DateTime.format(this._current,"YYYY-MM-DD")||(this._current=_year,"function"==typeof this.options.onChange&&change&&this.options.onChange(_year)),this._renderTenYear=(this._current||new Date).getFullYear(),this._renderYearList();},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._onCell=function(){var _this=this;delegate(this.$body,".eyear-cell","click",function(e){var yearStr=+e.delegateTarget.getAttribute("title"),newDate=distExports$4.DateTime.toDate(distExports$4.DateTime.format(_this._current,"yyyy-MM-dd HH:mm:ss"));newDate.setFullYear(yearStr);var disabled=e.delegateTarget.classList.contains("edate-disabled");disabled||_this._setCurrent(newDate),null==_this.options.onCell||_this.options.onCell.call(_this.options,newDate,distExports$4.DateTime.format(newDate,"YYYY"),disabled),e.stopPropagation(),e.preventDefault();});},_proto._onSuperPrev=function(){this._renderTenYear=this._renderTenYear-10,null==this.options.onPrevYear||this.options.onPrevYear.call(this.options,this._current,Util.generateYears(this._renderTenYear)),this._renderYearList();},_proto._onSuperNext=function(){this._renderTenYear=this._renderTenYear+10,null==this.options.onNextYear||this.options.onNextYear.call(this.options,this._current,Util.generateYears(this._renderTenYear)),this._renderYearList();},_proto._render=function(){this.$body.innerHTML='<table class="eyear-content"></table>',this.$panel.appendChild(this.$body);},_proto._renderYearList=function(){var _this_header,_this=this,list=Util.generateYears(this._renderTenYear);null==(_this_header=this.header)||_this_header.renderContent(list[1]+" - "+list[list.length-2]),this.$body.querySelector(".eyear-content")&&(this.$body.querySelector(".eyear-content").innerHTML="\n <tbody>\n "+Util.chunkBySize(list,3).slice(0,4).map(function(years,i){return "<tr>\n "+years.map(function(y,j){var classNames=0===i&&0===j||3===i&&2===j?"eyear-cell":"eyear-cell eyear-cell-in-view";return +y===+_this._current.getFullYear()&&(classNames+=" eyear-cell-selected"),"function"==typeof _this.options.disabledYear&&_this.options.disabledYear(distExports$4.DateTime.toDate(y),y)&&(classNames+=" edate-disabled"),'<td title="'+y+'" class="'+classNames+'">\n '+(_this.options.yearRender&&"function"==typeof _this.options.yearRender?_this.options.yearRender(distExports$4.DateTime.toDate(y),y):'<span class="eyear-cell-inner">'+ +y+"</span>")+"\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>\n ");},_create_class$1$1(Year,[{key:"current",get:function(){return this._current}}]),Year}(Container);function _create_class$4(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$7(){return _extends$7=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$7.apply(this,arguments)}function _set_prototype_of$8(o,p){return _set_prototype_of$8=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$8(o,p)}var _DATEPICKER_MODE_ARRAY=["date","month","year"],_DATEPICKER_DEFAULT_OPTIONS_={getPopupContainer:function(){return document.body},language:"zh",isMobile:false,mode:_DATEPICKER_MODE_ARRAY[0]},DatePicker=function(Picker){function DatePicker(container,options){var _this;return (_this=Picker.call(this,container,deepmerge.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{},{wrapClassName:("edate-picker-container "+((null==options?void 0:options.wrapClassName)||"")).trim()}],{clone:false}))||this).current=null,_this._current=null,_this._calendar=null,_this._month=null,_this._year=null,_this._currentMode="date",_this.options=deepmerge.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{}],{clone:false}),_this.options.current&&(_this.current=_this.options.current,_this._current=_this.options.current),_this._currentMode=_this.options.mode,_this._switchMode(),_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$8(subClass,superClass);}(DatePicker,Picker);var _proto=DatePicker.prototype;return _proto.setCurrent=function(date,change){ void 0===change&&(change=true),this._setCurrent(date,change);},_proto.updateBadges=function(badges){var _this__calendar;(null==badges?void 0:badges.length)>=0&&(null==(_this__calendar=this._calendar)||_this__calendar.updateBadges(badges));},_proto.destroy=function(){var _this__calendar,_this__month,_this__year;null==(_this__calendar=this._calendar)||_this__calendar.destroy(),this._calendar=null,null==(_this__month=this._month)||_this__month.destroy(),this._month=null,null==(_this__year=this._year)||_this__year.destroy(),this._year=null,Picker.prototype.destroy.call(this);},_proto._setCurrent=function(date,change){var _this__calendar,_this__month,_this__year;void 0===change&&(change=true),this._current=date,null==(_this__calendar=this._calendar)||_this__calendar.setCurrent(date,change),null==(_this__month=this._month)||_this__month.setCurrent(date,change),null==(_this__year=this._year)||_this__year.setCurrent(date,change);},_proto._switchMode=function(){this.$body.classList.add("edate-picker-"+this._currentMode),"date"===this._currentMode?this._initCalendar():"month"===this._currentMode?this._initMonth():"year"===this._currentMode&&this._initYear(),this.setPlacement(this.options.placement||"top");},_proto.hide=function(){this.open=false;},_proto._onOpenChange=function(open){Picker.prototype._onOpenChange.call(this,open),open&&(this._removeCurrentTypeClass(),this._currentMode=this.options.mode||"date",this._switchMode(),this._setCurrent(this.current,false)),open||null==this.options.onClose||this.options.onClose.call(this.options,this.current,this._currentMode);},_proto._initCalendar=function(){var _this=this;this._calendar||(this._calendar=new Calendar(this.$body,_extends$7({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),onMonth:this._onMonth.bind(this),onYear:this._onYear.bind(this),onChange:function(date){var _this__calendar;_this._current&&distExports$4.DateTime.format(_this._current,"YYYY-MM-DD")===distExports$4.DateTime.format(date,"YYYY-MM-DD")||_this._onChange(date,null==(_this__calendar=_this._calendar)?void 0:_this__calendar.options.showHeaderOk);}})));},_proto._initMonth=function(){var _this=this;this._month||(this._month=new Month(this.$body,_extends$7({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onChange:function(date){var _this__month;_this._current&&distExports$4.DateTime.format(_this._current,"YYYY-MM")===distExports$4.DateTime.format(date,"YYYY-MM")||_this._onChange(date,null==(_this__month=_this._month)?void 0:_this__month.options.showHeaderOk);},onYear:this._onYear.bind(this)})));},_proto._initYear=function(){var _this=this;this._year||(this._year=new Year(this.$body,_extends$7({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onChange:function(date){var _this__year;_this._current&&distExports$4.DateTime.format(_this._current,"YYYY")===distExports$4.DateTime.format(date,"YYYY")||_this._onChange(date,null==(_this__year=_this._year)?void 0:_this__year.options.showHeaderOk);}})));},_proto._onOk=function(date){this.current=date||this._current,this._setCurrent(date||this._current),null==this.options.onOk||this.options.onOk.call(this.options,this.current,this._currentMode),this.hide();},_proto._onClose=function(){this.hide();},_proto._onChange=function(date,_showHeaderOk){this._setCurrent(date,true);},_proto._onCell=function(date,_renderDate,disabled){null==this.options.onCell||this.options.onCell.call(this.options,date,this._currentMode),this.options.isMobile||this._currentMode!==this.options.mode||disabled||this._current&&distExports$4.DateTime.format(date,"YYYY-MM-DD")!==distExports$4.DateTime.format(this._current,"YYYY-MM-DD")||(this.current=date,null==this.options.onChange||this.options.onChange.call(this.options,date,this._currentMode)),disabled||this._prvMode();},_proto._prvMode=function(){this._currentMode!==this.options.mode||this.options.isMobile||this.hide();var index=_DATEPICKER_MODE_ARRAY.indexOf(this._currentMode);index>=1&&(index--,this._removeCurrentTypeClass(),this._currentMode=_DATEPICKER_MODE_ARRAY[index],this._switchMode());},_proto._onYear=function(){this._removeCurrentTypeClass(),this._currentMode="year",this._switchMode();},_proto._onMonth=function(){this._removeCurrentTypeClass(),this._currentMode="month",this._switchMode();},_proto._removeCurrentTypeClass=function(){this.$body.classList.remove("edate-picker-"+this._currentMode);},_create_class$4(DatePicker,[{key:"_minModeIndex",get:function(){return _DATEPICKER_MODE_ARRAY.indexOf(this.options.mode)}}]),DatePicker}(Picker);
10892
9057
 
10893
- var hasRequiredDist$2;
10894
-
10895
- function requireDist$2 () {
10896
- if (hasRequiredDist$2) return dist$3;
10897
- hasRequiredDist$2 = 1;
10898
- var delegate=requireDelegate(),utilsTools=requireDist$3(),deepmerge=requireCjs(),Picker=requireDist$a(),Util=function(){function Util(){}return Util.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},Util.chunkBySize=function(arr,size){return Array.from({length:Math.ceil(arr.length/size)}).map(function(_,index){return arr.slice(index*size,(index+1)*size)})},Util.generateYears=function(year){for(var years=[],i=year%10+1;i>=0;i--)years.push(year-i);for(var i1=1;years.length<12;i1++)years.push(year+i1);return years},Util.getDaysInMonth=function(year,month){return new Date(year,month+1,0).getDate()},Util.getFirstDayOfMonth=function(year,month,startOfWeek){return void 0===startOfWeek&&(startOfWeek=0),(new Date(year,month).getDay()-startOfWeek+7)%7},Util.generateWeeksByYearMonth=function(year,month,startOfWeek){ void 0===startOfWeek&&(startOfWeek=0),month-=1;for(var daysInMonth=Util.getDaysInMonth(year,month),firstDay=Util.getFirstDayOfMonth(year,month,startOfWeek),weeks=[],i=1;i<=firstDay+daysInMonth;i++){var day=i-firstDay;day<1?weeks.push((0===month?year-1:year)+"-"+Util.fillZero((month+12-1)%12+1)+"-"+Util.fillZero(Util.getDaysInMonth(year,month-1)+day)):day>daysInMonth?weeks.push((11===month?year+1:year)+"-"+Util.fillZero((month+1)%12+1)+"-"+(day-daysInMonth)):weeks.push(year+"-"+Util.fillZero(month+1)+"-"+Util.fillZero(day));}for(var nextDay=1;weeks.length<42;)weeks.push((11===month?year+1:year)+"-"+Util.fillZero((month+1)%12+1)+"-"+Util.fillZero(nextDay++));return weeks},Util.generateHours=function(){for(var hours=[],i=0;i<24;i++)hours.push(Util.fillZero(i));return hours},Util.generateMinutesOrSeconds=function(){for(var hours=[],i=0;i<=59;i++)hours.push(Util.fillZero(i));return hours},Util}(),__$CALENDAR_LOCALES$__={en:{year:"",month:"",weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],today:"Today",ok:"OK",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},zh:{year:"年",month:"月",weeks:["日","一","二","三","四","五","六"],today:"今天",ok:"确定",months:["01","02","03","04","05","06","07","08","09","10","11","12"]}},__DEFAULT_COMPONENTS_OPTIONS__={showSuperPrevIcon:false,showSuperNextIcon:false,showPrevIcon:false,showNextIcon:false,showHeaderClose:false,showHeaderOk:false,renderSuperPrevIcon:'<span class="edate-super-prev-icon"></span>',renderSuperNextIcon:'<span class="edate-super-next-icon"></span>',renderPrevIcon:'<span class="edate-prev-icon"></span>',renderNextIcon:'<span class="edate-next-icon"></span>',renderHeaderCloseIcon:'<span class="edate-close-icon">\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n </span>',renderHeaderOkIcon:function(locale){return '<span class="edate-btn-text">'+((null==locale?void 0:locale.ok)||"确定")+"</span>"}},Header=function(){function Header(options){this.$header=null,this.options=deepmerge.all([{},__DEFAULT_COMPONENTS_OPTIONS__,options],{clone:false}),this.$header=document.createElement("div"),this.$header.classList.add("edate-header",options.prefixCls+"-header"),options.className&&this.$header.classList.add(options.className),this._render(),this._eventListeners();}var _proto=Header.prototype;return _proto._render=function(){var _this__getStrOrFunToStr,_this__getStrOrFunToStr1,_this__getStrOrFunToStr2,_this__getStrOrFunToStr3,_this__getStrOrFunToStr4,_this__getStrOrFunToStr5;this.$header&&(this.$header.innerHTML="\n "+(this.options.showHeaderClose?'<div class="edate-close-btn">\n '+(null!=(_this__getStrOrFunToStr=this._getStrOrFunToStr(this.options.renderHeaderCloseIcon))?_this__getStrOrFunToStr:__DEFAULT_COMPONENTS_OPTIONS__.renderHeaderCloseIcon)+"\n </div>":this.options.showHeaderOk?"<span></span>":"")+"\n "+(this.options.showSuperPrevIcon||this.options.showPrevIcon?'\n <div class="edate-prev-btns">\n '+(this.options.showSuperPrevIcon?'<div class="edate-super-prev-btn '+this.options.prefixCls+'-super-prev-btn">\n '+(null!=(_this__getStrOrFunToStr1=this._getStrOrFunToStr(this.options.renderSuperPrevIcon))?_this__getStrOrFunToStr1:__DEFAULT_COMPONENTS_OPTIONS__.renderSuperPrevIcon)+"\n </div>":"")+"\n "+(this.options.showPrevIcon?'<div class="edate-prev-btn '+this.options.prefixCls+'-prev-btn">\n '+(null!=(_this__getStrOrFunToStr2=this._getStrOrFunToStr(this.options.renderPrevIcon))?_this__getStrOrFunToStr2:__DEFAULT_COMPONENTS_OPTIONS__.renderPrevIcon)+"\n </div>":"")+"\n </div>\n ":"")+'\n\n <div class="edate-header-view '+this.options.prefixCls+'-header-view"></div>\n\n '+(this.options.showNextIcon||this.options.showSuperNextIcon?'\n <div class="edate-next-btns">\n '+(this.options.showNextIcon?'<div class="edate-next-btn '+this.options.prefixCls+'-next-btn">\n '+(null!=(_this__getStrOrFunToStr3=this._getStrOrFunToStr(this.options.renderNextIcon))?_this__getStrOrFunToStr3:__DEFAULT_COMPONENTS_OPTIONS__.renderNextIcon)+"\n </div>":"")+"\n "+(this.options.showSuperNextIcon?'<div class="edate-super-next-btn '+this.options.prefixCls+'-super-next-btn">\n '+(null!=(_this__getStrOrFunToStr4=this._getStrOrFunToStr(this.options.renderSuperNextIcon))?_this__getStrOrFunToStr4:__DEFAULT_COMPONENTS_OPTIONS__.renderSuperNextIcon)+"\n </div>":"")+"\n </div>\n ":"")+"\n "+(this.options.showHeaderOk?'<div class="edate-ok-btn">\n '+(null!=(_this__getStrOrFunToStr5=this._getStrOrFunToStr(this.options.renderHeaderOkIcon))?_this__getStrOrFunToStr5:__DEFAULT_COMPONENTS_OPTIONS__.renderHeaderOkIcon)+"\n </div>":this.options.showHeaderClose?"<span></span>":""));},_proto._getStrOrFunToStr=function(value){if(null!=value){var _this_options;if("function"==typeof value)return this._getStrOrFunToStr(null==value?void 0:value(null==(_this_options=this.options)?void 0:_this_options.locale));if("string"==typeof value)return value}},_proto.renderContent=function(html){if(this.$header){var _$content=this.$header.querySelector(".edate-header-view");if(!_$content)return;_$content.innerHTML=html;}},_proto.destroy=function(){this.$header&&this.$header.remove();},_proto._eventListeners=function(){var _this=this;_this.$header&&(delegate(_this.$header,".edate-super-prev-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onSuperPrev||_this.options.onSuperPrev.call(_this.options);}),delegate(_this.$header,".edate-prev-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onPrev||_this.options.onPrev.call(_this.options);}),delegate(_this.$header,".edate-next-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onNext||_this.options.onNext.call(_this.options);}),delegate(_this.$header,".edate-super-next-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onSuperNext||_this.options.onSuperNext.call(_this.options);}),delegate(_this.$header,".edate-close-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==_this.options.onClose||_this.options.onClose.call(_this.options),event.stopPropagation(),event.preventDefault());}),delegate(_this.$header,".edate-ok-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==_this.options.onOk||_this.options.onOk.call(_this.options),event.stopPropagation(),event.preventDefault());}));},Header}();function _extends$2(){return _extends$2=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$2.apply(this,arguments)}var _CONTAINER_DEFAULT_OPTIONS_={prefixCls:"edate",locales:__$CALENDAR_LOCALES$__,showHeader:true},Container=function(){function Container(popupContainer,options){this.$panel=document.createElement("div"),this.$body=document.createElement("div"),this.$container=document.createElement("div"),this.language="zh",this.header=null,this.locale=__$CALENDAR_LOCALES$__.zh,this.options=deepmerge.all([{},_CONTAINER_DEFAULT_OPTIONS_,options],{clone:false}),this.$popupContainer=popupContainer?"function"==typeof popupContainer?popupContainer():popupContainer:document.body,this._setLocale(),this.$container.classList.add("edate-container",(this.options.prefixCls||"edate")+"-container"),options.isMobile&&this.$container.classList.add("edate-mobile",this.options.prefixCls+"-mobile"),this.options.wrapClassName&&this.$container.classList.add(this.options.wrapClassName),this.$panel.classList.add("edate-panel",(this.options.prefixCls||"edate")+"-panel"),this.options.showHeader&&(this.header=new Header(_extends$2({},this.options,{locale:this.locale,onPrev:this._onPrev.bind(this),onNext:this._onNext.bind(this),onSuperPrev:this._onSuperPrev.bind(this),onSuperNext:this._onSuperNext.bind(this),onClose:this._onClose.bind(this),onOk:this._onOk.bind(this)})),this.$panel.appendChild(this.header.$header)),this.$body.classList.add("edate-body",(this.options.prefixCls||"edate")+"-body"),this.$container.appendChild(this.$panel),this.$popupContainer.appendChild(this.$container);}var _proto=Container.prototype;return _proto._setLocale=function(){if(this.options.locales)if("string"==typeof this.options.language){var language=this.options.language||navigator.language;this.options.locales[language]?this.locale=this.options.locales[language]:this.locale=this.options.locales.zh;}else this.locale=this.options.locales.zh;},_proto.destroy=function(){var _this_$container;(null==(_this_$container=this.$container)?void 0:_this_$container.parentNode)&&this.$container.parentNode.removeChild(this.$container),this.header=null,this.$container=null;},_proto.setLocale=function(locale){"string"==typeof locale?this._setLocale():this.locale=locale;},_proto._onSuperPrev=function(){},_proto._onSuperNext=function(){},_proto._onPrev=function(){},_proto._onNext=function(){},_proto._onClose=function(){},_proto._onOk=function(){},Container}();function _create_class$3(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1(){return _extends$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1.apply(this,arguments)}function _set_prototype_of$3(o,p){return _set_prototype_of$3=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$3(o,p)}var _CALENDAR_DEFAULT_OPTIONS_={startOfWeek:0,showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,showPrevIcon:true,showNextIcon:true,language:"zh",renderBadge:'<span class="ecalendar-badge"></span>',badges:[]},Calendar=function(Container){function Calendar(container,options){var _this,_this_options_badges,_this_options,_this_options1,_this_options2;return (_this=Container.call(this,container,_extends$1({},_CALENDAR_DEFAULT_OPTIONS_,options,{prefixCls:"ecalendar"}))||this).badges=[],(null==(_this_options_badges=_this.options.badges)?void 0:_this_options_badges.length)&&_this._updateBadges(_this.options.badges,false),(null==(_this_options=_this.options)?void 0:_this_options.startOfWeek)&&((null==(_this_options1=_this.options)?void 0:_this_options1.startOfWeek)>6||(null==(_this_options2=_this.options)?void 0:_this_options2.startOfWeek)<0)&&(_this.options.startOfWeek=0),_this._render(),_this.setCurrent(_this.options.current,false),_this._onHeader(),_this._onCell(),_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$3(subClass,superClass);}(Calendar,Container);var _proto=Calendar.prototype;return _proto.setCurrent=function(date,change){if(void 0===change&&(change=true),"string"==typeof date||(left=date,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right))try{if(date="string"==typeof date?utilsTools.DateTime.toDate(date):date,(!this._current||utilsTools.DateTime.format(date,"YYYY-MM-DD")!==utilsTools.DateTime.format(this._current,"YYYY-MM-DD"))&&(this._current=date,change&&(null==this.options.onChange||this.options.onChange.call(this.options,date,utilsTools.DateTime.format(date,"YYYY-MM-DD"))),this.$body)){var _this_$body_querySelector,_this_$body_querySelector1;null==(_this_$body_querySelector=this.$body.querySelector(".ecalendar-cell-selected"))||_this_$body_querySelector.classList.remove("ecalendar-cell-selected");var title=utilsTools.DateTime.format(this._current,"YYYY-MM-DD");null==(_this_$body_querySelector1=this.$body.querySelector(".ecalendar-cell-in-view[title='"+title+"']"))||_this_$body_querySelector1.classList.add("ecalendar-cell-selected");}this._setRenderCurrent(this._current);}catch(error){this._setRenderCurrent(new Date);}else this._setRenderCurrent(new Date);var left,right;},_proto.updateBadges=function(badges){this._updateBadges(badges);},_proto._updateBadges=function(badges,rerender){ void 0===rerender&&(rerender=true),(null==badges?void 0:badges.length)>=0&&(this.badges=badges.map(function(date){return utilsTools.DateTime.format(date,"YYYY-MM-DD")}),rerender&&this._renderDate());},_proto._setRenderCurrent=function(date){(!this._renderCurrent||date&&utilsTools.DateTime.format(this._renderCurrent,"YYYY-MM")!==utilsTools.DateTime.format(date,"YYYY-MM"))&&(this._renderCurrent=date||new Date,this._renderDate());},_proto._onCell=function(){var _this=this;delegate(this.$body,".ecalendar-cell","click",function(event){var date=new Date(event.delegateTarget.getAttribute("title").replace(/\//gi,"/")),disabled=event.delegateTarget.classList.contains("edate-disabled");disabled||_this.setCurrent(date),null==_this.options.onCell||_this.options.onCell.call(_this.options,date,utilsTools.DateTime.format(_this._renderCurrent,"YYYY-MM-DD"),disabled),event.stopPropagation(),event.preventDefault();});},_proto._onSuperPrev=function(){var date=new Date(this._renderCurrent);date.setFullYear(date.getFullYear()-1,date.getMonth(),date.getDate()),this._setRenderCurrent(date),null==this.options.onPrevMonth||this.options.onPrevMonth.call(this.options,this._current,this._renderCurrent);},_proto._onSuperNext=function(){var date=new Date(this._renderCurrent);date.setFullYear(date.getFullYear()+1,date.getMonth(),date.getDate()),this._setRenderCurrent(date),null==this.options.onNextMonth||this.options.onNextMonth.call(this.options,this._current,this._renderCurrent);},_proto._onPrev=function(){var date=new Date(this._renderCurrent);date.setMonth(date.getMonth()-1,date.getDate()),this._setRenderCurrent(date),null==this.options.onPrevMonth||this.options.onPrevMonth.call(this.options,this._current,this._renderCurrent);},_proto._onNext=function(){var date=new Date(this._renderCurrent);date.setMonth(date.getMonth()+1,date.getDate()),this._setRenderCurrent(date),null==this.options.onNextMonth||this.options.onNextMonth.call(this.options,this._current,this._renderCurrent);},_proto._onHeader=function(){var _this=this;delegate(this.$panel,".ecalendar-header-month-btn","click",function(){null==_this.options.onMonth||_this.options.onMonth.call(_this.options,_this._current,_this._renderCurrent);}),delegate(this.$panel,".ecalendar-header-year-btn","click",function(){null==_this.options.onYear||_this.options.onYear.call(_this.options,_this._current,_this._renderCurrent);});},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._render=function(){var _this_locale,_this_locale1,shiftedCustomDays=[].concat(((null==(_this_locale=this.locale)?void 0:_this_locale.weeks)||[]).slice(this.options.startOfWeek),((null==(_this_locale1=this.locale)?void 0:_this_locale1.weeks)||[]).slice(0,this.options.startOfWeek));this.$body.innerHTML='<table class="ecalendar-content">\n <thead><tr>'+shiftedCustomDays.map(function(day){return "<th>"+day+"</th>"}).join("")+"</tr></thead>\n <tbody></tbody>\n </table>",this.$panel.appendChild(this.$body);},_proto._renderDate=function(){var _this_header,_this_$body_querySelector,_this=this;if(this.$body){var _this_locale_months,_this_locale,_this_locale1,_this_locale2,_this_locale3,_this_locale_months1,_this_locale4,_this_locale5,_this_$body_querySelector1,todayStr=utilsTools.DateTime.format(new Date,"YYYY-MM-DD"),year=this._renderCurrent.getFullYear(),month=this._renderCurrent.getMonth()+1,dayGroupArray=Util.chunkBySize(Util.generateWeeksByYearMonth(year,month,this.options.startOfWeek),7),allowMonthClick="function"==typeof this.options.onMonth,allowYearClick="function"==typeof this.options.onYear;if(null==(_this_header=this.header)?void 0:_this_header.$header)this.header.renderContent("\n "+("zh"!==this.options.language?'<span class="ecalendar-header-month-btn '+(allowMonthClick?"edate-header-title-hover":"")+'">'+(null==(_this_locale=this.locale)||null==(_this_locale_months=_this_locale.months)?void 0:_this_locale_months[+(month-1)])+((null==(_this_locale1=this.locale)?void 0:_this_locale1.month)||"")+'</span> <span class="ecalendar-header-year-btn '+(allowYearClick?"edate-header-title-hover":"")+'">'+year+((null==(_this_locale2=this.locale)?void 0:_this_locale2.year)||"")+"</span>":'<span class="ecalendar-header-year-btn '+(allowYearClick?"edate-header-title-hover":"")+'">'+year+((null==(_this_locale3=this.locale)?void 0:_this_locale3.year)||"")+'</span> <span class="ecalendar-header-month-btn '+(allowMonthClick?"edate-header-title-hover":"")+'">'+(null==(_this_locale4=this.locale)||null==(_this_locale_months1=_this_locale4.months)?void 0:_this_locale_months1[+(month-1)])+((null==(_this_locale5=this.locale)?void 0:_this_locale5.month)||"")+"</span>"));if(null==(_this_$body_querySelector=this.$body.querySelector(".ecalendar-content"))?void 0:_this_$body_querySelector.querySelector("tbody"))(null==(_this_$body_querySelector1=this.$body.querySelector(".ecalendar-content"))?void 0:_this_$body_querySelector1.querySelector("tbody")).innerHTML="\n "+dayGroupArray.slice(0,7).map(function(dates){return "<tr>\n "+dates.map(function(dateStr){var _this_options,_dateStr_split=dateStr.split("-"),y=_dateStr_split[0],m=_dateStr_split[1],d=_dateStr_split[2],date=new Date(+y,+m,+d),classNames=[month===+m?"ecalendar-cell-in-view":"",todayStr===dateStr?"ecalendar-cell-today":"",_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM-DD")===dateStr?"ecalendar-cell-selected":"","function"==typeof(null==(_this_options=_this.options)?void 0:_this_options.disabledDate)&&_this.options.disabledDate(utilsTools.DateTime.toDate(dateStr),dateStr)?"edate-disabled":""].filter(Boolean),badgeHtml=_this._renderBadge(date,dateStr);return '<td title="'+dateStr+'" class="ecalendar-cell '+classNames.join(" ")+'">\n '+("function"==typeof _this.options.renderDate?_this.options.renderDate(date,dateStr):'<span class="ecalendar-cell-inner">'+Util.fillZero(+d)+"</span>")+"\n "+badgeHtml+"\n </td>"}).join("")+"\n </tr>"}).join("");}},_proto._renderBadge=function(date,dateStr){var badgeHtml="";badgeHtml="function"==typeof this.options.renderBadge?this.options.renderBadge(date,dateStr):"string"==typeof this.options.renderBadge?this.options.renderBadge:"";var showBadge="function"==typeof this.options.showBadge&&this.options.showBadge(date,dateStr);return this.badges.includes(dateStr)||showBadge||(badgeHtml=""),badgeHtml},_create_class$3(Calendar,[{key:"current",get:function(){return this._current}}]),Calendar}(Container);function _create_class$2(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$2(o,p){return _set_prototype_of$2=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$2(o,p)}Calendar.DateTime=utilsTools.DateTime;var _Month_DEFAULT_OPTIONS_={showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,language:"zh"},Month=function(Container){function Month(popupContainer,options){var _this;return (_this=Container.call(this,popupContainer,deepmerge.all([{},_Month_DEFAULT_OPTIONS_,options||{},{showPrevIcon:false,showNextIcon:false,prefixCls:"emonth"}],{clone:false}))||this)._render(),_this.setCurrent(_this.options.current,false),_this._onHeaderTitle(),_this._onCell(),_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$2(subClass,superClass);}(Month,Container);var _proto=Month.prototype;return _proto.setCurrent=function(date,change){ void 0===change&&(change=true),this._setCurrent(date,change);},_proto._setCurrent=function(date,change){if("string"==typeof date||(left=date,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right))try{var d=date;"string"==typeof d&&(d=utilsTools.DateTime.toDate(d));var current=d;this._current&&utilsTools.DateTime.format(current,"YYYY-MM-DD")===utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this._current=current,"function"==typeof this.options.onChange&&change&&(null==this.options.onChange||this.options.onChange.call(this.options,current,utilsTools.DateTime.format(current,"YYYY-MM")))),this._setRenderCurrent(current);}catch(error){this._setRenderCurrent(new Date);}else this._setRenderCurrent(new Date);var left,right;},_proto._setRenderCurrent=function(date){if((!this._renderCurrent||this._renderCurrent&&utilsTools.DateTime.format(date,"YYYY")!==utilsTools.DateTime.format(this._renderCurrent,"YYYY"))&&(this._renderCurrent=date,this._renderMonths(date.getFullYear())),this._current){var _this_$body_querySelector,_this_$body_querySelector1;null==(_this_$body_querySelector=this.$body.querySelector(".emonth-cell-selected"))||_this_$body_querySelector.classList.remove("emonth-cell-selected");var selectedTitle=utilsTools.DateTime.format(this._current,"YYYY-MM");null==(_this_$body_querySelector1=this.$body.querySelector(".emonth-cell-in-view[title='"+selectedTitle+"']"))||_this_$body_querySelector1.classList.add("emonth-cell-selected");}this._setHeader();},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._onCell=function(){var _this=this;delegate(this.$body,".emonth-cell","click",function(e){e.stopPropagation(),e.preventDefault();var month=+e.delegateTarget.getAttribute("data-month"),newDate=utilsTools.DateTime.toDate(utilsTools.DateTime.format(_this._current,"yyyy-MM-dd HH:mm:ss"));newDate.setMonth(month-1);var disabled=e.delegateTarget.classList.contains("edate-disabled");disabled||_this.setCurrent(newDate),null==_this.options.onCell||_this.options.onCell.call(_this.options,newDate,utilsTools.DateTime.format(newDate,"YYYY-MM"),disabled);});},_proto._onSuperPrev=function(){var year=this._renderCurrent.getFullYear()-1,date=utilsTools.DateTime.toDate(year+utilsTools.DateTime.format(this._renderCurrent,"-MM-DDTHH:mm:ss"));this._setRenderCurrent(date),null==this.options.onSuperPrev||this.options.onSuperPrev.call(this.options,this._current,this._renderCurrent);},_proto._onSuperNext=function(){var year=this._renderCurrent.getFullYear()+1,date=utilsTools.DateTime.toDate(year+utilsTools.DateTime.format(this._renderCurrent,"-MM-DDTHH:mm:ss"));this._setRenderCurrent(date),null==this.options.onSuperNext||this.options.onSuperNext.call(this.options,this._current,this._renderCurrent);},_proto._onHeaderTitle=function(){var _this=this;delegate(this.$panel,".edate-header-title-hover","click",function(){null==_this.options.onYear||_this.options.onYear.call(_this.options,_this._current,_this._renderCurrent);});},_proto._setHeader=function(){if(this.$panel.querySelector(".emonth-header-view")){var allowClick="function"==typeof this.options.onYear;this.$panel.querySelector(".emonth-header-view").innerHTML='<span class="'+(allowClick?"edate-header-title-hover":"")+'">'+this._renderCurrent.getFullYear()+this.locale.year+"</span>";}},_proto._setDisabled=function(){for(var year=this._renderCurrent.getFullYear(),i=0;i<12;i++){var $cell=this.$body.querySelector(".emonth-cell[title='"+year+"-"+Util.fillZero(i+1)+"']");if($cell){var date=utilsTools.DateTime.toDate(year+"-"+Util.fillZero(i+1)+"-"+utilsTools.DateTime.format(this._renderCurrent,"DDTHH:mm:ss"));"function"==typeof this.options.disabledMonth&&this.options.disabledMonth(date,utilsTools.DateTime.format(date,"YYYY-MM"))?$cell.classList.add("edate-disabled"):$cell.classList.remove("edate-disabled");}}},_proto._render=function(){this.$body.innerHTML='<table class="emonth-content"></table>',this.$panel.appendChild(this.$body);},_proto._renderMonths=function(year){var _this=this;this.$body.querySelector(".emonth-content")&&(this.$body.querySelector(".emonth-content").innerHTML="\n <tbody>\n "+Util.chunkBySize(this.locale.months,3).slice(0,4).map(function(month,index){return "<tr>\n "+month.map(function(m,i){return '<td title="'+year+"-"+Util.fillZero(3*index+i+1)+'" data-month="'+Util.fillZero(3*index+i+1)+'" class="emonth-cell emonth-cell-in-view">\n <span class="emonth-cell-inner">'+(_this.options.monthRender&&"function"==typeof _this.options.monthRender?_this.options.monthRender(utilsTools.DateTime.toDate(year+"-"+Util.fillZero(3*index+i+1)),year+"-"+Util.fillZero(3*index+i+1))||"":m)+"</span>\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>"),this._setDisabled();},_create_class$2(Month,[{key:"current",get:function(){return this._current}}]),Month}(Container);function _create_class$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$1(o,p){return _set_prototype_of$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1(o,p)}var _YEAR_DEFAULT_OPTIONS_={showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,language:"zh",prefixCls:"eyear"},Year=function(Container){function Year(popupContainer,options){var _this;return (_this=Container.call(this,popupContainer,deepmerge.all([{},_YEAR_DEFAULT_OPTIONS_,options||{},{showPrevIcon:false,showNextIcon:false,renderPrevIcon:"",renderNextIcon:""}],{clone:false}))||this)._render(),_this._setCurrent(_this.options.current,false),_this._onCell(),_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(subClass,superClass);}(Year,Container);var _proto=Year.prototype;return _proto.setCurrent=function(year,change){ void 0===change&&(change=true),this._setCurrent(year,change);},_proto._setCurrent=function(year,change){ void 0===change&&(change=true);var left,right,_year="number"==typeof year?utilsTools.DateTime.toDate(year):(left=year,(null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?year:new Date);this._current&&utilsTools.DateTime.format(_year,"YYYY-MM-DD")===utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this._current=_year,"function"==typeof this.options.onChange&&change&&this.options.onChange(_year)),this._renderTenYear=(this._current||new Date).getFullYear(),this._renderYearList();},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._onCell=function(){var _this=this;delegate(this.$body,".eyear-cell","click",function(e){var yearStr=+e.delegateTarget.getAttribute("title"),newDate=utilsTools.DateTime.toDate(utilsTools.DateTime.format(_this._current,"yyyy-MM-dd HH:mm:ss"));newDate.setFullYear(yearStr);var disabled=e.delegateTarget.classList.contains("edate-disabled");disabled||_this._setCurrent(newDate),null==_this.options.onCell||_this.options.onCell.call(_this.options,newDate,utilsTools.DateTime.format(newDate,"YYYY"),disabled),e.stopPropagation(),e.preventDefault();});},_proto._onSuperPrev=function(){this._renderTenYear=this._renderTenYear-10,null==this.options.onPrevYear||this.options.onPrevYear.call(this.options,this._current,Util.generateYears(this._renderTenYear)),this._renderYearList();},_proto._onSuperNext=function(){this._renderTenYear=this._renderTenYear+10,null==this.options.onNextYear||this.options.onNextYear.call(this.options,this._current,Util.generateYears(this._renderTenYear)),this._renderYearList();},_proto._render=function(){this.$body.innerHTML='<table class="eyear-content"></table>',this.$panel.appendChild(this.$body);},_proto._renderYearList=function(){var _this_header,_this=this,list=Util.generateYears(this._renderTenYear);null==(_this_header=this.header)||_this_header.renderContent(list[1]+" - "+list[list.length-2]),this.$body.querySelector(".eyear-content")&&(this.$body.querySelector(".eyear-content").innerHTML="\n <tbody>\n "+Util.chunkBySize(list,3).slice(0,4).map(function(years,i){return "<tr>\n "+years.map(function(y,j){var classNames=0===i&&0===j||3===i&&2===j?"eyear-cell":"eyear-cell eyear-cell-in-view";return +y===+_this._current.getFullYear()&&(classNames+=" eyear-cell-selected"),"function"==typeof _this.options.disabledYear&&_this.options.disabledYear(utilsTools.DateTime.toDate(y),y)&&(classNames+=" edate-disabled"),'<td title="'+y+'" class="'+classNames+'">\n '+(_this.options.yearRender&&"function"==typeof _this.options.yearRender?_this.options.yearRender(utilsTools.DateTime.toDate(y),y):'<span class="eyear-cell-inner">'+ +y+"</span>")+"\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>\n ");},_create_class$1(Year,[{key:"current",get:function(){return this._current}}]),Year}(Container);function _create_class(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends.apply(this,arguments)}function _set_prototype_of(o,p){return _set_prototype_of=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of(o,p)}var _DATEPICKER_MODE_ARRAY=["date","month","year"],_DATEPICKER_DEFAULT_OPTIONS_={getPopupContainer:function(){return document.body},language:"zh",isMobile:false,mode:_DATEPICKER_MODE_ARRAY[0]},DatePicker=function(Picker){function DatePicker(container,options){var _this;return (_this=Picker.call(this,container,deepmerge.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{},{wrapClassName:("edate-picker-container "+((null==options?void 0:options.wrapClassName)||"")).trim()}],{clone:false}))||this).current=null,_this._current=null,_this._calendar=null,_this._month=null,_this._year=null,_this._currentMode="date",_this.options=deepmerge.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{}],{clone:false}),_this.options.current&&(_this.current=_this.options.current,_this._current=_this.options.current),_this._currentMode=_this.options.mode,_this._switchMode(),_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(subClass,superClass);}(DatePicker,Picker);var _proto=DatePicker.prototype;return _proto.setCurrent=function(date,change){ void 0===change&&(change=true),this._setCurrent(date,change);},_proto.updateBadges=function(badges){var _this__calendar;(null==badges?void 0:badges.length)>=0&&(null==(_this__calendar=this._calendar)||_this__calendar.updateBadges(badges));},_proto.destroy=function(){var _this__calendar,_this__month,_this__year;null==(_this__calendar=this._calendar)||_this__calendar.destroy(),this._calendar=null,null==(_this__month=this._month)||_this__month.destroy(),this._month=null,null==(_this__year=this._year)||_this__year.destroy(),this._year=null,Picker.prototype.destroy.call(this);},_proto._setCurrent=function(date,change){var _this__calendar,_this__month,_this__year;void 0===change&&(change=true),this._current=date,null==(_this__calendar=this._calendar)||_this__calendar.setCurrent(date,change),null==(_this__month=this._month)||_this__month.setCurrent(date,change),null==(_this__year=this._year)||_this__year.setCurrent(date,change);},_proto._switchMode=function(){this.$body.classList.add("edate-picker-"+this._currentMode),"date"===this._currentMode?this._initCalendar():"month"===this._currentMode?this._initMonth():"year"===this._currentMode&&this._initYear(),this.setPlacement(this.options.placement||"top");},_proto.hide=function(){this.open=false;},_proto._onOpenChange=function(open){Picker.prototype._onOpenChange.call(this,open),open&&(this._removeCurrentTypeClass(),this._currentMode=this.options.mode||"date",this._switchMode(),this._setCurrent(this.current,false)),open||null==this.options.onClose||this.options.onClose.call(this.options,this.current,this._currentMode);},_proto._initCalendar=function(){var _this=this;this._calendar||(this._calendar=new Calendar(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),onMonth:this._onMonth.bind(this),onYear:this._onYear.bind(this),onChange:function(date){var _this__calendar;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM-DD")===utilsTools.DateTime.format(date,"YYYY-MM-DD")||_this._onChange(date,null==(_this__calendar=_this._calendar)?void 0:_this__calendar.options.showHeaderOk);}})));},_proto._initMonth=function(){var _this=this;this._month||(this._month=new Month(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onChange:function(date){var _this__month;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM")===utilsTools.DateTime.format(date,"YYYY-MM")||_this._onChange(date,null==(_this__month=_this._month)?void 0:_this__month.options.showHeaderOk);},onYear:this._onYear.bind(this)})));},_proto._initYear=function(){var _this=this;this._year||(this._year=new Year(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onChange:function(date){var _this__year;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY")===utilsTools.DateTime.format(date,"YYYY")||_this._onChange(date,null==(_this__year=_this._year)?void 0:_this__year.options.showHeaderOk);}})));},_proto._onOk=function(date){this.current=date||this._current,this._setCurrent(date||this._current),null==this.options.onOk||this.options.onOk.call(this.options,this.current,this._currentMode),this.hide();},_proto._onClose=function(){this.hide();},_proto._onChange=function(date,_showHeaderOk){this._setCurrent(date,true);},_proto._onCell=function(date,_renderDate,disabled){null==this.options.onCell||this.options.onCell.call(this.options,date,this._currentMode),this.options.isMobile||this._currentMode!==this.options.mode||disabled||this._current&&utilsTools.DateTime.format(date,"YYYY-MM-DD")!==utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this.current=date,null==this.options.onChange||this.options.onChange.call(this.options,date,this._currentMode)),disabled||this._prvMode();},_proto._prvMode=function(){this._currentMode!==this.options.mode||this.options.isMobile||this.hide();var index=_DATEPICKER_MODE_ARRAY.indexOf(this._currentMode);index>=1&&(index--,this._removeCurrentTypeClass(),this._currentMode=_DATEPICKER_MODE_ARRAY[index],this._switchMode());},_proto._onYear=function(){this._removeCurrentTypeClass(),this._currentMode="year",this._switchMode();},_proto._onMonth=function(){this._removeCurrentTypeClass(),this._currentMode="month",this._switchMode();},_proto._removeCurrentTypeClass=function(){this.$body.classList.remove("edate-picker-"+this._currentMode);},_create_class(DatePicker,[{key:"_minModeIndex",get:function(){return _DATEPICKER_MODE_ARRAY.indexOf(this.options.mode)}}]),DatePicker}(Picker);dist$3.Calendar=Calendar,dist$3.DatePicker=DatePicker,dist$3.Header=Header,dist$3.Month=Month,dist$3.Year=Year;
10899
- return dist$3;
10900
- }
10901
-
10902
- var distExports$1 = requireDist$2();
10903
-
10904
- function _extends$5() {
10905
- _extends$5 = Object.assign || function(target) {
9058
+ function _extends$6() {
9059
+ _extends$6 = Object.assign || function(target) {
10906
9060
  for(var i = 1; i < arguments.length; i++){
10907
9061
  var source = arguments[i];
10908
9062
  for(var key in source){
@@ -10913,7 +9067,7 @@
10913
9067
  }
10914
9068
  return target;
10915
9069
  };
10916
- return _extends$5.apply(this, arguments);
9070
+ return _extends$6.apply(this, arguments);
10917
9071
  }
10918
9072
  function _inherits$6(subClass, superClass) {
10919
9073
  if (typeof superClass !== "function" && superClass !== null) {
@@ -10926,14 +9080,14 @@
10926
9080
  configurable: true
10927
9081
  }
10928
9082
  });
10929
- if (superClass) _set_prototype_of$6(subClass, superClass);
9083
+ if (superClass) _set_prototype_of$7(subClass, superClass);
10930
9084
  }
10931
- function _set_prototype_of$6(o, p) {
10932
- _set_prototype_of$6 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
9085
+ function _set_prototype_of$7(o, p) {
9086
+ _set_prototype_of$7 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
10933
9087
  o.__proto__ = p;
10934
9088
  return o;
10935
9089
  };
10936
- return _set_prototype_of$6(o, p);
9090
+ return _set_prototype_of$7(o, p);
10937
9091
  }
10938
9092
  /**
10939
9093
  * 日历选择器控件
@@ -10943,7 +9097,7 @@
10943
9097
  function DatePickerControl(options) {
10944
9098
  var _this;
10945
9099
  var _this_options_props_urlInfo_searchParams, _this_options_props_urlInfo, _this_options_props;
10946
- _this = Control.call(this, _extends$5({
9100
+ _this = Control.call(this, _extends$6({
10947
9101
  maxDate: new Date()
10948
9102
  }, options, {
10949
9103
  tagName: 'span',
@@ -10951,7 +9105,7 @@
10951
9105
  classNameSuffix: 'date'
10952
9106
  })) || this;
10953
9107
  _this.options = options;
10954
- _this._value = distExports$6.DateTime.format(((_this_options_props = _this.options.props) == null ? void 0 : (_this_options_props_urlInfo = _this_options_props.urlInfo) == null ? void 0 : (_this_options_props_urlInfo_searchParams = _this_options_props_urlInfo.searchParams) == null ? void 0 : _this_options_props_urlInfo_searchParams.begin) || new Date(), 'YYYY-MM-DD');
9108
+ _this._value = distExports$4.DateTime.format(((_this_options_props = _this.options.props) == null ? void 0 : (_this_options_props_urlInfo = _this_options_props.urlInfo) == null ? void 0 : (_this_options_props_urlInfo_searchParams = _this_options_props_urlInfo.searchParams) == null ? void 0 : _this_options_props_urlInfo_searchParams.begin) || new Date(), 'YYYY-MM-DD');
10955
9109
  _this._render();
10956
9110
  // 日期上的点
10957
9111
  _this.on(EVENTS.control.dateMonthChange, function(dates) {
@@ -10964,7 +9118,7 @@
10964
9118
  _proto._render = function _render() {
10965
9119
  var _this = this;
10966
9120
  var _this_options_props;
10967
- var isMobile1 = distExports$6.isMobile();
9121
+ var isMobile1 = distExports$4.isMobile();
10968
9122
  if (isMobile1) {
10969
9123
  var _this_locale;
10970
9124
  this.$container.innerHTML = '\n <span class="' + PREFIX_CLASS + '-mobile-date-filter" title="' + (((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_CALENDAR) || '') + '">\n <span class="' + PREFIX_CLASS + '-mobile-date-filter-value">' + this._getDateStr() + "</span>\n " + IconComponents.filter() + "\n <span>";
@@ -10974,7 +9128,7 @@
10974
9128
  title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_CALENDAR
10975
9129
  });
10976
9130
  }
10977
- this.datePicker = new distExports$1.DatePicker(this.$container, {
9131
+ this.datePicker = new DatePicker(this.$container, {
10978
9132
  isMobile: isMobile1,
10979
9133
  getPopupContainer: function() {
10980
9134
  return _this.$container;
@@ -10986,7 +9140,7 @@
10986
9140
  ],
10987
9141
  badges: ((_this_options_props = this.options.props) == null ? void 0 : _this_options_props.recMonth) || [],
10988
9142
  language: this.options.language === 'zh' ? 'zh' : 'en',
10989
- current: distExports$6.DateTime.toDate(this._value),
9143
+ current: distExports$4.DateTime.toDate(this._value),
10990
9144
  placement: 'tr',
10991
9145
  triggerClose: true,
10992
9146
  disabledDate: function(date) {
@@ -10994,8 +9148,8 @@
10994
9148
  },
10995
9149
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
10996
9150
  onOk: function(date, _mode) {
10997
- if (date && _this._value !== distExports$6.DateTime.format(date, 'YYYY-MM-DD') && isMobile1) {
10998
- _this._value = distExports$6.DateTime.format(date, 'YYYY-MM-DD');
9151
+ if (date && _this._value !== distExports$4.DateTime.format(date, 'YYYY-MM-DD') && isMobile1) {
9152
+ _this._value = distExports$4.DateTime.format(date, 'YYYY-MM-DD');
10999
9153
  _this.options.onOk == null ? void 0 : _this.options.onOk.call(_this.options, date);
11000
9154
  _this.emit(EVENTS.control.dateChange, date);
11001
9155
  if (date && _this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
@@ -11004,8 +9158,8 @@
11004
9158
  }
11005
9159
  },
11006
9160
  onChange: function(date, mode) {
11007
- if (date && _this._value !== distExports$6.DateTime.format(date, 'YYYY-MM-DD') && !isMobile1 && mode === 'date') {
11008
- _this._value = distExports$6.DateTime.format(date, 'YYYY-MM-DD');
9161
+ if (date && _this._value !== distExports$4.DateTime.format(date, 'YYYY-MM-DD') && !isMobile1 && mode === 'date') {
9162
+ _this._value = distExports$4.DateTime.format(date, 'YYYY-MM-DD');
11009
9163
  _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, date);
11010
9164
  _this.emit(EVENTS.control.dateChange, date);
11011
9165
  }
@@ -11024,8 +9178,8 @@
11024
9178
  if (change === void 0) change = true;
11025
9179
  var _this_datePicker;
11026
9180
  (_this_datePicker = this.datePicker) == null ? void 0 : _this_datePicker.setCurrent(date, change);
11027
- if (date && !change && this._value !== distExports$6.DateTime.format(date, 'YYYY-MM-DD')) {
11028
- this._value = distExports$6.DateTime.format(date, 'YYYY-MM-DD');
9181
+ if (date && !change && this._value !== distExports$4.DateTime.format(date, 'YYYY-MM-DD')) {
9182
+ this._value = distExports$4.DateTime.format(date, 'YYYY-MM-DD');
11029
9183
  if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
11030
9184
  this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value").innerHTML = this._getDateStr();
11031
9185
  }
@@ -11059,7 +9213,90 @@
11059
9213
  return DatePickerControl;
11060
9214
  }(Control);
11061
9215
 
11062
- var dist$1 = {};
9216
+ var dist$1 = {exports: {}};
9217
+
9218
+ var hasRequiredDist$1;
9219
+
9220
+ function requireDist$1 () {
9221
+ if (hasRequiredDist$1) return dist$1.exports;
9222
+ hasRequiredDist$1 = 1;
9223
+
9224
+ var deepmerge = requireCjs();
9225
+
9226
+ function _create_class(Constructor, protoProps, staticProps) {
9227
+ return protoProps && function(target, props) {
9228
+ for (var i = 0; i < props.length; i++) {
9229
+ var descriptor = props[i];
9230
+ descriptor.enumerable = descriptor.enumerable || false, descriptor.configurable = true,
9231
+ "value" in descriptor && (descriptor.writable = true), Object.defineProperty(target, descriptor.key, descriptor);
9232
+ }
9233
+ }(Constructor.prototype, protoProps), Constructor;
9234
+ }
9235
+
9236
+ var I18n = function() {
9237
+ function I18n(translations, options) {
9238
+ this._translations = {}, this._locale = null == options ? void 0 : options.defaultLocale,
9239
+ translations && (this._translations = translations, (null == options ? void 0 : options.defaultLocale) || (this._locale = Object.keys(translations)[0])),
9240
+ this.options = options || {};
9241
+ }
9242
+ var _proto = I18n.prototype;
9243
+ return _proto.t = function(scope, variables) {
9244
+ var value, translation = this._translations[this._locale];
9245
+ if (!translation) return "function" == typeof this.options.customizeMissing ? this.options.customizeMissing(scope, variables) : '[missing "' + this._locale + '" locale]';
9246
+ if ("string" == typeof scope && scope.includes(".") && !(scope in translation)) {
9247
+ var _this__findChainValue = this._findChainValue(translation, scope), v = _this__findChainValue[0];
9248
+ if (_this__findChainValue[1]) value = v; else {
9249
+ if (void 0 === (null == variables ? void 0 : variables.defaultvalue)) return "function" == typeof this.options.customizeMissing ? this.options.customizeMissing(scope, variables) : '[missing "' + this._locale + "." + scope + '" translation]';
9250
+ value = variables.defaultvalue;
9251
+ }
9252
+ } else if (scope in translation) value = translation[scope]; else {
9253
+ if (void 0 === (null == variables ? void 0 : variables.defaultvalue)) return "function" == typeof this.options.customizeMissing ? this.options.customizeMissing(scope, variables) : '[missing "' + this._locale + "." + scope + '" translation]';
9254
+ value = variables.defaultvalue;
9255
+ }
9256
+ return "string" == typeof value && variables && /\{\{\s*(\w+)\s*\}\}/.test(value) ? value.replace(/\{\{\s*(\w+)\s*\}\}/g, function(_, varName) {
9257
+ return String(variables[varName]) || "";
9258
+ }) : value;
9259
+ }, _proto.appendTranslations = function(translations) {
9260
+ this._translations = deepmerge(this._translations, translations, {
9261
+ clone: false
9262
+ }), this._locale || (this._locale = Object.keys(this._translations)[0]), this._onChange();
9263
+ }, _proto.switchLocale = function(locale) {
9264
+ locale in this._translations && (this._locale = locale, this._onChange());
9265
+ }, _proto.switchTranslation = function(locale) {
9266
+ this.switchLocale(locale);
9267
+ }, _proto.getCurrentLocale = function() {
9268
+ return this._locale;
9269
+ }, _proto.getCurrentTranslation = function() {
9270
+ return this._translations[this._locale];
9271
+ }, _proto.getVersion = function() {
9272
+ return "2.0.0";
9273
+ }, _proto._onChange = function() {
9274
+ return null == this.options.onChange ? void 0 : this.options.onChange.call(this.options, this);
9275
+ }, _proto._findChainValue = function(obj, path) {
9276
+ for (var paths = path.split("."), translation = obj, i = 0; i < paths.length; i++) {
9277
+ if (!(paths[i] in translation)) return [ void 0, false ];
9278
+ if (translation = translation[paths[i]], i + 1 === paths.length) return [ translation[paths[i]], true ];
9279
+ }
9280
+ return [ void 0, false ];
9281
+ }, _create_class(I18n, [ {
9282
+ key: "locale",
9283
+ get: function() {
9284
+ return this._locale;
9285
+ }
9286
+ }, {
9287
+ key: "translations",
9288
+ get: function() {
9289
+ return this._translations;
9290
+ }
9291
+ } ]), I18n;
9292
+ }();
9293
+
9294
+ I18n.VERSION = "2.0.0", dist$1.exports = I18n;
9295
+ return dist$1.exports;
9296
+ }
9297
+
9298
+ var distExports$1 = requireDist$1();
9299
+ var I18n = /*@__PURE__*/getDefaultExportFromCjs(distExports$1);
11063
9300
 
11064
9301
  /**
11065
9302
  * drag scroll support move and touch
@@ -11072,11 +9309,11 @@
11072
9309
  */
11073
9310
 
11074
9311
  var dist;
11075
- var hasRequiredDist$1;
9312
+ var hasRequiredDist;
11076
9313
 
11077
- function requireDist$1 () {
11078
- if (hasRequiredDist$1) return dist;
11079
- hasRequiredDist$1 = 1;
9314
+ function requireDist () {
9315
+ if (hasRequiredDist) return dist;
9316
+ hasRequiredDist = 1;
11080
9317
 
11081
9318
  /**
11082
9319
  * 拖拽滚动状态
@@ -11515,22 +9752,15 @@
11515
9752
  return dist;
11516
9753
  }
11517
9754
 
9755
+ var distExports = requireDist();
9756
+ var DragScroll = /*@__PURE__*/getDefaultExportFromCjs(distExports);
9757
+
11518
9758
  /*
11519
- * @ezuikit/control-time-line v1.0.7
11520
- * Copyright (c) 2026-01-05 Ezviz-OpenBiz
9759
+ * @ezuikit/control-time-line v2.0.0-beta.2
9760
+ * Copyright (c) 2026-05-03 Ezviz-OpenBiz
11521
9761
  * Released under the MIT License.
11522
9762
  */
11523
-
11524
- var hasRequiredDist;
11525
-
11526
- function requireDist () {
11527
- if (hasRequiredDist) return dist$1;
11528
- hasRequiredDist = 1;
11529
- var deepmerge=requireCjs(),I18n=requireDist$8(),Picker=requireDist$a(),utilsTools=requireDist$3(),DragScroll=requireDist$1(),delegate=requireDelegate(),_$TIMELINE_LOCALES$_={zh:{title:"包含{{len}}段录像",foldTitle:"{{len}}个录像"},en:{title:"Includes {{len}} {{unit}}",foldTitle:"{{len}} {{unit}}"}};function _create_class$2(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var _$BASE_TIME_LINE_DEFAULT_OPTIONS$_={current:new Date,language:"zh",timeSections:[],readOnly:false,className:"",timeWidth:0,width:"100%",timePointColor:"#1890ff",timeTextColor:"#FFF",timeScaleColor:"#FFF",timeSectionColor:"rgba(24, 144, 255, 0.5)",timeAxisBgColor:"#000",onChange:function(){},onDragStart:function(){},onDragging:function(){},onDragEnd:function(){},onDestroy:function(){}},BaseTimeLine=function(){function BaseTimeLine(container,options){if(this._current=new Date,this._readOnly=false,this._width=0,this._height=0,this._destroyed=false,this._timeWidth=0,this._timeSections=[],this.$container=container,!container)throw new Error("container is required");var left,right;this.options=deepmerge(_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}),this.options.timeSections&&Array.isArray(this.options.timeSections)&&(this._timeSections=this.options.timeSections),this.options.readOnly&&(this.readOnly=this.options.readOnly),this.options.className&&this.$container.classList.add(this.options.className),this.$container.style.position="relative",this.options.current&&(left=this.options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?this._current=this.options.current||new Date:this._current=new Date,this.i18n=new I18n(deepmerge(_$TIMELINE_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"}),this._timeWidth=this.options.timeWidth||0,this._resize(this.options.width||"100%",this.options.height);}var _proto=BaseTimeLine.prototype;return _proto.setReadOnly=function(readOnly){this.readOnly=readOnly;},_proto.update=function(current){this._current=current;},_proto.updateTimeSections=function(timeSections){timeSections&&Array.isArray(timeSections)&&(this._timeSections=timeSections);},_proto.resize=function(width,height){this._resize(width,height);},_proto._resize=function(width,height){var cssText="";/^\d+(\.\d+)?$/.test(width+"")?cssText+="width: "+width+"px;":width&&(cssText+="width: "+width+";"),/^\d+(\.\d+)?$/.test(height+"")?cssText+="height: "+height+"px;":height&&(cssText+="height: "+height+";"),this.$container&&(this.$container.style.cssText+=cssText),this._width=Math.floor(this.$container.clientWidth),this._height=Math.floor(this.$container.clientHeight);},_proto.setTimeWidth=function(timeWidth){[0,1,2,3,4,5].includes(timeWidth)&&(this._timeWidth=timeWidth);},_proto.destroy=function(){this._current=null,null==this.options.onDestroy||this.options.onDestroy.call(this.options),this._timeSections=[],this._readOnly=false,this._destroyed=true;},_create_class$2(BaseTimeLine,[{key:"current",get:function(){return this._current},set:function(current){this._current=current;}},{key:"readOnly",get:function(){return this._readOnly},set:function(readOnly){this._readOnly!==readOnly&&(this._readOnly=readOnly,this.$container.style.cursor=readOnly?"not-allowed":"pointer");}},{key:"timeSections",get:function(){return this._timeSections}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"timeWidth",get:function(){return this._timeWidth}}]),BaseTimeLine}();BaseTimeLine.LOCALES=_$TIMELINE_LOCALES$_;var TimeLineUtil=function(){function TimeLineUtil(){}return TimeLineUtil.timeToSecond=function(time){var e=time.split(":");return 60*Number(e[0])*60+60*Number(e[1])+(Number(e[2])||0)},TimeLineUtil.minuteToTime=function(minute){var hour=Math.floor(minute/60),m=minute%60;return (hour>9?hour:"0"+hour)+":"+(m>9?m:"0"+m)},TimeLineUtil.timeToMinute=function(time){var e=time.split(":");return 60*Number(e[0])+Number(e[1])},TimeLineUtil.tranTimeToString=function(start,end){var _DateTime_toDate,_DateTime_toDate1,secondNum=Math.floor((null==(_DateTime_toDate=utilsTools.DateTime.toDate(end))?void 0:_DateTime_toDate.getTime())-(null==(_DateTime_toDate1=utilsTools.DateTime.toDate(start))?void 0:_DateTime_toDate1.getTime()))/1e3,second=secondNum%60,minute=Math.floor(secondNum/60);return (minute>0?utilsTools.DateTime.fillZero(minute)+"'":"0'")+utilsTools.DateTime.fillZero(second)+"''"},TimeLineUtil}(),_$TIMELINE_ICONS$__tip='<svg viewBox="0 0 57 24" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="tip">\n <path class="ez-time-line-icon-tip" fill-rule="evenodd" d="m4,0l44,0c2.2091,0 4,1.7909 4,4l0,3.8218l4.9399,3.3572c0.5839,0.3968 0.5839,1.2574 0,1.6542l-4.9399,3.3572l0,3.8096c0,2.2091 -1.7909,4 -4,4l-44,0c-2.2091,0 -4,-1.7909 -4,-4l0,-16c0,-2.2091 1.7909,-4 4,-4z"/>\n </svg>',_$TIMELINE_ICONS$__plus='\n <svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="plus">\n <path d="M0 0L10.6667 0" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5" transform="matrix(0,1,-1,0,8,2.66663)"/>\n <path d="M2.66669 8L13.3334 8" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__minus='\n <svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="minus">\n <path d="M2.66669 8L13.3334 8" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__close='\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n ',_$TIMELINE_ICONS$__pause='<svg viewBox="0 0 20 20" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="pause">\n\t\t <path d="M9.43914 2.47881L13.4688 8.4912C14.3594 9.81998 13.4071 11.6047 11.8074 11.6047L3.74811 11.6047C2.14849 11.6047 1.19616 9.81998 2.08675 8.4912L6.11641 2.47881C6.90863 1.2968 8.64693 1.2968 9.43914 2.47881Z" fill-rule="evenodd" transform="matrix(0,1,-1,0,16.5781,2.22229)" />\n </svg>\n ',_$TIMELINE_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path xmlns="http://www.w3.org/2000/svg" id="形状结合" d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',TIME_WIDTH=[[1,10,10,"单位 1秒"],[60,20,5,"单位 1分钟"],[600,20,6,"单位 10分钟"],[3600,30,6,"单位 1小时"],[14400,40,2,"单位 4小时"],[43200,80,2,"单位 12小时"]],MOBILE_TIME_WIDTH=[[1,10,10,"单位 1分钟"],[10,20,5,"单位 10分钟"],[30,20,6,"单位 30分钟"],[60,30,6,"单位 1小时"],[120,40,2,"单位 2小时"],[240,80,2,"单位 4小时"]],__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__={targets:[],root:null,rootMargin:"0px",threshold:.1,loadingClass:"ez-lazy-image-loading",loadedClass:"ez-lazy-image-loaded",loadedErrorClass:"ez-lazy-image-error",onLoadError:function(){}},ImageLazyLoader=function(){function ImageLazyLoader(options){ void 0===options&&(options={}),this.options=Object.assign({},__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__,options),this._observer=null,this._init();}var _proto=ImageLazyLoader.prototype;return _proto._init=function(){var _this=this;ImageLazyLoader.isSupported&&(this._observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){var _this__observer;entry.isIntersecting&&(_this._loadImage(entry.target),null==(_this__observer=_this._observer)||_this__observer.unobserve(entry.target));});},this.options)),this.addImages(this.options.targets);},_proto._loadImage=function(img){var _img_classList,_img_classList1,_img_classList2,_this=this;if(img&&!(null==(_img_classList=img.classList)?void 0:_img_classList.contains(this.options.loadingClass))&&!(null==(_img_classList1=img.classList)?void 0:_img_classList1.contains(this.options.loadedClass))&&!(null==(_img_classList2=img.classList)?void 0:_img_classList2.contains(this.options.loadedErrorClass))&&img.hasAttribute("data-src")){var _this1=this;img.classList.add(this.options.loadingClass);var tempImg=new Image;tempImg.onload=function(){img.src=img.dataset.src,img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedClass),img.dispatchEvent(new Event("lazyloaded"));},tempImg.onerror=function(e){img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedErrorClass),null==_this1.options.onLoadError||_this1.options.onLoadError.call(_this1.options,img);},tempImg.src=img.dataset.src;}},_proto.addImages=function(targets){var _this=this;(null==targets?void 0:targets.length)&&targets.forEach(function(target){var _this__observer;(null==target?void 0:target.hasAttribute("data-src"))&&(ImageLazyLoader.isSupported&&_this._observer?null==(_this__observer=_this._observer)||_this__observer.observe(target):_this._loadImage(target));});},_proto.destroy=function(){this._observer&&(this._observer.disconnect(),this._observer=null);},ImageLazyLoader}();function _create_class$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1(){return _extends$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1.apply(this,arguments)}function _set_prototype_of$1(o,p){return _set_prototype_of$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1(o,p)}ImageLazyLoader.isSupported="IntersectionObserver"in window;var _$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_=Object.assign({},_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,{height:400,width:"100%",timeWidth:0,readOnly:false,timePointColor:"#648FFC",timeTextColor:"#666666",timeScaleColor:"transparent",timeSectionColor:"#369FFF",timeAxisBgColor:"#BDCDFF",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",showTimeWidthBtn:true,showCoverFold:true}),MobileTimeLine=function(BaseTimeLine){function MobileTimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}))||this)._isTouchStart=false,_this._dragScroll=null,_this._moveStartX=0,_this._moveStartY=0,_this._imageLazyLoader=null,_this._imageLazyLoaderPicker=null,_this.state={start:"00:00:00",end:"24:00:00",current:null,timeArr:[],availTimeLine:[],index:0},_this._onImageError=_this._onImageError.bind(_this),_this._plusClick=_this._plusClick.bind(_this),_this._minusClick=_this._minusClick.bind(_this),_this._onPickerClose=_this._onPickerClose.bind(_this),_this._onClickItem=_this._onClickItem.bind(_this),_this._onClickCoverFold=_this._onClickCoverFold.bind(_this),_this._imageLazyLoader=new ImageLazyLoader({root:_this.$container,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}}),_this._render(),_this.options.timeSections&&Array.isArray(_this.options.timeSections)&&_this.updateTimeSections(_this.options.timeSections),_this}!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(subClass,superClass);}(MobileTimeLine,BaseTimeLine);var _proto=MobileTimeLine.prototype;return _proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._dragScroll&&(this._dragScroll.readonly=readOnly);},_proto.setTimeWidth=function(timeWidth){MOBILE_TIME_WIDTH[timeWidth]&&(BaseTimeLine.prototype.setTimeWidth.call(this,timeWidth),this._matchTimeDot());},_proto.updateTimeSections=function(timeSections,defaultIndex){BaseTimeLine.prototype.updateTimeSections.call(this,timeSections);var list=timeSections.map(function(record){return _extends$1({},record,{startTime:utilsTools.DateTime.format(record.startTime,"HH:mm:ss"),endTime:utilsTools.DateTime.format(record.endTime,"HH:mm:ss")})});if(list.length>0){ void 0===defaultIndex&&(defaultIndex=list.length-1);var current=this.state.current;this._setState({availTimeLine:list,start:list[defaultIndex].startTime,end:list[defaultIndex].endTime,current:null===current?list[defaultIndex].startTime:current}),this._matchTimeDot();}else this._setState({availTimeLine:[],current:utilsTools.DateTime.format(this.current||(new Date).getTime(),"HH:mm:ss")}),this._matchTimeDot();},_proto.update=function(time){var _this__dragScroll;time&&!(null==(_this__dragScroll=this._dragScroll)?void 0:_this__dragScroll.isDragging)&&(this._setState({current:utilsTools.DateTime.format(time,"HH:mm:ss")}),this._currentOffsetH());},_proto.destroy=function(){var _this__dragScroll;if(this._scrollTimer&&(clearInterval(this._scrollTimer),this._scrollTimer=null),this._$currentTime)try{this.$container.removeChild(this._$currentTime),this._$currentTime=null;}catch(error){}if(this._$itemContainer&&this._$itemList)try{this._$itemContainer.removeChild(this._$itemList),this._$itemList=null;}catch(error){}if(this._$itemContainer)try{this.$container.removeChild(this._$itemContainer),this._$itemContainer=null;}catch(error){}if(this._$op)try{this.$container.removeChild(this._$op),this._$op=null;}catch(error){}this._picker&&(this._picker.destroy(),this._picker=null),this._imageLazyLoader&&(this._imageLazyLoader.destroy(),this._imageLazyLoader=null),this._imageLazyLoaderPicker&&(this._imageLazyLoaderPicker.destroy(),this._imageLazyLoaderPicker=null),this._removeEventListener(),null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.destroy(),this._dragScroll=null,BaseTimeLine.prototype.destroy.call(this);},_proto._setState=function(obj){var _this=this;Object.keys(obj).forEach(function(key){var _this__dragScroll,_this_timeSections_;"current"===key&&obj[key]?(_this._setCurrentDOM(obj[key]),_this.state.current===obj[key]||(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.isDragging)||(_this.state[key]=obj[key],_this.current=new Date(utilsTools.DateTime.format((null==(_this_timeSections_=_this.timeSections[0])?void 0:_this_timeSections_.endTime)||(new Date).getTime(),"YYYY-MM-DD")+"T"+obj[key]),null==_this.options.onChange||_this.options.onChange.call(_this.options,_this.current))):_this.state[key]=obj[key];});},_proto._setCurrentDOM=function(time){this._$currentTime&&(this._$currentTime.querySelector(".ez-time-line-current-value").innerHTML=time);},_proto._matchTimeDot=function(){for(var scaleWidth=this._scaleWidth,timeArr=[],minute=TimeLineUtil.timeToMinute("24:00:00"),i=minute=Math.floor(minute/scaleWidth)*scaleWidth;i>=0;){var marginTop=0,marginBottom=0;i==minute&&(marginTop=70),0==i&&(marginBottom=this.$container.clientHeight-70);var time=TimeLineUtil.minuteToTime(i);timeArr.push({id:i,current:time,label:"a"+i,marginTop:marginTop,marginBottom:marginBottom,recArr:[],coverArr:this._filterTimeSectionsByTime(time)}),i-=scaleWidth;}this._setState({timeArr:timeArr}),this._matchRecTimeDot();},_proto._matchRecTimeDot=function(){var _this_state=this.state,availTimeLine=_this_state.availTimeLine,timeArr=_this_state.timeArr,scaleWidth=this._scaleWidth,len=availTimeLine.length;if(0===len)for(var j=0;j<timeArr.length;j++)timeArr[j].recArr=[];else {for(var k=0;k<timeArr.length;k++)timeArr[k].recArr=[];for(var i=0;i<len;i++){var stAvailPercent,etAvailPercent,temp=availTimeLine[i],st=TimeLineUtil.timeToSecond(temp.startTime),et=TimeLineUtil.timeToSecond(temp.endTime),stMinute=Math.floor(st/(60*scaleWidth))*scaleWidth;stAvailPercent=(st-60*stMinute)/scaleWidth;var etMinute=Math.floor(et/(60*scaleWidth))*scaleWidth;etAvailPercent=(et-60*etMinute)/scaleWidth;for(var j1=0;j1<timeArr.length;j1++)if(timeArr[j1].id==stMinute&&timeArr[j1].id==etMinute){var height=etAvailPercent-stAvailPercent,top=60-etAvailPercent;timeArr[j1].recArr.push({height:height,top:top});}else timeArr[j1].id==stMinute?timeArr[j1].recArr.push({height:60-stAvailPercent,top:0}):timeArr[j1].id==etMinute?timeArr[j1].recArr.push({height:etAvailPercent,top:60-etAvailPercent}):timeArr[j1].id>stMinute&&timeArr[j1].id<etMinute&&timeArr[j1].recArr.push({height:60,top:0});}}this._setState({timeArr:timeArr}),this._renderDateLine();},_proto._renderDateLine=function(){var _this=this,timeArr=this.state.timeArr,container=this._$itemList;container.innerHTML="",timeArr.forEach(function(item,index){var _this__imageLazyLoader,timeItemDOM=document.createElement("div");timeItemDOM.setAttribute("class","ez-time-line-time-scale-area"),item.marginTop&&(timeItemDOM.style.cssText+="margin-top: "+item.marginTop+"px;"),item.marginBottom&&(timeItemDOM.style.cssText+="margin-bottom: "+item.marginBottom+"px;"),timeItemDOM.style.cssText+="border-right-color: "+(_this.options.timeAxisBgColor||"rgba(189, 205, 255, 1)")+";",timeItemDOM.setAttribute("data-time",item.current),timeItemDOM.setAttribute("data-index",index+""),document.createElement("div").setAttribute("class","ez-time-line-scale");var timeItemHtml="";item.coverArr.length&&_this.options.showCoverFold&&(timeItemHtml+='\n <div class="ez-time-line-time-cover-fold '+(item.coverArr.length>1?"ez-time-line-time-cover-fold-multiple":"")+'"\n data-start="'+item.current+'">\n '+(item.coverArr.length>1?'<div class="ez-time-line-cover-fold-placeholder" style="color: #FFF"></div>':"")+'\n <div class="ez-time-line-time-cover-fold-img">\n <img data-src="'+_this._setImageScr(item.coverArr[0].coverPic)+'" class="ez-time-line-img"/>\n <span class="ez-time-line-time-cover-fold-len">\n '+(item.coverArr.length>1?_this.i18n.t("foldTitle",{len:item.coverArr.length,unit:"videos"}):""+utilsTools.DateTime.format(item.coverArr[0].startTime,"HH:mm"))+"\n </span>\n "+(1===item.coverArr.length?'<span class="ez-time-line-time-cover-fold-time">'+TimeLineUtil.tranTimeToString(item.coverArr[0].startTime,item.coverArr[0].endTime)+"</span>":"")+'\n <span class="ez-time-line-time-cover-fold-pause">'+_$TIMELINE_ICONS$__pause+"</span>\n </div>\n </div>"),item.recArr.forEach(function(i){timeItemHtml+='<div class="ez-time-line-time-unavail"\n style="height: '+i.height+"px;background-color:"+(_this.options.timeSectionColor||"#369FFF")+"; top: "+i.top+'px">\n </div>';}),timeItemHtml+="<div id="+item.label+' class="ez-time-line-time-label" style="color: '+(_this.options.timeTextColor||"#666")+'">'+item.current+"</div>",timeItemDOM.innerHTML=timeItemHtml,container.appendChild(timeItemDOM),item.coverArr.length&&_this.options.showCoverFold&&(null==(_this__imageLazyLoader=_this._imageLazyLoader)||_this__imageLazyLoader.addImages(container.querySelectorAll("img.ez-time-line-img")||[]));}),this._currentOffsetH();},_proto._currentOffsetH=function(){var current=this.state.current;if(current){var _this__dragScroll,y=(86400-TimeLineUtil.timeToSecond(current)||0)/this._scaleWidth;null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y+60,false);}},_proto._render=function(){var _this=this;if(this._$currentTime=document.createElement("div"),this._$currentTime.classList.add("ez-time-line-current"),this._$currentTime.innerHTML='<div class="ez-time-line-current-content" style="color: '+(this.options.currentTimeBgColor||"#648FFC")+'">\n <span class="ez-time-line-current-tip">'+_$TIMELINE_ICONS$__tip+'</span>\n <span class="ez-time-line-current-tip-line" style="background-color: '+(this.options.timePointColor||"#648FFC")+';"></span>\n <div class="ez-time-line-current-value" style="color: '+(this.options.currentTimeColor||"#FFFFFF")+'">00:00:00</div>\n </div>',this.$container.appendChild(this._$currentTime),this._$itemContainer=document.createElement("div"),this._$itemContainer.classList.add("ez-time-line-container"),this.$container.appendChild(this._$itemContainer),this._dragScroll=new DragScroll(this._$itemContainer,{hideScrollbar:true,onChange:function(state){var result=_this._offsetYToTime(state.y);result[1]!==_this.state.current&&_this._setCurrentDOM(result[0]>=86400?"23:59:59":result[1]);},onDragStart:function(e){_this._moveStartX=e.clientX,_this._moveStartY=e.clientY,null==_this.options.onDragStart||_this.options.onDragStart.call(_this.options,_this.state.current);},onDragging:function(){null==_this.options.onDragging||_this.options.onDragging.call(_this.options,_this.state.current);},onDragEnd:function(){var _this__dragScroll,result=_this._offsetYToTime(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.currentY);result[1]!==_this.state.current&&_this._setState({current:result[0]>=86400?"23:59:59":result[1]}),null==_this.options.onDragEnd||_this.options.onDragEnd.call(_this.options,_this.state.current);}}),/\d/.test(this.options.height))this._$itemContainer.style.cssText+="height: "+this.options.height+"px";else if("string"==typeof this.options.height)this._$itemContainer.style.cssText+="height: "+this.options.height;else {var height=this.$container.clientHeight;this._$itemContainer.style.cssText+="height: "+height+"px";}this._$itemList=document.createElement("div"),this._$itemList.classList.add("ez-time-line-item"),this._dragScroll.$content.appendChild(this._$itemList),this.options.showTimeWidthBtn&&(this._$op=document.createElement("div"),this._$op.classList.add("ez-time-line-op"),this._$op.innerHTML='<span class="ez-time-line-op-wrapper"><span class="ez-time-line-icon-plus">'+_$TIMELINE_ICONS$__plus+'</span> <span class="ez-time-line-icon-minus">'+_$TIMELINE_ICONS$__minus+"</span></span>",this.$container.appendChild(this._$op)),this.options.showCoverFold&&(this._picker=new Picker(null,{isMobile:true,wrapClassName:"ez-time-line-picker",onOpenChange:function(isOpen){var _this_options_onPickerOpenChange,_this_options;null==(_this_options=_this.options)||null==(_this_options_onPickerOpenChange=_this_options.onPickerOpenChange)||_this_options_onPickerOpenChange.call(_this_options,isOpen);}}),this._imageLazyLoaderPicker=new ImageLazyLoader({root:this._picker.$body,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}})),this._addEventListener();},_proto._addEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.addEventListener("click",this._plusClick,false),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.addEventListener("click",this._minusClick,false));this._matchTimeDot(),this._picker&&(this._delegatePickerClose=delegate(this._picker.$body,".ez-time-line-picker-close","click",this._onPickerClose,false),this._delegateItemContent=delegate(this._picker.$body,".ez-time-line-picker-item-content","click",this._onClickItem,false),this._delegateCoverFold=delegate(this._$itemList,".ez-time-line-time-cover-fold","click",this._onClickCoverFold,false));},_proto._removeEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1,_this__picker_$body_querySelector,_this__picker_$body;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.removeEventListener("click",this._plusClick),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.removeEventListener("click",this._minusClick));this._picker&&(null==(_this__picker_$body=this._picker.$body)||null==(_this__picker_$body_querySelector=_this__picker_$body.querySelector(".ez-time-line-picker-close"))||_this__picker_$body_querySelector.removeEventListener("click",this._onPickerClose),this._delegateItemContent&&(this._delegateItemContent.forEach(function(delegation){delegation.destroy();}),this._delegateItemContent=null),this._delegatePickerClose&&(this._delegatePickerClose.forEach(function(delegation){delegation.destroy();}),this._delegatePickerClose=null),this._delegateCoverFold&&(this._delegateCoverFold.forEach(function(delegation){delegation.destroy();}),this._delegateCoverFold=null));},_proto._plusClick=function(){var timeWidth=this.timeWidth+1;timeWidth>0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(timeWidth);},_proto._minusClick=function(){var timeWidth=this.timeWidth-1;timeWidth>=0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(Math.floor(timeWidth));},_proto._timeSectionsToGroupsByHour=function(list){var obj={};return list.forEach(function(item,index){var hour=utilsTools.DateTime.format(item.startTime,"HH");obj[+hour]?obj[+hour].push(_extends$1({},item,{_index:index})):obj[+hour]=[_extends$1({},item,{_index:index})];}),obj},_proto._filterTimeSectionsByTime=function(start){if(!start)return [];var startSecond=TimeLineUtil.timeToSecond(start+":00"),endSecond=TimeLineUtil.timeToSecond(start+":00")+60*this._scaleWidth;return this.timeSections.filter(function(item){var _$start=TimeLineUtil.timeToSecond(utilsTools.DateTime.format(item.startTime,"HH:mm:ss"));return _$start>=startSecond&&_$start<endSecond})},_proto._renderPickerContent=function(start){var _this__picker_innerHTML,_this__picker,_this__picker1,_this__picker2,_this__imageLazyLoaderPicker,_this=this,list=this._filterTimeSectionsByTime(start),hourGroups=this._timeSectionsToGroupsByHour(list);(null==(_this__picker=this._picker)||null==(_this__picker_innerHTML=_this__picker.innerHTML)||_this__picker_innerHTML.call(_this__picker,'<div class="ez-time-line-picker-container">\n <div class="ez-time-line-picker-header">\n <span class="ez-time-line-picker-close">'+_$TIMELINE_ICONS$__close+"</span>\n "+this.i18n.t("title",{len:list.length,unit:list.length>1?"videos":"video"})+'\n </div>\n <div class="ez-time-line-picker-content">\n <div class="ez-time-line-picker-list">\n '+Object.keys(hourGroups).reverse().map(function(key){return '<div class="ez-time-line-picker-item">\n <div class="ez-time-line-picker-item-title">'+key+':00</div>\n <div class="ez-time-line-picker-item-list">\n '+hourGroups[key].reverse().map(function(item){return '<div class="ez-time-line-picker-item-content"\n data-start="'+utilsTools.DateTime.format(item.startTime,"YYYYMMDDTHHmmssZ")+'"\n data-end="'+utilsTools.DateTime.format(item.endTime,"YYYYMMDDTHHmmssZ")+'"\n data-index="'+item._index+'">\n <span class="ez-time-line-picker-item-time">'+utilsTools.DateTime.format(item.startTime,"HH:mm")+'</span>\n <span class="ez-time-line-picker-item-duration">\n '+TimeLineUtil.tranTimeToString(item.startTime,item.endTime)+'\n </span>\n <img class="ez-time-line-picker-item-cover" data-src="'+_this._setImageScr(item.coverPic)+'"/>\n </div>'}).join("")+"\n </div>\n </div>"}).join("")+"\n </div>\n </div>\n </div>\n </div>"),null==(_this__picker1=this._picker)?void 0:_this__picker1.$body)&&(null==(_this__imageLazyLoaderPicker=this._imageLazyLoaderPicker)||_this__imageLazyLoaderPicker.addImages((null==(_this__picker2=this._picker)?void 0:_this__picker2.$body.querySelectorAll("img"))||[]));},_proto._onImageError=function(img){if(!img.hasAttribute("data-error")){var _img_parentNode,placeholder=document.createElement("div");placeholder.classList.add("ez-time-line-item-cover-placeholder"),placeholder.innerHTML=""+_$TIMELINE_ICONS$__picture,null==(_img_parentNode=img.parentNode)||_img_parentNode.appendChild(placeholder),img.setAttribute("data-error","true"),img.remove();}},_proto._onPickerClose=function(){this._picker&&(this._picker.open=false);},_proto._onClickItem=function(e){var _e_delegateTarget_getAttribute,_e_delegateTarget,index=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_getAttribute=_e_delegateTarget.getAttribute)?void 0:_e_delegateTarget_getAttribute.call(_e_delegateTarget,"data-index");this._picker&&(this._picker.open=false),null==this.options.onPickerSelect||this.options.onPickerSelect.call(this.options,this.timeSections[+index]);},_proto._onClickCoverFold=function(e){var _e_delegateTarget_parentElement_getAttribute,_e_delegateTarget_parentElement,_e_delegateTarget;e.preventDefault();var time=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_parentElement=_e_delegateTarget.parentElement)||null==(_e_delegateTarget_parentElement_getAttribute=_e_delegateTarget_parentElement.getAttribute)?void 0:_e_delegateTarget_parentElement_getAttribute.call(_e_delegateTarget_parentElement,"data-time"),moveX=Math.abs(this._moveStartX-e.clientX),moveY=Math.abs(this._moveStartY-e.clientY);this._picker&&time&&!(moveX>=1||moveY>=1)&&(this._renderPickerContent(time),this._picker.open=true);},_proto._setImageScr=function(src){if(src){var query="x=200&"+(this.options.coverQuery||"");return src+(src.includes("?")?"&":"?")+query}return ""},_proto._offsetYToTime=function(offsetY){var _this__dragScroll,y=offsetY;offsetY<60&&(y=60,null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y));var second=86400-Math.floor((y-60)*this._scaleWidth);return [second,utilsTools.DateTime.fillZero(Math.floor(second/3600))+":"+utilsTools.DateTime.fillZero(Math.floor(second%3600/60))+":"+utilsTools.DateTime.fillZero(second%60)]},_create_class$1(MobileTimeLine,[{key:"_scaleWidth",get:function(){return (MOBILE_TIME_WIDTH[this.timeWidth]||MOBILE_TIME_WIDTH[0])[0]}}]),MobileTimeLine}(BaseTimeLine);function isOverlap(a_start,a_end,b_start,b_end){return Math.max(a_start,b_start)<=Math.min(a_end,b_end)}function _create_class(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends.apply(this,arguments)}function _set_prototype_of(o,p){return _set_prototype_of=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of(o,p)}var _$TIMELINE_DEFAULT_OPTIONS$_={height:36,dpr:window.devicePixelRatio||2,scaleOffsetTop:4,showYearMonthDay:true},TimeLine=function(BaseTimeLine){function TimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$TIMELINE_DEFAULT_OPTIONS$_,options,{clone:true}))||this)._$canvas=null,_this._ctx=null,_this._timeWidthArray=TIME_WIDTH[0],_this._centerPositionX=0,_this._isMouseDown=false,_this._mousePosition=0,_this._oldTime=null,_this._isOver=false,_this._moved=false,_this._isCtrlKeyDown=false,_this._lastTouchDist=0,_this.$container=container,_this._mousemoveFun=_this._mousemoveFun.bind(_this),_this._mouseoverFun=_this._mouseoverFun.bind(_this),_this._mouseleaveFun=_this._mouseleaveFun.bind(_this),_this._mousedownFun=_this._mousedownFun.bind(_this),_this._mouseUpFun=_this._mouseUpFun.bind(_this),_this._mousewheelFun=_this._mousewheelFun.bind(_this),_this._touchstartFun=_this._touchstartFun.bind(_this),_this._touchmoveFun=_this._touchmoveFun.bind(_this),_this._touchendFun=_this._touchendFun.bind(_this),_this._ctrlKeyDownFun=_this._ctrlKeyDownFun.bind(_this),_this._ctrlKeyUpFun=_this._ctrlKeyUpFun.bind(_this),_this._init(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of(subClass,superClass);}(TimeLine,BaseTimeLine);var _proto=TimeLine.prototype;return _proto._init=function(){this._$canvas=document.createElement("canvas"),this._ctx=this._$canvas.getContext("2d"),this.readOnly||(this._$canvas.style.cssText+="cursor: pointer;"),this.$container.appendChild(this._$canvas),this.resize(this.width,this.height),this._update({current:this.current,timeWidth:this.timeWidth,timeSections:this.timeSections}),this._addEventListener();},_proto.resize=function(width,height){BaseTimeLine.prototype.resize.call(this,width,height),this._$canvas&&width&&(this._$canvas.width=this.width*this.options.dpr,this._$canvas.style.cssText+="width: "+this.width+"px;"),this._$canvas&&height&&(this._$canvas.height=this.height*this.options.dpr,this._$canvas.style.cssText+="height: "+this.height+"px;"),this._draw();},_proto.setTimeWidth=function(timeWidth){this._update({timeWidth:timeWidth});},_proto.updateTimeSections=function(timeSections){this._update({timeSections:timeSections});},_proto.update=function(time){time&&!this._isMouseDown&&this._update({current:utilsTools.DateTime.toDate(time)});},_proto._update=function(options){var left,right,_this__$canvas;(void 0===options&&(options={}),(null==options?void 0:options.current)&&(left=options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)&&(this.current=options.current),(null==options?void 0:options.timeSections)&&BaseTimeLine.prototype.updateTimeSections.call(this,this._mergeTimeSections(options.timeSections)),"number"==typeof(null==options?void 0:options.timeWidth)&&(null==options?void 0:options.timeWidth)<TIME_WIDTH.length&&(BaseTimeLine.prototype.setTimeWidth.call(this,options.timeWidth),this._timeWidthArray=TIME_WIDTH[Math.floor(this.timeWidth)]),"number"==typeof(null==options?void 0:options.timeWidth)&&this._timeWidthArray)&&(this._timeWidthArray[3]&&(null==(_this__$canvas=this._$canvas)||_this__$canvas.setAttribute("data-title",this._timeWidthArray[3])));this._draw();},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._$canvas&&(this._$canvas.style.cssText+="cursor: "+(readOnly?"not-allowed":"pointer"));},_proto.destroy=function(){if(this._removeEventListener(),this._$canvas)try{this.$container.removeChild(this._$canvas),this._$canvas=null;}catch(e){}BaseTimeLine.prototype.destroy.call(this);},_proto._draw=function(){this._ctx&&(this._ctx.fillStyle=this.options.timeAxisBgColor,this._ctx.fillRect(0,0,this.width*this.options.dpr,this.height*this.options.dpr)),this._drawSections(),this._drawScale();},_proto._drawScale=function(){var lineWidth=1*this.options.dpr;this._centerPositionX=parseInt(this.width*this.options.dpr/2+"");for(var centerPosition={x:this.width*this.options.dpr/2,y:this.height*this.options.dpr},curScaleTime=Math.floor(this.current.getTime()/1e3),offsetSecond=(curScaleTime-Math.floor(utilsTools.DateTime.toDate(utilsTools.DateTime.format(new Date(1e3*curScaleTime),"YYYY-MM-DD")).getTime()/1e3))%this._timeWidthArray[0],padding=this.height*this.options.dpr/20,spacing=this._curScaleSpacing*this.options.dpr,rightLastScaleTimeX=Math.floor(this._centerPositionX+(this._timeWidthArray[0]-offsetSecond)/this._timeWidthArray[0]*spacing),leftLastScaleTime=curScaleTime-offsetSecond,rightLastScaleTime=leftLastScaleTime+this._timeWidthArray[0],x=rightLastScaleTimeX-spacing;x>0;x-=spacing){0===(leftLastScaleTime-Math.floor(utilsTools.DateTime.toDate(utilsTools.DateTime.format(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD")).getTime()/1e3))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x,padding,x,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(utilsTools.DateTime.format(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x,padding,x,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),leftLastScaleTime-=this._timeWidthArray[0];}for(var x1=rightLastScaleTimeX;x1<=this.width*this.options.dpr;x1+=spacing){0===(rightLastScaleTime-Math.floor(utilsTools.DateTime.toDate(utilsTools.DateTime.format(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD")).getTime()/1e3))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x1,padding,x1,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(utilsTools.DateTime.format(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x1,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x1,padding,x1,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),rightLastScaleTime+=this._timeWidthArray[0];}this._drawSolidLine(centerPosition.x,0,centerPosition.x,centerPosition.y,lineWidth,this.options.timePointColor);},_proto._drawSolidLine=function(startX,startY,endX,endY,lineWidth,color){this._ctx&&(this._ctx.save(),this._ctx.strokeStyle=null!=color?color:this.options.timeScaleColor,this._ctx.lineWidth=lineWidth,this._ctx.beginPath(),this._ctx.moveTo(startX,startY),this._ctx.lineTo(endX,endY),this._ctx.stroke(),this._ctx.restore());},_proto._drawTextString=function(text,x,y,align){if(this._ctx){var timeTexts=text.split(" ");this._ctx.font=12*this.options.dpr*1+"px serif",this._ctx.fillStyle=this.options.timeTextColor,this._ctx.textAlign=align||"left",this._timeWidthArray[0]%60==0&&(timeTexts[1]=timeTexts[1].replace(/:00$/,"")),this._ctx.fillText(timeTexts[1],x,y+8*this.options.dpr),!this.options.showYearMonthDay||"00:00:00"!==timeTexts[1]&&"00:00"!==timeTexts[1]&&this._timeWidthArray[0]*this._timeWidthArray[2]!==86400||(this._ctx.textAlign=align||"left",this._ctx.fillText(timeTexts[0],x,y+18*this.options.dpr));}},_proto._drawSections=function(){for(var timeArr=this.timeSections||[],i=0;i<timeArr.length;i++){var position=this._findPosition(timeArr[i]);this._ctx&&isOverlap(0,this.width*this.options.dpr,position.x1,position.x2)&&(this._ctx.fillStyle=this.options.timeSectionColor,this._ctx.fillRect(position.x1,0,position.x2-position.x1,this.height*this.options.dpr));}},_proto._findPosition=function(item){var x1=(parseInt((item.startTime-this.current.getTime())/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing+this.width/2)*this.options.dpr;return {x1:x1,x2:x1+parseInt((item.endTime-item.startTime)/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing*this.options.dpr}},_proto._mergeTimeSections=function(timeSections){if(0===timeSections.length)return timeSections;for(var merged=[(timeSections=timeSections.map(function(item){return 10===(item.startTime+"").length&&(item.startTime=1e3*item.startTime),10===(item.endTime+"").length&&(item.endTime=1e3*item.endTime),_extends({},item,{startTime:item.startTime,endTime:item.endTime})}))[0]],i=1;i<timeSections.length;i++){var prev=merged[merged.length-1],curr=timeSections[i];prev.endTime>=curr.startTime?prev.endTime=Math.max(prev.endTime,curr.endTime):merged.push(curr);}return merged},_proto._addEventListener=function(){this._$canvas&&(this._$canvas.addEventListener("mousemove",this._mousemoveFun),this._$canvas.addEventListener("mouseover",this._mouseoverFun),this._$canvas.addEventListener("mouseleave",this._mouseleaveFun),this._$canvas.addEventListener("mousedown",this._mousedownFun),this._$canvas.addEventListener("mouseup",this._mouseUpFun),this._$canvas.addEventListener("wheel",this._mousewheelFun),this.$container.addEventListener("wheel",function(e){e.preventDefault();},{passive:false}),this._$canvas.addEventListener("keydown",this._ctrlKeyDownFun),this._$canvas.addEventListener("keyup",this._ctrlKeyUpFun),document.addEventListener("keydown",this._ctrlKeyDownFun,false),document.addEventListener("keyup",this._ctrlKeyUpFun,false),this._$canvas.addEventListener("touchstart",this._touchstartFun,{passive:false}),this._$canvas.addEventListener("touchmove",this._touchmoveFun,{passive:false}),this._$canvas.addEventListener("touchend",this._touchendFun,{passive:false}));},_proto._removeEventListener=function(){this._$canvas&&(this._$canvas.removeEventListener("mousemove",this._mousemoveFun),this._$canvas.removeEventListener("mouseover",this._mouseoverFun),this._$canvas.removeEventListener("mouseleave",this._mouseleaveFun),this._$canvas.removeEventListener("mousedown",this._mousedownFun),this._$canvas.removeEventListener("mouseup",this._mouseUpFun),this._$canvas.removeEventListener("wheel",this._mousewheelFun),this._$canvas.removeEventListener("keydown",this._ctrlKeyDownFun),this._$canvas.removeEventListener("keyup",this._ctrlKeyUpFun),document.removeEventListener("keydown",this._ctrlKeyDownFun),document.removeEventListener("keyup",this._ctrlKeyUpFun),this._$canvas.removeEventListener("touchstart",this._touchstartFun),this._$canvas.removeEventListener("touchmove",this._touchmoveFun),this._$canvas.removeEventListener("touchend",this._touchendFun));},_proto._mousedownFun=function(e){this.readOnly||(this._isMouseDown=true,this._mousePosition=e.pageX,this._oldTime=this.current,null==this.options.onDragStart||this.options.onDragStart.call(this.options,this.current));},_proto._mouseoverFun=function(){this.readOnly||(this._isOver=true);},_proto._mouseleaveFun=function(e){this.readOnly||(this._isOver=false,this._moveEndOrTouchEndFun(e));},_proto._mouseUpFun=function(e){this._moveEndOrTouchEndFun(e);},_proto._mousemoveFun=function(e){if(!this.readOnly)if(this._isMouseDown&&this._isOver)this._moveUpdateFun(e.pageX);else {var left=parseInt(this.$container.offsetLeft+"",10);this._mousePosition=e.pageX-left,this._update();}},_proto._mousewheelFun=function(e){e.preventDefault(),this.readOnly;},_proto._ctrlKeyDownFun=function(e){(e.ctrlKey||"Control"===e.key)&&(this._isCtrlKeyDown=true);},_proto._ctrlKeyUpFun=function(e){(e.ctrlKey||"Control"===e.key)&&(this._isCtrlKeyDown=false);},_proto._getTouchDistance=function(touches){var touch1=touches[0],touch2=touches[1],dx=touch2.clientX-touch1.clientX,dy=touch2.clientY-touch1.clientY;return Math.sqrt(dx*dx+dy*dy)},_proto._touchstartFun=function(e){if(!this.readOnly)if(this._oldTime=this.current,this._isOver=true,1===e.touches.length){var touch=e.touches[0];this._isMouseDown=true,this._mousePosition=touch.clientX;}else 2===e.touches.length&&(this._lastTouchDist=this._getTouchDistance(e.touches));},_proto._touchmoveFun=function(e){if(e.preventDefault(),e.stopPropagation(),!this.readOnly)if(1===e.touches.length){var touch=e.touches[0];this._moveUpdateFun(touch.clientX);}else if(2===e.touches.length){this._getTouchDistance(e.touches);this._lastTouchDist;}},_proto._touchendFun=function(e){this.readOnly||this._moveEndOrTouchEndFun(e);},_proto._moveEndOrTouchEndFun=function(e){e.preventDefault(),this.readOnly||this._isMouseDown&&(this._isMouseDown=false,this._moved&&(this._moved=false,this._update({current:this.current}),this._oldTime=this.current,null==this.options.onDragEnd||this.options.onDragEnd.call(this.options,this.current,this._isOver)),this._isOver&&Math.abs(this._mousePosition-(e.pageX||0))>5&&(null==this.options.onChange||this.options.onChange.call(this.options,this.current)),this._mousePosition=0,this._lastTouchDist=0);},_proto._moveUpdateFun=function(x){var mouseOffset=this._mousePosition-x;if(0!==mouseOffset){if(this._oldTime){var currentTime=this._oldTime.getTime()+1e3*parseInt(mouseOffset/this._curScaleSpacing*this._timeWidthArray[0]+"",10);this._update({current:new Date(currentTime)}),null==this.options.onDragging||this.options.onDragging.call(this.options,new Date(currentTime));}this._moved=true;}},_create_class(TimeLine,[{key:"_curScaleSpacing",get:function(){var _this__timeWidthArray,_this__timeWidthArray1;return Math.floor((null==(_this__timeWidthArray=this._timeWidthArray)?void 0:_this__timeWidthArray[1])-(null==(_this__timeWidthArray1=this._timeWidthArray)?void 0:_this__timeWidthArray1[1])*+(this.timeWidth%1/2).toFixed(2))}}]),TimeLine}(BaseTimeLine);TimeLine.TIME_WIDTH=TIME_WIDTH,dist$1.BaseTimeLine=BaseTimeLine,dist$1.MobileTimeLine=MobileTimeLine,dist$1.TimeLine=TimeLine;
11530
- return dist$1;
11531
- }
11532
-
11533
- var distExports = requireDist();
9763
+ var _$TIMELINE_LOCALES$_={zh:{title:"包含{{len}}段录像",foldTitle:"{{len}}个录像"},en:{title:"Includes {{len}} {{unit}}",foldTitle:"{{len}} {{unit}}"}};function _create_class$2(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var _$BASE_TIME_LINE_DEFAULT_OPTIONS$_={current:new Date,language:"zh",timeSections:[],readOnly:false,className:"",timeWidth:0,width:"100%",timePointColor:"#1890ff",timeTextColor:"#FFF",timeScaleColor:"#FFF",timeSectionColor:"rgba(24, 144, 255, 0.5)",timeAxisBgColor:"#000",onChange:function(){},onDragStart:function(){},onDragging:function(){},onDragEnd:function(){},onDestroy:function(){}},BaseTimeLine=function(){function BaseTimeLine(container,options){if(this._current=new Date,this._readOnly=false,this._width=0,this._height=0,this._destroyed=false,this._timeWidth=0,this._timeSections=[],this.$container=container,!container)throw new Error("container is required");var left,right;this.options=deepmerge(_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}),this.options.timeSections&&Array.isArray(this.options.timeSections)&&(this._timeSections=this.options.timeSections),this.options.readOnly&&(this.readOnly=this.options.readOnly),this.options.className&&this.$container.classList.add(this.options.className),this.$container.style.position="relative",this.options.current&&(left=this.options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?this._current=this.options.current||new Date:this._current=new Date,this.i18n=new I18n(deepmerge(_$TIMELINE_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"}),this._timeWidth=this.options.timeWidth||0,this._resize(this.options.width||"100%",this.options.height);}var _proto=BaseTimeLine.prototype;return _proto.setReadOnly=function(readOnly){this.readOnly=readOnly;},_proto.update=function(current){this._current=current;},_proto.updateTimeSections=function(timeSections){timeSections&&Array.isArray(timeSections)&&(this._timeSections=timeSections);},_proto.resize=function(width,height){this._resize(width,height);},_proto._resize=function(width,height){var cssText="";/^\d+(\.\d+)?$/.test(width+"")?cssText+="width: "+width+"px;":width&&(cssText+="width: "+width+";"),/^\d+(\.\d+)?$/.test(height+"")?cssText+="height: "+height+"px;":height&&(cssText+="height: "+height+";"),this.$container&&(this.$container.style.cssText+=cssText),this._width=Math.floor(this.$container.clientWidth),this._height=Math.floor(this.$container.clientHeight);},_proto.setTimeWidth=function(timeWidth){[0,1,2,3,4,5].includes(timeWidth)&&(this._timeWidth=timeWidth);},_proto.destroy=function(){this._current=null,null==this.options.onDestroy||this.options.onDestroy.call(this.options),this._timeSections=[],this._readOnly=false,this._destroyed=true;},_create_class$2(BaseTimeLine,[{key:"current",get:function(){return this._current},set:function(current){this._current=current;}},{key:"readOnly",get:function(){return this._readOnly},set:function(readOnly){this._readOnly!==readOnly&&(this._readOnly=readOnly,this.$container.style.cursor=readOnly?"not-allowed":"pointer");}},{key:"timeSections",get:function(){return this._timeSections}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"timeWidth",get:function(){return this._timeWidth}}]),BaseTimeLine}();BaseTimeLine.LOCALES=_$TIMELINE_LOCALES$_;var TimeLineUtil=function(){function TimeLineUtil(){}return TimeLineUtil.timeToSecond=function(time){var e=time.split(":");return 60*Number(e[0])*60+60*Number(e[1])+(Number(e[2])||0)},TimeLineUtil.minuteToTime=function(minute){var hour=Math.floor(minute/60),m=minute%60;return (hour>9?hour:"0"+hour)+":"+(m>9?m:"0"+m)},TimeLineUtil.timeToMinute=function(time){var e=time.split(":");return 60*Number(e[0])+Number(e[1])},TimeLineUtil.tranTimeToString=function(start,end){var _DateTime_toDate,_DateTime_toDate1,secondNum=Math.floor((null==(_DateTime_toDate=distExports$4.DateTime.toDate(end))?void 0:_DateTime_toDate.getTime())-(null==(_DateTime_toDate1=distExports$4.DateTime.toDate(start))?void 0:_DateTime_toDate1.getTime()))/1e3,second=secondNum%60,minute=Math.floor(secondNum/60);return (minute>0?distExports$4.DateTime.fillZero(minute)+"'":"0'")+distExports$4.DateTime.fillZero(second)+"''"},TimeLineUtil}(),_$TIMELINE_ICONS$__tip='<svg viewBox="0 0 57 24" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="tip">\n <path class="ez-time-line-icon-tip" fill-rule="evenodd" d="m4,0l44,0c2.2091,0 4,1.7909 4,4l0,3.8218l4.9399,3.3572c0.5839,0.3968 0.5839,1.2574 0,1.6542l-4.9399,3.3572l0,3.8096c0,2.2091 -1.7909,4 -4,4l-44,0c-2.2091,0 -4,-1.7909 -4,-4l0,-16c0,-2.2091 1.7909,-4 4,-4z"/>\n </svg>',_$TIMELINE_ICONS$__plus='\n <svg viewBox="0 0 16 16" stroke="currentColor" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="plus">\n <path d="M0 0L10.6667 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0,1,-1,0,8,2.66663)"/>\n <path d="M2.66669 8L13.3334 8" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__minus='\n <svg viewBox="0 0 16 16" stroke="currentColor" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="minus">\n <path d="M2.66669 8L13.3334 8" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__close='\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n ',_$TIMELINE_ICONS$__pause='<svg viewBox="0 0 20 20" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="pause">\n\t\t <path d="M9.43914 2.47881L13.4688 8.4912C14.3594 9.81998 13.4071 11.6047 11.8074 11.6047L3.74811 11.6047C2.14849 11.6047 1.19616 9.81998 2.08675 8.4912L6.11641 2.47881C6.90863 1.2968 8.64693 1.2968 9.43914 2.47881Z" fill-rule="evenodd" transform="matrix(0,1,-1,0,16.5781,2.22229)" />\n </svg>\n ',_$TIMELINE_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',TIME_WIDTH=[[1,10,10,"单位 1秒"],[60,20,5,"单位 1分钟"],[600,20,6,"单位 10分钟"],[3600,30,6,"单位 1小时"],[14400,40,2,"单位 4小时"],[43200,80,2,"单位 12小时"]],MOBILE_TIME_WIDTH=[[1,10,10,"单位 1分钟"],[10,20,5,"单位 10分钟"],[30,20,6,"单位 30分钟"],[60,30,6,"单位 1小时"],[120,40,2,"单位 2小时"],[240,80,2,"单位 4小时"]],__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__={targets:[],root:null,rootMargin:"0px",threshold:.1,loadingClass:"ez-lazy-image-loading",loadedClass:"ez-lazy-image-loaded",loadedErrorClass:"ez-lazy-image-error",onLoadError:function(){}},ImageLazyLoader=function(){function ImageLazyLoader(options){ void 0===options&&(options={}),this.options=Object.assign({},__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__,options),this._observer=null,this._init();}var _proto=ImageLazyLoader.prototype;return _proto._init=function(){var _this=this;ImageLazyLoader.isSupported&&(this._observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){var _this__observer;entry.isIntersecting&&(_this._loadImage(entry.target),null==(_this__observer=_this._observer)||_this__observer.unobserve(entry.target));});},this.options)),this.addImages(this.options.targets);},_proto._loadImage=function(img){var _img_classList,_img_classList1,_img_classList2,_this=this;if(img&&!(null==(_img_classList=img.classList)?void 0:_img_classList.contains(this.options.loadingClass))&&!(null==(_img_classList1=img.classList)?void 0:_img_classList1.contains(this.options.loadedClass))&&!(null==(_img_classList2=img.classList)?void 0:_img_classList2.contains(this.options.loadedErrorClass))&&img.hasAttribute("data-src")){var _this1=this;img.classList.add(this.options.loadingClass);var tempImg=new Image;tempImg.onload=function(){img.src=img.dataset.src,img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedClass),img.dispatchEvent(new Event("lazyloaded"));},tempImg.onerror=function(e){img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedErrorClass),null==_this1.options.onLoadError||_this1.options.onLoadError.call(_this1.options,img);},tempImg.src=img.dataset.src;}},_proto.addImages=function(targets){var _this=this;(null==targets?void 0:targets.length)&&targets.forEach(function(target){var _this__observer;(null==target?void 0:target.hasAttribute("data-src"))&&(ImageLazyLoader.isSupported&&_this._observer?null==(_this__observer=_this._observer)||_this__observer.observe(target):_this._loadImage(target));});},_proto.destroy=function(){this._observer&&(this._observer.disconnect(),this._observer=null);},ImageLazyLoader}();function _create_class$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1$1(){return _extends$1$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1$1.apply(this,arguments)}function _set_prototype_of$1$1(o,p){return _set_prototype_of$1$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$1(o,p)}ImageLazyLoader.isSupported="IntersectionObserver"in window;var _$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_=Object.assign({},_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,{height:400,width:"100%",timeWidth:0,readOnly:false,timePointColor:"#648FFC",timeTextColor:"#666666",timeScaleColor:"transparent",timeSectionColor:"#369FFF",timeAxisBgColor:"#BDCDFF",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",showTimeWidthBtn:true,showCoverFold:true}),MobileTimeLine=function(BaseTimeLine){function MobileTimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}))||this)._isTouchStart=false,_this._dragScroll=null,_this._moveStartX=0,_this._moveStartY=0,_this._imageLazyLoader=null,_this._imageLazyLoaderPicker=null,_this.state={start:"00:00:00",end:"24:00:00",current:null,timeArr:[],availTimeLine:[],index:0},_this._onImageError=_this._onImageError.bind(_this),_this._plusClick=_this._plusClick.bind(_this),_this._minusClick=_this._minusClick.bind(_this),_this._onPickerClose=_this._onPickerClose.bind(_this),_this._onClickItem=_this._onClickItem.bind(_this),_this._onClickCoverFold=_this._onClickCoverFold.bind(_this),_this._imageLazyLoader=new ImageLazyLoader({root:_this.$container,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}}),_this._render(),_this.options.timeSections&&Array.isArray(_this.options.timeSections)&&_this.updateTimeSections(_this.options.timeSections),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$1$1(subClass,superClass);}(MobileTimeLine,BaseTimeLine);var _proto=MobileTimeLine.prototype;return _proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._dragScroll&&(this._dragScroll.readonly=readOnly);},_proto.setTimeWidth=function(timeWidth){MOBILE_TIME_WIDTH[timeWidth]&&(BaseTimeLine.prototype.setTimeWidth.call(this,timeWidth),this._matchTimeDot());},_proto.updateTimeSections=function(timeSections,defaultIndex){BaseTimeLine.prototype.updateTimeSections.call(this,timeSections);var list=timeSections.map(function(record){return _extends$1$1({},record,{startTime:distExports$4.DateTime.format(record.startTime,"HH:mm:ss"),endTime:distExports$4.DateTime.format(record.endTime,"HH:mm:ss")})});if(list.length>0){ void 0===defaultIndex&&(defaultIndex=list.length-1);var current=this.state.current;this._setState({availTimeLine:list,start:list[defaultIndex].startTime,end:list[defaultIndex].endTime,current:null===current?list[defaultIndex].startTime:current}),this._matchTimeDot();}else this._setState({availTimeLine:[],current:distExports$4.DateTime.format(this.current||(new Date).getTime(),"HH:mm:ss")}),this._matchTimeDot();},_proto.update=function(time){var _this__dragScroll;time&&!(null==(_this__dragScroll=this._dragScroll)?void 0:_this__dragScroll.isDragging)&&(this._setState({current:distExports$4.DateTime.format(time,"HH:mm:ss")}),this._currentOffsetH());},_proto.destroy=function(){var _this__dragScroll;if(this._scrollTimer&&(clearInterval(this._scrollTimer),this._scrollTimer=null),this._$currentTime)try{this.$container.removeChild(this._$currentTime),this._$currentTime=null;}catch(error){}if(this._$itemContainer&&this._$itemList)try{this._$itemContainer.removeChild(this._$itemList),this._$itemList=null;}catch(error){}if(this._$itemContainer)try{this.$container.removeChild(this._$itemContainer),this._$itemContainer=null;}catch(error){}if(this._$op)try{this.$container.removeChild(this._$op),this._$op=null;}catch(error){}this._picker&&(this._picker.destroy(),this._picker=null),this._imageLazyLoader&&(this._imageLazyLoader.destroy(),this._imageLazyLoader=null),this._imageLazyLoaderPicker&&(this._imageLazyLoaderPicker.destroy(),this._imageLazyLoaderPicker=null),this._removeEventListener(),null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.destroy(),this._dragScroll=null,BaseTimeLine.prototype.destroy.call(this);},_proto._setState=function(obj){var _this=this;Object.keys(obj).forEach(function(key){var _this__dragScroll,_this_timeSections_;"current"===key&&obj[key]?(_this._setCurrentDOM(obj[key]),_this.state.current===obj[key]||(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.isDragging)||(_this.state[key]=obj[key],_this.current=new Date(distExports$4.DateTime.format((null==(_this_timeSections_=_this.timeSections[0])?void 0:_this_timeSections_.endTime)||(new Date).getTime(),"YYYY-MM-DD")+"T"+obj[key]),null==_this.options.onChange||_this.options.onChange.call(_this.options,_this.current))):_this.state[key]=obj[key];});},_proto._setCurrentDOM=function(time){this._$currentTime&&(this._$currentTime.querySelector(".ez-time-line-current-value").innerHTML=time);},_proto._matchTimeDot=function(){for(var scaleWidth=this._scaleWidth,timeArr=[],minute=TimeLineUtil.timeToMinute("24:00:00"),i=minute=Math.floor(minute/scaleWidth)*scaleWidth;i>=0;){var marginTop=0,marginBottom=0;i==minute&&(marginTop=70),0==i&&(marginBottom=this.$container.clientHeight-70);var time=TimeLineUtil.minuteToTime(i);timeArr.push({id:i,current:time,label:"a"+i,marginTop:marginTop,marginBottom:marginBottom,recArr:[],coverArr:this._filterTimeSectionsByTime(time)}),i-=scaleWidth;}this._setState({timeArr:timeArr}),this._matchRecTimeDot();},_proto._matchRecTimeDot=function(){var _this_state=this.state,availTimeLine=_this_state.availTimeLine,timeArr=_this_state.timeArr,scaleWidth=this._scaleWidth,len=availTimeLine.length;if(0===len)for(var j=0;j<timeArr.length;j++)timeArr[j].recArr=[];else {for(var k=0;k<timeArr.length;k++)timeArr[k].recArr=[];for(var i=0;i<len;i++){var stAvailPercent,etAvailPercent,temp=availTimeLine[i],st=TimeLineUtil.timeToSecond(temp.startTime),et=TimeLineUtil.timeToSecond(temp.endTime),stMinute=Math.floor(st/(60*scaleWidth))*scaleWidth;stAvailPercent=(st-60*stMinute)/scaleWidth;var etMinute=Math.floor(et/(60*scaleWidth))*scaleWidth;etAvailPercent=(et-60*etMinute)/scaleWidth;for(var j1=0;j1<timeArr.length;j1++)if(timeArr[j1].id==stMinute&&timeArr[j1].id==etMinute){var height=etAvailPercent-stAvailPercent,top=60-etAvailPercent;timeArr[j1].recArr.push({height:height,top:top});}else timeArr[j1].id==stMinute?timeArr[j1].recArr.push({height:60-stAvailPercent,top:0}):timeArr[j1].id==etMinute?timeArr[j1].recArr.push({height:etAvailPercent,top:60-etAvailPercent}):timeArr[j1].id>stMinute&&timeArr[j1].id<etMinute&&timeArr[j1].recArr.push({height:60,top:0});}}this._setState({timeArr:timeArr}),this._renderDateLine();},_proto._renderDateLine=function(){var _this=this,timeArr=this.state.timeArr,container=this._$itemList;container.innerHTML="",timeArr.forEach(function(item,index){var _this__imageLazyLoader,timeItemDOM=document.createElement("div");timeItemDOM.setAttribute("class","ez-time-line-time-scale-area"),item.marginTop&&(timeItemDOM.style.cssText+="margin-top: "+item.marginTop+"px;"),item.marginBottom&&(timeItemDOM.style.cssText+="margin-bottom: "+item.marginBottom+"px;"),timeItemDOM.style.cssText+="border-right-color: "+(_this.options.timeAxisBgColor||"rgba(189, 205, 255, 1)")+";",timeItemDOM.setAttribute("data-time",item.current),timeItemDOM.setAttribute("data-index",index+""),document.createElement("div").setAttribute("class","ez-time-line-scale");var timeItemHtml="";item.coverArr.length&&_this.options.showCoverFold&&(timeItemHtml+='\n <div class="ez-time-line-time-cover-fold '+(item.coverArr.length>1?"ez-time-line-time-cover-fold-multiple":"")+'"\n data-start="'+item.current+'">\n '+(item.coverArr.length>1?'<div class="ez-time-line-cover-fold-placeholder" style="color: #FFF"></div>':"")+'\n <div class="ez-time-line-time-cover-fold-img">\n <img data-src="'+_this._setImageScr(item.coverArr[0].coverPic)+'" class="ez-time-line-img"/>\n <span class="ez-time-line-time-cover-fold-len">\n '+(item.coverArr.length>1?_this.i18n.t("foldTitle",{len:item.coverArr.length,unit:"videos"}):""+distExports$4.DateTime.format(item.coverArr[0].startTime,"HH:mm"))+"\n </span>\n "+(1===item.coverArr.length?'<span class="ez-time-line-time-cover-fold-time">'+TimeLineUtil.tranTimeToString(item.coverArr[0].startTime,item.coverArr[0].endTime)+"</span>":"")+'\n <span class="ez-time-line-time-cover-fold-pause">'+_$TIMELINE_ICONS$__pause+"</span>\n </div>\n </div>"),item.recArr.forEach(function(i){timeItemHtml+='<div class="ez-time-line-time-unavail"\n style="height: '+i.height+"px;background-color:"+(_this.options.timeSectionColor||"#369FFF")+"; top: "+i.top+'px">\n </div>';}),timeItemHtml+="<div id="+item.label+' class="ez-time-line-time-label" style="color: '+(_this.options.timeTextColor||"#666")+'">'+item.current+"</div>",timeItemDOM.innerHTML=timeItemHtml,container.appendChild(timeItemDOM),item.coverArr.length&&_this.options.showCoverFold&&(null==(_this__imageLazyLoader=_this._imageLazyLoader)||_this__imageLazyLoader.addImages(container.querySelectorAll("img.ez-time-line-img")||[]));}),this._currentOffsetH();},_proto._currentOffsetH=function(){var current=this.state.current;if(current){var _this__dragScroll,y=(86400-TimeLineUtil.timeToSecond(current)||0)/this._scaleWidth;null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y+60,false);}},_proto._render=function(){var _this=this;if(this._$currentTime=document.createElement("div"),this._$currentTime.classList.add("ez-time-line-current"),this._$currentTime.innerHTML='<div class="ez-time-line-current-content" style="color: '+(this.options.currentTimeBgColor||"#648FFC")+'">\n <span class="ez-time-line-current-tip">'+_$TIMELINE_ICONS$__tip+'</span>\n <span class="ez-time-line-current-tip-line" style="background-color: '+(this.options.timePointColor||"#648FFC")+';"></span>\n <div class="ez-time-line-current-value" style="color: '+(this.options.currentTimeColor||"#FFFFFF")+'">00:00:00</div>\n </div>',this.$container.appendChild(this._$currentTime),this._$itemContainer=document.createElement("div"),this._$itemContainer.classList.add("ez-time-line-container"),this.$container.appendChild(this._$itemContainer),this._dragScroll=new DragScroll(this._$itemContainer,{hideScrollbar:true,onChange:function(state){var result=_this._offsetYToTime(state.y);result[1]!==_this.state.current&&_this._setCurrentDOM(result[0]>=86400?"23:59:59":result[1]);},onDragStart:function(e){_this._moveStartX=e.clientX,_this._moveStartY=e.clientY,null==_this.options.onDragStart||_this.options.onDragStart.call(_this.options,_this.state.current);},onDragging:function(){null==_this.options.onDragging||_this.options.onDragging.call(_this.options,_this.state.current);},onDragEnd:function(){var _this__dragScroll,result=_this._offsetYToTime(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.currentY);result[1]!==_this.state.current&&_this._setState({current:result[0]>=86400?"23:59:59":result[1]}),null==_this.options.onDragEnd||_this.options.onDragEnd.call(_this.options,_this.state.current);}}),/\d/.test(this.options.height))this._$itemContainer.style.cssText+="height: "+this.options.height+"px";else if("string"==typeof this.options.height)this._$itemContainer.style.cssText+="height: "+this.options.height;else {var height=this.$container.clientHeight;this._$itemContainer.style.cssText+="height: "+height+"px";}this._$itemList=document.createElement("div"),this._$itemList.classList.add("ez-time-line-item"),this._dragScroll.$content.appendChild(this._$itemList),this.options.showTimeWidthBtn&&(this._$op=document.createElement("div"),this._$op.classList.add("ez-time-line-op"),this._$op.innerHTML='<span class="ez-time-line-op-wrapper"><span class="ez-time-line-icon-plus">'+_$TIMELINE_ICONS$__plus+'</span> <span class="ez-time-line-icon-minus">'+_$TIMELINE_ICONS$__minus+"</span></span>",this.$container.appendChild(this._$op)),this.options.showCoverFold&&(this._picker=new Picker(null,{isMobile:true,wrapClassName:"ez-time-line-picker",onOpenChange:function(isOpen){var _this_options_onPickerOpenChange,_this_options;null==(_this_options=_this.options)||null==(_this_options_onPickerOpenChange=_this_options.onPickerOpenChange)||_this_options_onPickerOpenChange.call(_this_options,isOpen);}}),this._imageLazyLoaderPicker=new ImageLazyLoader({root:this._picker.$body,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}})),this._addEventListener();},_proto._addEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.addEventListener("click",this._plusClick,false),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.addEventListener("click",this._minusClick,false));this._matchTimeDot(),this._picker&&(this._delegatePickerClose=delegate(this._picker.$body,".ez-time-line-picker-close","click",this._onPickerClose,false),this._delegateItemContent=delegate(this._picker.$body,".ez-time-line-picker-item-content","click",this._onClickItem,false),this._delegateCoverFold=delegate(this._$itemList,".ez-time-line-time-cover-fold","click",this._onClickCoverFold,false));},_proto._removeEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1,_this__picker_$body_querySelector,_this__picker_$body;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.removeEventListener("click",this._plusClick),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.removeEventListener("click",this._minusClick));this._picker&&(null==(_this__picker_$body=this._picker.$body)||null==(_this__picker_$body_querySelector=_this__picker_$body.querySelector(".ez-time-line-picker-close"))||_this__picker_$body_querySelector.removeEventListener("click",this._onPickerClose),this._delegateItemContent&&(this._delegateItemContent.forEach(function(delegation){delegation.destroy();}),this._delegateItemContent=null),this._delegatePickerClose&&(this._delegatePickerClose.forEach(function(delegation){delegation.destroy();}),this._delegatePickerClose=null),this._delegateCoverFold&&(this._delegateCoverFold.forEach(function(delegation){delegation.destroy();}),this._delegateCoverFold=null));},_proto._plusClick=function(){var timeWidth=this.timeWidth+1;timeWidth>0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(timeWidth);},_proto._minusClick=function(){var timeWidth=this.timeWidth-1;timeWidth>=0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(Math.floor(timeWidth));},_proto._timeSectionsToGroupsByHour=function(list){var obj={};return list.forEach(function(item,index){var hour=distExports$4.DateTime.format(item.startTime,"HH");obj[+hour]?obj[+hour].push(_extends$1$1({},item,{_index:index})):obj[+hour]=[_extends$1$1({},item,{_index:index})];}),obj},_proto._filterTimeSectionsByTime=function(start){if(!start)return [];var startSecond=TimeLineUtil.timeToSecond(start+":00"),endSecond=TimeLineUtil.timeToSecond(start+":00")+60*this._scaleWidth;return this.timeSections.filter(function(item){var _$start=TimeLineUtil.timeToSecond(distExports$4.DateTime.format(item.startTime,"HH:mm:ss"));return _$start>=startSecond&&_$start<endSecond})},_proto._renderPickerContent=function(start){var _this__picker_innerHTML,_this__picker,_this__picker1,_this__picker2,_this__imageLazyLoaderPicker,_this=this,list=this._filterTimeSectionsByTime(start),hourGroups=this._timeSectionsToGroupsByHour(list);(null==(_this__picker=this._picker)||null==(_this__picker_innerHTML=_this__picker.innerHTML)||_this__picker_innerHTML.call(_this__picker,'<div class="ez-time-line-picker-container">\n <div class="ez-time-line-picker-header">\n <span class="ez-time-line-picker-close">'+_$TIMELINE_ICONS$__close+"</span>\n "+this.i18n.t("title",{len:list.length,unit:list.length>1?"videos":"video"})+'\n </div>\n <div class="ez-time-line-picker-content">\n <div class="ez-time-line-picker-list">\n '+Object.keys(hourGroups).reverse().map(function(key){return '<div class="ez-time-line-picker-item">\n <div class="ez-time-line-picker-item-title">'+key+':00</div>\n <div class="ez-time-line-picker-item-list">\n '+hourGroups[key].reverse().map(function(item){return '<div class="ez-time-line-picker-item-content"\n data-start="'+distExports$4.DateTime.format(item.startTime,"YYYYMMDDTHHmmssZ")+'"\n data-end="'+distExports$4.DateTime.format(item.endTime,"YYYYMMDDTHHmmssZ")+'"\n data-index="'+item._index+'">\n <span class="ez-time-line-picker-item-time">'+distExports$4.DateTime.format(item.startTime,"HH:mm")+'</span>\n <span class="ez-time-line-picker-item-duration">\n '+TimeLineUtil.tranTimeToString(item.startTime,item.endTime)+'\n </span>\n <img class="ez-time-line-picker-item-cover" data-src="'+_this._setImageScr(item.coverPic)+'"/>\n </div>'}).join("")+"\n </div>\n </div>"}).join("")+"\n </div>\n </div>\n </div>\n </div>"),null==(_this__picker1=this._picker)?void 0:_this__picker1.$body)&&(null==(_this__imageLazyLoaderPicker=this._imageLazyLoaderPicker)||_this__imageLazyLoaderPicker.addImages((null==(_this__picker2=this._picker)?void 0:_this__picker2.$body.querySelectorAll("img"))||[]));},_proto._onImageError=function(img){if(!img.hasAttribute("data-error")){var _img_parentNode,placeholder=document.createElement("div");placeholder.classList.add("ez-time-line-item-cover-placeholder"),placeholder.innerHTML=""+_$TIMELINE_ICONS$__picture,null==(_img_parentNode=img.parentNode)||_img_parentNode.appendChild(placeholder),img.setAttribute("data-error","true"),img.remove();}},_proto._onPickerClose=function(){this._picker&&(this._picker.open=false);},_proto._onClickItem=function(e){var _e_delegateTarget_getAttribute,_e_delegateTarget,index=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_getAttribute=_e_delegateTarget.getAttribute)?void 0:_e_delegateTarget_getAttribute.call(_e_delegateTarget,"data-index");this._picker&&(this._picker.open=false),null==this.options.onPickerSelect||this.options.onPickerSelect.call(this.options,this.timeSections[+index]);},_proto._onClickCoverFold=function(e){var _e_delegateTarget_parentElement_getAttribute,_e_delegateTarget_parentElement,_e_delegateTarget;e.preventDefault();var time=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_parentElement=_e_delegateTarget.parentElement)||null==(_e_delegateTarget_parentElement_getAttribute=_e_delegateTarget_parentElement.getAttribute)?void 0:_e_delegateTarget_parentElement_getAttribute.call(_e_delegateTarget_parentElement,"data-time"),moveX=Math.abs(this._moveStartX-e.clientX),moveY=Math.abs(this._moveStartY-e.clientY);this._picker&&time&&!(moveX>=1||moveY>=1)&&(this._renderPickerContent(time),this._picker.open=true);},_proto._setImageScr=function(src){if(src){var query="x=200&"+(this.options.coverQuery||"");return src+(src.includes("?")?"&":"?")+query}return ""},_proto._offsetYToTime=function(offsetY){var _this__dragScroll,y=offsetY;offsetY<60&&(y=60,null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y));var second=86400-Math.floor((y-60)*this._scaleWidth);return [second,distExports$4.DateTime.fillZero(Math.floor(second/3600))+":"+distExports$4.DateTime.fillZero(Math.floor(second%3600/60))+":"+distExports$4.DateTime.fillZero(second%60)]},_create_class$1(MobileTimeLine,[{key:"_scaleWidth",get:function(){return (MOBILE_TIME_WIDTH[this.timeWidth]||MOBILE_TIME_WIDTH[0])[0]}}]),MobileTimeLine}(BaseTimeLine);function isOverlap(a_start,a_end,b_start,b_end){return Math.max(a_start,b_start)<=Math.min(a_end,b_end)}function _create_class$3(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$5(){return _extends$5=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$5.apply(this,arguments)}function _set_prototype_of$6(o,p){return _set_prototype_of$6=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$6(o,p)}var _$TIMELINE_DEFAULT_OPTIONS$_={height:36,dpr:window.devicePixelRatio||2,scaleOffsetTop:4,showYearMonthDay:true},TimeLine=function(BaseTimeLine){function TimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$TIMELINE_DEFAULT_OPTIONS$_,options,{clone:true}))||this)._$canvas=null,_this._ctx=null,_this._timeWidthArray=TIME_WIDTH[0],_this._centerPositionX=0,_this._isMouseDown=false,_this._mousePosition=0,_this._oldTime=null,_this._isOver=false,_this._moved=false,_this._isCtrlKeyDown=false,_this._lastTouchDist=0,_this.$container=container,_this._mousemoveFun=_this._mousemoveFun.bind(_this),_this._mouseoverFun=_this._mouseoverFun.bind(_this),_this._mouseleaveFun=_this._mouseleaveFun.bind(_this),_this._mousedownFun=_this._mousedownFun.bind(_this),_this._mouseUpFun=_this._mouseUpFun.bind(_this),_this._mousewheelFun=_this._mousewheelFun.bind(_this),_this._touchstartFun=_this._touchstartFun.bind(_this),_this._touchmoveFun=_this._touchmoveFun.bind(_this),_this._touchendFun=_this._touchendFun.bind(_this),_this._ctrlKeyDownFun=_this._ctrlKeyDownFun.bind(_this),_this._ctrlKeyUpFun=_this._ctrlKeyUpFun.bind(_this),_this._init(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$6(subClass,superClass);}(TimeLine,BaseTimeLine);var _proto=TimeLine.prototype;return _proto._init=function(){this._$canvas=document.createElement("canvas"),this._ctx=this._$canvas.getContext("2d"),this.readOnly||(this._$canvas.style.cssText+="cursor: pointer;"),this.$container.appendChild(this._$canvas),this.resize(this.width,this.height),this._update({current:this.current,timeWidth:this.timeWidth,timeSections:this.timeSections}),this._addEventListener();},_proto.resize=function(width,height){BaseTimeLine.prototype.resize.call(this,width,height),this._$canvas&&width&&(this._$canvas.width=this.width*this.options.dpr,this._$canvas.style.cssText+="width: "+this.width+"px;"),this._$canvas&&height&&(this._$canvas.height=this.height*this.options.dpr,this._$canvas.style.cssText+="height: "+this.height+"px;"),this._draw();},_proto.setTimeWidth=function(timeWidth){this._update({timeWidth:timeWidth});},_proto.updateTimeSections=function(timeSections){this._update({timeSections:timeSections});},_proto.update=function(time){time&&!this._isMouseDown&&this._update({current:distExports$4.DateTime.toDate(time)});},_proto._update=function(options){var left,right,_this__$canvas;(void 0===options&&(options={}),(null==options?void 0:options.current)&&(left=options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)&&(this.current=options.current),(null==options?void 0:options.timeSections)&&BaseTimeLine.prototype.updateTimeSections.call(this,this._mergeTimeSections(options.timeSections)),"number"==typeof(null==options?void 0:options.timeWidth)&&(null==options?void 0:options.timeWidth)<TIME_WIDTH.length&&(BaseTimeLine.prototype.setTimeWidth.call(this,options.timeWidth),this._timeWidthArray=TIME_WIDTH[Math.floor(this.timeWidth)]),"number"==typeof(null==options?void 0:options.timeWidth)&&this._timeWidthArray)&&(this._timeWidthArray[3]&&(null==(_this__$canvas=this._$canvas)||_this__$canvas.setAttribute("data-title",this._timeWidthArray[3])));this._draw();},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._$canvas&&(this._$canvas.style.cssText+="cursor: "+(readOnly?"not-allowed":"pointer"));},_proto.destroy=function(){if(this._removeEventListener(),this._$canvas)try{this.$container.removeChild(this._$canvas),this._$canvas=null;}catch(e){}BaseTimeLine.prototype.destroy.call(this);},_proto._draw=function(){this._ctx&&(this._ctx.fillStyle=this.options.timeAxisBgColor,this._ctx.fillRect(0,0,this.width*this.options.dpr,this.height*this.options.dpr)),this._drawSections(),this._drawScale();},_proto._drawScale=function(){var lineWidth=1*this.options.dpr;this._centerPositionX=parseInt(this.width*this.options.dpr/2+"");for(var centerPosition={x:this.width*this.options.dpr/2,y:this.height*this.options.dpr},curScaleTime=Math.floor(this.current.getTime()/1e3),offsetSecond=(curScaleTime-Math.floor(distExports$4.DateTime.toDate(distExports$4.DateTime.format(new Date(1e3*curScaleTime),"YYYY-MM-DD")).getTime()/1e3))%this._timeWidthArray[0],padding=this.height*this.options.dpr/20,spacing=this._curScaleSpacing*this.options.dpr,rightLastScaleTimeX=Math.floor(this._centerPositionX+(this._timeWidthArray[0]-offsetSecond)/this._timeWidthArray[0]*spacing),leftLastScaleTime=curScaleTime-offsetSecond,rightLastScaleTime=leftLastScaleTime+this._timeWidthArray[0],x=rightLastScaleTimeX-spacing;x>0;x-=spacing){0===(leftLastScaleTime-Math.floor(distExports$4.DateTime.toDate(distExports$4.DateTime.format(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD")).getTime()/1e3))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x,padding,x,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(distExports$4.DateTime.format(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x,padding,x,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),leftLastScaleTime-=this._timeWidthArray[0];}for(var x1=rightLastScaleTimeX;x1<=this.width*this.options.dpr;x1+=spacing){0===(rightLastScaleTime-Math.floor(distExports$4.DateTime.toDate(distExports$4.DateTime.format(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD")).getTime()/1e3))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x1,padding,x1,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(distExports$4.DateTime.format(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x1,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x1,padding,x1,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),rightLastScaleTime+=this._timeWidthArray[0];}this._drawSolidLine(centerPosition.x,0,centerPosition.x,centerPosition.y,lineWidth,this.options.timePointColor);},_proto._drawSolidLine=function(startX,startY,endX,endY,lineWidth,color){this._ctx&&(this._ctx.save(),this._ctx.strokeStyle=null!=color?color:this.options.timeScaleColor,this._ctx.lineWidth=lineWidth,this._ctx.beginPath(),this._ctx.moveTo(startX,startY),this._ctx.lineTo(endX,endY),this._ctx.stroke(),this._ctx.restore());},_proto._drawTextString=function(text,x,y,align){if(this._ctx){var timeTexts=text.split(" ");this._ctx.font=12*this.options.dpr*1+"px serif",this._ctx.fillStyle=this.options.timeTextColor,this._ctx.textAlign=align||"left",this._timeWidthArray[0]%60==0&&(timeTexts[1]=timeTexts[1].replace(/:00$/,"")),this._ctx.fillText(timeTexts[1],x,y+8*this.options.dpr),!this.options.showYearMonthDay||"00:00:00"!==timeTexts[1]&&"00:00"!==timeTexts[1]&&this._timeWidthArray[0]*this._timeWidthArray[2]!==86400||(this._ctx.textAlign=align||"left",this._ctx.fillText(timeTexts[0],x,y+18*this.options.dpr));}},_proto._drawSections=function(){for(var timeArr=this.timeSections||[],i=0;i<timeArr.length;i++){var position=this._findPosition(timeArr[i]);this._ctx&&isOverlap(0,this.width*this.options.dpr,position.x1,position.x2)&&(this._ctx.fillStyle=this.options.timeSectionColor,this._ctx.fillRect(position.x1,0,position.x2-position.x1,this.height*this.options.dpr));}},_proto._findPosition=function(item){var x1=(parseInt((item.startTime-this.current.getTime())/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing+this.width/2)*this.options.dpr;return {x1:x1,x2:x1+parseInt((item.endTime-item.startTime)/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing*this.options.dpr}},_proto._mergeTimeSections=function(timeSections){if(0===timeSections.length)return timeSections;for(var merged=[(timeSections=timeSections.map(function(item){return 10===(item.startTime+"").length&&(item.startTime=1e3*item.startTime),10===(item.endTime+"").length&&(item.endTime=1e3*item.endTime),_extends$5({},item,{startTime:item.startTime,endTime:item.endTime})}))[0]],i=1;i<timeSections.length;i++){var prev=merged[merged.length-1],curr=timeSections[i];prev.endTime>=curr.startTime?prev.endTime=Math.max(prev.endTime,curr.endTime):merged.push(curr);}return merged},_proto._addEventListener=function(){this._$canvas&&(this._$canvas.addEventListener("mousemove",this._mousemoveFun),this._$canvas.addEventListener("mouseover",this._mouseoverFun),this._$canvas.addEventListener("mouseleave",this._mouseleaveFun),this._$canvas.addEventListener("mousedown",this._mousedownFun),this._$canvas.addEventListener("mouseup",this._mouseUpFun),this._$canvas.addEventListener("wheel",this._mousewheelFun),this.$container.addEventListener("wheel",function(e){e.preventDefault();},{passive:false}),this._$canvas.addEventListener("keydown",this._ctrlKeyDownFun),this._$canvas.addEventListener("keyup",this._ctrlKeyUpFun),document.addEventListener("keydown",this._ctrlKeyDownFun,false),document.addEventListener("keyup",this._ctrlKeyUpFun,false),this._$canvas.addEventListener("touchstart",this._touchstartFun,{passive:false}),this._$canvas.addEventListener("touchmove",this._touchmoveFun,{passive:false}),this._$canvas.addEventListener("touchend",this._touchendFun,{passive:false}));},_proto._removeEventListener=function(){this._$canvas&&(this._$canvas.removeEventListener("mousemove",this._mousemoveFun),this._$canvas.removeEventListener("mouseover",this._mouseoverFun),this._$canvas.removeEventListener("mouseleave",this._mouseleaveFun),this._$canvas.removeEventListener("mousedown",this._mousedownFun),this._$canvas.removeEventListener("mouseup",this._mouseUpFun),this._$canvas.removeEventListener("wheel",this._mousewheelFun),this._$canvas.removeEventListener("keydown",this._ctrlKeyDownFun),this._$canvas.removeEventListener("keyup",this._ctrlKeyUpFun),document.removeEventListener("keydown",this._ctrlKeyDownFun),document.removeEventListener("keyup",this._ctrlKeyUpFun),this._$canvas.removeEventListener("touchstart",this._touchstartFun),this._$canvas.removeEventListener("touchmove",this._touchmoveFun),this._$canvas.removeEventListener("touchend",this._touchendFun));},_proto._mousedownFun=function(e){this.readOnly||(this._isMouseDown=true,this._mousePosition=e.pageX,this._oldTime=this.current,null==this.options.onDragStart||this.options.onDragStart.call(this.options,this.current));},_proto._mouseoverFun=function(){this.readOnly||(this._isOver=true);},_proto._mouseleaveFun=function(e){this.readOnly||(this._isOver=false,this._moveEndOrTouchEndFun(e));},_proto._mouseUpFun=function(e){this._moveEndOrTouchEndFun(e);},_proto._mousemoveFun=function(e){if(!this.readOnly)if(this._isMouseDown&&this._isOver)this._moveUpdateFun(e.pageX);else {var left=parseInt(this.$container.offsetLeft+"",10);this._mousePosition=e.pageX-left,this._update();}},_proto._mousewheelFun=function(e){e.preventDefault(),this.readOnly;},_proto._ctrlKeyDownFun=function(e){(e.ctrlKey||"Control"===e.key)&&(this._isCtrlKeyDown=true);},_proto._ctrlKeyUpFun=function(e){(e.ctrlKey||"Control"===e.key)&&(this._isCtrlKeyDown=false);},_proto._getTouchDistance=function(touches){var touch1=touches[0],touch2=touches[1],dx=touch2.clientX-touch1.clientX,dy=touch2.clientY-touch1.clientY;return Math.sqrt(dx*dx+dy*dy)},_proto._touchstartFun=function(e){if(!this.readOnly)if(this._oldTime=this.current,this._isOver=true,1===e.touches.length){var touch=e.touches[0];this._isMouseDown=true,this._mousePosition=touch.clientX;}else 2===e.touches.length&&(this._lastTouchDist=this._getTouchDistance(e.touches));},_proto._touchmoveFun=function(e){if(e.preventDefault(),e.stopPropagation(),!this.readOnly)if(1===e.touches.length){var touch=e.touches[0];this._moveUpdateFun(touch.clientX);}else if(2===e.touches.length){this._getTouchDistance(e.touches);this._lastTouchDist;}},_proto._touchendFun=function(e){this.readOnly||this._moveEndOrTouchEndFun(e);},_proto._moveEndOrTouchEndFun=function(e){e.preventDefault(),this.readOnly||this._isMouseDown&&(this._isMouseDown=false,this._moved&&(this._moved=false,this._update({current:this.current}),this._oldTime=this.current,null==this.options.onDragEnd||this.options.onDragEnd.call(this.options,this.current,this._isOver)),this._isOver&&Math.abs(this._mousePosition-(e.pageX||0))>5&&(null==this.options.onChange||this.options.onChange.call(this.options,this.current)),this._mousePosition=0,this._lastTouchDist=0);},_proto._moveUpdateFun=function(x){var mouseOffset=this._mousePosition-x;if(0!==mouseOffset){if(this._oldTime){var currentTime=this._oldTime.getTime()+1e3*parseInt(mouseOffset/this._curScaleSpacing*this._timeWidthArray[0]+"",10);this._update({current:new Date(currentTime)}),null==this.options.onDragging||this.options.onDragging.call(this.options,new Date(currentTime));}this._moved=true;}},_create_class$3(TimeLine,[{key:"_curScaleSpacing",get:function(){var _this__timeWidthArray,_this__timeWidthArray1;return Math.floor((null==(_this__timeWidthArray=this._timeWidthArray)?void 0:_this__timeWidthArray[1])-(null==(_this__timeWidthArray1=this._timeWidthArray)?void 0:_this__timeWidthArray1[1])*+(this.timeWidth%1/2).toFixed(2))}}]),TimeLine}(BaseTimeLine);TimeLine.TIME_WIDTH=TIME_WIDTH;
11534
9764
 
11535
9765
  function _extends$4() {
11536
9766
  _extends$4 = Object.assign || function(target) {
@@ -11631,17 +9861,17 @@
11631
9861
  }
11632
9862
  }
11633
9863
  };
11634
- if (distExports$6.isMobile()) {
11635
- this.timeLineUtil = new distExports.MobileTimeLine(this.$container, _timeLineOptions);
9864
+ if (distExports$4.isMobile()) {
9865
+ this.timeLineUtil = new MobileTimeLine(this.$container, _timeLineOptions);
11636
9866
  } else {
11637
- this.timeLineUtil = new distExports.TimeLine(this.$container, _timeLineOptions);
9867
+ this.timeLineUtil = new TimeLine(this.$container, _timeLineOptions);
11638
9868
  this._renderAddReduce();
11639
9869
  }
11640
9870
  (_this_timeLineUtil = this.timeLineUtil) == null ? void 0 : (_this_timeLineUtil_updateTimeSections = _this_timeLineUtil.updateTimeSections) == null ? void 0 : _this_timeLineUtil_updateTimeSections.call(_this_timeLineUtil, this.records);
11641
9871
  this.timeLineUtil.update(new Date());
11642
9872
  };
11643
9873
  _proto.setWidth = function setWidth(width) {
11644
- if (!distExports$6.isMobile()) this.timeLineUtil.resize(width);
9874
+ if (!distExports$4.isMobile()) this.timeLineUtil.resize(width);
11645
9875
  };
11646
9876
  _proto._renderAddReduce = function _renderAddReduce() {
11647
9877
  var _this = this;
@@ -12318,12 +10548,12 @@
12318
10548
  for(var _iterator = _create_for_of_iterator_helper_loose$1(btnList), _step; !(_step = _iterator()).done;){
12319
10549
  var item = _step.value;
12320
10550
  var _theme_options_mobileExtendOptions, // 在移动端支持扩展和窗口区域渲染
12321
- _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions1, _theme_options, _theme_options1;
12322
- if (((((_theme_options_mobileExtendOptions = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions.controls) || []).includes(item.iconId) && item.iconId !== "ptz" || ((_theme_options_mobileExtendOptions1 = theme.options.mobileExtendOptions) == null ? void 0 : (_theme_options_mobileExtendOptions_controls = _theme_options_mobileExtendOptions1.controls) == null ? void 0 : _theme_options_mobileExtendOptions_controls.includes('rec')) && REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId) // 移动端模式下,不渲染在header 中控件, 需要移动到mobileExtend中
10551
+ _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions1;
10552
+ if (((((_theme_options_mobileExtendOptions = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions.controls) || []).includes(item.iconId) && item.iconId !== "ptz" || ((_theme_options_mobileExtendOptions1 = theme.options.mobileExtendOptions) == null ? void 0 : (_theme_options_mobileExtendOptions_controls = _theme_options_mobileExtendOptions1.controls) == null ? void 0 : _theme_options_mobileExtendOptions_controls.includes('rec')) && REC_GROUP.includes(item.iconId) // 移动端模式下,不渲染在header 中控件, 需要移动到mobileExtend中
12323
10553
  ) && Utils.isMobile) {
12324
10554
  continue;
12325
10555
  }
12326
- if (REC_GROUP((_theme_options1 = theme.options) == null ? void 0 : _theme_options1.sdkType).includes(item.iconId) && theme._header) {
10556
+ if (REC_GROUP.includes(item.iconId) && theme._header) {
12327
10557
  _renderRecType(theme, theme._header.$right, item.iconId, props);
12328
10558
  continue;
12329
10559
  }
@@ -12331,7 +10561,7 @@
12331
10561
  if (theme.options.deviceOptions !== null) {
12332
10562
  var _theme_controls;
12333
10563
  if (!((_theme_controls = theme.controls) == null ? void 0 : _theme_controls["deviceControl"])) {
12334
- var _theme_options2;
10564
+ var _theme_options;
12335
10565
  // eslint-disable-next-line @typescript-eslint/dot-notation, new-cap, @typescript-eslint/no-unsafe-argument
12336
10566
  theme.controls["deviceControl"] = new Controls["device"](_extends$1({
12337
10567
  rootContainer: theme.$container,
@@ -12344,7 +10574,7 @@
12344
10574
  type: theme.options.type,
12345
10575
  deviceSerial: theme.urlInfo.deviceSerial,
12346
10576
  channelNo: theme.urlInfo.channelNo
12347
- }, ((_theme_options2 = theme.options) == null ? void 0 : _theme_options2["deviceOptions"]) || {}, {
10577
+ }, ((_theme_options = theme.options) == null ? void 0 : _theme_options["deviceOptions"]) || {}, {
12348
10578
  props: props
12349
10579
  }));
12350
10580
  }
@@ -12354,7 +10584,7 @@
12354
10584
  // footer
12355
10585
  if (Controls[item.iconId]) {
12356
10586
  if (theme.options["" + item.iconId + "Options"] !== null) {
12357
- var _theme_options3;
10587
+ var _theme_options1;
12358
10588
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
12359
10589
  theme.controls["" + item.iconId + "Control"] = new Controls[item.iconId](_extends$1({
12360
10590
  rootContainer: theme.$container,
@@ -12373,7 +10603,7 @@
12373
10603
  } : {}, {
12374
10604
  PLAY_TYPE: theme.options.type,
12375
10605
  sdkType: theme.options.sdkType
12376
- }, ((_theme_options3 = theme.options) == null ? void 0 : _theme_options3["" + item.iconId + "Options"]) || {}, {
10606
+ }, ((_theme_options1 = theme.options) == null ? void 0 : _theme_options1["" + item.iconId + "Options"]) || {}, {
12377
10607
  props: props
12378
10608
  }));
12379
10609
  }
@@ -12461,7 +10691,7 @@
12461
10691
  props.height = Math.floor(theme.$container.clientHeight);
12462
10692
  }
12463
10693
  if (filterThemeData.header) {
12464
- theme._header = new Header({
10694
+ theme._header = new Header$1({
12465
10695
  getPopupContainer: function() {
12466
10696
  return theme.$container;
12467
10697
  },
@@ -12526,8 +10756,7 @@
12526
10756
  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 : []);
12527
10757
  // FIXME: 这个逻辑实际上是有问题的
12528
10758
  _needTimeLine = list.some(function(item) {
12529
- var _theme_options;
12530
- return REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId);
10759
+ return REC_GROUP.includes(item.iconId);
12531
10760
  });
12532
10761
  // PC 单独渲染timeLine
12533
10762
  if (!Utils.isMobile && !(theme.options.timeLineOptions === null || theme.options.disabledTimeLine) && _needTimeLine) {
@@ -12555,8 +10784,8 @@
12555
10784
  }
12556
10785
  if (theme.options.recOptions !== null && ((_theme_options_mobileExtendOptions2 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions2.controls.includes('rec')) && _needTimeLine) {
12557
10786
  [].concat(((_filterThemeData_header1 = filterThemeData.header) == null ? void 0 : _filterThemeData_header1.btnList) || [], (_filterThemeData_footer_btnList1 = (_filterThemeData_footer1 = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer1.btnList) != null ? _filterThemeData_footer_btnList1 : []).forEach(function(item) {
12558
- var _theme_options, _theme__mobileExtend;
12559
- if (REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId)) _renderRecType(theme, (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight, item.iconId, props);
10787
+ var _theme__mobileExtend;
10788
+ if (REC_GROUP.includes(item.iconId)) _renderRecType(theme, (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight, item.iconId, props);
12560
10789
  });
12561
10790
  }
12562
10791
  if ((theme.options.timeLineOptions !== null || !theme.options.disabledTimeLine) && ((_theme_options_mobileExtendOptions3 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions3.controls.includes('timeLine')) && _needTimeLine) {
@@ -12918,13 +11147,13 @@
12918
11147
  _this._initOptions(options);
12919
11148
  if (_this.options.type === 'ezopen') {
12920
11149
  var _this_urlInfo_searchParams, _this_urlInfo;
12921
- _this.urlInfo = distExports$6.parseEzopenUrl(_this.options.url);
11150
+ _this.urlInfo = distExports$4.parseEzopenUrl(_this.options.url);
12922
11151
  if ((_this_urlInfo = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams = _this_urlInfo.searchParams) == null ? void 0 : _this_urlInfo_searchParams.spaceId) {
12923
11152
  _this.options.spaceId = _this.urlInfo.searchParams.spaceId;
12924
11153
  }
12925
11154
  if (_this.urlInfo.type === 'rec') {
12926
11155
  var _this_urlInfo_searchParams1, _this_urlInfo1, _this_urlInfo_searchParams2, _this_urlInfo2;
12927
- _this._seekDate = ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.begin) ? distExports$6.DateTime.toDate((_this_urlInfo2 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams2 = _this_urlInfo2.searchParams) == null ? void 0 : _this_urlInfo_searchParams2.begin) : distExports$6.DateTime.toDate(distExports$6.DateTime.format(new Date(), 'YYYY/MM/DD') + ' 00:00:00');
11156
+ _this._seekDate = ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.begin) ? distExports$4.DateTime.toDate((_this_urlInfo2 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams2 = _this_urlInfo2.searchParams) == null ? void 0 : _this_urlInfo_searchParams2.begin) : distExports$4.DateTime.toDate(distExports$4.DateTime.format(new Date(), 'YYYY/MM/DD') + ' 00:00:00');
12928
11157
  }
12929
11158
  }
12930
11159
  _this._getRecType(_this.options.url);
@@ -13231,7 +11460,7 @@
13231
11460
  clone: false
13232
11461
  });
13233
11462
  // prettier-ignore
13234
- this.i18n = new I18n(locales, {
11463
+ this.i18n = new I18n$1(locales, {
13235
11464
  defaultLocale: language
13236
11465
  });
13237
11466
  // 默认清晰度列表
@@ -13699,7 +11928,7 @@
13699
11928
  * @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
13700
11929
  */ _proto._getRecType = function _getRecType(url) {
13701
11930
  if (this.options.type === 'ezopen' && /^ezopen:\/\//.test(url)) {
13702
- var urlInfo = distExports$6.parseEzopenUrl(url);
11931
+ var urlInfo = distExports$4.parseEzopenUrl(url);
13703
11932
  if (urlInfo.type === 'rec') {
13704
11933
  var _urlInfo_searchParams;
13705
11934
  if (urlInfo.recType === 'cloud' && (urlInfo == null ? void 0 : (_urlInfo_searchParams = urlInfo.searchParams) == null ? void 0 : _urlInfo_searchParams.busType) === '7') {
@@ -14164,7 +12393,7 @@
14164
12393
  zh: zh,
14165
12394
  en: en
14166
12395
  };
14167
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.4-beta.3';
12396
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.0-beta.1';
14168
12397
 
14169
12398
  // 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
14170
12399