@ezuikit/player-theme 3.1.0-beta.4 → 3.1.1-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/constant.js +2 -2
- package/dist/index.cjs +173 -80
- package/dist/index.esm.js +173 -80
- package/dist/index.umd.js +457 -1547
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +76 -41
- package/package.json +12 -15
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v3.1.
|
|
3
|
-
* Copyright (c) 2026-07-
|
|
2
|
+
* @ezuikit/player-theme v3.1.1-beta.1
|
|
3
|
+
* Copyright (c) 2026-07-30 11:17:11 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
(function (global, factory) {
|
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
return (locales == null ? void 0 : locales[language]) || (locales == null ? void 0 : locales['zh']) || {};
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
-
function _defineProperties$
|
|
594
|
+
function _defineProperties$9(target, props) {
|
|
595
595
|
for(var i = 0; i < props.length; i++){
|
|
596
596
|
var descriptor = props[i];
|
|
597
597
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -601,10 +601,10 @@
|
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
function _create_class$k(Constructor, protoProps, staticProps) {
|
|
604
|
-
if (protoProps) _defineProperties$
|
|
604
|
+
if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
|
|
605
605
|
return Constructor;
|
|
606
606
|
}
|
|
607
|
-
function _inherits$
|
|
607
|
+
function _inherits$y(subClass, superClass) {
|
|
608
608
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
609
609
|
throw new TypeError("Super expression must either be null or a function");
|
|
610
610
|
}
|
|
@@ -636,7 +636,7 @@
|
|
|
636
636
|
* const myControl = new MyControl({})
|
|
637
637
|
* ```
|
|
638
638
|
*/ var Control = /*#__PURE__*/ function(EventEmitter) {
|
|
639
|
-
_inherits$
|
|
639
|
+
_inherits$y(Control, EventEmitter);
|
|
640
640
|
function Control(options) {
|
|
641
641
|
var _this;
|
|
642
642
|
var _this___options;
|
|
@@ -825,7 +825,7 @@
|
|
|
825
825
|
};
|
|
826
826
|
return _extends$A.apply(this, arguments);
|
|
827
827
|
}
|
|
828
|
-
function _inherits$
|
|
828
|
+
function _inherits$x(subClass, superClass) {
|
|
829
829
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
830
830
|
throw new TypeError("Super expression must either be null or a function");
|
|
831
831
|
}
|
|
@@ -850,7 +850,7 @@
|
|
|
850
850
|
* 加载动画控件
|
|
851
851
|
* @category Control
|
|
852
852
|
*/ var Loading = /*#__PURE__*/ function(Control) {
|
|
853
|
-
_inherits$
|
|
853
|
+
_inherits$x(Loading, Control);
|
|
854
854
|
function Loading(options) {
|
|
855
855
|
if (options === void 0) options = {};
|
|
856
856
|
var _this;
|
|
@@ -906,7 +906,7 @@
|
|
|
906
906
|
};
|
|
907
907
|
return _extends$z.apply(this, arguments);
|
|
908
908
|
}
|
|
909
|
-
function _inherits$
|
|
909
|
+
function _inherits$w(subClass, superClass) {
|
|
910
910
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
911
911
|
throw new TypeError("Super expression must either be null or a function");
|
|
912
912
|
}
|
|
@@ -936,7 +936,7 @@
|
|
|
936
936
|
* 封面控件
|
|
937
937
|
* @category Control
|
|
938
938
|
*/ var Poster = /*#__PURE__*/ function(Control) {
|
|
939
|
-
_inherits$
|
|
939
|
+
_inherits$w(Poster, Control);
|
|
940
940
|
function Poster(options) {
|
|
941
941
|
if (options === void 0) options = {};
|
|
942
942
|
var _this;
|
|
@@ -1246,7 +1246,7 @@
|
|
|
1246
1246
|
};
|
|
1247
1247
|
return _extends$y.apply(this, arguments);
|
|
1248
1248
|
}
|
|
1249
|
-
function _inherits$
|
|
1249
|
+
function _inherits$v(subClass, superClass) {
|
|
1250
1250
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
1251
1251
|
throw new TypeError("Super expression must either be null or a function");
|
|
1252
1252
|
}
|
|
@@ -1271,7 +1271,7 @@
|
|
|
1271
1271
|
* 消息控件
|
|
1272
1272
|
* @category Control
|
|
1273
1273
|
*/ var Message = /*#__PURE__*/ function(Control) {
|
|
1274
|
-
_inherits$
|
|
1274
|
+
_inherits$v(Message, Control);
|
|
1275
1275
|
function Message(options) {
|
|
1276
1276
|
if (options === void 0) options = {};
|
|
1277
1277
|
var _this;
|
|
@@ -1300,7 +1300,11 @@
|
|
|
1300
1300
|
if (duration === void 0) duration = 2;
|
|
1301
1301
|
this._toast(msg, 'warn', duration);
|
|
1302
1302
|
};
|
|
1303
|
-
|
|
1303
|
+
/**
|
|
1304
|
+
* toast 错误消息(渲染在 rootContainer 上的浮层)
|
|
1305
|
+
* @param {string} msg 消息内容
|
|
1306
|
+
* @param {number} duration 自动关闭延时,单位秒, 默认 2s 后关闭
|
|
1307
|
+
*/ _proto.toastError = function toastError(msg, duration) {
|
|
1304
1308
|
if (duration === void 0) duration = 2;
|
|
1305
1309
|
this._toast(msg, 'error', duration);
|
|
1306
1310
|
};
|
|
@@ -1415,7 +1419,7 @@
|
|
|
1415
1419
|
return Message;
|
|
1416
1420
|
}(Control);
|
|
1417
1421
|
|
|
1418
|
-
function _defineProperties$
|
|
1422
|
+
function _defineProperties$8(target, props) {
|
|
1419
1423
|
for(var i = 0; i < props.length; i++){
|
|
1420
1424
|
var descriptor = props[i];
|
|
1421
1425
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -1425,7 +1429,7 @@
|
|
|
1425
1429
|
}
|
|
1426
1430
|
}
|
|
1427
1431
|
function _create_class$j(Constructor, protoProps, staticProps) {
|
|
1428
|
-
if (protoProps) _defineProperties$
|
|
1432
|
+
if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
|
|
1429
1433
|
return Constructor;
|
|
1430
1434
|
}
|
|
1431
1435
|
function _extends$x() {
|
|
@@ -1442,7 +1446,7 @@
|
|
|
1442
1446
|
};
|
|
1443
1447
|
return _extends$x.apply(this, arguments);
|
|
1444
1448
|
}
|
|
1445
|
-
function _inherits$
|
|
1449
|
+
function _inherits$u(subClass, superClass) {
|
|
1446
1450
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
1447
1451
|
throw new TypeError("Super expression must either be null or a function");
|
|
1448
1452
|
}
|
|
@@ -1466,7 +1470,7 @@
|
|
|
1466
1470
|
* 播放/暂停控件
|
|
1467
1471
|
* @category Control
|
|
1468
1472
|
*/ var Play = /*#__PURE__*/ function(Control) {
|
|
1469
|
-
_inherits$
|
|
1473
|
+
_inherits$u(Play, Control);
|
|
1470
1474
|
function Play(options) {
|
|
1471
1475
|
var _this;
|
|
1472
1476
|
_this = Control.call(this, _extends$x({}, options, {
|
|
@@ -1530,12 +1534,12 @@
|
|
|
1530
1534
|
* LICENSE file in the root directory of this source tree.
|
|
1531
1535
|
*/
|
|
1532
1536
|
|
|
1533
|
-
var dist$
|
|
1534
|
-
var hasRequiredDist$
|
|
1537
|
+
var dist$5;
|
|
1538
|
+
var hasRequiredDist$5;
|
|
1535
1539
|
|
|
1536
|
-
function requireDist$
|
|
1537
|
-
if (hasRequiredDist$
|
|
1538
|
-
hasRequiredDist$
|
|
1540
|
+
function requireDist$5 () {
|
|
1541
|
+
if (hasRequiredDist$5) return dist$5;
|
|
1542
|
+
hasRequiredDist$5 = 1;
|
|
1539
1543
|
|
|
1540
1544
|
function _array_like_to_array(arr, len) {
|
|
1541
1545
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -2112,12 +2116,12 @@
|
|
|
2112
2116
|
*/
|
|
2113
2117
|
Picker.VERSION = '1.1.8';
|
|
2114
2118
|
|
|
2115
|
-
dist$
|
|
2116
|
-
return dist$
|
|
2119
|
+
dist$5 = Picker;
|
|
2120
|
+
return dist$5;
|
|
2117
2121
|
}
|
|
2118
2122
|
|
|
2119
|
-
var distExports$
|
|
2120
|
-
var Picker = /*@__PURE__*/getDefaultExportFromCjs(distExports$
|
|
2123
|
+
var distExports$5 = requireDist$5();
|
|
2124
|
+
var Picker = /*@__PURE__*/getDefaultExportFromCjs(distExports$5);
|
|
2121
2125
|
|
|
2122
2126
|
var delegate$2 = {exports: {}};
|
|
2123
2127
|
|
|
@@ -2258,12 +2262,12 @@
|
|
|
2258
2262
|
var delegateExports = requireDelegate();
|
|
2259
2263
|
var delegate = /*@__PURE__*/getDefaultExportFromCjs(delegateExports);
|
|
2260
2264
|
|
|
2261
|
-
var cjs
|
|
2262
|
-
var hasRequiredCjs
|
|
2265
|
+
var cjs;
|
|
2266
|
+
var hasRequiredCjs;
|
|
2263
2267
|
|
|
2264
|
-
function requireCjs
|
|
2265
|
-
if (hasRequiredCjs
|
|
2266
|
-
hasRequiredCjs
|
|
2268
|
+
function requireCjs () {
|
|
2269
|
+
if (hasRequiredCjs) return cjs;
|
|
2270
|
+
hasRequiredCjs = 1;
|
|
2267
2271
|
|
|
2268
2272
|
var isMergeableObject = function isMergeableObject(value) {
|
|
2269
2273
|
return isNonNullObject(value)
|
|
@@ -2395,32 +2399,32 @@
|
|
|
2395
2399
|
|
|
2396
2400
|
var deepmerge_1 = deepmerge;
|
|
2397
2401
|
|
|
2398
|
-
cjs
|
|
2399
|
-
return cjs
|
|
2402
|
+
cjs = deepmerge_1;
|
|
2403
|
+
return cjs;
|
|
2400
2404
|
}
|
|
2401
2405
|
|
|
2402
|
-
var cjsExports
|
|
2403
|
-
var deepmerge
|
|
2406
|
+
var cjsExports = requireCjs();
|
|
2407
|
+
var deepmerge = /*@__PURE__*/getDefaultExportFromCjs(cjsExports);
|
|
2404
2408
|
|
|
2405
|
-
var dist$
|
|
2409
|
+
var dist$4 = {};
|
|
2406
2410
|
|
|
2407
2411
|
/*
|
|
2408
|
-
* @ezuikit/utils-tools v2.0.
|
|
2412
|
+
* @ezuikit/utils-tools v2.0.5
|
|
2409
2413
|
* tools utils
|
|
2410
|
-
* Copyright (c) 2026-
|
|
2414
|
+
* Copyright (c) 2026-07-06 Ezviz-OpenBiz
|
|
2411
2415
|
* Released under the MIT License.
|
|
2412
2416
|
*/
|
|
2413
2417
|
|
|
2414
|
-
var hasRequiredDist$
|
|
2418
|
+
var hasRequiredDist$4;
|
|
2415
2419
|
|
|
2416
|
-
function requireDist$
|
|
2417
|
-
if (hasRequiredDist$
|
|
2418
|
-
hasRequiredDist$
|
|
2419
|
-
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$
|
|
2420
|
-
return dist$
|
|
2420
|
+
function requireDist$4 () {
|
|
2421
|
+
if (hasRequiredDist$4) return dist$4;
|
|
2422
|
+
hasRequiredDist$4 = 1;
|
|
2423
|
+
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.normalizeUnit=function(unit){return "year"===unit||"y"===unit||"年"===unit?"year":"month"===unit||"M"===unit||"月"===unit?"month":"day"===unit||"d"===unit||"日"===unit?"day":"hour"===unit||"h"===unit||"时"===unit?"hour":"minute"===unit||"m"===unit||"分"===unit?"minute":"second"},DateTime.daysInMonth=function(year,month){return new Date(year,month+1,0).getDate()},DateTime.shiftMonth=function(baseDate,months){var result=new Date(baseDate.getTime()),currentDate=result.getDate();result.setDate(1),result.setMonth(result.getMonth()+months);var maxDate=DateTime.daysInMonth(result.getFullYear(),result.getMonth());return result.setDate(Math.min(currentDate,maxDate)),result},DateTime.add=function(input,value,unit){if(void 0===unit&&(unit="day"),!Number.isFinite(value))throw new Error("Invalid value");var baseDate=DateTime.toDate(input),normalizedUnit=DateTime.normalizeUnit(unit);if("year"===normalizedUnit)return DateTime.shiftMonth(baseDate,12*value);if("month"===normalizedUnit)return DateTime.shiftMonth(baseDate,value);var result=new Date(baseDate.getTime());return result.setTime(result.getTime()+value*{day:864e5,hour:36e5,minute:6e4,second:1e3}[normalizedUnit]),result},DateTime.subtract=function(input,value,unit){return void 0===unit&&(unit="day"),DateTime.add(input,-value,unit)},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};
|
|
2424
|
+
return dist$4;
|
|
2421
2425
|
}
|
|
2422
2426
|
|
|
2423
|
-
var distExports$
|
|
2427
|
+
var distExports$4 = requireDist$4();
|
|
2424
2428
|
|
|
2425
2429
|
/**
|
|
2426
2430
|
* 节流函数
|
|
@@ -2648,9 +2652,9 @@
|
|
|
2648
2652
|
* ```ts
|
|
2649
2653
|
* Utils.isMobile // true | false
|
|
2650
2654
|
* ```
|
|
2651
|
-
*/ Utils.isMobile = distExports$
|
|
2655
|
+
*/ Utils.isMobile = distExports$4.isMobile();
|
|
2652
2656
|
|
|
2653
|
-
function _defineProperties$
|
|
2657
|
+
function _defineProperties$7(target, props) {
|
|
2654
2658
|
for(var i = 0; i < props.length; i++){
|
|
2655
2659
|
var descriptor = props[i];
|
|
2656
2660
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -2660,7 +2664,7 @@
|
|
|
2660
2664
|
}
|
|
2661
2665
|
}
|
|
2662
2666
|
function _create_class$i(Constructor, protoProps, staticProps) {
|
|
2663
|
-
if (protoProps) _defineProperties$
|
|
2667
|
+
if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
|
|
2664
2668
|
return Constructor;
|
|
2665
2669
|
}
|
|
2666
2670
|
var PROGRESS_DEFAULT_OPTIONS = {
|
|
@@ -2974,7 +2978,7 @@
|
|
|
2974
2978
|
return Progress;
|
|
2975
2979
|
}();
|
|
2976
2980
|
|
|
2977
|
-
function _defineProperties$
|
|
2981
|
+
function _defineProperties$6(target, props) {
|
|
2978
2982
|
for(var i = 0; i < props.length; i++){
|
|
2979
2983
|
var descriptor = props[i];
|
|
2980
2984
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -2984,7 +2988,7 @@
|
|
|
2984
2988
|
}
|
|
2985
2989
|
}
|
|
2986
2990
|
function _create_class$h(Constructor, protoProps, staticProps) {
|
|
2987
|
-
if (protoProps) _defineProperties$
|
|
2991
|
+
if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
|
|
2988
2992
|
return Constructor;
|
|
2989
2993
|
}
|
|
2990
2994
|
function _extends$w() {
|
|
@@ -3001,7 +3005,7 @@
|
|
|
3001
3005
|
};
|
|
3002
3006
|
return _extends$w.apply(this, arguments);
|
|
3003
3007
|
}
|
|
3004
|
-
function _inherits$
|
|
3008
|
+
function _inherits$t(subClass, superClass) {
|
|
3005
3009
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
3006
3010
|
throw new TypeError("Super expression must either be null or a function");
|
|
3007
3011
|
}
|
|
@@ -3033,7 +3037,7 @@
|
|
|
3033
3037
|
* 音量调节控件
|
|
3034
3038
|
* @category Control
|
|
3035
3039
|
*/ var Volume = /*#__PURE__*/ function(Control) {
|
|
3036
|
-
_inherits$
|
|
3040
|
+
_inherits$t(Volume, Control);
|
|
3037
3041
|
function Volume(options) {
|
|
3038
3042
|
if (options === void 0) options = {};
|
|
3039
3043
|
var _this;
|
|
@@ -3042,8 +3046,8 @@
|
|
|
3042
3046
|
tagName: 'span',
|
|
3043
3047
|
classNameSuffix: 'volume',
|
|
3044
3048
|
controlType: 'button'
|
|
3045
|
-
})) || this, _this._muted = false, _this._volume = 0, /** 用来记录静音前的音量 */ _this._lastVolume = 0, _this._progress = null;
|
|
3046
|
-
_this._options = deepmerge
|
|
3049
|
+
})) || this, _this._muted = false, _this._volume = 0, /** 用来记录静音前的音量 */ _this._lastVolume = 0, /** 音量进度条实例 @private */ _this._progress = null;
|
|
3050
|
+
_this._options = deepmerge(VOLUME_DEFAULT_OPTIONS, options, {
|
|
3047
3051
|
clone: false
|
|
3048
3052
|
});
|
|
3049
3053
|
_this._render();
|
|
@@ -3911,7 +3915,7 @@
|
|
|
3911
3915
|
};
|
|
3912
3916
|
return _extends$v.apply(this, arguments);
|
|
3913
3917
|
}
|
|
3914
|
-
function _inherits$
|
|
3918
|
+
function _inherits$s(subClass, superClass) {
|
|
3915
3919
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
3916
3920
|
throw new TypeError("Super expression must either be null or a function");
|
|
3917
3921
|
}
|
|
@@ -3935,7 +3939,7 @@
|
|
|
3935
3939
|
* 全屏控件
|
|
3936
3940
|
* @category Control
|
|
3937
3941
|
*/ var Fullscreen = /*#__PURE__*/ function(Control) {
|
|
3938
|
-
_inherits$
|
|
3942
|
+
_inherits$s(Fullscreen, Control);
|
|
3939
3943
|
function Fullscreen(options) {
|
|
3940
3944
|
var _this;
|
|
3941
3945
|
var _options_props, _this_options;
|
|
@@ -3943,7 +3947,7 @@
|
|
|
3943
3947
|
tagName: 'span',
|
|
3944
3948
|
classNameSuffix: 'fullscreen',
|
|
3945
3949
|
controlType: 'button'
|
|
3946
|
-
}, options)) || this, _this.isCurrentFullscreen = false;
|
|
3950
|
+
}, options)) || this, /** 当前是否处于全屏状态 */ _this.isCurrentFullscreen = false;
|
|
3947
3951
|
_this.options = options;
|
|
3948
3952
|
_this.isCurrentFullscreen = !!((_options_props = options.props) == null ? void 0 : _options_props.isCurrentFullscreen);
|
|
3949
3953
|
_this._$rootContainer = (_this_options = _this.options) == null ? void 0 : _this_options.rootContainer;
|
|
@@ -4018,7 +4022,7 @@
|
|
|
4018
4022
|
};
|
|
4019
4023
|
return _extends$u.apply(this, arguments);
|
|
4020
4024
|
}
|
|
4021
|
-
function _inherits$
|
|
4025
|
+
function _inherits$r(subClass, superClass) {
|
|
4022
4026
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
4023
4027
|
throw new TypeError("Super expression must either be null or a function");
|
|
4024
4028
|
}
|
|
@@ -4042,7 +4046,7 @@
|
|
|
4042
4046
|
* 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
|
|
4043
4047
|
* @category Control
|
|
4044
4048
|
*/ var Rec = /*#__PURE__*/ function(Control) {
|
|
4045
|
-
_inherits$
|
|
4049
|
+
_inherits$r(Rec, Control);
|
|
4046
4050
|
function Rec(options) {
|
|
4047
4051
|
var _this;
|
|
4048
4052
|
var _options_props;
|
|
@@ -4059,14 +4063,19 @@
|
|
|
4059
4063
|
return _this;
|
|
4060
4064
|
}
|
|
4061
4065
|
var _proto = Rec.prototype;
|
|
4062
|
-
|
|
4066
|
+
/**
|
|
4067
|
+
* 销毁
|
|
4068
|
+
*/ _proto.destroy = function destroy() {
|
|
4063
4069
|
var _this__delegation;
|
|
4064
4070
|
this.$container.removeEventListener('dblclick', this._onDBlClick);
|
|
4065
4071
|
(_this__delegation = this._delegation) == null ? void 0 : _this__delegation.destroy();
|
|
4066
4072
|
this._delegation = null;
|
|
4067
4073
|
Control.prototype.destroy.call(this);
|
|
4068
4074
|
};
|
|
4069
|
-
|
|
4075
|
+
/**
|
|
4076
|
+
* 添加回放类型图标
|
|
4077
|
+
* @param {string} id 回放类型 'rec' | 'cloudRec' | 'cloudRecord'
|
|
4078
|
+
*/ _proto.addRecType = function addRecType(id) {
|
|
4070
4079
|
var spanIcon = '';
|
|
4071
4080
|
switch(id){
|
|
4072
4081
|
case 'rec':
|
|
@@ -4138,7 +4147,7 @@
|
|
|
4138
4147
|
return Rec;
|
|
4139
4148
|
}(Control);
|
|
4140
4149
|
|
|
4141
|
-
var dist$
|
|
4150
|
+
var dist$3 = {exports: {}};
|
|
4142
4151
|
|
|
4143
4152
|
/*
|
|
4144
4153
|
* @ezuikit/utils-i18n v2.0.0
|
|
@@ -4147,17 +4156,17 @@
|
|
|
4147
4156
|
* Released under the MIT License.
|
|
4148
4157
|
*/
|
|
4149
4158
|
|
|
4150
|
-
var hasRequiredDist$
|
|
4159
|
+
var hasRequiredDist$3;
|
|
4151
4160
|
|
|
4152
|
-
function requireDist$
|
|
4153
|
-
if (hasRequiredDist$
|
|
4154
|
-
hasRequiredDist$
|
|
4155
|
-
var deepmerge=requireCjs
|
|
4156
|
-
return dist$
|
|
4161
|
+
function requireDist$3 () {
|
|
4162
|
+
if (hasRequiredDist$3) return dist$3.exports;
|
|
4163
|
+
hasRequiredDist$3 = 1;
|
|
4164
|
+
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;
|
|
4165
|
+
return dist$3.exports;
|
|
4157
4166
|
}
|
|
4158
4167
|
|
|
4159
|
-
var distExports$
|
|
4160
|
-
var I18n
|
|
4168
|
+
var distExports$3 = requireDist$3();
|
|
4169
|
+
var I18n = /*@__PURE__*/getDefaultExportFromCjs(distExports$3);
|
|
4161
4170
|
|
|
4162
4171
|
/*
|
|
4163
4172
|
* @ezuikit/utils-logger v2.0.0
|
|
@@ -4166,20 +4175,20 @@
|
|
|
4166
4175
|
* Released under the MIT License.
|
|
4167
4176
|
*/
|
|
4168
4177
|
|
|
4169
|
-
var dist$
|
|
4170
|
-
var hasRequiredDist$
|
|
4178
|
+
var dist$2;
|
|
4179
|
+
var hasRequiredDist$2;
|
|
4171
4180
|
|
|
4172
|
-
function requireDist$
|
|
4173
|
-
if (hasRequiredDist$
|
|
4174
|
-
hasRequiredDist$
|
|
4175
|
-
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&¤t.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$4=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)}})};
|
|
4176
|
-
return dist$
|
|
4181
|
+
function requireDist$2 () {
|
|
4182
|
+
if (hasRequiredDist$2) return dist$2;
|
|
4183
|
+
hasRequiredDist$2 = 1;
|
|
4184
|
+
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&¤t.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)}})};
|
|
4185
|
+
return dist$2;
|
|
4177
4186
|
}
|
|
4178
4187
|
|
|
4179
|
-
var distExports$
|
|
4180
|
-
var Logger = /*@__PURE__*/getDefaultExportFromCjs(distExports$
|
|
4188
|
+
var distExports$2 = requireDist$2();
|
|
4189
|
+
var Logger = /*@__PURE__*/getDefaultExportFromCjs(distExports$2);
|
|
4181
4190
|
|
|
4182
|
-
var zh
|
|
4191
|
+
var zh = {
|
|
4183
4192
|
391001: '取流地址或端口非法',
|
|
4184
4193
|
395000: '服务内部异常,请稍后重试',
|
|
4185
4194
|
395400: '预览取流参数异常',
|
|
@@ -4459,7 +4468,7 @@
|
|
|
4459
4468
|
};
|
|
4460
4469
|
|
|
4461
4470
|
// 不要出现多层的的数据, 数据铺平
|
|
4462
|
-
var en
|
|
4471
|
+
var en = {
|
|
4463
4472
|
391001: 'Illegal streaming address or port',
|
|
4464
4473
|
395000: 'Internal service exception, please try again later',
|
|
4465
4474
|
395400: 'Preview streaming parameter exception',
|
|
@@ -5369,7 +5378,7 @@
|
|
|
5369
5378
|
voice: voice
|
|
5370
5379
|
};
|
|
5371
5380
|
|
|
5372
|
-
function _inherits$
|
|
5381
|
+
function _inherits$q(subClass, superClass) {
|
|
5373
5382
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
5374
5383
|
throw new TypeError("Super expression must either be null or a function");
|
|
5375
5384
|
}
|
|
@@ -5393,7 +5402,7 @@
|
|
|
5393
5402
|
* 截图控件
|
|
5394
5403
|
* @category Content
|
|
5395
5404
|
*/ var Content = /*#__PURE__*/ function(EventEmitter) {
|
|
5396
|
-
_inherits$
|
|
5405
|
+
_inherits$q(Content, EventEmitter);
|
|
5397
5406
|
function Content(options) {
|
|
5398
5407
|
var _this;
|
|
5399
5408
|
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._cleanUpResizeObserver = null, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
|
|
@@ -5522,7 +5531,7 @@
|
|
|
5522
5531
|
};
|
|
5523
5532
|
return _extends$t.apply(this, arguments);
|
|
5524
5533
|
}
|
|
5525
|
-
function _inherits$
|
|
5534
|
+
function _inherits$p(subClass, superClass) {
|
|
5526
5535
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
5527
5536
|
throw new TypeError("Super expression must either be null or a function");
|
|
5528
5537
|
}
|
|
@@ -5546,7 +5555,7 @@
|
|
|
5546
5555
|
* 更多控件
|
|
5547
5556
|
* @category Control
|
|
5548
5557
|
*/ var More = /*#__PURE__*/ function(Control) {
|
|
5549
|
-
_inherits$
|
|
5558
|
+
_inherits$p(More, Control);
|
|
5550
5559
|
function More(options) {
|
|
5551
5560
|
var _this;
|
|
5552
5561
|
_this = Control.call(this, _extends$t({}, options, {
|
|
@@ -6270,7 +6279,7 @@
|
|
|
6270
6279
|
if (theme.$container) theme.$container.style.cssText += cssText;
|
|
6271
6280
|
}
|
|
6272
6281
|
|
|
6273
|
-
function _defineProperties$
|
|
6282
|
+
function _defineProperties$5(target, props) {
|
|
6274
6283
|
for(var i = 0; i < props.length; i++){
|
|
6275
6284
|
var descriptor = props[i];
|
|
6276
6285
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -6280,7 +6289,7 @@
|
|
|
6280
6289
|
}
|
|
6281
6290
|
}
|
|
6282
6291
|
function _create_class$g(Constructor, protoProps, staticProps) {
|
|
6283
|
-
if (protoProps) _defineProperties$
|
|
6292
|
+
if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
|
|
6284
6293
|
return Constructor;
|
|
6285
6294
|
}
|
|
6286
6295
|
function _extends$s() {
|
|
@@ -6297,7 +6306,7 @@
|
|
|
6297
6306
|
};
|
|
6298
6307
|
return _extends$s.apply(this, arguments);
|
|
6299
6308
|
}
|
|
6300
|
-
function _inherits$
|
|
6309
|
+
function _inherits$o(subClass, superClass) {
|
|
6301
6310
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6302
6311
|
throw new TypeError("Super expression must either be null or a function");
|
|
6303
6312
|
}
|
|
@@ -6325,7 +6334,7 @@
|
|
|
6325
6334
|
* 电子放大控件
|
|
6326
6335
|
* @category Control
|
|
6327
6336
|
*/ var Zoom$1 = /*#__PURE__*/ function(Control) {
|
|
6328
|
-
_inherits$
|
|
6337
|
+
_inherits$o(Zoom, Control);
|
|
6329
6338
|
function Zoom(options) {
|
|
6330
6339
|
var _this;
|
|
6331
6340
|
_this = Control.call(this, _extends$s({}, options, {
|
|
@@ -6616,7 +6625,12 @@
|
|
|
6616
6625
|
};
|
|
6617
6626
|
}
|
|
6618
6627
|
}
|
|
6619
|
-
|
|
6628
|
+
/**
|
|
6629
|
+
* 获取开放平台轻应用模板数据
|
|
6630
|
+
* @param theme
|
|
6631
|
+
* @param id 开放平台轻应用模板id (https://open.ys7.com/console/ezuikit/template.html)
|
|
6632
|
+
* @returns
|
|
6633
|
+
*/ function getThemeDataByTemplate(theme, id) {
|
|
6620
6634
|
return _async_to_generator$7(function() {
|
|
6621
6635
|
var _theme_options_token_httpToken, _theme_options_token, url;
|
|
6622
6636
|
return _ts_generator$7(this, function(_state) {
|
|
@@ -6925,7 +6939,8 @@
|
|
|
6925
6939
|
}
|
|
6926
6940
|
/**
|
|
6927
6941
|
* 获取主题数据 (主题优先级: template > themeDate)
|
|
6928
|
-
* @param
|
|
6942
|
+
* @param theme 主题实例
|
|
6943
|
+
* @param data 主题数据或模板id(萤石开放平台轻应用32位模板字符串)或模板名称
|
|
6929
6944
|
* @returns
|
|
6930
6945
|
*/ function getThemeData(theme, data) {
|
|
6931
6946
|
return _async_to_generator$6(function() {
|
|
@@ -7131,7 +7146,7 @@
|
|
|
7131
7146
|
};
|
|
7132
7147
|
return _extends$p.apply(this, arguments);
|
|
7133
7148
|
}
|
|
7134
|
-
function _inherits$
|
|
7149
|
+
function _inherits$n(subClass, superClass) {
|
|
7135
7150
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7136
7151
|
throw new TypeError("Super expression must either be null or a function");
|
|
7137
7152
|
}
|
|
@@ -7152,7 +7167,7 @@
|
|
|
7152
7167
|
return _set_prototype_of$r(o, p);
|
|
7153
7168
|
}
|
|
7154
7169
|
var Footer$1 = /*#__PURE__*/ function(Component) {
|
|
7155
|
-
_inherits$
|
|
7170
|
+
_inherits$n(Footer, Component);
|
|
7156
7171
|
function Footer(options) {
|
|
7157
7172
|
if (options === void 0) options = {};
|
|
7158
7173
|
return Component.call(this, _extends$p({}, options, {
|
|
@@ -7176,7 +7191,7 @@
|
|
|
7176
7191
|
};
|
|
7177
7192
|
return _extends$o.apply(this, arguments);
|
|
7178
7193
|
}
|
|
7179
|
-
function _inherits$
|
|
7194
|
+
function _inherits$m(subClass, superClass) {
|
|
7180
7195
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7181
7196
|
throw new TypeError("Super expression must either be null or a function");
|
|
7182
7197
|
}
|
|
@@ -7197,7 +7212,7 @@
|
|
|
7197
7212
|
return _set_prototype_of$q(o, p);
|
|
7198
7213
|
}
|
|
7199
7214
|
var Header$1 = /*#__PURE__*/ function(Component) {
|
|
7200
|
-
_inherits$
|
|
7215
|
+
_inherits$m(Header, Component);
|
|
7201
7216
|
function Header(options) {
|
|
7202
7217
|
if (options === void 0) options = {};
|
|
7203
7218
|
return Component.call(this, _extends$o({}, options, {
|
|
@@ -7380,7 +7395,7 @@
|
|
|
7380
7395
|
};
|
|
7381
7396
|
return _extends$n.apply(this, arguments);
|
|
7382
7397
|
}
|
|
7383
|
-
function _inherits$
|
|
7398
|
+
function _inherits$l(subClass, superClass) {
|
|
7384
7399
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7385
7400
|
throw new TypeError("Super expression must either be null or a function");
|
|
7386
7401
|
}
|
|
@@ -7405,7 +7420,7 @@
|
|
|
7405
7420
|
* 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
|
|
7406
7421
|
* @category Control
|
|
7407
7422
|
*/ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
|
|
7408
|
-
_inherits$
|
|
7423
|
+
_inherits$l(GlobalFullscreen, Fullscreen);
|
|
7409
7424
|
function GlobalFullscreen(options) {
|
|
7410
7425
|
return Fullscreen.call(this, _extends$n({}, options, {
|
|
7411
7426
|
controlType: 'button',
|
|
@@ -7452,7 +7467,7 @@
|
|
|
7452
7467
|
};
|
|
7453
7468
|
return _extends$m.apply(this, arguments);
|
|
7454
7469
|
}
|
|
7455
|
-
function _inherits$
|
|
7470
|
+
function _inherits$k(subClass, superClass) {
|
|
7456
7471
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7457
7472
|
throw new TypeError("Super expression must either be null or a function");
|
|
7458
7473
|
}
|
|
@@ -7476,7 +7491,7 @@
|
|
|
7476
7491
|
* 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
|
|
7477
7492
|
* @category Control
|
|
7478
7493
|
*/ var CapturePicture = /*#__PURE__*/ function(Control) {
|
|
7479
|
-
_inherits$
|
|
7494
|
+
_inherits$k(CapturePicture, Control);
|
|
7480
7495
|
function CapturePicture(options) {
|
|
7481
7496
|
var _this;
|
|
7482
7497
|
_this = Control.call(this, _extends$m({}, options, {
|
|
@@ -7533,13 +7548,13 @@
|
|
|
7533
7548
|
}(Control);
|
|
7534
7549
|
|
|
7535
7550
|
/*
|
|
7536
|
-
* @ezuikit/control-ptz v1.0.0-beta.
|
|
7537
|
-
* Copyright (c) 2026-
|
|
7551
|
+
* @ezuikit/control-ptz v1.0.0-beta.6
|
|
7552
|
+
* Copyright (c) 2026-07-28 Ezviz-OpenBiz
|
|
7538
7553
|
* Released under the MIT License.
|
|
7539
7554
|
*/
|
|
7540
|
-
var PTZ_DEFAULT_OPTIONS={language:"zh",env:{domain:"https://open.ys7.com"},accessToken:"",speed:2,locales:{zh:{GET_PTZ_STATUS:"获取当前云台状态",GET_PTZ_STATUS_FAILED:"未加载Theme模块,无法获取云台状态",MOBILE_HIDE_PTZ:"移动端,非全屏状态不展示云台",OPTION_PTZ_FAILED:"未加载Theme模块,无法操作云台",MOBILE_PTZ_TIPS:"请通过操控云台来调整摄像机视角",PTZ_FAST:"快",PTZ_MID:"中",PTZ_SLOW:"慢",PTZ_SPEED:"调整云台转动速度",DEVICE_ZOOM:"控制设备放大/缩小画面",DEVICE_FOCUS:"调整设备焦距"},en:{GET_PTZ_STATUS:"Get current PTZ status",GET_PTZ_STATUS_FAILED:"Theme module is not loaded, PTZ status cannot be obtained",MOBILE_HIDE_PTZ:"Mobile terminal, PTZ is not displayed in non-full screen state",OPTION_PTZ_FAILED:"Theme module is not loaded, PTZ cannot be operated",MOBILE_PTZ_TIPS:"Adjust camera angle by manipulating gimbal",PTZ_FAST:"F",PTZ_MID:"M",PTZ_SLOW:"S",PTZ_SPEED:"Adjust the PTZ rotation speed",DEVICE_ZOOM:"Control the device to zoom in/out of the screen",DEVICE_FOCUS:"Adjusting the device's focal length"}}},PTZ_SPEED={1:1,2:3,3:7,slow:1,mid:3,fast:7},BasePtz=function(){function BasePtz(container,options){var _this_options_locales,_this_options_locales1,_this_options_locales2;if(void 0===options&&(options={}),!container)throw new Error("Ptz container is required");(this.options=deepmerge$1(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$1(this.options,options,{clone:false});},_proto.destroy=function(){},BasePtz}();function _set_prototype_of$1$3(o,p){return _set_prototype_of$1$3=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$3(o,p)}var MobilePtz=function(BasePtz){function MobilePtz(container,options){var _this;return (_this=BasePtz.call(this,container,options)||this)._touchstart=_this._touchstart.bind(_this),_this._touchend=_this._touchend.bind(_this),_this._render(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$1$3(subClass,superClass);}(MobilePtz,BasePtz);var _proto=MobilePtz.prototype;return _proto.destroy=function(){this._removeEventListener(),this.$content&&(this.$content.remove(),this.$content=null),BasePtz.prototype.destroy.call(this);},_proto._render=function(){this.$content=document.createElement("div"),this.$content.classList.add("ez-mobile-ptz-content"),this.$content.innerHTML='\n <div class="ez-mobile-ptz-wrap">\n <div class="ez-mobile-ptz-container">\n <div class="ez-mobile-ptz-center ez-mobile-ptz-center"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-top ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-left ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-bottom ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-right ez-mobile-ptz-default"></div>\n </div>\n </div>\n ',this.$container.appendChild(this.$content),this._addEventListener();},_proto._addEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.addEventListener(touchstart,this._touchstart),$warp.addEventListener(touchend,this._touchend));},_proto._touchstart=function(e){e.preventDefault(),this._handlePtzTouch(e,"start");},_proto._touchend=function(e){e.preventDefault(),this._handlePtzTouch(e,"stop");},_proto._removeEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.removeEventListener(touchstart,this._touchstart),$warp.removeEventListener(touchend,this._touchend));},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_e_changedTouches_,_e_changedTouches_1,_this_options_env,_this_options_token_deviceToken1,_this_options_token1;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");var _this_options_env1,$warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),rect=$warp.getBoundingClientRect(),containerCenterX=rect.left+130,containerCenterY=rect.top+130,left=(e.x||(null==(_e_changedTouches_=e.changedTouches[0])?void 0:_e_changedTouches_.clientX))-containerCenterX,top=(e.y||(null==(_e_changedTouches_1=e.changedTouches[0])?void 0:_e_changedTouches_1.clientY))-containerCenterY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),$icons=$warp.querySelectorAll(".ez-mobile-ptz-icon");(Math.abs(left)>Math.abs(top)?left>0?(direction=3,$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=2,$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):top>0?(direction=1,$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=0,$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")),$warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop",$warp.style.cssText="",$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"));var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{direction:direction,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed","1"),data.append("direction",direction+""),data.append("accessToken",token),fetch(url,{method:"POST",body:data}).then(function(response){return response.json()}).then(function(rt){200===rt.code||[60005,60002,60003,60004].includes(+rt.code)&&($warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"),null==operationResultCb||operationResultCb(rt);}).catch(function(err){}).finally(function(){operationResultCb=null;});},MobilePtz}(BasePtz);function asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value;}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw);}function _async_to_generator$5(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"throw",err);}_next(void 0);})}}function _create_class$e(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$n(o,p){return _set_prototype_of$n=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$n(o,p)}function _ts_generator$5(thisArg,body){var f,y,t,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]},g=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return g.next=verb(0),g.throw=verb(1),g.return=verb(2),"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return function(op){if(f)throw new TypeError("Generator is already executing.");for(;g&&(g=0,op[0]&&(_=0)),_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=_.trys,(t=t.length>0&&t[t.length-1])||6!==op[0]&&2!==op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_);}catch(e){op=[6,e],y=0;}finally{f=t=0;}if(5&op[0])throw op[1];return {value:op[0]?op[1]:void 0,done:true}}([n,v])}}}var Ptz$1=function(BasePtz){function Ptz(container,options){var _this;return void 0===options&&(options={}),(_this=BasePtz.call(this,container,options)||this)._isMobile=distExports$6.isMobile(),_this._isRotate=false,_this._clearTimer=null,_this._$wrapper=document.createElement("div"),_this._$wrapper.className="ez-ptz-container-wrap",_this._$directionCircleContainer=document.createElement("div"),_this._$directionCircleContainer.classList.add("ez-ptz-container"),_this._$directionCircleContainer.innerHTML='\n <div class="ez-ptz-main ez-ptz-direction-center"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top" data-direction="0"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top-left" data-direction="4"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left" data-direction="2"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left-bottom" data-direction="5"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom" data-direction="1"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom-right" data-direction="7"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right" data-direction="3"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right-top" data-direction="6"></div>\n ',_this._$wrapper.appendChild(_this._$directionCircleContainer),_this._$speedContainer=document.createElement("div"),_this._$speedContainer.classList.add("ez-ptz-speed-container"),_this._$speedContainer.innerHTML='\n <div class="ez-ptz-speed-progress" title="'+_this.locale.PTZ_SPEED+'">\n <div class="ez-ptz-speed-progress-line">\n <div class="ez-ptz-speed-progress-line-dot '+(1===_this.speed?"ez-ptz-speed-active":"")+'" data-id="slow" data-index="1" data-value="1"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(3===_this.speed?"ez-ptz-speed-active":"")+'" data-id="mid" data-index="2" data-value="3"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(7===_this.speed?"ez-ptz-speed-active":"")+'" data-id="fast" data-index="3" data-value="7"></div>\n </div>\n <div class="ez-ptz-speed-progress-points">\n <div class="ez-ptz-speed-progress-points-slow">\n '+_this.locale.PTZ_SLOW+'\n </div>\n <div class="ez-ptz-speed-progress-points-mid">\n '+_this.locale.PTZ_MID+'\n </div>\n <div class="ez-ptz-speed-progress-points-fast">\n '+_this.locale.PTZ_FAST+"\n </div>\n </div>\n </div>\n ",_this._$wrapper.appendChild(_this._$speedContainer),_this._$btnContainer=document.createElement("div"),_this._$btnContainer.classList.add("ez-ptz-btn-container"),_this._$btnContainer.innerHTML='\n <div class="ez-ptz-btn-zoom" title="'+_this.locale.DEVICE_ZOOM+'" style="user-select: none;">\n <div class="ez-ptz-btn-zoom-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M563.2 198.4c179.2 0 326.4 147.2 326.4 326.4s-147.2 326.4-326.4 326.4S230.4 704 230.4 524.8s147.2-326.4 332.8-326.4z m0 64c-147.2 0-262.4 115.2-262.4 262.4s115.2 262.4 262.4 262.4 262.4-115.2 262.4-262.4S704 262.4 563.2 262.4z" fill="#ffffff"></path>\n <path d="M691.2 556.8H428.8c-19.2 0-32-12.8-32-32s12.8-32 32-32h262.4c19.2 0 32 12.8 32 32s-12.8 32-32 32z" fill="#ffffff">\n </path>\n <path d="M556.8 691.2c-19.2 0-32-12.8-32-32V396.8c0-19.2 12.8-32 32-32s32 12.8 32 32v262.4c0 19.2-12.8 32-32 32z" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-zoom-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M569.6 838.4c-172.8 0-307.2-140.8-307.2-307.2s140.8-307.2 307.2-307.2 307.2 140.8 307.2 307.2-140.8 307.2-307.2 307.2z m0-64c134.4 0 249.6-108.8 249.6-249.6S704 281.6 569.6 281.6 320 396.8 320 531.2s108.8 243.2 249.6 243.2z" fill="#ffffff"></path>\n <path d="M691.2 563.2H448c-19.2 0-32-12.8-32-32s12.8-38.4 32-38.4h249.6c19.2 0 32 12.8 32 32s-19.2 38.4-38.4 38.4z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n <div class="ez-ptz-btn-focal" title="'+_this.locale.DEVICE_FOCUS+'" style="user-select: none;">\n <div class="ez-ptz-btn-focal-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M646.4 825.6H320c-44.8 0-83.2-38.4-83.2-83.2V409.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6zM320 390.4c-12.8 0-19.2 6.4-19.2 19.2v326.4c0 12.8 6.4 19.2 19.2 19.2h326.4c12.8 0 19.2-6.4 19.2-19.2V409.6c0-12.8-6.4-19.2-19.2-19.2H320z" fill="#ffffff"></path>\n <path d="M396.8 358.4V281.6c0-25.6 25.6-51.2 51.2-51.2h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H704l-6.4-268.8" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-focal-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M320 358.4h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H320c-25.6 0-51.2-25.6-51.2-51.2V409.6c0-25.6 25.6-51.2 51.2-51.2z" fill="#ffffff"></path>\n <path d="M774.4 697.6H704c-19.2 0-32-12.8-32-32s12.8-32 32-32h70.4c12.8 0 19.2-6.4 19.2-19.2V281.6c0-12.8-6.4-19.2-19.2-19.2H448c-12.8 0-19.2 6.4-19.2 19.2v70.4c0 19.2-12.8 32-32 32s-32-12.8-32-25.6V281.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n ',_this._$wrapper.appendChild(_this._$btnContainer),container.appendChild(_this._$wrapper),_this._$directionCircleContainer.onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._$directionCircleContainer.ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._onSwitchSpeed=function(e){var list=Array.from(_this._$speedContainer.querySelectorAll(".ez-ptz-speed-progress-line-dot"));if(list.includes(e.target)&&!e.target.classList.contains("ez-ptz-speed-active")){list.forEach(function(item){item===e.target?item.classList.add("ez-ptz-speed-active"):item.classList.remove("ez-ptz-speed-active");});var value=e.target.getAttribute("data-value"),index=e.target.getAttribute("data-index");_this.speed=+value,null==_this.options.onSpeedChange||_this.options.onSpeedChange.call(_this.options,+index);}},_this._$speedContainer.onmouseup=_this._onSwitchSpeed,_this._isMobile&&(_this._$speedContainer.ontouchend=_this._onSwitchSpeed),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");}),_this._isMobile&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");})),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$n(subClass,superClass);}(Ptz,BasePtz);var _proto=Ptz.prototype;return _proto.destroy=function(){this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer&&(this._$directionCircleContainer.remove(),this._$directionCircleContainer=null),this._$speedContainer&&(this._onSwitchSpeed=null,this._$speedContainer.remove(),this._$speedContainer=null),this._$btnContainer&&(this._$btnContainer.remove(),this._$btnContainer=null),this._$wrapper&&(this._$wrapper.remove(),this._$wrapper=null),BasePtz.prototype.destroy.call(this);},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_this_options_env,_this_options_token_deviceToken1,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzQueue||(this._ptzQueue=Promise.resolve());var container=this._$directionCircleContainer.getBoundingClientRect(),containerCenterX=container.left+(this._$directionCircleContainer.clientWidth+2)/2,containerCenterY=container.top+(this._$directionCircleContainer.clientHeight+2)/2,eventX=e.x||e.changedTouches[0].clientX,eventY=e.y||e.changedTouches[0].clientY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),backDeg=0;function getAreaId(x,y){var rad=Math.atan2(y,x);rad<0&&(rad+=2*Math.PI);var deg=rad*(180/Math.PI)-225-12.5;return deg<0&&(deg+=360),Math.floor(deg/45)+1}var _this_options_env1,left=eventX-containerCenterX,top=eventY-containerCenterY;if(this.isRotate)switch(getAreaId(left,top)){case 1:direction=2,backDeg=90;break;case 2:direction=4,backDeg=135;break;case 3:direction=0,backDeg=180;break;case 4:direction=6,backDeg=225;break;case 5:direction=3,backDeg=270;break;case 6:direction=7,backDeg=315;break;case 7:direction=1,backDeg=0;break;case 8:direction=5,backDeg=45;}else switch(getAreaId(left,top)){case 1:direction=0,backDeg=180;break;case 2:direction=6,backDeg=225;break;case 3:direction=3,backDeg=270;break;case 4:direction=7,backDeg=315;break;case 5:direction=1,backDeg=0;break;case 6:direction=5,backDeg=45;break;case 7:direction=2,backDeg=90;break;case 8:direction=4,backDeg=135;}(this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer.style.cssText="start"===type?"background-image:linear-gradient("+backDeg+"deg, #4277FF 0%, rgba(100,143,252,0.00) 30%)":"","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{areaId:getAreaId(left,top),direction:direction,backDeg:backDeg,isRotate:this.isRotate,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzQueue=this._ptzQueue.then(function(){return _async_to_generator$5(function(){var _this;return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return _this=this,[4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){var _rt_result;null==operationResultCb||operationResultCb(rt);var code=rt.code||(null==rt||null==(_rt_result=rt.result)?void 0:_rt_result.code);return [6e4,60001,60002,60003,60004,60005,60006,10002].includes(+code)&&(_this._$directionCircleContainer.style.cssText="background-image:linear-gradient("+backDeg+"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)"),rt}).catch(function(err){}).finally(function(){operationResultCb=null,"stop"===type&&(_this._clearTimer=setTimeout(function(){_this._$directionCircleContainer.style.cssText="";},1e3));})];case 1:return [2,_state.sent()]}})}).call(_this)}),"stop"===type&&(this._ptzQueue=this._ptzQueue.finally(function(){}));},_proto._handleBtnTouch=function(btn,option,type){var _this_options_token,_this_options_env,_this_options_token_deviceToken,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)?void 0:_this_options_token.deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzOperation||(this._ptzOperation=Promise.resolve());var direction=8;direction="zoom"===btn?"add"===option?8:9:"add"===option?10:11;var _this_options_env1,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken.video);"stop"===type&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{btn:btn,option:option,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzOperation=this._ptzOperation.then(function(){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){return null==operationResultCb||operationResultCb(rt),rt}).catch(function(err){}).finally(function(){operationResultCb=null;})];case 1:return [2,_state.sent()]}})})()}),"stop"===type&&(this._ptzOperation=this._ptzOperation.finally(function(){_this._ptzOperation=null;}));},_create_class$e(Ptz,[{key:"isRotate",get:function(){return this._isRotate},set:function(isRotate){this._isRotate=isRotate;}}]),Ptz}(BasePtz);
|
|
7555
|
+
var PTZ_DEFAULT_OPTIONS={language:"zh",env:{domain:"https://open.ys7.com"},accessToken:"",speed:2,locales:{zh:{GET_PTZ_STATUS:"获取当前云台状态",GET_PTZ_STATUS_FAILED:"未加载Theme模块,无法获取云台状态",MOBILE_HIDE_PTZ:"移动端,非全屏状态不展示云台",OPTION_PTZ_FAILED:"未加载Theme模块,无法操作云台",MOBILE_PTZ_TIPS:"请通过操控云台来调整摄像机视角",PTZ_FAST:"快",PTZ_MID:"中",PTZ_SLOW:"慢",PTZ_SPEED:"调整云台转动速度",DEVICE_ZOOM:"控制设备放大/缩小画面",DEVICE_FOCUS:"调整设备焦距"},en:{GET_PTZ_STATUS:"Get current PTZ status",GET_PTZ_STATUS_FAILED:"Theme module is not loaded, PTZ status cannot be obtained",MOBILE_HIDE_PTZ:"Mobile terminal, PTZ is not displayed in non-full screen state",OPTION_PTZ_FAILED:"Theme module is not loaded, PTZ cannot be operated",MOBILE_PTZ_TIPS:"Adjust camera angle by manipulating gimbal",PTZ_FAST:"F",PTZ_MID:"M",PTZ_SLOW:"S",PTZ_SPEED:"Adjust the PTZ rotation speed",DEVICE_ZOOM:"Control the device to zoom in/out of the screen",DEVICE_FOCUS:"Adjusting the device's focal length"}}},PTZ_SPEED={1:1,2:3,3:7,slow:1,mid:3,fast:7},BasePtz=function(){function BasePtz(container,options){var _this_options_locales,_this_options_locales1,_this_options_locales2;if(void 0===options&&(options={}),!container)throw new Error("Ptz container is required");(this.options=deepmerge(PTZ_DEFAULT_OPTIONS,options,{clone:false}),null==(_this_options_locales=this.options.locales)?void 0:_this_options_locales[this.options.language])?this.locale=null==(_this_options_locales1=this.options.locales)?void 0:_this_options_locales1[this.options.language]:this.locale=null==(_this_options_locales2=this.options.locales)?void 0:_this_options_locales2.zh;this.$container=container,this.speed=PTZ_SPEED[this.options.speed||2];}var _proto=BasePtz.prototype;return _proto.updateOptions=function(options){this.options=deepmerge(this.options,options,{clone:false});},_proto.destroy=function(){},BasePtz}();function _set_prototype_of$1$3(o,p){return _set_prototype_of$1$3=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$3(o,p)}var MobilePtz=function(BasePtz){function MobilePtz(container,options){var _this;return (_this=BasePtz.call(this,container,options)||this)._touchstart=_this._touchstart.bind(_this),_this._touchend=_this._touchend.bind(_this),_this._render(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$1$3(subClass,superClass);}(MobilePtz,BasePtz);var _proto=MobilePtz.prototype;return _proto.destroy=function(){this._removeEventListener(),this.$content&&(this.$content.remove(),this.$content=null),BasePtz.prototype.destroy.call(this);},_proto._render=function(){this.$content=document.createElement("div"),this.$content.classList.add("ez-mobile-ptz-content"),this.$content.innerHTML='\n <div class="ez-mobile-ptz-wrap">\n <div class="ez-mobile-ptz-container">\n <div class="ez-mobile-ptz-center ez-mobile-ptz-center"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-top ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-left ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-bottom ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-right ez-mobile-ptz-default"></div>\n </div>\n </div>\n ',this.$container.appendChild(this.$content),this._addEventListener();},_proto._addEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.addEventListener(touchstart,this._touchstart),$warp.addEventListener(touchend,this._touchend));},_proto._touchstart=function(e){e.preventDefault(),this._handlePtzTouch(e,"start");},_proto._touchend=function(e){e.preventDefault(),this._handlePtzTouch(e,"stop");},_proto._removeEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.removeEventListener(touchstart,this._touchstart),$warp.removeEventListener(touchend,this._touchend));},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_e_changedTouches_,_e_changedTouches_1,_this_options_env,_this_options_token_deviceToken1,_this_options_token1;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");var _this_options_env1,$warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),rect=$warp.getBoundingClientRect(),containerCenterX=rect.left+130,containerCenterY=rect.top+130,left=(e.x||(null==(_e_changedTouches_=e.changedTouches[0])?void 0:_e_changedTouches_.clientX))-containerCenterX,top=(e.y||(null==(_e_changedTouches_1=e.changedTouches[0])?void 0:_e_changedTouches_1.clientY))-containerCenterY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),$icons=$warp.querySelectorAll(".ez-mobile-ptz-icon");(Math.abs(left)>Math.abs(top)?left>0?(direction=3,$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=2,$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):top>0?(direction=1,$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=0,$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")),$warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop",$warp.style.cssText="",$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"));var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{direction:direction,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed","1"),data.append("direction",direction+""),data.append("accessToken",token),fetch(url,{method:"POST",body:data}).then(function(response){return response.json()}).then(function(rt){200===rt.code||[60005,60002,60003,60004].includes(+rt.code)&&($warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"),null==operationResultCb||operationResultCb(rt);}).catch(function(err){}).finally(function(){operationResultCb=null;});},MobilePtz}(BasePtz);function asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value;}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw);}function _async_to_generator$5(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"throw",err);}_next(void 0);})}}function _create_class$e(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$n(o,p){return _set_prototype_of$n=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$n(o,p)}function _ts_generator$5(thisArg,body){var f,y,t,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]},g=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return g.next=verb(0),g.throw=verb(1),g.return=verb(2),"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return function(op){if(f)throw new TypeError("Generator is already executing.");for(;g&&(g=0,op[0]&&(_=0)),_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=_.trys,(t=t.length>0&&t[t.length-1])||6!==op[0]&&2!==op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_);}catch(e){op=[6,e],y=0;}finally{f=t=0;}if(5&op[0])throw op[1];return {value:op[0]?op[1]:void 0,done:true}}([n,v])}}}var Ptz$1=function(BasePtz){function Ptz(container,options){var _this;return void 0===options&&(options={}),(_this=BasePtz.call(this,container,options)||this)._isMobile=distExports$4.isMobile(),_this._isRotate=false,_this._clearTimer=null,_this._$wrapper=document.createElement("div"),_this._$wrapper.className="ez-ptz-container-wrap",_this._$directionCircleContainer=document.createElement("div"),_this._$directionCircleContainer.classList.add("ez-ptz-container"),_this._$directionCircleContainer.innerHTML='\n <div class="ez-ptz-main ez-ptz-direction-center"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top" data-direction="0"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top-left" data-direction="4"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left" data-direction="2"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left-bottom" data-direction="5"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom" data-direction="1"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom-right" data-direction="7"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right" data-direction="3"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right-top" data-direction="6"></div>\n ',_this._$wrapper.appendChild(_this._$directionCircleContainer),_this._$speedContainer=document.createElement("div"),_this._$speedContainer.classList.add("ez-ptz-speed-container"),_this._$speedContainer.innerHTML='\n <div class="ez-ptz-speed-progress" title="'+_this.locale.PTZ_SPEED+'">\n <div class="ez-ptz-speed-progress-line">\n <div class="ez-ptz-speed-progress-line-dot '+(1===_this.speed?"ez-ptz-speed-active":"")+'" data-id="slow" data-index="1" data-value="1"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(3===_this.speed?"ez-ptz-speed-active":"")+'" data-id="mid" data-index="2" data-value="3"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(7===_this.speed?"ez-ptz-speed-active":"")+'" data-id="fast" data-index="3" data-value="7"></div>\n </div>\n <div class="ez-ptz-speed-progress-points">\n <div class="ez-ptz-speed-progress-points-slow">\n '+_this.locale.PTZ_SLOW+'\n </div>\n <div class="ez-ptz-speed-progress-points-mid">\n '+_this.locale.PTZ_MID+'\n </div>\n <div class="ez-ptz-speed-progress-points-fast">\n '+_this.locale.PTZ_FAST+"\n </div>\n </div>\n </div>\n ",_this._$wrapper.appendChild(_this._$speedContainer),_this._$btnContainer=document.createElement("div"),_this._$btnContainer.classList.add("ez-ptz-btn-container"),_this._$btnContainer.innerHTML='\n <div class="ez-ptz-btn-zoom" title="'+_this.locale.DEVICE_ZOOM+'" style="user-select: none;">\n <div class="ez-ptz-btn-zoom-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M563.2 198.4c179.2 0 326.4 147.2 326.4 326.4s-147.2 326.4-326.4 326.4S230.4 704 230.4 524.8s147.2-326.4 332.8-326.4z m0 64c-147.2 0-262.4 115.2-262.4 262.4s115.2 262.4 262.4 262.4 262.4-115.2 262.4-262.4S704 262.4 563.2 262.4z" fill="#ffffff"></path>\n <path d="M691.2 556.8H428.8c-19.2 0-32-12.8-32-32s12.8-32 32-32h262.4c19.2 0 32 12.8 32 32s-12.8 32-32 32z" fill="#ffffff">\n </path>\n <path d="M556.8 691.2c-19.2 0-32-12.8-32-32V396.8c0-19.2 12.8-32 32-32s32 12.8 32 32v262.4c0 19.2-12.8 32-32 32z" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-zoom-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M569.6 838.4c-172.8 0-307.2-140.8-307.2-307.2s140.8-307.2 307.2-307.2 307.2 140.8 307.2 307.2-140.8 307.2-307.2 307.2z m0-64c134.4 0 249.6-108.8 249.6-249.6S704 281.6 569.6 281.6 320 396.8 320 531.2s108.8 243.2 249.6 243.2z" fill="#ffffff"></path>\n <path d="M691.2 563.2H448c-19.2 0-32-12.8-32-32s12.8-38.4 32-38.4h249.6c19.2 0 32 12.8 32 32s-19.2 38.4-38.4 38.4z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n <div class="ez-ptz-btn-focal" title="'+_this.locale.DEVICE_FOCUS+'" style="user-select: none;">\n <div class="ez-ptz-btn-focal-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M646.4 825.6H320c-44.8 0-83.2-38.4-83.2-83.2V409.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6zM320 390.4c-12.8 0-19.2 6.4-19.2 19.2v326.4c0 12.8 6.4 19.2 19.2 19.2h326.4c12.8 0 19.2-6.4 19.2-19.2V409.6c0-12.8-6.4-19.2-19.2-19.2H320z" fill="#ffffff"></path>\n <path d="M396.8 358.4V281.6c0-25.6 25.6-51.2 51.2-51.2h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H704l-6.4-268.8" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-focal-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M320 358.4h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H320c-25.6 0-51.2-25.6-51.2-51.2V409.6c0-25.6 25.6-51.2 51.2-51.2z" fill="#ffffff"></path>\n <path d="M774.4 697.6H704c-19.2 0-32-12.8-32-32s12.8-32 32-32h70.4c12.8 0 19.2-6.4 19.2-19.2V281.6c0-12.8-6.4-19.2-19.2-19.2H448c-12.8 0-19.2 6.4-19.2 19.2v70.4c0 19.2-12.8 32-32 32s-32-12.8-32-25.6V281.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n ',_this._$wrapper.appendChild(_this._$btnContainer),container.appendChild(_this._$wrapper),_this._$directionCircleContainer.onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._$directionCircleContainer.ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._onSwitchSpeed=function(e){var list=Array.from(_this._$speedContainer.querySelectorAll(".ez-ptz-speed-progress-line-dot"));if(list.includes(e.target)&&!e.target.classList.contains("ez-ptz-speed-active")){list.forEach(function(item){item===e.target?item.classList.add("ez-ptz-speed-active"):item.classList.remove("ez-ptz-speed-active");});var value=e.target.getAttribute("data-value"),index=e.target.getAttribute("data-index");_this.speed=+value,null==_this.options.onSpeedChange||_this.options.onSpeedChange.call(_this.options,+index);}},_this._$speedContainer.onmouseup=_this._onSwitchSpeed,_this._isMobile&&(_this._$speedContainer.ontouchend=_this._onSwitchSpeed),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");}),_this._isMobile&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");})),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$n(subClass,superClass);}(Ptz,BasePtz);var _proto=Ptz.prototype;return _proto.destroy=function(){this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer&&(this._$directionCircleContainer.remove(),this._$directionCircleContainer=null),this._$speedContainer&&(this._onSwitchSpeed=null,this._$speedContainer.remove(),this._$speedContainer=null),this._$btnContainer&&(this._$btnContainer.remove(),this._$btnContainer=null),this._$wrapper&&(this._$wrapper.remove(),this._$wrapper=null),BasePtz.prototype.destroy.call(this);},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_this_options_env,_this_options_token_deviceToken1,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzQueue||(this._ptzQueue=Promise.resolve());var container=this._$directionCircleContainer.getBoundingClientRect(),containerCenterX=container.left+(this._$directionCircleContainer.clientWidth+2)/2,containerCenterY=container.top+(this._$directionCircleContainer.clientHeight+2)/2,eventX=e.x||e.changedTouches[0].clientX,eventY=e.y||e.changedTouches[0].clientY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),backDeg=0;function getAreaId(x,y){var rad=Math.atan2(y,x);rad<0&&(rad+=2*Math.PI);var deg=rad*(180/Math.PI)-225-12.5;return deg<0&&(deg+=360),Math.floor(deg/45)+1}var _this_options_env1,left=eventX-containerCenterX,top=eventY-containerCenterY;if(this.isRotate)switch(getAreaId(left,top)){case 1:direction=2,backDeg=90;break;case 2:direction=4,backDeg=135;break;case 3:direction=0,backDeg=180;break;case 4:direction=6,backDeg=225;break;case 5:direction=3,backDeg=270;break;case 6:direction=7,backDeg=315;break;case 7:direction=1,backDeg=0;break;case 8:direction=5,backDeg=45;}else switch(getAreaId(left,top)){case 1:direction=0,backDeg=180;break;case 2:direction=6,backDeg=225;break;case 3:direction=3,backDeg=270;break;case 4:direction=7,backDeg=315;break;case 5:direction=1,backDeg=0;break;case 6:direction=5,backDeg=45;break;case 7:direction=2,backDeg=90;break;case 8:direction=4,backDeg=135;}(this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer.style.cssText="start"===type?"background-image:linear-gradient("+backDeg+"deg, #4277FF 0%, rgba(100,143,252,0.00) 30%)":"","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{areaId:getAreaId(left,top),direction:direction,backDeg:backDeg,isRotate:this.isRotate,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzQueue=this._ptzQueue.then(function(){return _async_to_generator$5(function(){var _this;return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return _this=this,[4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){var _rt_result;null==operationResultCb||operationResultCb(rt);var code=rt.code||(null==rt||null==(_rt_result=rt.result)?void 0:_rt_result.code);return [6e4,60001,60002,60003,60004,60005,60006,10002].includes(+code)&&(_this._$directionCircleContainer.style.cssText="background-image:linear-gradient("+backDeg+"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)"),rt}).catch(function(err){}).finally(function(){operationResultCb=null,"stop"===type&&(_this._clearTimer=setTimeout(function(){_this._$directionCircleContainer.style.cssText="";},1e3));})];case 1:return [2,_state.sent()]}})}).call(_this)}),"stop"===type&&(this._ptzQueue=this._ptzQueue.finally(function(){}));},_proto._handleBtnTouch=function(btn,option,type){var _this_options_token,_this_options_env,_this_options_token_deviceToken,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)?void 0:_this_options_token.deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzOperation||(this._ptzOperation=Promise.resolve());var direction=8;direction="zoom"===btn?"add"===option?8:9:"add"===option?10:11;var _this_options_env1,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken.video);"stop"===type&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{btn:btn,option:option,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzOperation=this._ptzOperation.then(function(){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){return null==operationResultCb||operationResultCb(rt),rt}).catch(function(err){}).finally(function(){operationResultCb=null;})];case 1:return [2,_state.sent()]}})})()}),"stop"===type&&(this._ptzOperation=this._ptzOperation.finally(function(){_this._ptzOperation=null;}));},_create_class$e(Ptz,[{key:"isRotate",get:function(){return this._isRotate},set:function(isRotate){this._isRotate=isRotate;}}]),Ptz}(BasePtz);
|
|
7541
7556
|
|
|
7542
|
-
function _defineProperties$
|
|
7557
|
+
function _defineProperties$4(target, props) {
|
|
7543
7558
|
for(var i = 0; i < props.length; i++){
|
|
7544
7559
|
var descriptor = props[i];
|
|
7545
7560
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -7549,7 +7564,7 @@
|
|
|
7549
7564
|
}
|
|
7550
7565
|
}
|
|
7551
7566
|
function _create_class$d(Constructor, protoProps, staticProps) {
|
|
7552
|
-
if (protoProps) _defineProperties$
|
|
7567
|
+
if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
|
|
7553
7568
|
return Constructor;
|
|
7554
7569
|
}
|
|
7555
7570
|
function _extends$l() {
|
|
@@ -7566,7 +7581,7 @@
|
|
|
7566
7581
|
};
|
|
7567
7582
|
return _extends$l.apply(this, arguments);
|
|
7568
7583
|
}
|
|
7569
|
-
function _inherits$
|
|
7584
|
+
function _inherits$j(subClass, superClass) {
|
|
7570
7585
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7571
7586
|
throw new TypeError("Super expression must either be null or a function");
|
|
7572
7587
|
}
|
|
@@ -7590,7 +7605,7 @@
|
|
|
7590
7605
|
* 云台控件
|
|
7591
7606
|
* @category Control
|
|
7592
7607
|
*/ var Ptz = /*#__PURE__*/ function(Control) {
|
|
7593
|
-
_inherits$
|
|
7608
|
+
_inherits$j(Ptz, Control);
|
|
7594
7609
|
function Ptz(options) {
|
|
7595
7610
|
var _this;
|
|
7596
7611
|
_this = Control.call(this, _extends$l({}, options, {
|
|
@@ -7735,7 +7750,7 @@
|
|
|
7735
7750
|
return format.replace('HH', pad(hours)).replace('MM', pad(minutes)).replace('SS', pad(secs));
|
|
7736
7751
|
}
|
|
7737
7752
|
|
|
7738
|
-
function _defineProperties$
|
|
7753
|
+
function _defineProperties$3(target, props) {
|
|
7739
7754
|
for(var i = 0; i < props.length; i++){
|
|
7740
7755
|
var descriptor = props[i];
|
|
7741
7756
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -7745,7 +7760,7 @@
|
|
|
7745
7760
|
}
|
|
7746
7761
|
}
|
|
7747
7762
|
function _create_class$c(Constructor, protoProps, staticProps) {
|
|
7748
|
-
if (protoProps) _defineProperties$
|
|
7763
|
+
if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
|
|
7749
7764
|
return Constructor;
|
|
7750
7765
|
}
|
|
7751
7766
|
function _extends$k() {
|
|
@@ -7762,7 +7777,7 @@
|
|
|
7762
7777
|
};
|
|
7763
7778
|
return _extends$k.apply(this, arguments);
|
|
7764
7779
|
}
|
|
7765
|
-
function _inherits$
|
|
7780
|
+
function _inherits$i(subClass, superClass) {
|
|
7766
7781
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7767
7782
|
throw new TypeError("Super expression must either be null or a function");
|
|
7768
7783
|
}
|
|
@@ -7794,7 +7809,7 @@
|
|
|
7794
7809
|
* 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
|
|
7795
7810
|
* @category Control
|
|
7796
7811
|
*/ var Record = /*#__PURE__*/ function(Control) {
|
|
7797
|
-
_inherits$
|
|
7812
|
+
_inherits$i(Record, Control);
|
|
7798
7813
|
function Record(options) {
|
|
7799
7814
|
var _this;
|
|
7800
7815
|
_this = Control.call(this, _extends$k({}, options, {
|
|
@@ -7925,7 +7940,7 @@
|
|
|
7925
7940
|
});
|
|
7926
7941
|
};
|
|
7927
7942
|
}
|
|
7928
|
-
function _defineProperties$
|
|
7943
|
+
function _defineProperties$2(target, props) {
|
|
7929
7944
|
for(var i = 0; i < props.length; i++){
|
|
7930
7945
|
var descriptor = props[i];
|
|
7931
7946
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -7935,7 +7950,7 @@
|
|
|
7935
7950
|
}
|
|
7936
7951
|
}
|
|
7937
7952
|
function _create_class$b(Constructor, protoProps, staticProps) {
|
|
7938
|
-
if (protoProps) _defineProperties$
|
|
7953
|
+
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
7939
7954
|
return Constructor;
|
|
7940
7955
|
}
|
|
7941
7956
|
function _extends$j() {
|
|
@@ -7952,7 +7967,7 @@
|
|
|
7952
7967
|
};
|
|
7953
7968
|
return _extends$j.apply(this, arguments);
|
|
7954
7969
|
}
|
|
7955
|
-
function _inherits$
|
|
7970
|
+
function _inherits$h(subClass, superClass) {
|
|
7956
7971
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7957
7972
|
throw new TypeError("Super expression must either be null or a function");
|
|
7958
7973
|
}
|
|
@@ -8072,7 +8087,7 @@
|
|
|
8072
8087
|
*
|
|
8073
8088
|
* @category Control
|
|
8074
8089
|
*/ var Talk = /*#__PURE__*/ function(Control) {
|
|
8075
|
-
_inherits$
|
|
8090
|
+
_inherits$h(Talk, Control);
|
|
8076
8091
|
function Talk(options) {
|
|
8077
8092
|
var _this;
|
|
8078
8093
|
_this = Control.call(this, _extends$j({}, options, {
|
|
@@ -8222,7 +8237,7 @@
|
|
|
8222
8237
|
};
|
|
8223
8238
|
return _extends$i.apply(this, arguments);
|
|
8224
8239
|
}
|
|
8225
|
-
function _inherits$
|
|
8240
|
+
function _inherits$g(subClass, superClass) {
|
|
8226
8241
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
8227
8242
|
throw new TypeError("Super expression must either be null or a function");
|
|
8228
8243
|
}
|
|
@@ -8340,7 +8355,7 @@
|
|
|
8340
8355
|
*
|
|
8341
8356
|
* @category Control
|
|
8342
8357
|
*/ var Broadcast = /*#__PURE__*/ function(Control) {
|
|
8343
|
-
_inherits$
|
|
8358
|
+
_inherits$g(Broadcast, Control);
|
|
8344
8359
|
function Broadcast(options) {
|
|
8345
8360
|
var _this;
|
|
8346
8361
|
_this = Control.call(this, _extends$i({}, options, {
|
|
@@ -8452,7 +8467,7 @@
|
|
|
8452
8467
|
};
|
|
8453
8468
|
return _extends$h.apply(this, arguments);
|
|
8454
8469
|
}
|
|
8455
|
-
function _inherits$
|
|
8470
|
+
function _inherits$f(subClass, superClass) {
|
|
8456
8471
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
8457
8472
|
throw new TypeError("Super expression must either be null or a function");
|
|
8458
8473
|
}
|
|
@@ -8570,7 +8585,7 @@
|
|
|
8570
8585
|
*
|
|
8571
8586
|
* @category Control
|
|
8572
8587
|
*/ var AIChat = /*#__PURE__*/ function(Control) {
|
|
8573
|
-
_inherits$
|
|
8588
|
+
_inherits$f(AIChat, Control);
|
|
8574
8589
|
function AIChat(options) {
|
|
8575
8590
|
var _this;
|
|
8576
8591
|
_this = Control.call(this, _extends$h({}, options, {
|
|
@@ -8653,7 +8668,7 @@
|
|
|
8653
8668
|
};
|
|
8654
8669
|
return _extends$g.apply(this, arguments);
|
|
8655
8670
|
}
|
|
8656
|
-
function _inherits$
|
|
8671
|
+
function _inherits$e(subClass, superClass) {
|
|
8657
8672
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
8658
8673
|
throw new TypeError("Super expression must either be null or a function");
|
|
8659
8674
|
}
|
|
@@ -8680,7 +8695,7 @@
|
|
|
8680
8695
|
*
|
|
8681
8696
|
* @category Control
|
|
8682
8697
|
*/ var Live = /*#__PURE__*/ function(Control) {
|
|
8683
|
-
_inherits$
|
|
8698
|
+
_inherits$e(Live, Control);
|
|
8684
8699
|
function Live(options) {
|
|
8685
8700
|
var _this;
|
|
8686
8701
|
var _this___options_props1;
|
|
@@ -8748,7 +8763,7 @@
|
|
|
8748
8763
|
};
|
|
8749
8764
|
return _extends$f.apply(this, arguments);
|
|
8750
8765
|
}
|
|
8751
|
-
function _inherits$
|
|
8766
|
+
function _inherits$d(subClass, superClass) {
|
|
8752
8767
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
8753
8768
|
throw new TypeError("Super expression must either be null or a function");
|
|
8754
8769
|
}
|
|
@@ -8775,7 +8790,7 @@
|
|
|
8775
8790
|
*
|
|
8776
8791
|
* @category Control
|
|
8777
8792
|
*/ var RecDropdown = /*#__PURE__*/ function(Control) {
|
|
8778
|
-
_inherits$
|
|
8793
|
+
_inherits$d(RecDropdown, Control);
|
|
8779
8794
|
function RecDropdown(options) {
|
|
8780
8795
|
var _this;
|
|
8781
8796
|
var _options_props, _this___options_props1;
|
|
@@ -8898,357 +8913,108 @@
|
|
|
8898
8913
|
return RecDropdown;
|
|
8899
8914
|
}(Control);
|
|
8900
8915
|
|
|
8901
|
-
var
|
|
8902
|
-
|
|
8903
|
-
/*
|
|
8904
|
-
* @ezuikit/utils-tools v2.0.2
|
|
8905
|
-
* tools utils
|
|
8906
|
-
* Copyright (c) 2026-01-07 Ezviz-OpenBiz
|
|
8907
|
-
* Released under the MIT License.
|
|
8908
|
-
*/
|
|
8916
|
+
var eventemitter3 = {exports: {}};
|
|
8909
8917
|
|
|
8910
|
-
var
|
|
8918
|
+
var hasRequiredEventemitter3;
|
|
8911
8919
|
|
|
8912
|
-
function
|
|
8913
|
-
if (
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
return dist$3;
|
|
8917
|
-
}
|
|
8920
|
+
function requireEventemitter3 () {
|
|
8921
|
+
if (hasRequiredEventemitter3) return eventemitter3.exports;
|
|
8922
|
+
hasRequiredEventemitter3 = 1;
|
|
8923
|
+
(function (module) {
|
|
8918
8924
|
|
|
8919
|
-
|
|
8925
|
+
var has = Object.prototype.hasOwnProperty
|
|
8926
|
+
, prefix = '~';
|
|
8920
8927
|
|
|
8921
|
-
|
|
8928
|
+
/**
|
|
8929
|
+
* Constructor to create a storage for our `EE` objects.
|
|
8930
|
+
* An `Events` instance is a plain object whose properties are event names.
|
|
8931
|
+
*
|
|
8932
|
+
* @constructor
|
|
8933
|
+
* @private
|
|
8934
|
+
*/
|
|
8935
|
+
function Events() {}
|
|
8922
8936
|
|
|
8923
|
-
|
|
8924
|
-
|
|
8937
|
+
//
|
|
8938
|
+
// We try to not inherit from `Object.prototype`. In some engines creating an
|
|
8939
|
+
// instance in this way is faster than calling `Object.create(null)` directly.
|
|
8940
|
+
// If `Object.create(null)` is not supported we prefix the event names with a
|
|
8941
|
+
// character to make sure that the built-in object properties are not
|
|
8942
|
+
// overridden or used as an attack vector.
|
|
8943
|
+
//
|
|
8944
|
+
if (Object.create) {
|
|
8945
|
+
Events.prototype = Object.create(null);
|
|
8925
8946
|
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8947
|
+
//
|
|
8948
|
+
// This hack is needed because the `__proto__` property is still inherited in
|
|
8949
|
+
// some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
|
|
8950
|
+
//
|
|
8951
|
+
if (!new Events().__proto__) prefix = false;
|
|
8952
|
+
}
|
|
8929
8953
|
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
8954
|
+
/**
|
|
8955
|
+
* Representation of a single event listener.
|
|
8956
|
+
*
|
|
8957
|
+
* @param {Function} fn The listener function.
|
|
8958
|
+
* @param {*} context The context to invoke the listener with.
|
|
8959
|
+
* @param {Boolean} [once=false] Specify if the listener is a one-time listener.
|
|
8960
|
+
* @constructor
|
|
8961
|
+
* @private
|
|
8962
|
+
*/
|
|
8963
|
+
function EE(fn, context, once) {
|
|
8964
|
+
this.fn = fn;
|
|
8965
|
+
this.context = context;
|
|
8966
|
+
this.once = once || false;
|
|
8967
|
+
}
|
|
8934
8968
|
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8969
|
+
/**
|
|
8970
|
+
* Add a listener for a given event.
|
|
8971
|
+
*
|
|
8972
|
+
* @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
|
|
8973
|
+
* @param {(String|Symbol)} event The event name.
|
|
8974
|
+
* @param {Function} fn The listener function.
|
|
8975
|
+
* @param {*} context The context to invoke the listener with.
|
|
8976
|
+
* @param {Boolean} once Specify if the listener is a one-time listener.
|
|
8977
|
+
* @returns {EventEmitter}
|
|
8978
|
+
* @private
|
|
8979
|
+
*/
|
|
8980
|
+
function addListener(emitter, event, fn, context, once) {
|
|
8981
|
+
if (typeof fn !== 'function') {
|
|
8982
|
+
throw new TypeError('The listener must be a function');
|
|
8983
|
+
}
|
|
8938
8984
|
|
|
8939
|
-
|
|
8940
|
-
|
|
8985
|
+
var listener = new EE(fn, context || emitter, once)
|
|
8986
|
+
, evt = prefix ? prefix + event : event;
|
|
8941
8987
|
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
}
|
|
8988
|
+
if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
|
|
8989
|
+
else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
|
|
8990
|
+
else emitter._events[evt] = [emitter._events[evt], listener];
|
|
8946
8991
|
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
8992
|
+
return emitter;
|
|
8993
|
+
}
|
|
8950
8994
|
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
8995
|
+
/**
|
|
8996
|
+
* Clear event by name.
|
|
8997
|
+
*
|
|
8998
|
+
* @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
|
|
8999
|
+
* @param {(String|Symbol)} evt The Event name.
|
|
9000
|
+
* @private
|
|
9001
|
+
*/
|
|
9002
|
+
function clearEvent(emitter, evt) {
|
|
9003
|
+
if (--emitter._eventsCount === 0) emitter._events = new Events();
|
|
9004
|
+
else delete emitter._events[evt];
|
|
9005
|
+
}
|
|
8954
9006
|
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
return target.concat(source).map(function(element) {
|
|
8967
|
-
return cloneUnlessOtherwiseSpecified(element, options)
|
|
8968
|
-
})
|
|
8969
|
-
}
|
|
8970
|
-
|
|
8971
|
-
function getMergeFunction(key, options) {
|
|
8972
|
-
if (!options.customMerge) {
|
|
8973
|
-
return deepmerge
|
|
8974
|
-
}
|
|
8975
|
-
var customMerge = options.customMerge(key);
|
|
8976
|
-
return typeof customMerge === 'function' ? customMerge : deepmerge
|
|
8977
|
-
}
|
|
8978
|
-
|
|
8979
|
-
function getEnumerableOwnPropertySymbols(target) {
|
|
8980
|
-
return Object.getOwnPropertySymbols
|
|
8981
|
-
? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
8982
|
-
return Object.propertyIsEnumerable.call(target, symbol)
|
|
8983
|
-
})
|
|
8984
|
-
: []
|
|
8985
|
-
}
|
|
8986
|
-
|
|
8987
|
-
function getKeys(target) {
|
|
8988
|
-
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
|
|
8989
|
-
}
|
|
8990
|
-
|
|
8991
|
-
function propertyIsOnObject(object, property) {
|
|
8992
|
-
try {
|
|
8993
|
-
return property in object
|
|
8994
|
-
} catch(_) {
|
|
8995
|
-
return false
|
|
8996
|
-
}
|
|
8997
|
-
}
|
|
8998
|
-
|
|
8999
|
-
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
9000
|
-
function propertyIsUnsafe(target, key) {
|
|
9001
|
-
return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
|
|
9002
|
-
&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
|
|
9003
|
-
&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
|
|
9004
|
-
}
|
|
9005
|
-
|
|
9006
|
-
function mergeObject(target, source, options) {
|
|
9007
|
-
var destination = {};
|
|
9008
|
-
if (options.isMergeableObject(target)) {
|
|
9009
|
-
getKeys(target).forEach(function(key) {
|
|
9010
|
-
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
9011
|
-
});
|
|
9012
|
-
}
|
|
9013
|
-
getKeys(source).forEach(function(key) {
|
|
9014
|
-
if (propertyIsUnsafe(target, key)) {
|
|
9015
|
-
return
|
|
9016
|
-
}
|
|
9017
|
-
|
|
9018
|
-
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
9019
|
-
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
9020
|
-
} else {
|
|
9021
|
-
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
9022
|
-
}
|
|
9023
|
-
});
|
|
9024
|
-
return destination
|
|
9025
|
-
}
|
|
9026
|
-
|
|
9027
|
-
function deepmerge(target, source, options) {
|
|
9028
|
-
options = options || {};
|
|
9029
|
-
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
9030
|
-
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
9031
|
-
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
9032
|
-
// implementations can use it. The caller may not replace it.
|
|
9033
|
-
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
9034
|
-
|
|
9035
|
-
var sourceIsArray = Array.isArray(source);
|
|
9036
|
-
var targetIsArray = Array.isArray(target);
|
|
9037
|
-
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
9038
|
-
|
|
9039
|
-
if (!sourceAndTargetTypesMatch) {
|
|
9040
|
-
return cloneUnlessOtherwiseSpecified(source, options)
|
|
9041
|
-
} else if (sourceIsArray) {
|
|
9042
|
-
return options.arrayMerge(target, source, options)
|
|
9043
|
-
} else {
|
|
9044
|
-
return mergeObject(target, source, options)
|
|
9045
|
-
}
|
|
9046
|
-
}
|
|
9047
|
-
|
|
9048
|
-
deepmerge.all = function deepmergeAll(array, options) {
|
|
9049
|
-
if (!Array.isArray(array)) {
|
|
9050
|
-
throw new Error('first argument should be an array')
|
|
9051
|
-
}
|
|
9052
|
-
|
|
9053
|
-
return array.reduce(function(prev, next) {
|
|
9054
|
-
return deepmerge(prev, next, options)
|
|
9055
|
-
}, {})
|
|
9056
|
-
};
|
|
9057
|
-
|
|
9058
|
-
var deepmerge_1 = deepmerge;
|
|
9059
|
-
|
|
9060
|
-
cjs = deepmerge_1;
|
|
9061
|
-
return cjs;
|
|
9062
|
-
}
|
|
9063
|
-
|
|
9064
|
-
var hasRequiredDist$2;
|
|
9065
|
-
|
|
9066
|
-
function requireDist$2 () {
|
|
9067
|
-
if (hasRequiredDist$2) return dist$2.exports;
|
|
9068
|
-
hasRequiredDist$2 = 1;
|
|
9069
|
-
|
|
9070
|
-
var deepmerge = requireCjs();
|
|
9071
|
-
|
|
9072
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
9073
|
-
return protoProps && function(target, props) {
|
|
9074
|
-
for (var i = 0; i < props.length; i++) {
|
|
9075
|
-
var descriptor = props[i];
|
|
9076
|
-
descriptor.enumerable = descriptor.enumerable || false, descriptor.configurable = true,
|
|
9077
|
-
"value" in descriptor && (descriptor.writable = true), Object.defineProperty(target, descriptor.key, descriptor);
|
|
9078
|
-
}
|
|
9079
|
-
}(Constructor.prototype, protoProps), Constructor;
|
|
9080
|
-
}
|
|
9081
|
-
|
|
9082
|
-
var I18n = function() {
|
|
9083
|
-
function I18n(translations, options) {
|
|
9084
|
-
this._translations = {}, this._locale = null == options ? void 0 : options.defaultLocale,
|
|
9085
|
-
translations && (this._translations = translations, (null == options ? void 0 : options.defaultLocale) || (this._locale = Object.keys(translations)[0])),
|
|
9086
|
-
this.options = options || {};
|
|
9087
|
-
}
|
|
9088
|
-
var _proto = I18n.prototype;
|
|
9089
|
-
return _proto.t = function(scope, variables) {
|
|
9090
|
-
var value, translation = this._translations[this._locale];
|
|
9091
|
-
if (!translation) return "function" == typeof this.options.customizeMissing ? this.options.customizeMissing(scope, variables) : '[missing "' + this._locale + '" locale]';
|
|
9092
|
-
if ("string" == typeof scope && scope.includes(".") && !(scope in translation)) {
|
|
9093
|
-
var _this__findChainValue = this._findChainValue(translation, scope), v = _this__findChainValue[0];
|
|
9094
|
-
if (_this__findChainValue[1]) value = v; else {
|
|
9095
|
-
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]';
|
|
9096
|
-
value = variables.defaultvalue;
|
|
9097
|
-
}
|
|
9098
|
-
} else if (scope in translation) value = translation[scope]; else {
|
|
9099
|
-
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]';
|
|
9100
|
-
value = variables.defaultvalue;
|
|
9101
|
-
}
|
|
9102
|
-
return "string" == typeof value && variables && /\{\{\s*(\w+)\s*\}\}/.test(value) ? value.replace(/\{\{\s*(\w+)\s*\}\}/g, function(_, varName) {
|
|
9103
|
-
return String(variables[varName]) || "";
|
|
9104
|
-
}) : value;
|
|
9105
|
-
}, _proto.appendTranslations = function(translations) {
|
|
9106
|
-
this._translations = deepmerge(this._translations, translations, {
|
|
9107
|
-
clone: false
|
|
9108
|
-
}), this._locale || (this._locale = Object.keys(this._translations)[0]), this._onChange();
|
|
9109
|
-
}, _proto.switchLocale = function(locale) {
|
|
9110
|
-
locale in this._translations && (this._locale = locale, this._onChange());
|
|
9111
|
-
}, _proto.switchTranslation = function(locale) {
|
|
9112
|
-
this.switchLocale(locale);
|
|
9113
|
-
}, _proto.getCurrentLocale = function() {
|
|
9114
|
-
return this._locale;
|
|
9115
|
-
}, _proto.getCurrentTranslation = function() {
|
|
9116
|
-
return this._translations[this._locale];
|
|
9117
|
-
}, _proto.getVersion = function() {
|
|
9118
|
-
return "2.0.0";
|
|
9119
|
-
}, _proto._onChange = function() {
|
|
9120
|
-
return null == this.options.onChange ? void 0 : this.options.onChange.call(this.options, this);
|
|
9121
|
-
}, _proto._findChainValue = function(obj, path) {
|
|
9122
|
-
for (var paths = path.split("."), translation = obj, i = 0; i < paths.length; i++) {
|
|
9123
|
-
if (!(paths[i] in translation)) return [ void 0, false ];
|
|
9124
|
-
if (translation = translation[paths[i]], i + 1 === paths.length) return [ translation[paths[i]], true ];
|
|
9125
|
-
}
|
|
9126
|
-
return [ void 0, false ];
|
|
9127
|
-
}, _create_class(I18n, [ {
|
|
9128
|
-
key: "locale",
|
|
9129
|
-
get: function() {
|
|
9130
|
-
return this._locale;
|
|
9131
|
-
}
|
|
9132
|
-
}, {
|
|
9133
|
-
key: "translations",
|
|
9134
|
-
get: function() {
|
|
9135
|
-
return this._translations;
|
|
9136
|
-
}
|
|
9137
|
-
} ]), I18n;
|
|
9138
|
-
}();
|
|
9139
|
-
|
|
9140
|
-
I18n.VERSION = "2.0.0", dist$2.exports = I18n;
|
|
9141
|
-
return dist$2.exports;
|
|
9142
|
-
}
|
|
9143
|
-
|
|
9144
|
-
var distExports$2 = requireDist$2();
|
|
9145
|
-
var I18n$1 = /*@__PURE__*/getDefaultExportFromCjs(distExports$2);
|
|
9146
|
-
|
|
9147
|
-
var cjsExports = requireCjs();
|
|
9148
|
-
var deepmerge = /*@__PURE__*/getDefaultExportFromCjs(cjsExports);
|
|
9149
|
-
|
|
9150
|
-
var eventemitter3 = {exports: {}};
|
|
9151
|
-
|
|
9152
|
-
var hasRequiredEventemitter3;
|
|
9153
|
-
|
|
9154
|
-
function requireEventemitter3 () {
|
|
9155
|
-
if (hasRequiredEventemitter3) return eventemitter3.exports;
|
|
9156
|
-
hasRequiredEventemitter3 = 1;
|
|
9157
|
-
(function (module) {
|
|
9158
|
-
|
|
9159
|
-
var has = Object.prototype.hasOwnProperty
|
|
9160
|
-
, prefix = '~';
|
|
9161
|
-
|
|
9162
|
-
/**
|
|
9163
|
-
* Constructor to create a storage for our `EE` objects.
|
|
9164
|
-
* An `Events` instance is a plain object whose properties are event names.
|
|
9165
|
-
*
|
|
9166
|
-
* @constructor
|
|
9167
|
-
* @private
|
|
9168
|
-
*/
|
|
9169
|
-
function Events() {}
|
|
9170
|
-
|
|
9171
|
-
//
|
|
9172
|
-
// We try to not inherit from `Object.prototype`. In some engines creating an
|
|
9173
|
-
// instance in this way is faster than calling `Object.create(null)` directly.
|
|
9174
|
-
// If `Object.create(null)` is not supported we prefix the event names with a
|
|
9175
|
-
// character to make sure that the built-in object properties are not
|
|
9176
|
-
// overridden or used as an attack vector.
|
|
9177
|
-
//
|
|
9178
|
-
if (Object.create) {
|
|
9179
|
-
Events.prototype = Object.create(null);
|
|
9180
|
-
|
|
9181
|
-
//
|
|
9182
|
-
// This hack is needed because the `__proto__` property is still inherited in
|
|
9183
|
-
// some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
|
|
9184
|
-
//
|
|
9185
|
-
if (!new Events().__proto__) prefix = false;
|
|
9186
|
-
}
|
|
9187
|
-
|
|
9188
|
-
/**
|
|
9189
|
-
* Representation of a single event listener.
|
|
9190
|
-
*
|
|
9191
|
-
* @param {Function} fn The listener function.
|
|
9192
|
-
* @param {*} context The context to invoke the listener with.
|
|
9193
|
-
* @param {Boolean} [once=false] Specify if the listener is a one-time listener.
|
|
9194
|
-
* @constructor
|
|
9195
|
-
* @private
|
|
9196
|
-
*/
|
|
9197
|
-
function EE(fn, context, once) {
|
|
9198
|
-
this.fn = fn;
|
|
9199
|
-
this.context = context;
|
|
9200
|
-
this.once = once || false;
|
|
9201
|
-
}
|
|
9202
|
-
|
|
9203
|
-
/**
|
|
9204
|
-
* Add a listener for a given event.
|
|
9205
|
-
*
|
|
9206
|
-
* @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
|
|
9207
|
-
* @param {(String|Symbol)} event The event name.
|
|
9208
|
-
* @param {Function} fn The listener function.
|
|
9209
|
-
* @param {*} context The context to invoke the listener with.
|
|
9210
|
-
* @param {Boolean} once Specify if the listener is a one-time listener.
|
|
9211
|
-
* @returns {EventEmitter}
|
|
9212
|
-
* @private
|
|
9213
|
-
*/
|
|
9214
|
-
function addListener(emitter, event, fn, context, once) {
|
|
9215
|
-
if (typeof fn !== 'function') {
|
|
9216
|
-
throw new TypeError('The listener must be a function');
|
|
9217
|
-
}
|
|
9218
|
-
|
|
9219
|
-
var listener = new EE(fn, context || emitter, once)
|
|
9220
|
-
, evt = prefix ? prefix + event : event;
|
|
9221
|
-
|
|
9222
|
-
if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
|
|
9223
|
-
else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
|
|
9224
|
-
else emitter._events[evt] = [emitter._events[evt], listener];
|
|
9225
|
-
|
|
9226
|
-
return emitter;
|
|
9227
|
-
}
|
|
9228
|
-
|
|
9229
|
-
/**
|
|
9230
|
-
* Clear event by name.
|
|
9231
|
-
*
|
|
9232
|
-
* @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
|
|
9233
|
-
* @param {(String|Symbol)} evt The Event name.
|
|
9234
|
-
* @private
|
|
9235
|
-
*/
|
|
9236
|
-
function clearEvent(emitter, evt) {
|
|
9237
|
-
if (--emitter._eventsCount === 0) emitter._events = new Events();
|
|
9238
|
-
else delete emitter._events[evt];
|
|
9239
|
-
}
|
|
9240
|
-
|
|
9241
|
-
/**
|
|
9242
|
-
* Minimal `EventEmitter` interface that is molded against the Node.js
|
|
9243
|
-
* `EventEmitter` interface.
|
|
9244
|
-
*
|
|
9245
|
-
* @constructor
|
|
9246
|
-
* @public
|
|
9247
|
-
*/
|
|
9248
|
-
function EventEmitter() {
|
|
9249
|
-
this._events = new Events();
|
|
9250
|
-
this._eventsCount = 0;
|
|
9251
|
-
}
|
|
9007
|
+
/**
|
|
9008
|
+
* Minimal `EventEmitter` interface that is molded against the Node.js
|
|
9009
|
+
* `EventEmitter` interface.
|
|
9010
|
+
*
|
|
9011
|
+
* @constructor
|
|
9012
|
+
* @public
|
|
9013
|
+
*/
|
|
9014
|
+
function EventEmitter() {
|
|
9015
|
+
this._events = new Events();
|
|
9016
|
+
this._eventsCount = 0;
|
|
9017
|
+
}
|
|
9252
9018
|
|
|
9253
9019
|
/**
|
|
9254
9020
|
* Return an array listing the events for which the emitter has registered
|
|
@@ -9479,913 +9245,44 @@
|
|
|
9479
9245
|
//
|
|
9480
9246
|
EventEmitter.prefixed = prefix;
|
|
9481
9247
|
|
|
9482
|
-
//
|
|
9483
|
-
// Allow `EventEmitter` to be imported as module namespace.
|
|
9484
|
-
//
|
|
9485
|
-
EventEmitter.EventEmitter = EventEmitter;
|
|
9486
|
-
|
|
9487
|
-
//
|
|
9488
|
-
// Expose the module.
|
|
9489
|
-
//
|
|
9490
|
-
{
|
|
9491
|
-
module.exports = EventEmitter;
|
|
9492
|
-
}
|
|
9493
|
-
} (eventemitter3));
|
|
9494
|
-
return eventemitter3.exports;
|
|
9495
|
-
}
|
|
9496
|
-
|
|
9497
|
-
var eventemitter3Exports = requireEventemitter3();
|
|
9498
|
-
var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
|
|
9499
|
-
|
|
9500
|
-
/*
|
|
9501
|
-
* @ezuikit/control-modal v0.0.1
|
|
9502
|
-
* Copyright (c) 2026-07-06 Ezviz-OpenBiz
|
|
9503
|
-
* Released under the MIT License.
|
|
9504
|
-
*/
|
|
9505
|
-
function _array_like_to_array$2(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _create_class$a(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _create_for_of_iterator_helper_loose$2(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return (it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array$2(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array$2(o,minLen):void 0}}(o))||allowArrayLike){it&&(o=it);var i=0;return function(){return i>=o.length?{done:true}:{done:false,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var ModalProvider=function(){function ModalProvider(){this._instances=new Set,this._zIndexCounter=1e3;}var _proto=ModalProvider.prototype;return _proto.register=function(modal,minZIndex){this._instances.add(modal);var base=Math.max(this._zIndexCounter,minZIndex||1e3);return this._zIndexCounter=base+2,base},_proto.unregister=function(modal){this._instances.delete(modal);},_proto.bringToTop=function(){var base=this._zIndexCounter;return this._zIndexCounter+=2,base},_proto.getInstances=function(){return Array.from(this._instances)},_proto.destroyAll=function(){for(var _step,_iterator=_create_for_of_iterator_helper_loose$2(this.getInstances());!(_step=_iterator()).done;){var modal=_step.value;modal._destroyed||modal.destroy();}},ModalProvider.getInstance=function(){return ModalProvider._instance||(ModalProvider._instance=new ModalProvider),ModalProvider._instance},ModalProvider.resetInstance=function(){ModalProvider._instance&&(ModalProvider._instance._instances.clear(),ModalProvider._instance._zIndexCounter=1e3,ModalProvider._instance=null);},_create_class$a(ModalProvider,[{key:"count",get:function(){return this._instances.size}}]),ModalProvider}();ModalProvider._instance=null;var EVENTS$1={open:"open",close:"close",dragStart:"dragStart",dragging:"dragging",dragEnd:"dragEnd"},_$MODAL_LOCALES$_={zh:{close:"关闭"},en:{close:"Close"}},__$MODAL_DEFAULT_OPTIONS$__={width:420,position:"center",draggable:true,showMask:true,maskClosable:true,showHeader:true,showClose:true,closeOnEscape:true,open:false,zIndex:1e3,language:"zh"};var Modal=function(){function Modal(container,options){this._$mask=null,this._$header=null,this._$title=null,this._$close=null,this._visible=false,this._dragging=false,this._dragOffset={x:0,y:0},this._destroyed=false,this._dragBounds={maxLeft:0,maxTop:0},this._dragPoint=null,this._dragRafId=null,this._pos={x:0,y:0},this.options=deepmerge(__$MODAL_DEFAULT_OPTIONS$__,null!=options?options:{},{clone:false}),this._eventEmitter=new EventEmitter,this._i18n=new I18n$1(deepmerge(_$MODAL_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"}),this._container=this._resolveContainer(container),this._baseZIndex=ModalProvider.getInstance().register(this,this.options.zIndex),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onDragFrame=this._onDragFrame.bind(this),this._onHeaderPointerDown=this._onHeaderPointerDown.bind(this),this._onCloseClick=this._onCloseClick.bind(this),this._onMaskClick=this._onMaskClick.bind(this),this._onKeydown=this._onKeydown.bind(this),this._onWindowResize=this._onWindowResize.bind(this),this._onModalPointerDown=this._onModalPointerDown.bind(this),this._onWrapDblClick=this._onWrapDblClick.bind(this),this._render(),this._bindEvents(),this.options.open&&this.open();}var _proto=Modal.prototype;return _proto.open=function(){this._destroyed||this._visible||(this._visible=true,this._$mask&&this._$mask.classList.remove("emodal-hidden"),this._$wrap.classList.remove("emodal-hidden"),this._applyInitialPosition(),window.addEventListener("resize",this._onWindowResize),this.options.closeOnEscape&&document.addEventListener("keydown",this._onKeydown),this._eventEmitter.emit(EVENTS$1.open),null==this.options.onOpen||this.options.onOpen.call(this.options));},_proto.close=function(){!this._destroyed&&this._visible&&(this._visible=false,this._$mask&&this._$mask.classList.add("emodal-hidden"),this._$wrap.classList.add("emodal-hidden"),this._stopDragging(),window.removeEventListener("resize",this._onWindowResize),document.removeEventListener("keydown",this._onKeydown),this._eventEmitter.emit(EVENTS$1.close),null==this.options.onClose||this.options.onClose.call(this.options));},_proto.isVisible=function(){return this._visible},_proto.bringToTop=function(){this._destroyed||(this._baseZIndex=ModalProvider.getInstance().bringToTop(),this._$mask&&(this._$mask.style.zIndex=""+this._baseZIndex),this._$wrap.style.zIndex=""+(this._baseZIndex+1));},_proto.setTitle=function(title){this.options.title=title,this._$title&&this._mount(this._$title,title);},_proto.setContent=function(content){this.options.content=content,this._mount(this._$body,content);},_proto.updateOptions=function(options){this.options=deepmerge(this.options,options,{clone:false}),(options.language||options.locales)&&(this._i18n=new I18n$1(deepmerge(_$MODAL_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"})),this._stopDragging();var wasVisible=this._visible;this._teardownDom(),this._render(),this._bindEvents(),wasVisible&&(this._visible=false,this.open());},_proto.on=function(event,callback){this._eventEmitter.on(event,callback);},_proto.off=function(event,callback){this._eventEmitter.off(event,callback);},_proto.setPosition=function(left,top,bounds){var _ref=bounds||this._bounds(),maxLeft=_ref.maxLeft,maxTop=_ref.maxTop,x=Math.max(0,Math.min(left,maxLeft)),y=Math.max(0,Math.min(top,maxTop));return this._setTranslate(x,y),{x:x,y:y}},_proto.destroy=function(){this._destroyed||(this._stopDragging(),window.removeEventListener("resize",this._onWindowResize),document.removeEventListener("keydown",this._onKeydown),this._teardownDom(),this._eventEmitter.removeAllListeners(),this._destroyed=true,ModalProvider.getInstance().unregister(this));},_proto._resolveContainer=function(container){return "string"==typeof container?document.querySelector(container)||document.body:container||document.body},_proto._toSize=function(value){return null==value||""===value?null:"number"==typeof value?value+"px":value},_proto._render=function(){this.options.showMask&&(this._$mask=document.createElement("div"),this._$mask.className="emodal-mask emodal-hidden",this._$mask.style.zIndex=""+this._baseZIndex,this._container.appendChild(this._$mask)),this._$wrap=document.createElement("div"),this._$wrap.className="emodal-wrap emodal-hidden",this.options.draggable&&this._$wrap.classList.add("emodal-draggable"),this.options.className&&this._$wrap.classList.add(this.options.className),this._$wrap.style.zIndex=""+(this._baseZIndex+1);var w=this._toSize(this.options.width);w&&(this._$wrap.style.width=w);var h=this._toSize(this.options.height);h&&(this._$wrap.style.height=h),this.options.showHeader?(this._$header=document.createElement("div"),this._$header.className="emodal-header",this._$title=document.createElement("div"),this._$title.className="emodal-title",void 0!==this.options.title&&this._mount(this._$title,this.options.title),this._$header.appendChild(this._$title),this.options.showClose&&(this._$close=document.createElement("button"),this._$close.type="button",this._$close.className="emodal-close",this._$close.setAttribute("aria-label",String(this._i18n.t("close"))),this._$close.innerHTML='<svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true">\n <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n</svg>',this._$header.appendChild(this._$close)),this._$wrap.appendChild(this._$header)):(this._$header=null,this._$title=null,this._$close=null),this._$body=document.createElement("div"),this._$body.className="emodal-body",void 0!==this.options.content&&this._mount(this._$body,this.options.content),this._$wrap.appendChild(this._$body),this._container.appendChild(this._$wrap);},_proto._mount=function(target,content){var left,right;left=content,(null!=(right=HTMLElement)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?(target.innerHTML="",target.appendChild(content)):target.innerHTML=null!=content?content:"";},_proto._teardownDom=function(){var _this__$mask;this._$wrap.parentNode&&this._$wrap.parentNode.removeChild(this._$wrap),(null==(_this__$mask=this._$mask)?void 0:_this__$mask.parentNode)&&this._$mask.parentNode.removeChild(this._$mask),this._$mask=null,this._$header=null,this._$title=null,this._$close=null;},_proto._bindEvents=function(){var _this__$close,_this__$mask,_this__$mask1;(null==(_this__$close=this._$close)||_this__$close.addEventListener("click",this._onCloseClick),this.options.showMask&&this.options.maskClosable)&&(null==(_this__$mask1=this._$mask)||_this__$mask1.addEventListener("click",this._onMaskClick));this.options.draggable&&this._$header&&(this._$header.addEventListener("mousedown",this._onHeaderPointerDown),this._$header.addEventListener("touchstart",this._onHeaderPointerDown,{passive:false})),this._$wrap.addEventListener("pointerdown",this._onModalPointerDown),this._$wrap.addEventListener("dblclick",this._onWrapDblClick),null==(_this__$mask=this._$mask)||_this__$mask.addEventListener("pointerdown",this._onModalPointerDown);},_proto._onCloseClick=function(e){e.stopPropagation(),this.close();},_proto._onMaskClick=function(){this.close();},_proto._onModalPointerDown=function(){this.bringToTop();},_proto._onWrapDblClick=function(e){e.stopPropagation();},_proto._onKeydown=function(e){"Escape"!==e.key&&"Esc"!==e.key||this.close();},_proto._onWindowResize=function(){if(this._dragging)return this._dragBounds=this._bounds(),void this.setPosition(this._pos.x,this._pos.y,this._dragBounds);this.setPosition(this._pos.x,this._pos.y);},_proto._getPoint=function(e){if("touches"in e){var t=e.touches[0]||e.changedTouches[0];return {x:t.clientX,y:t.clientY}}return {x:e.clientX,y:e.clientY}},_proto._onHeaderPointerDown=function(e){if(this.options.draggable){var target=e.target;if(!(this._$close&&(target===this._$close||this._$close.contains(target))||"button"in e&&0!==e.button)){var point=this._getPoint(e),rect=this._$wrap.getBoundingClientRect();this._dragOffset={x:point.x-rect.left,y:point.y-rect.top},this._dragBounds=this._bounds(),this._dragging=true,this._$wrap.style.willChange="transform",document.body.classList.add("emodal-dragging"),document.addEventListener("mousemove",this._onPointerMove),document.addEventListener("mouseup",this._onPointerUp),document.addEventListener("touchmove",this._onPointerMove,{passive:false}),document.addEventListener("touchend",this._onPointerUp),document.addEventListener("touchcancel",this._onPointerUp),this._eventEmitter.emit(EVENTS$1.dragStart);}}},_proto._onPointerMove=function(e){this._dragging&&(e.cancelable&&e.preventDefault(),this._dragPoint=this._getPoint(e),null===this._dragRafId&&(this._dragRafId=requestAnimationFrame(this._onDragFrame)));},_proto._onDragFrame=function(){if(this._dragRafId=null,this._dragging&&this._dragPoint){var left=this._dragPoint.x-this._dragOffset.x,top=this._dragPoint.y-this._dragOffset.y,_this__dragBounds=this._dragBounds,maxLeft=_this__dragBounds.maxLeft,maxTop=_this__dragBounds.maxTop,x=Math.max(0,Math.min(left,maxLeft)),y=Math.max(0,Math.min(top,maxTop));this._setTranslate(x,y),this._eventEmitter.emit(EVENTS$1.dragging,{x:x,y:y});}},_proto._onPointerUp=function(){this._dragging&&(this._stopDragging(),this._eventEmitter.emit(EVENTS$1.dragEnd,{left:this._pos.x,top:this._pos.y}));},_proto._stopDragging=function(){null!==this._dragRafId&&(cancelAnimationFrame(this._dragRafId),this._dragRafId=null),this._dragPoint=null,this._dragging?(this._dragging=false,this._$wrap&&(this._$wrap.style.willChange=""),document.body.classList.remove("emodal-dragging"),document.removeEventListener("mousemove",this._onPointerMove),document.removeEventListener("mouseup",this._onPointerUp),document.removeEventListener("touchmove",this._onPointerMove),document.removeEventListener("touchend",this._onPointerUp),document.removeEventListener("touchcancel",this._onPointerUp)):document.body.classList.remove("emodal-dragging");},_proto._bounds=function(){var vw=document.documentElement.clientWidth,vh=document.documentElement.clientHeight,w=this._$wrap.offsetWidth,h=this._$wrap.offsetHeight;return {maxLeft:Math.max(0,vw-w),maxTop:Math.max(0,vh-h)}},_proto._setTranslate=function(x,y){this._pos={x:x,y:y},this._$wrap.style.transform="translate3d("+x+"px, "+y+"px, 0)";},_proto._center=function(){var vw=document.documentElement.clientWidth,vh=document.documentElement.clientHeight,w=this._$wrap.offsetWidth,h=this._$wrap.offsetHeight;this.setPosition((vw-w)/2,(vh-h)/2);},_proto._applyInitialPosition=function(){var obj,position=this.options.position;position&&"object"==(void 0===position?"undefined":(obj=position)&&"undefined"!=typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj)?this.setPosition(position.x,position.y):this._center();},Modal}();Modal.VERSION="0.0.1",Modal.EVENTS=EVENTS$1;
|
|
9506
|
-
|
|
9507
|
-
/*
|
|
9508
|
-
* @ezuikit/control-virtual-scroll v0.0.1
|
|
9509
|
-
* Copyright (c) 2026-07-06 Ezviz-OpenBiz
|
|
9510
|
-
* Released under the MIT License.
|
|
9511
|
-
*/
|
|
9512
|
-
var EVENTS={render:"render",scroll:"scroll",reachTop:"reachTop",reachBottom:"reachBottom"},DefaultOptions={itemHeight:40,buffer:5,smooth:true};function _create_class$9(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var _OVERWRITE_MERGE_={clone:false,arrayMerge:function(_dest,src){return src}},VirtualScroll=function(){function VirtualScroll(container,options){this._active=new Map,this._pool=[],this._heights=[],this._prefix=[],this._prefixDirty=false,this._containerHeight=0,this._startIndex=-1,this._endIndex=-1,this._ticking=false,this._destroyed=false,this._resizeObserver=null,this._eventEmitter=new EventEmitter,this.options=deepmerge(DefaultOptions,null!=options?options:{},_OVERWRITE_MERGE_),this._wrapper=this._resolveContainer(null!=container?container:this.options.container),this._onScroll=this._onScroll.bind(this),this._onResize=this._onResize.bind(this),this._wrapper.classList.add("evscroll-wrapper"),"static"===getComputedStyle(this._wrapper).position&&(this._wrapper.style.position="relative"),this._wrapper.style.overflowY="auto",this._$content=document.createElement("div"),this._$content.className="evscroll-content",this._$viewport=document.createElement("div"),this._$viewport.className="evscroll-viewport",this._$content.appendChild(this._$viewport),this._wrapper.appendChild(this._$content),this._containerHeight=this._wrapper.clientHeight,this._wrapper.addEventListener("scroll",this._onScroll,{passive:true}),this._setupResizeObserver(),this._initHeights(),this._syncContentHeight(),this._compute(true);}var _proto=VirtualScroll.prototype;return _proto.getTotalCount=function(){return this.options.data?this.options.data.length:this.options.total||0},_proto.getCurrentRange=function(){return {startIndex:this._startIndex,endIndex:this._endIndex}},_proto.scrollToIndex=function(index,smooth){var total=this.getTotalCount();if(index<0||index>=total)return false;var top=this._offsetOf(index),useSmooth=void 0===smooth?this.options.smooth:smooth;return "function"==typeof this._wrapper.scrollTo?this._wrapper.scrollTo({top:top,behavior:useSmooth?"smooth":"auto"}):this._wrapper.scrollTop=top,true},_proto.scrollToTop=function(smooth){this.scrollToIndex(0,smooth);},_proto.scrollToBottom=function(smooth){var total=this.getTotalCount();total>0&&this.scrollToIndex(total-1,smooth);},_proto.setData=function(data){this.options.data=data,this.refresh();},_proto.setTotal=function(total){this.options.total=total,this.options.data=void 0,this.refresh();},_proto.refresh=function(){this._reset(),this._initHeights(),this._syncContentHeight(),this._compute(true);},_proto.updateOptions=function(options){this.options=deepmerge(this.options,options,_OVERWRITE_MERGE_),this.refresh();},_proto.on=function(event,callback){this._eventEmitter.on(event,callback);},_proto.off=function(event,callback){this._eventEmitter.off(event,callback);},_proto.destroy=function(){this._destroyed||(this._wrapper.removeEventListener("scroll",this._onScroll),this._resizeObserver?(this._resizeObserver.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResize),this._reset(),this._$content.parentNode===this._wrapper&&this._wrapper.removeChild(this._$content),this._wrapper.classList.remove("evscroll-wrapper"),this._eventEmitter.removeAllListeners(),this._destroyed=true);},_proto._resolveContainer=function(container){var el="string"==typeof container?document.querySelector(container):container;if(!el)throw new Error("[VirtualScroll] container not found: "+String(container));return el},_proto._estimated=function(){var _this_options_estimatedItemHeight,ih=this.options.itemHeight;return null!=(_this_options_estimatedItemHeight=this.options.estimatedItemHeight)?_this_options_estimatedItemHeight:"number"==typeof ih&&ih>0?ih:DefaultOptions.itemHeight},_proto._baseHeightAt=function(index){var ih=this.options.itemHeight;if("function"==typeof ih){var h=ih(index,this.options.data?this.options.data[index]:void 0);return h>0?h:this._estimated()}return this._estimated()},_proto._initHeights=function(){if(!this._variable)return this._heights=[],this._prefix=[],void(this._prefixDirty=false);for(var total=this.getTotalCount(),heights=new Array(total),i=0;i<total;i++)heights[i]=this._baseHeightAt(i);this._heights=heights,this._prefixDirty=true,this._ensurePrefix();},_proto._ensurePrefix=function(){if(this._variable){var total=this.getTotalCount();if(this._prefixDirty||this._prefix.length!==total+1){var prefix=new Array(total+1);prefix[0]=0;for(var i=0;i<total;i++)prefix[i+1]=prefix[i]+(this._heights[i]||0);this._prefix=prefix,this._prefixDirty=false;}}},_proto._offsetOf=function(index){if(this._variable){this._ensurePrefix();var i=Math.max(0,Math.min(index,this.getTotalCount()));return this._prefix[i]||0}return index*this._fixedHeight},_proto._heightOf=function(index){return this._variable?this._heights[index]||0:this._fixedHeight},_proto._totalHeight=function(){return this._variable?(this._ensurePrefix(),this._prefix[this.getTotalCount()]||0):this.getTotalCount()*this._fixedHeight},_proto._findStartIndex=function(scrollTop){var total=this.getTotalCount();if(0===total)return 0;if(!this._variable)return Math.min(total-1,Math.max(0,Math.floor(scrollTop/this._fixedHeight)));this._ensurePrefix();for(var lo=0,hi=total;lo<hi;){var mid=lo+hi+1>>1;this._prefix[mid]<=scrollTop?lo=mid:hi=mid-1;}return Math.min(lo,total-1)},_proto._syncContentHeight=function(){this._$content.style.height=this._totalHeight()+"px";},_proto._onScroll=function(){var _this=this;this._eventEmitter.emit(EVENTS.scroll,this._wrapper.scrollTop),null==this.options.onScroll||this.options.onScroll.call(this.options,this._wrapper.scrollTop),this._ticking||(this._ticking=true,requestAnimationFrame(function(){_this._compute(false),_this._ticking=false;}));},_proto._setupResizeObserver=function(){var _this=this;"undefined"!=typeof ResizeObserver?(this._resizeObserver=new ResizeObserver(function(){return _this._onResize()}),this._resizeObserver.observe(this._wrapper)):window.addEventListener("resize",this._onResize);},_proto._onResize=function(){var h=this._wrapper.clientHeight;h!==this._containerHeight&&(this._containerHeight=h,this._compute(true));},_proto._compute=function(force){if(!this._destroyed){var total=this.getTotalCount();if((0===total||0===this._containerHeight)&&(this._containerHeight=this._wrapper.clientHeight,0===total))return this._reset(),void(this._$content.style.height="0px");var start,end,scrollTop=this._wrapper.scrollTop,buffer=this._buffer;if(this._variable)this._ensurePrefix(),start=Math.max(0,this._findStartIndex(scrollTop)-buffer),end=Math.min(total-1,this._findStartIndex(scrollTop+this._containerHeight)+buffer);else {var itemHeight=this._fixedHeight,rawStart=Math.floor(scrollTop/itemHeight);start=Math.max(0,rawStart-buffer);var capacity=Math.ceil(this._containerHeight/itemHeight);end=Math.min(total-1,rawStart+capacity-1+buffer);}if(force||start!==this._startIndex||end!==this._endIndex){if(this._startIndex=start,this._endIndex=end,this._updateRange(start,end),this._dynamic&&this._measureAndAdjust()){var st=this._wrapper.scrollTop,s2=Math.max(0,this._findStartIndex(st)-buffer),e2=Math.min(total-1,this._findStartIndex(st+this._containerHeight)+buffer);s2===start&&e2===end||(this._startIndex=s2,this._endIndex=e2,this._updateRange(s2,e2),start=s2,end=e2);}var range={startIndex:start,endIndex:end};this._eventEmitter.emit(EVENTS.render,range),null==this.options.onRender||this.options.onRender.call(this.options,range),0===start&&this._eventEmitter.emit(EVENTS.reachTop),end===total-1&&this._eventEmitter.emit(EVENTS.reachBottom);}}},_proto._measureAndAdjust=function(){var _this=this,changed=false;if(this._active.forEach(function(el,idx){var h=el.offsetHeight;h>0&&Math.abs(h-(_this._heights[idx]||0))>.5&&(_this._heights[idx]=h,changed=true);}),!changed)return false;var anchorIdx=this._startIndex>=0?this._startIndex:0,gap=this._wrapper.scrollTop-this._offsetOf(anchorIdx);this._prefixDirty=true,this._ensurePrefix(),this._$content.style.height=this._totalHeight()+"px",this._repositionActive();var newScrollTop=this._offsetOf(anchorIdx)+gap;return newScrollTop>=0&&Math.abs(newScrollTop-this._wrapper.scrollTop)>.5&&(this._wrapper.scrollTop=newScrollTop),true},_proto._repositionActive=function(){var _this=this;this._active.forEach(function(el,idx){el.style.top=_this._offsetOf(idx)+"px";});},_proto._updateRange=function(start,end){var _this=this,toRecycle=[];this._active.forEach(function(_el,idx){(idx<start||idx>end)&&toRecycle.push(idx);}),toRecycle.forEach(function(idx){var el=_this._active.get(idx);el&&(el.style.display="none",_this._pool.push(el)),_this._active.delete(idx);});for(var i=start;i<=end;i++)if(!this._active.has(i)){var el=this._pool.pop()||this._createItemEl();el.style.display="",el.style.top=this._offsetOf(i)+"px",el.style.height=this._dynamic?"":this._heightOf(i)+"px",el.setAttribute("data-index",String(i)),this._fillItem(el,i),el.parentNode!==this._$viewport&&this._$viewport.appendChild(el),this._active.set(i,el);}},_proto._createItemEl=function(){var el=document.createElement("div");return el.className="evscroll-item",el},_proto._fillItem=function(el,index){var left,right,item=this.options.data?this.options.data[index]:void 0,content=this.options.renderItem(index,item);left=content,(null!=(right=HTMLElement)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?el.replaceChildren(content):el.innerHTML=null!=content?content:"";},_proto._reset=function(){this._active.clear(),this._pool=[],this._$viewport.replaceChildren(),this._startIndex=-1,this._endIndex=-1;},_create_class$9(VirtualScroll,[{key:"_dynamic",get:function(){return !!this.options.dynamicHeight}},{key:"_variable",get:function(){return this._dynamic||"function"==typeof this.options.itemHeight}},{key:"_fixedHeight",get:function(){var ih=this.options.itemHeight;return "number"==typeof ih&&ih>0?ih:DefaultOptions.itemHeight}},{key:"_buffer",get:function(){var _this_options_buffer;return null!=(_this_options_buffer=this.options.buffer)?_this_options_buffer:DefaultOptions.buffer}}]),VirtualScroll}();VirtualScroll.VERSION="0.0.1",VirtualScroll.EVENTS=EVENTS;
|
|
9513
|
-
|
|
9514
|
-
/*
|
|
9515
|
-
* @ezuikit/control-rec-list-modal v0.0.1-beta.6
|
|
9516
|
-
* Copyright (c) 2026-07-06 Ezviz-OpenBiz
|
|
9517
|
-
* Released under the MIT License.
|
|
9518
|
-
*/
|
|
9519
|
-
|
|
9520
|
-
// 图片懒加载类(基于 IntersectionObserver)
|
|
9521
|
-
/**
|
|
9522
|
-
* 默认配置项
|
|
9523
|
-
*/ /* eslint-disable @typescript-eslint/naming-convention */ var __$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__$1 = {
|
|
9524
|
-
targets: [],
|
|
9525
|
-
root: null,
|
|
9526
|
-
rootMargin: '0px',
|
|
9527
|
-
threshold: 0.1,
|
|
9528
|
-
loadingClass: 'ez-lazy-image-loading',
|
|
9529
|
-
loadedClass: 'ez-lazy-image-loaded',
|
|
9530
|
-
loadedErrorClass: 'ez-lazy-image-error',
|
|
9531
|
-
dwell: 200,
|
|
9532
|
-
onLoadError: function onLoadError() {}
|
|
9533
|
-
};
|
|
9534
|
-
/**
|
|
9535
|
-
* 图片懒加载类
|
|
9536
|
-
*/ var ImageLazyLoader$1 = /*#__PURE__*/ function() {
|
|
9537
|
-
function ImageLazyLoader(options) {
|
|
9538
|
-
if (options === void 0) options = {};
|
|
9539
|
-
/** 进入视口后的待加载计时器(元素 -> timer),用于「停留满 dwell 才加载」 */ this._pendingTimers = new Map();
|
|
9540
|
-
this.options = Object.assign({}, __$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__$1, options);
|
|
9541
|
-
this._observer = null;
|
|
9542
|
-
this._init();
|
|
9543
|
-
}
|
|
9544
|
-
var _proto = ImageLazyLoader.prototype;
|
|
9545
|
-
/**
|
|
9546
|
-
* 初始化 Intersection Observer
|
|
9547
|
-
*/ _proto._init = function _init() {
|
|
9548
|
-
var _this = this;
|
|
9549
|
-
if (ImageLazyLoader.isSupported) {
|
|
9550
|
-
// 创建 Intersection Observer
|
|
9551
|
-
this._observer = new IntersectionObserver(function(entries) {
|
|
9552
|
-
entries.forEach(function(entry) {
|
|
9553
|
-
var target = entry.target;
|
|
9554
|
-
if (entry.isIntersecting) {
|
|
9555
|
-
// 进入视口:延迟 dwell 后再加载,期间已有计时则跳过
|
|
9556
|
-
if (_this._pendingTimers.has(target)) return;
|
|
9557
|
-
var timer = setTimeout(function() {
|
|
9558
|
-
var _this__observer;
|
|
9559
|
-
_this._pendingTimers.delete(target);
|
|
9560
|
-
_this._loadImage(target);
|
|
9561
|
-
(_this__observer = _this._observer) == null ? void 0 : _this__observer.unobserve(target);
|
|
9562
|
-
}, _this.options.dwell);
|
|
9563
|
-
_this._pendingTimers.set(target, timer);
|
|
9564
|
-
} else {
|
|
9565
|
-
// 停留未满 dwell 就离开视口(如快速滚动):取消加载
|
|
9566
|
-
var timer1 = _this._pendingTimers.get(target);
|
|
9567
|
-
if (timer1 !== undefined) {
|
|
9568
|
-
clearTimeout(timer1);
|
|
9569
|
-
_this._pendingTimers.delete(target);
|
|
9570
|
-
}
|
|
9571
|
-
}
|
|
9572
|
-
});
|
|
9573
|
-
}, this.options);
|
|
9574
|
-
} else {
|
|
9575
|
-
console.warn('not support Intersection Observer!');
|
|
9576
|
-
}
|
|
9577
|
-
this.addImages(this.options.targets);
|
|
9578
|
-
};
|
|
9579
|
-
_proto._loadImage = function _loadImage(img) {
|
|
9580
|
-
var _this = this;
|
|
9581
|
-
var _img_classList, _img_classList1, _img_classList2;
|
|
9582
|
-
if (!img) return;
|
|
9583
|
-
if ((_img_classList = img.classList) == null ? void 0 : _img_classList.contains(this.options.loadingClass)) return;
|
|
9584
|
-
if ((_img_classList1 = img.classList) == null ? void 0 : _img_classList1.contains(this.options.loadedClass)) return;
|
|
9585
|
-
if ((_img_classList2 = img.classList) == null ? void 0 : _img_classList2.contains(this.options.loadedErrorClass)) return;
|
|
9586
|
-
if (!img.hasAttribute('data-src')) return;
|
|
9587
|
-
/* eslint-disable @typescript-eslint/no-this-alias */ var _this1 = this;
|
|
9588
|
-
// 添加加载中类
|
|
9589
|
-
img.classList.add(this.options.loadingClass);
|
|
9590
|
-
// 创建新的图片对象进行预加载
|
|
9591
|
-
var tempImg = new Image();
|
|
9592
|
-
tempImg.onload = function() {
|
|
9593
|
-
// 设置实际图片源
|
|
9594
|
-
img.src = img.dataset.src;
|
|
9595
|
-
// 更新类名
|
|
9596
|
-
img.classList.remove(_this.options.loadingClass);
|
|
9597
|
-
img.classList.add(_this.options.loadedClass);
|
|
9598
|
-
// 触发加载完成事件
|
|
9599
|
-
img.dispatchEvent(new Event('lazyloaded'));
|
|
9600
|
-
};
|
|
9601
|
-
tempImg.onerror = function() {
|
|
9602
|
-
console.error('图片加载失败:', img.dataset.src);
|
|
9603
|
-
img.classList.remove(_this.options.loadingClass);
|
|
9604
|
-
img.classList.add(_this.options.loadedErrorClass);
|
|
9605
|
-
_this1.options.onLoadError == null ? void 0 : _this1.options.onLoadError.call(_this1.options, img);
|
|
9606
|
-
};
|
|
9607
|
-
tempImg.src = img.dataset.src;
|
|
9608
|
-
};
|
|
9609
|
-
/**
|
|
9610
|
-
* 添加新的懒加载图片
|
|
9611
|
-
*/ _proto.addImages = function addImages(targets) {
|
|
9612
|
-
var _this = this;
|
|
9613
|
-
// 观察所有懒加载图片
|
|
9614
|
-
if (targets == null ? void 0 : targets.length) {
|
|
9615
|
-
targets.forEach(function(target) {
|
|
9616
|
-
if (target == null ? void 0 : target.hasAttribute('data-src')) {
|
|
9617
|
-
if (ImageLazyLoader.isSupported && _this._observer) {
|
|
9618
|
-
var _this__observer;
|
|
9619
|
-
(_this__observer = _this._observer) == null ? void 0 : _this__observer.observe(target);
|
|
9620
|
-
} else {
|
|
9621
|
-
_this._loadImage(target);
|
|
9622
|
-
}
|
|
9623
|
-
}
|
|
9624
|
-
});
|
|
9625
|
-
}
|
|
9626
|
-
};
|
|
9627
|
-
/**
|
|
9628
|
-
* 销毁观察器
|
|
9629
|
-
*/ _proto.destroy = function destroy() {
|
|
9630
|
-
// 清理所有待加载计时器
|
|
9631
|
-
this._pendingTimers.forEach(function(timer) {
|
|
9632
|
-
return clearTimeout(timer);
|
|
9633
|
-
});
|
|
9634
|
-
this._pendingTimers.clear();
|
|
9635
|
-
if (this._observer) {
|
|
9636
|
-
this._observer.disconnect();
|
|
9637
|
-
this._observer = null;
|
|
9638
|
-
}
|
|
9639
|
-
};
|
|
9640
|
-
return ImageLazyLoader;
|
|
9641
|
-
}();
|
|
9642
|
-
ImageLazyLoader$1.isSupported = 'IntersectionObserver' in window;
|
|
9643
|
-
|
|
9644
|
-
function _defineProperties$1$1(target, props) {
|
|
9645
|
-
for(var i = 0; i < props.length; i++){
|
|
9646
|
-
var descriptor = props[i];
|
|
9647
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
9648
|
-
descriptor.configurable = true;
|
|
9649
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
9650
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
9651
|
-
}
|
|
9652
|
-
}
|
|
9653
|
-
function _create_class$1$2(Constructor, protoProps, staticProps) {
|
|
9654
|
-
if (protoProps) _defineProperties$1$1(Constructor.prototype, protoProps);
|
|
9655
|
-
return Constructor;
|
|
9656
|
-
}
|
|
9657
|
-
/** 类名前缀 */ var _PREFIX_$1 = 'ez-rec-list-modal-checkbox';
|
|
9658
|
-
/** 勾选标记 SVG(白色对勾) */ var _CHECK_ICON_ = '<svg viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M3.5 8.4 6.4 11.3 12.5 4.9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';
|
|
9659
|
-
/**
|
|
9660
|
-
* 复选框组件(DOM,无框架依赖)。
|
|
9661
|
-
*
|
|
9662
|
-
* 视觉:圆角方框,选中时填充主题蓝并展示白色对勾;内部包含一个视觉隐藏的原生
|
|
9663
|
-
* `<input type="checkbox">` 以支持键盘与无障碍。
|
|
9664
|
-
*
|
|
9665
|
-
* @example
|
|
9666
|
-
* ```ts
|
|
9667
|
-
* const cb = new Checkbox({ label: '事件', checked: true, onChange: (v) => console.log(v) });
|
|
9668
|
-
* container.appendChild(cb.el);
|
|
9669
|
-
* ```
|
|
9670
|
-
*/ var Checkbox = /*#__PURE__*/ function() {
|
|
9671
|
-
function Checkbox(options) {
|
|
9672
|
-
if (options === void 0) options = {};
|
|
9673
|
-
var _options_checked, _options_disabled, _options_label, _options_size;
|
|
9674
|
-
/** 文案节点 */ this._$label = null;
|
|
9675
|
-
/** 是否已销毁 */ this._destroyed = false;
|
|
9676
|
-
this.options = {
|
|
9677
|
-
checked: (_options_checked = options.checked) != null ? _options_checked : false,
|
|
9678
|
-
disabled: (_options_disabled = options.disabled) != null ? _options_disabled : false,
|
|
9679
|
-
label: (_options_label = options.label) != null ? _options_label : '',
|
|
9680
|
-
size: (_options_size = options.size) != null ? _options_size : 16,
|
|
9681
|
-
onChange: options.onChange
|
|
9682
|
-
};
|
|
9683
|
-
this._onChange = this._onChange.bind(this);
|
|
9684
|
-
// 根(label)
|
|
9685
|
-
this._$root = document.createElement('label');
|
|
9686
|
-
this._$root.className = _PREFIX_$1;
|
|
9687
|
-
this._$root.style.setProperty('--ez-rec-list-modal-checkbox-size', "" + this.options.size + "px");
|
|
9688
|
-
// 原生 input(视觉隐藏,承载键盘/无障碍/选中态)
|
|
9689
|
-
this._$input = document.createElement('input');
|
|
9690
|
-
this._$input.type = 'checkbox';
|
|
9691
|
-
this._$input.className = "" + _PREFIX_$1 + "-input";
|
|
9692
|
-
this._$input.checked = this.options.checked;
|
|
9693
|
-
this._$input.disabled = this.options.disabled;
|
|
9694
|
-
this._$input.addEventListener('change', this._onChange);
|
|
9695
|
-
this._$root.appendChild(this._$input);
|
|
9696
|
-
// 自定义方框 + 对勾
|
|
9697
|
-
this._$box = document.createElement('span');
|
|
9698
|
-
this._$box.className = "" + _PREFIX_$1 + "-box";
|
|
9699
|
-
this._$box.innerHTML = '<span class="' + _PREFIX_$1 + '-check">' + _CHECK_ICON_ + "</span>";
|
|
9700
|
-
this._$root.appendChild(this._$box);
|
|
9701
|
-
// 文案
|
|
9702
|
-
if (this.options.label) {
|
|
9703
|
-
this._$label = document.createElement('span');
|
|
9704
|
-
this._$label.className = "" + _PREFIX_$1 + "-label";
|
|
9705
|
-
this._$label.textContent = this.options.label;
|
|
9706
|
-
this._$root.appendChild(this._$label);
|
|
9707
|
-
}
|
|
9708
|
-
this._syncState();
|
|
9709
|
-
}
|
|
9710
|
-
var _proto = Checkbox.prototype;
|
|
9711
|
-
/**
|
|
9712
|
-
* 设置选中态
|
|
9713
|
-
* @param checked 是否选中
|
|
9714
|
-
* @param emit 是否触发 onChange 回调,默认 false
|
|
9715
|
-
*/ _proto.setChecked = function setChecked(checked, emit) {
|
|
9716
|
-
if (emit === void 0) emit = false;
|
|
9717
|
-
if (this._$input.checked === checked) return;
|
|
9718
|
-
this._$input.checked = checked;
|
|
9719
|
-
this._syncState();
|
|
9720
|
-
if (emit) this.options.onChange == null ? void 0 : this.options.onChange.call(this.options, checked);
|
|
9721
|
-
};
|
|
9722
|
-
/**
|
|
9723
|
-
* 设置禁用态
|
|
9724
|
-
* @param disabled 是否禁用
|
|
9725
|
-
*/ _proto.setDisabled = function setDisabled(disabled) {
|
|
9726
|
-
this.options.disabled = disabled;
|
|
9727
|
-
this._$input.disabled = disabled;
|
|
9728
|
-
this._syncState();
|
|
9729
|
-
};
|
|
9730
|
-
/**
|
|
9731
|
-
* 设置文案
|
|
9732
|
-
* @param label 文案
|
|
9733
|
-
*/ _proto.setLabel = function setLabel(label) {
|
|
9734
|
-
this.options.label = label;
|
|
9735
|
-
if (label) {
|
|
9736
|
-
if (!this._$label) {
|
|
9737
|
-
this._$label = document.createElement('span');
|
|
9738
|
-
this._$label.className = "" + _PREFIX_$1 + "-label";
|
|
9739
|
-
this._$root.appendChild(this._$label);
|
|
9740
|
-
}
|
|
9741
|
-
this._$label.textContent = label;
|
|
9742
|
-
} else if (this._$label) {
|
|
9743
|
-
this._$label.remove();
|
|
9744
|
-
this._$label = null;
|
|
9745
|
-
}
|
|
9746
|
-
};
|
|
9747
|
-
/**
|
|
9748
|
-
* 销毁,移除事件与 DOM
|
|
9749
|
-
*/ _proto.destroy = function destroy() {
|
|
9750
|
-
if (this._destroyed) return;
|
|
9751
|
-
this._destroyed = true;
|
|
9752
|
-
this._$input.removeEventListener('change', this._onChange);
|
|
9753
|
-
this._$root.remove();
|
|
9754
|
-
};
|
|
9755
|
-
// --------------------------------------------------------------------------
|
|
9756
|
-
// private
|
|
9757
|
-
// --------------------------------------------------------------------------
|
|
9758
|
-
/** 原生 input change:同步状态并回调 */ _proto._onChange = function _onChange() {
|
|
9759
|
-
this._syncState();
|
|
9760
|
-
this.options.onChange == null ? void 0 : this.options.onChange.call(this.options, this._$input.checked);
|
|
9761
|
-
};
|
|
9762
|
-
/** 同步选中/禁用态到根节点 class */ _proto._syncState = function _syncState() {
|
|
9763
|
-
this._$root.classList.toggle("" + _PREFIX_$1 + "-checked", this._$input.checked);
|
|
9764
|
-
this._$root.classList.toggle("" + _PREFIX_$1 + "-disabled", this.options.disabled);
|
|
9765
|
-
};
|
|
9766
|
-
_create_class$1$2(Checkbox, [
|
|
9767
|
-
{
|
|
9768
|
-
key: "el",
|
|
9769
|
-
get: // --------------------------------------------------------------------------
|
|
9770
|
-
// public
|
|
9771
|
-
// --------------------------------------------------------------------------
|
|
9772
|
-
/** 根 DOM 节点 */ function get() {
|
|
9773
|
-
return this._$root;
|
|
9774
|
-
}
|
|
9775
|
-
},
|
|
9776
|
-
{
|
|
9777
|
-
key: "checked",
|
|
9778
|
-
get: /** 当前是否选中 */ function get() {
|
|
9779
|
-
return this._$input.checked;
|
|
9780
|
-
}
|
|
9781
|
-
}
|
|
9782
|
-
]);
|
|
9783
|
-
return Checkbox;
|
|
9784
|
-
}();
|
|
9785
|
-
|
|
9786
|
-
/**
|
|
9787
|
-
* 回放事件图标集
|
|
9788
|
-
*
|
|
9789
|
-
* 规范(与 tip 一致):
|
|
9790
|
-
* - 以键名作为图标标识,值为规范化后的 SVG 字符串模板;
|
|
9791
|
-
* - 根节点统一 `width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="<key>"`,移除 xmlns;
|
|
9792
|
-
* - 使用 `currentColor` 着色(描边/填充随字体颜色变化),移除设计稿导出的透明包围盒。
|
|
9793
|
-
*/ var _$REC_EVENT_ICONS$_ = {
|
|
9794
|
-
// 播放中(均衡器三条竖条,用于激活/正在播放的卡片)
|
|
9795
|
-
playing: '<svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="playing">\n <rect x="1.5" y="7" width="3" height="7.5" rx="1.5"/>\n <rect x="6.5" y="3" width="3" height="11.5" rx="1.5"/>\n <rect x="11" y="5.5" width="3" height="9" rx="1.5"/>\n </svg>',
|
|
9796
|
-
// 人形检测
|
|
9797
|
-
humanDetection: '<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="humanDetection">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.42689 10.122L5.78846 9.81738C5.5102 9.68459 5.33301 9.4037 5.33301 9.09537V6.6667C5.33301 6.22487 5.69118 5.8667 6.13301 5.8667H9.86634C10.3082 5.8667 10.6663 6.22487 10.6663 6.6667V9.10694C10.6663 9.40926 10.4959 9.68576 10.2258 9.82162L9.62858 10.122H6.42689Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.00039 2.1333C8.88405 2.1333 9.60039 2.84965 9.60039 3.7333C9.60039 4.61696 8.88405 5.3333 8.00039 5.3333C7.11674 5.3333 6.40039 4.61696 6.40039 3.7333C6.40039 2.84965 7.11674 2.1333 8.00039 2.1333Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.80039 9.06689C9.24222 9.06689 9.60039 9.42507 9.60039 9.8669V13.0669C9.60039 13.5087 9.24222 13.8669 8.80039 13.8669H7.20039C6.75856 13.8669 6.40039 13.5087 6.40039 13.0669V9.8669C6.40039 9.42507 6.75856 9.06689 7.20039 9.06689H8.80039Z" fill="currentColor"/>\n <path d="M4.26628 2.6665H2.93294C2.19694 2.6665 1.59961 3.26325 1.59961 3.99984V5.33317" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M1.59961 10.6665V11.9998C1.59961 12.7358 2.19694 13.3332 2.93294 13.3332H4.26628" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M11.7334 13.3332H13.0667C13.8033 13.3332 14.4001 12.7358 14.4001 11.9998V10.6665" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M14.4001 5.33317V3.99984C14.4001 3.26325 13.8033 2.6665 13.0667 2.6665H11.7334" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>',
|
|
9798
|
-
// 人脸检测
|
|
9799
|
-
faceDetection: '<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="faceDetection">\n <path d="M4.26628 2.66602H2.93294C2.19694 2.66602 1.59961 3.26276 1.59961 3.99935V5.33268" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M1.59961 10.666V11.9993C1.59961 12.7353 2.19694 13.3327 2.93294 13.3327H4.26628" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M11.7334 13.3327H13.0667C13.8033 13.3327 14.4001 12.7353 14.4001 11.9993V10.666" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M14.4001 5.33268V3.99935C14.4001 3.26276 13.8033 2.66602 13.0667 2.66602H11.7334" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.26636 8.53273C4.26636 8.53273 3.74805 8.7145 3.74805 9.32262C3.74805 9.93074 4.12968 10.4493 4.62191 10.4493C4.73317 10.9272 5.97651 13.0867 8.08858 13.0867C10.0905 13.0867 11.5552 10.3969 11.5552 10.3969C11.5552 10.3969 12.2716 10.1395 12.2518 9.32262C12.2325 8.69788 11.7965 8.53273 11.7965 8.53273C11.7965 8.53273 12.1055 5.56552 9.99785 4.3185C7.89022 3.07148 6.36571 4.5319 6.36571 4.5319C6.36571 4.5319 4.11766 4.87602 4.2222 7.69628" fill="currentColor"/>\n </svg>',
|
|
9800
|
-
// 宠物检测
|
|
9801
|
-
petDetection: '<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="petDetection">\n <path d="M10.134 2.66309C11.9012 2.66316 13.3341 4.09615 13.3342 5.86328V10.6641C13.334 12.4311 11.9011 13.8632 10.134 13.8633H5.86743C4.10029 13.8633 2.6675 12.4311 2.66724 10.6641V5.86328C2.66739 4.09611 4.10022 2.66309 5.86743 2.66309H10.134ZM7.97583 7.95312C7.5222 7.95327 7.15454 8.32075 7.15454 8.77441C7.15459 9.07899 7.32174 9.34112 7.56763 9.4834C7.5526 9.52337 7.54321 9.56694 7.54321 9.6123C7.54296 10.2798 6.9996 10.8223 6.33228 10.8223C6.13114 10.8224 5.96802 10.9863 5.96802 11.1875C5.96822 11.3882 6.13127 11.5516 6.33228 11.5518C7.0251 11.5518 7.63284 11.185 7.97583 10.6367C8.31908 11.1851 8.92713 11.5518 9.62036 11.5518C9.82129 11.5516 9.98442 11.3881 9.98462 11.1875C9.98462 10.9864 9.8214 10.8225 9.62036 10.8223C8.95273 10.8223 8.4087 10.2798 8.40845 9.6123C8.40845 9.56694 8.39906 9.52337 8.38403 9.4834C8.63004 9.34115 8.79805 9.07907 8.7981 8.77441C8.7981 8.32066 8.42989 7.95312 7.97583 7.95312ZM5.06665 5.87207C4.62483 5.87226 4.26685 6.23032 4.26685 6.67188C4.26708 7.11353 4.62497 7.47149 5.06665 7.47168C5.50818 7.47168 5.86622 7.11365 5.86646 6.67188C5.86646 6.2302 5.50832 5.87207 5.06665 5.87207ZM10.9338 5.87207C10.492 5.87226 10.134 6.23032 10.134 6.67188C10.1343 7.11353 10.4922 7.47149 10.9338 7.47168C11.3754 7.47168 11.7334 7.11365 11.7336 6.67188C11.7336 6.2302 11.3755 5.87207 10.9338 5.87207Z" fill="currentColor"/>\n <path d="M12.8 4.08984C12.9449 4.28499 13.0671 4.49562 13.1633 4.71777L15.1584 8.09668C15.4833 8.64759 15.5543 9.28148 15.3577 9.88086C15.1613 10.4797 14.7204 10.9735 14.1174 11.2705C13.8537 11.4002 13.4576 11.4741 13.1633 11.5137C13.0759 11.7889 12.9522 12.0484 12.8 12.2891V4.08984Z" fill="currentColor" fill-opacity="0.6"/>\n <path d="M3.19946 12.4372C3.05452 12.242 2.93249 12.0315 2.83618 11.8093L0.841064 8.43039C0.51612 7.87943 0.44519 7.24568 0.641846 6.64621C0.838188 6.04713 1.27893 5.5536 1.88208 5.25656C2.14581 5.12684 2.54188 5.05303 2.83618 5.0134C2.92354 4.73812 3.04729 4.47872 3.19946 4.23801L3.19946 12.4372Z" fill="currentColor" fill-opacity="0.6"/>\n </svg>',
|
|
9802
|
-
// 车辆检测
|
|
9803
|
-
vehicleDetection: '<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="vehicleDetection">\n <path d="M14.2522 6.62695L12.6147 7.25195" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M3.39233 7.25L1.74854 6.625" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M12.6116 7.25L12.0872 4.7425C11.9354 4.01875 11.2972 3.5 10.5572 3.5H5.50722C4.7816 3.5 4.15098 4 3.98598 4.70687L3.3916 7.25" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M12.375 7.25098C13.4106 7.25098 14.25 8.09035 14.25 9.12598V12.1523C14.247 12.3407 11.125 11.9375 11.125 11.9375H4.875C4.875 11.9375 1.7522 12.4275 1.75 12.2822V9.12598C1.75 8.09035 2.58938 7.25098 3.625 7.25098H12.375ZM4.09375 9.28125L4.03027 9.28516C3.80148 9.3162 3.625 9.51269 3.625 9.75C3.625 10.0089 3.83487 10.2188 4.09375 10.2188H5.65625L5.71973 10.2148C5.94852 10.1838 6.125 9.98731 6.125 9.75C6.125 9.49112 5.91513 9.28125 5.65625 9.28125H4.09375ZM10.2803 9.28516C10.0515 9.3162 9.875 9.51269 9.875 9.75C9.875 10.0089 10.0849 10.2188 10.3438 10.2188H11.9062L11.9697 10.2148C12.1985 10.1838 12.375 9.98731 12.375 9.75C12.375 9.49112 12.1651 9.28125 11.9062 9.28125H10.3438L10.2803 9.28516Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.25 9.125C14.25 8.08938 13.4106 7.25 12.375 7.25H3.625C2.58938 7.25 1.75 8.08938 1.75 9.125V12.0373H14.25V9.125V9.125Z" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.5625 13.4998C5.08 13.4998 5.5 13.0798 5.5 12.5623V11.9373L2.375 11.875V12.7185C2.375 13.1498 2.725 13.4998 3.15625 13.4998H4.5625Z" fill="currentColor" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M12.6877 13.4998C13.2052 13.4998 13.6252 13.0798 13.6252 12.5623V11.9373L10.5002 11.875V12.7185C10.5002 13.1498 10.8502 13.4998 11.2815 13.4998H12.6877Z" fill="currentColor" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>',
|
|
9804
|
-
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 '
|
|
9805
|
-
};
|
|
9248
|
+
//
|
|
9249
|
+
// Allow `EventEmitter` to be imported as module namespace.
|
|
9250
|
+
//
|
|
9251
|
+
EventEmitter.EventEmitter = EventEmitter;
|
|
9806
9252
|
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9253
|
+
//
|
|
9254
|
+
// Expose the module.
|
|
9255
|
+
//
|
|
9256
|
+
{
|
|
9257
|
+
module.exports = EventEmitter;
|
|
9258
|
+
}
|
|
9259
|
+
} (eventemitter3));
|
|
9260
|
+
return eventemitter3.exports;
|
|
9261
|
+
}
|
|
9812
9262
|
|
|
9813
|
-
var
|
|
9814
|
-
|
|
9815
|
-
/** Empty list placeholder */ empty: 'No recordings',
|
|
9816
|
-
/** Event filter checkbox label */ eventFilter: 'Event'
|
|
9817
|
-
};
|
|
9263
|
+
var eventemitter3Exports = requireEventemitter3();
|
|
9264
|
+
var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
|
|
9818
9265
|
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9266
|
+
/*
|
|
9267
|
+
* @ezuikit/control-modal v0.0.1
|
|
9268
|
+
* Copyright (c) 2026-07-06 Ezviz-OpenBiz
|
|
9269
|
+
* Released under the MIT License.
|
|
9270
|
+
*/
|
|
9271
|
+
function _array_like_to_array$2(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _create_class$a(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _create_for_of_iterator_helper_loose$2(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return (it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array$2(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array$2(o,minLen):void 0}}(o))||allowArrayLike){it&&(o=it);var i=0;return function(){return i>=o.length?{done:true}:{done:false,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var ModalProvider=function(){function ModalProvider(){this._instances=new Set,this._zIndexCounter=1e3;}var _proto=ModalProvider.prototype;return _proto.register=function(modal,minZIndex){this._instances.add(modal);var base=Math.max(this._zIndexCounter,minZIndex||1e3);return this._zIndexCounter=base+2,base},_proto.unregister=function(modal){this._instances.delete(modal);},_proto.bringToTop=function(){var base=this._zIndexCounter;return this._zIndexCounter+=2,base},_proto.getInstances=function(){return Array.from(this._instances)},_proto.destroyAll=function(){for(var _step,_iterator=_create_for_of_iterator_helper_loose$2(this.getInstances());!(_step=_iterator()).done;){var modal=_step.value;modal._destroyed||modal.destroy();}},ModalProvider.getInstance=function(){return ModalProvider._instance||(ModalProvider._instance=new ModalProvider),ModalProvider._instance},ModalProvider.resetInstance=function(){ModalProvider._instance&&(ModalProvider._instance._instances.clear(),ModalProvider._instance._zIndexCounter=1e3,ModalProvider._instance=null);},_create_class$a(ModalProvider,[{key:"count",get:function(){return this._instances.size}}]),ModalProvider}();ModalProvider._instance=null;var EVENTS$1={open:"open",close:"close",dragStart:"dragStart",dragging:"dragging",dragEnd:"dragEnd"},_$MODAL_LOCALES$_={zh:{close:"关闭"},en:{close:"Close"}},__$MODAL_DEFAULT_OPTIONS$__={width:420,position:"center",draggable:true,showMask:true,maskClosable:true,showHeader:true,showClose:true,closeOnEscape:true,open:false,zIndex:1e3,language:"zh"};var Modal=function(){function Modal(container,options){this._$mask=null,this._$header=null,this._$title=null,this._$close=null,this._visible=false,this._dragging=false,this._dragOffset={x:0,y:0},this._destroyed=false,this._dragBounds={maxLeft:0,maxTop:0},this._dragPoint=null,this._dragRafId=null,this._pos={x:0,y:0},this.options=deepmerge(__$MODAL_DEFAULT_OPTIONS$__,null!=options?options:{},{clone:false}),this._eventEmitter=new EventEmitter,this._i18n=new I18n(deepmerge(_$MODAL_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"}),this._container=this._resolveContainer(container),this._baseZIndex=ModalProvider.getInstance().register(this,this.options.zIndex),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onDragFrame=this._onDragFrame.bind(this),this._onHeaderPointerDown=this._onHeaderPointerDown.bind(this),this._onCloseClick=this._onCloseClick.bind(this),this._onMaskClick=this._onMaskClick.bind(this),this._onKeydown=this._onKeydown.bind(this),this._onWindowResize=this._onWindowResize.bind(this),this._onModalPointerDown=this._onModalPointerDown.bind(this),this._onWrapDblClick=this._onWrapDblClick.bind(this),this._render(),this._bindEvents(),this.options.open&&this.open();}var _proto=Modal.prototype;return _proto.open=function(){this._destroyed||this._visible||(this._visible=true,this._$mask&&this._$mask.classList.remove("emodal-hidden"),this._$wrap.classList.remove("emodal-hidden"),this._applyInitialPosition(),window.addEventListener("resize",this._onWindowResize),this.options.closeOnEscape&&document.addEventListener("keydown",this._onKeydown),this._eventEmitter.emit(EVENTS$1.open),null==this.options.onOpen||this.options.onOpen.call(this.options));},_proto.close=function(){!this._destroyed&&this._visible&&(this._visible=false,this._$mask&&this._$mask.classList.add("emodal-hidden"),this._$wrap.classList.add("emodal-hidden"),this._stopDragging(),window.removeEventListener("resize",this._onWindowResize),document.removeEventListener("keydown",this._onKeydown),this._eventEmitter.emit(EVENTS$1.close),null==this.options.onClose||this.options.onClose.call(this.options));},_proto.isVisible=function(){return this._visible},_proto.bringToTop=function(){this._destroyed||(this._baseZIndex=ModalProvider.getInstance().bringToTop(),this._$mask&&(this._$mask.style.zIndex=""+this._baseZIndex),this._$wrap.style.zIndex=""+(this._baseZIndex+1));},_proto.setTitle=function(title){this.options.title=title,this._$title&&this._mount(this._$title,title);},_proto.setContent=function(content){this.options.content=content,this._mount(this._$body,content);},_proto.updateOptions=function(options){this.options=deepmerge(this.options,options,{clone:false}),(options.language||options.locales)&&(this._i18n=new I18n(deepmerge(_$MODAL_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"})),this._stopDragging();var wasVisible=this._visible;this._teardownDom(),this._render(),this._bindEvents(),wasVisible&&(this._visible=false,this.open());},_proto.on=function(event,callback){this._eventEmitter.on(event,callback);},_proto.off=function(event,callback){this._eventEmitter.off(event,callback);},_proto.setPosition=function(left,top,bounds){var _ref=bounds||this._bounds(),maxLeft=_ref.maxLeft,maxTop=_ref.maxTop,x=Math.max(0,Math.min(left,maxLeft)),y=Math.max(0,Math.min(top,maxTop));return this._setTranslate(x,y),{x:x,y:y}},_proto.destroy=function(){this._destroyed||(this._stopDragging(),window.removeEventListener("resize",this._onWindowResize),document.removeEventListener("keydown",this._onKeydown),this._teardownDom(),this._eventEmitter.removeAllListeners(),this._destroyed=true,ModalProvider.getInstance().unregister(this));},_proto._resolveContainer=function(container){return "string"==typeof container?document.querySelector(container)||document.body:container||document.body},_proto._toSize=function(value){return null==value||""===value?null:"number"==typeof value?value+"px":value},_proto._render=function(){this.options.showMask&&(this._$mask=document.createElement("div"),this._$mask.className="emodal-mask emodal-hidden",this._$mask.style.zIndex=""+this._baseZIndex,this._container.appendChild(this._$mask)),this._$wrap=document.createElement("div"),this._$wrap.className="emodal-wrap emodal-hidden",this.options.draggable&&this._$wrap.classList.add("emodal-draggable"),this.options.className&&this._$wrap.classList.add(this.options.className),this._$wrap.style.zIndex=""+(this._baseZIndex+1);var w=this._toSize(this.options.width);w&&(this._$wrap.style.width=w);var h=this._toSize(this.options.height);h&&(this._$wrap.style.height=h),this.options.showHeader?(this._$header=document.createElement("div"),this._$header.className="emodal-header",this._$title=document.createElement("div"),this._$title.className="emodal-title",void 0!==this.options.title&&this._mount(this._$title,this.options.title),this._$header.appendChild(this._$title),this.options.showClose&&(this._$close=document.createElement("button"),this._$close.type="button",this._$close.className="emodal-close",this._$close.setAttribute("aria-label",String(this._i18n.t("close"))),this._$close.innerHTML='<svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true">\n <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n</svg>',this._$header.appendChild(this._$close)),this._$wrap.appendChild(this._$header)):(this._$header=null,this._$title=null,this._$close=null),this._$body=document.createElement("div"),this._$body.className="emodal-body",void 0!==this.options.content&&this._mount(this._$body,this.options.content),this._$wrap.appendChild(this._$body),this._container.appendChild(this._$wrap);},_proto._mount=function(target,content){var left,right;left=content,(null!=(right=HTMLElement)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?(target.innerHTML="",target.appendChild(content)):target.innerHTML=null!=content?content:"";},_proto._teardownDom=function(){var _this__$mask;this._$wrap.parentNode&&this._$wrap.parentNode.removeChild(this._$wrap),(null==(_this__$mask=this._$mask)?void 0:_this__$mask.parentNode)&&this._$mask.parentNode.removeChild(this._$mask),this._$mask=null,this._$header=null,this._$title=null,this._$close=null;},_proto._bindEvents=function(){var _this__$close,_this__$mask,_this__$mask1;(null==(_this__$close=this._$close)||_this__$close.addEventListener("click",this._onCloseClick),this.options.showMask&&this.options.maskClosable)&&(null==(_this__$mask1=this._$mask)||_this__$mask1.addEventListener("click",this._onMaskClick));this.options.draggable&&this._$header&&(this._$header.addEventListener("mousedown",this._onHeaderPointerDown),this._$header.addEventListener("touchstart",this._onHeaderPointerDown,{passive:false})),this._$wrap.addEventListener("pointerdown",this._onModalPointerDown),this._$wrap.addEventListener("dblclick",this._onWrapDblClick),null==(_this__$mask=this._$mask)||_this__$mask.addEventListener("pointerdown",this._onModalPointerDown);},_proto._onCloseClick=function(e){e.stopPropagation(),this.close();},_proto._onMaskClick=function(){this.close();},_proto._onModalPointerDown=function(){this.bringToTop();},_proto._onWrapDblClick=function(e){e.stopPropagation();},_proto._onKeydown=function(e){"Escape"!==e.key&&"Esc"!==e.key||this.close();},_proto._onWindowResize=function(){if(this._dragging)return this._dragBounds=this._bounds(),void this.setPosition(this._pos.x,this._pos.y,this._dragBounds);this.setPosition(this._pos.x,this._pos.y);},_proto._getPoint=function(e){if("touches"in e){var t=e.touches[0]||e.changedTouches[0];return {x:t.clientX,y:t.clientY}}return {x:e.clientX,y:e.clientY}},_proto._onHeaderPointerDown=function(e){if(this.options.draggable){var target=e.target;if(!(this._$close&&(target===this._$close||this._$close.contains(target))||"button"in e&&0!==e.button)){var point=this._getPoint(e),rect=this._$wrap.getBoundingClientRect();this._dragOffset={x:point.x-rect.left,y:point.y-rect.top},this._dragBounds=this._bounds(),this._dragging=true,this._$wrap.style.willChange="transform",document.body.classList.add("emodal-dragging"),document.addEventListener("mousemove",this._onPointerMove),document.addEventListener("mouseup",this._onPointerUp),document.addEventListener("touchmove",this._onPointerMove,{passive:false}),document.addEventListener("touchend",this._onPointerUp),document.addEventListener("touchcancel",this._onPointerUp),this._eventEmitter.emit(EVENTS$1.dragStart);}}},_proto._onPointerMove=function(e){this._dragging&&(e.cancelable&&e.preventDefault(),this._dragPoint=this._getPoint(e),null===this._dragRafId&&(this._dragRafId=requestAnimationFrame(this._onDragFrame)));},_proto._onDragFrame=function(){if(this._dragRafId=null,this._dragging&&this._dragPoint){var left=this._dragPoint.x-this._dragOffset.x,top=this._dragPoint.y-this._dragOffset.y,_this__dragBounds=this._dragBounds,maxLeft=_this__dragBounds.maxLeft,maxTop=_this__dragBounds.maxTop,x=Math.max(0,Math.min(left,maxLeft)),y=Math.max(0,Math.min(top,maxTop));this._setTranslate(x,y),this._eventEmitter.emit(EVENTS$1.dragging,{x:x,y:y});}},_proto._onPointerUp=function(){this._dragging&&(this._stopDragging(),this._eventEmitter.emit(EVENTS$1.dragEnd,{left:this._pos.x,top:this._pos.y}));},_proto._stopDragging=function(){null!==this._dragRafId&&(cancelAnimationFrame(this._dragRafId),this._dragRafId=null),this._dragPoint=null,this._dragging?(this._dragging=false,this._$wrap&&(this._$wrap.style.willChange=""),document.body.classList.remove("emodal-dragging"),document.removeEventListener("mousemove",this._onPointerMove),document.removeEventListener("mouseup",this._onPointerUp),document.removeEventListener("touchmove",this._onPointerMove),document.removeEventListener("touchend",this._onPointerUp),document.removeEventListener("touchcancel",this._onPointerUp)):document.body.classList.remove("emodal-dragging");},_proto._bounds=function(){var vw=document.documentElement.clientWidth,vh=document.documentElement.clientHeight,w=this._$wrap.offsetWidth,h=this._$wrap.offsetHeight;return {maxLeft:Math.max(0,vw-w),maxTop:Math.max(0,vh-h)}},_proto._setTranslate=function(x,y){this._pos={x:x,y:y},this._$wrap.style.transform="translate3d("+x+"px, "+y+"px, 0)";},_proto._center=function(){var vw=document.documentElement.clientWidth,vh=document.documentElement.clientHeight,w=this._$wrap.offsetWidth,h=this._$wrap.offsetHeight;this.setPosition((vw-w)/2,(vh-h)/2);},_proto._applyInitialPosition=function(){var obj,position=this.options.position;position&&"object"==(void 0===position?"undefined":(obj=position)&&"undefined"!=typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj)?this.setPosition(position.x,position.y):this._center();},Modal}();Modal.VERSION="0.0.1",Modal.EVENTS=EVENTS$1;
|
|
9824
9272
|
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
|
|
9830
|
-
|
|
9831
|
-
var second = secondNum % 60;
|
|
9832
|
-
var minute = Math.floor(secondNum / 60);
|
|
9833
|
-
return "" + (minute > 0 ? distExports$3.DateTime.fillZero(minute) + "'" : "0'") + distExports$3.DateTime.fillZero(second) + "''";
|
|
9834
|
-
}
|
|
9273
|
+
/*
|
|
9274
|
+
* @ezuikit/control-virtual-scroll v0.0.1
|
|
9275
|
+
* Copyright (c) 2026-06-29 Ezviz-OpenBiz
|
|
9276
|
+
* Released under the MIT License.
|
|
9277
|
+
*/
|
|
9278
|
+
var EVENTS={render:"render",scroll:"scroll",reachTop:"reachTop",reachBottom:"reachBottom"},DefaultOptions={itemHeight:40,buffer:5,smooth:true};function _create_class$9(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var _OVERWRITE_MERGE_={clone:false,arrayMerge:function(_dest,src){return src}},VirtualScroll=function(){function VirtualScroll(container,options){this._active=new Map,this._pool=[],this._containerHeight=0,this._startIndex=-1,this._endIndex=-1,this._ticking=false,this._destroyed=false,this._resizeObserver=null,this._eventEmitter=new EventEmitter,this.options=deepmerge(DefaultOptions,null!=options?options:{},_OVERWRITE_MERGE_),this._wrapper=this._resolveContainer(null!=container?container:this.options.container),this._onScroll=this._onScroll.bind(this),this._onResize=this._onResize.bind(this),this._wrapper.classList.add("evscroll-wrapper"),"static"===getComputedStyle(this._wrapper).position&&(this._wrapper.style.position="relative"),this._wrapper.style.overflowY="auto",this._$content=document.createElement("div"),this._$content.className="evscroll-content",this._$viewport=document.createElement("div"),this._$viewport.className="evscroll-viewport",this._$content.appendChild(this._$viewport),this._wrapper.appendChild(this._$content),this._containerHeight=this._wrapper.clientHeight,this._wrapper.addEventListener("scroll",this._onScroll,{passive:true}),this._setupResizeObserver(),this._syncContentHeight(),this._compute(true);}var _proto=VirtualScroll.prototype;return _proto.getTotalCount=function(){return this.options.data?this.options.data.length:this.options.total||0},_proto.getCurrentRange=function(){return {startIndex:this._startIndex,endIndex:this._endIndex}},_proto.scrollToIndex=function(index,smooth){var total=this.getTotalCount();if(index<0||index>=total)return false;var top=index*(this.options.itemHeight||DefaultOptions.itemHeight),useSmooth=void 0===smooth?this.options.smooth:smooth;return "function"==typeof this._wrapper.scrollTo?this._wrapper.scrollTo({top:top,behavior:useSmooth?"smooth":"auto"}):this._wrapper.scrollTop=top,true},_proto.scrollToTop=function(smooth){this.scrollToIndex(0,smooth);},_proto.scrollToBottom=function(smooth){var total=this.getTotalCount();total>0&&this.scrollToIndex(total-1,smooth);},_proto.setData=function(data){this.options.data=data,this.refresh();},_proto.setTotal=function(total){this.options.total=total,this.options.data=void 0,this.refresh();},_proto.refresh=function(){this._reset(),this._syncContentHeight(),this._compute(true);},_proto.updateOptions=function(options){this.options=deepmerge(this.options,options,_OVERWRITE_MERGE_),this.refresh();},_proto.on=function(event,callback){this._eventEmitter.on(event,callback);},_proto.off=function(event,callback){this._eventEmitter.off(event,callback);},_proto.destroy=function(){this._destroyed||(this._wrapper.removeEventListener("scroll",this._onScroll),this._resizeObserver?(this._resizeObserver.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResize),this._reset(),this._$content.parentNode===this._wrapper&&this._wrapper.removeChild(this._$content),this._wrapper.classList.remove("evscroll-wrapper"),this._eventEmitter.removeAllListeners(),this._destroyed=true);},_proto._resolveContainer=function(container){var el="string"==typeof container?document.querySelector(container):container;if(!el)throw new Error("[VirtualScroll] container not found: "+String(container));return el},_proto._syncContentHeight=function(){this._$content.style.height=this.getTotalCount()*this._itemHeight+"px";},_proto._onScroll=function(){var _this=this;this._eventEmitter.emit(EVENTS.scroll,this._wrapper.scrollTop),null==this.options.onScroll||this.options.onScroll.call(this.options,this._wrapper.scrollTop),this._ticking||(this._ticking=true,requestAnimationFrame(function(){_this._compute(false),_this._ticking=false;}));},_proto._setupResizeObserver=function(){var _this=this;"undefined"!=typeof ResizeObserver?(this._resizeObserver=new ResizeObserver(function(){return _this._onResize()}),this._resizeObserver.observe(this._wrapper)):window.addEventListener("resize",this._onResize);},_proto._onResize=function(){var h=this._wrapper.clientHeight;h!==this._containerHeight&&(this._containerHeight=h,this._compute(true));},_proto._compute=function(force){if(!this._destroyed){var total=this.getTotalCount();if(0!==total&&0!==this._containerHeight||(this._containerHeight=this._wrapper.clientHeight,0!==total)){var scrollTop=this._wrapper.scrollTop,itemHeight=this._itemHeight,buffer=this._buffer,rawStart=Math.floor(scrollTop/itemHeight),start=Math.max(0,rawStart-buffer),rawEnd=rawStart+Math.ceil(this._containerHeight/itemHeight)-1,end=Math.min(total-1,rawEnd+buffer);if(force||start!==this._startIndex||end!==this._endIndex){this._startIndex=start,this._endIndex=end,this._updateRange(start,end);var range={startIndex:start,endIndex:end};this._eventEmitter.emit(EVENTS.render,range),null==this.options.onRender||this.options.onRender.call(this.options,range),0===start&&this._eventEmitter.emit(EVENTS.reachTop),end===total-1&&this._eventEmitter.emit(EVENTS.reachBottom);}}else this._reset();}},_proto._updateRange=function(start,end){var _this=this,itemHeight=this._itemHeight,toRecycle=[];this._active.forEach(function(_el,idx){(idx<start||idx>end)&&toRecycle.push(idx);}),toRecycle.forEach(function(idx){var el=_this._active.get(idx);el&&(el.style.display="none",_this._pool.push(el)),_this._active.delete(idx);});for(var i=start;i<=end;i++)if(!this._active.has(i)){var el=this._pool.pop()||this._createItemEl();el.style.display="",el.style.top=i*itemHeight+"px",el.style.height=itemHeight+"px",el.setAttribute("data-index",String(i)),this._fillItem(el,i),el.parentNode!==this._$viewport&&this._$viewport.appendChild(el),this._active.set(i,el);}},_proto._createItemEl=function(){var el=document.createElement("div");return el.className="evscroll-item",el},_proto._fillItem=function(el,index){var left,right,item=this.options.data?this.options.data[index]:void 0,content=this.options.renderItem(index,item);left=content,(null!=(right=HTMLElement)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?el.replaceChildren(content):el.innerHTML=null!=content?content:"";},_proto._reset=function(){this._active.clear(),this._pool=[],this._$viewport.replaceChildren(),this._startIndex=-1,this._endIndex=-1;},_create_class$9(VirtualScroll,[{key:"_itemHeight",get:function(){return this.options.itemHeight||DefaultOptions.itemHeight}},{key:"_buffer",get:function(){var _this_options_buffer;return null!=(_this_options_buffer=this.options.buffer)?_this_options_buffer:DefaultOptions.buffer}}]),VirtualScroll}();VirtualScroll.VERSION="0.0.1",VirtualScroll.EVENTS=EVENTS;
|
|
9835
9279
|
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
9842
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
9843
|
-
}
|
|
9844
|
-
}
|
|
9845
|
-
function _create_class$8(Constructor, protoProps, staticProps) {
|
|
9846
|
-
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
9847
|
-
return Constructor;
|
|
9848
|
-
}
|
|
9849
|
-
function _extends$e() {
|
|
9850
|
-
_extends$e = Object.assign || function(target) {
|
|
9851
|
-
for(var i = 1; i < arguments.length; i++){
|
|
9852
|
-
var source = arguments[i];
|
|
9853
|
-
for(var key in source){
|
|
9854
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9855
|
-
target[key] = source[key];
|
|
9856
|
-
}
|
|
9857
|
-
}
|
|
9858
|
-
}
|
|
9859
|
-
return target;
|
|
9860
|
-
};
|
|
9861
|
-
return _extends$e.apply(this, arguments);
|
|
9862
|
-
}
|
|
9863
|
-
function _inherits$d(subClass, superClass) {
|
|
9864
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
9865
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
9866
|
-
}
|
|
9867
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
9868
|
-
constructor: {
|
|
9869
|
-
value: subClass,
|
|
9870
|
-
writable: true,
|
|
9871
|
-
configurable: true
|
|
9872
|
-
}
|
|
9873
|
-
});
|
|
9874
|
-
if (superClass) _set_prototype_of$f(subClass, superClass);
|
|
9875
|
-
}
|
|
9876
|
-
function _set_prototype_of$f(o, p) {
|
|
9877
|
-
_set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
9878
|
-
o.__proto__ = p;
|
|
9879
|
-
return o;
|
|
9880
|
-
};
|
|
9881
|
-
return _set_prototype_of$f(o, p);
|
|
9882
|
-
}
|
|
9883
|
-
/** 类名前缀 */ var _PREFIX_ = 'ez-rec-list-modal';
|
|
9884
|
-
/** 小时分组标题行高度(px):标题 20 + 下间距 8 */ var _GROUP_HEADER_HEIGHT_ = 28;
|
|
9885
|
-
/** 每行展示的卡片数量 */ var _COLUMNS_ = 2;
|
|
9886
|
-
/** 卡片(缩略图)高度(px) */ var _CARD_HEIGHT_ = 62;
|
|
9887
|
-
/** 行之间的垂直间距(px) */ var _ROW_GAP_ = 8;
|
|
9888
|
-
/** 默认弹框高度(px):列表可视区高度 = 弹框高度 − 头部高度(约 442 + 48) */ var _DEFAULT_MODAL_HEIGHT_ = 490;
|
|
9889
|
-
/** 用户手动滚动后,恢复「自动滚动到激活卡片」的静默时长(ms) */ var _USER_SCROLL_RESUME_MS_ = 3000;
|
|
9890
|
-
/** 卡片类型图标:事件录像 */ var _ICON_EVENT_ = '<svg viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true"><path d="M11.5 1.5H4.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1Zm0 1.1v10.8h-7V2.6h7ZM6 5.2h4v-1H6v1Zm0 2.3h4v-1H6v1Zm0 2.3h2.7v-1H6v1Z"/></svg>';
|
|
9891
|
-
/**
|
|
9892
|
-
* // 云存储
|
|
9893
|
-
* CloudVideoTypeEnum {
|
|
9894
|
-
* ALL(-1, "全部录像"),
|
|
9895
|
-
* CONTINUOUS(1, "连续录像"),
|
|
9896
|
-
* EVENT(2, "活动录像"),
|
|
9897
|
-
* HUMAN(3, "有人录像"),
|
|
9898
|
-
* FACE(4, "人脸录像"),
|
|
9899
|
-
* Car(5, "车型录像"),
|
|
9900
|
-
* PET(6, "宠物录像"),
|
|
9901
|
-
*
|
|
9902
|
-
* // 本地存储
|
|
9903
|
-
* 录像类型 ALRAM报警录像 TIMIING定时录像 CAR车 HD人形 ,与recordType非强相关
|
|
9904
|
-
*/ var _REC_EVENT_ICONS_ = {
|
|
9905
|
-
/** 连续录像 */ 1: _ICON_EVENT_,
|
|
9906
|
-
/** 活动录像 */ 2: _ICON_EVENT_,
|
|
9907
|
-
/** 有人录像 */ 3: _$REC_EVENT_ICONS$_.humanDetection,
|
|
9908
|
-
/* 人脸录像 */ 4: _$REC_EVENT_ICONS$_.faceDetection,
|
|
9909
|
-
/* 车型录像 */ 5: _$REC_EVENT_ICONS$_.vehicleDetection,
|
|
9910
|
-
/** 宠物录像 */ 6: _$REC_EVENT_ICONS$_.petDetection,
|
|
9911
|
-
/** 报警录像 */ ALRAM: _ICON_EVENT_,
|
|
9912
|
-
/** 定时录像 */ TIMIING: _ICON_EVENT_,
|
|
9913
|
-
/** 车 */ CAR: _$REC_EVENT_ICONS$_.vehicleDetection,
|
|
9914
|
-
/** 人形 */ HD: _$REC_EVENT_ICONS$_.humanDetection
|
|
9915
|
-
};
|
|
9916
|
-
/** 默认配置 */ var _$REC_LIST_MODAL_DEFAULT_OPTIONS$_ = {
|
|
9917
|
-
width: 260,
|
|
9918
|
-
height: _DEFAULT_MODAL_HEIGHT_,
|
|
9919
|
-
buffer: 5,
|
|
9920
|
-
startTimeFormat: 'HH:mm',
|
|
9921
|
-
groupTitleFormat: 'HH:00',
|
|
9922
|
-
eventFilterChecked: false};
|
|
9923
|
-
/**
|
|
9924
|
-
* 录像列表弹框。
|
|
9925
|
-
*
|
|
9926
|
-
* 特性:
|
|
9927
|
-
* 1. 继承 {@link Modal}(`@ezuikit/control-modal`),复用其拖动、关闭、遮罩、定位等能力;
|
|
9928
|
-
* 2. 录像图片列表使用 {@link VirtualScroll}(`@ezuikit/control-virtual-scroll`)渲染,支持大数据量;
|
|
9929
|
-
* 3. 录像图片使用 {@link ImageLazyLoader} 懒加载,滚动进入可视区才真正加载;
|
|
9930
|
-
* 4. 录像图片按「小时」分组展示,每组带分组标题;
|
|
9931
|
-
* 5. 每张卡片左上角展示开始时间,右上角展示时长(右下角展示类型图标);
|
|
9932
|
-
* 6. 标题栏提供「事件」过滤勾选框,勾选后仅展示事件录像。
|
|
9933
|
-
*
|
|
9934
|
-
* @example
|
|
9935
|
-
* ```ts
|
|
9936
|
-
* const modal = new RecListModal(container, {
|
|
9937
|
-
* sections,
|
|
9938
|
-
* onCardClick: (section) => console.log(section),
|
|
9939
|
-
* });
|
|
9940
|
-
* modal.open();
|
|
9941
|
-
* ```
|
|
9942
|
-
*/ var RecListModal = /*#__PURE__*/ function(Modal) {
|
|
9943
|
-
_inherits$d(RecListModal, Modal);
|
|
9944
|
-
function RecListModal(container, options) {
|
|
9945
|
-
var _this;
|
|
9946
|
-
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
|
|
9947
|
-
// 先用合并后的弹框相关配置初始化父类 Modal
|
|
9948
|
-
_this = Modal.call(this, container, RecListModal._mergeModalOptions(options)) || this, /** 标题栏容器节点 */ _this._$titleWrap = null, /** 「事件」过滤复选框 */ _this._eventCheckbox = null, /** 虚拟滚动实例 */ _this._virtualScroll = null, /** 图片懒加载实例 */ _this._lazyLoader = null, /** 扁平化后的虚拟列表行 */ _this._rows = [], /** 过滤排序后的有效录像片段(卡片点击时按 index 回查) */ _this._sortedSections = [], /** 是否仅展示事件录像(「事件」过滤勾选框状态) */ _this._eventOnly = false, /** 虚拟滚动是否已初始化(首次 open 后才初始化,避免隐藏态测量高度为 0) */ _this._vsInited = false, /** 是否已销毁 */ _this._recordDestroyed = false, /** 当前激活卡片在 _sortedSections 中的索引(-1 表示无):仅当其变化时才自动滚动 */ _this._activeIndex = -1, /** 用户是否正在手动滚动(滚动期间暂停自动滚动到激活卡片) */ _this._userInteracting = false, /** 用户滚动后恢复自动滚动的计时器 */ _this._userScrollTimer = null;
|
|
9949
|
-
var def = _$REC_LIST_MODAL_DEFAULT_OPTIONS$_;
|
|
9950
|
-
// 多语言:内置 zh/en,options.locales 深合并覆盖,options.language 指定当前语言(默认 zh)
|
|
9951
|
-
_this._recI18n = new I18n$1(deepmerge(_$REC_LIST_MODAL_LOCALES$_, _this.options.locales || {}, {
|
|
9952
|
-
clone: false
|
|
9953
|
-
}), {
|
|
9954
|
-
defaultLocale: _this.options.language || 'zh'
|
|
9955
|
-
});
|
|
9956
|
-
_this.recordOptions = {
|
|
9957
|
-
sections: (_ref = options == null ? void 0 : options.sections) != null ? _ref : [],
|
|
9958
|
-
buffer: (_ref1 = options == null ? void 0 : options.buffer) != null ? _ref1 : def.buffer,
|
|
9959
|
-
coverQuery: (_ref2 = options == null ? void 0 : options.coverQuery) != null ? _ref2 : '',
|
|
9960
|
-
startTimeFormat: (_ref3 = options == null ? void 0 : options.startTimeFormat) != null ? _ref3 : def.startTimeFormat,
|
|
9961
|
-
groupTitleFormat: (_ref4 = options == null ? void 0 : options.groupTitleFormat) != null ? _ref4 : def.groupTitleFormat,
|
|
9962
|
-
emptyText: (_ref5 = options == null ? void 0 : options.emptyText) != null ? _ref5 : String(_this._recI18n.t('empty')),
|
|
9963
|
-
showEventFilter: false,
|
|
9964
|
-
eventFilterText: (_ref6 = options == null ? void 0 : options.eventFilterText) != null ? _ref6 : String(_this._recI18n.t('eventFilter')),
|
|
9965
|
-
eventFilterChecked: (_ref7 = options == null ? void 0 : options.eventFilterChecked) != null ? _ref7 : def.eventFilterChecked,
|
|
9966
|
-
showCardTypeIcon: false,
|
|
9967
|
-
isEvent: options == null ? void 0 : options.isEvent,
|
|
9968
|
-
renderCardIcon: options == null ? void 0 : options.renderCardIcon,
|
|
9969
|
-
onCardClick: options == null ? void 0 : options.onCardClick
|
|
9970
|
-
};
|
|
9971
|
-
_this._eventOnly = _this.recordOptions.eventFilterChecked;
|
|
9972
|
-
_this._activeTime = typeof (options == null ? void 0 : options.activeTime) === 'number' ? options.activeTime : undefined;
|
|
9973
|
-
_this._titleText = typeof (options == null ? void 0 : options.title) === 'string' ? options.title : String(_this._recI18n.t('title'));
|
|
9974
|
-
// 标题栏(标题 + 事件过滤复选框)
|
|
9975
|
-
_this.setTitle(_this._buildHeaderTitle());
|
|
9976
|
-
// 列表根节点(VirtualScroll 容器):撑满 Modal 内容区,可视高度 = 弹框高度 − 头部高度
|
|
9977
|
-
_this._$listRoot = document.createElement('div');
|
|
9978
|
-
_this._$listRoot.className = "" + _PREFIX_ + "-list";
|
|
9979
|
-
// 空占位
|
|
9980
|
-
_this._$empty = document.createElement('div');
|
|
9981
|
-
_this._$empty.className = "" + _PREFIX_ + "-empty";
|
|
9982
|
-
_this._$empty.textContent = _this.recordOptions.emptyText;
|
|
9983
|
-
_this._$empty.style.display = 'none';
|
|
9984
|
-
_this._$listRoot.appendChild(_this._$empty);
|
|
9985
|
-
// 挂到 Modal 内容区
|
|
9986
|
-
_this.setContent(_this._$listRoot);
|
|
9987
|
-
// 事件委托:卡片点击
|
|
9988
|
-
_this._onListClick = _this._onListClick.bind(_this);
|
|
9989
|
-
_this._onUserScroll = _this._onUserScroll.bind(_this);
|
|
9990
|
-
_this._$listRoot.addEventListener('click', _this._onListClick);
|
|
9991
|
-
// 构建行数据
|
|
9992
|
-
_this._buildRows();
|
|
9993
|
-
// 若初始化即要求打开,父类已在 super 内 open;此处补充初始化虚拟滚动
|
|
9994
|
-
if (_this.isVisible()) _this._ensureVirtualScroll();
|
|
9995
|
-
return _this;
|
|
9996
|
-
}
|
|
9997
|
-
var _proto = RecListModal.prototype;
|
|
9998
|
-
// --------------------------------------------------------------------------
|
|
9999
|
-
// public
|
|
10000
|
-
// --------------------------------------------------------------------------
|
|
10001
|
-
/**
|
|
10002
|
-
* 打开弹框。隐藏态下 VirtualScroll 无法测量高度,这里在展示后再初始化/刷新。
|
|
10003
|
-
*/ _proto.open = function open() {
|
|
10004
|
-
Modal.prototype.open.call(this);
|
|
10005
|
-
// Modal 基类构造时若 options.open=true 会调用本方法,此时子类的 DOM(_$listRoot 等)尚未创建,
|
|
10006
|
-
// 需等构造完成后再初始化虚拟滚动(构造末尾会补调用 _ensureVirtualScroll)。
|
|
10007
|
-
if (!this._$listRoot) return;
|
|
10008
|
-
this._ensureVirtualScroll();
|
|
10009
|
-
// 每次打开都滚动到激活卡片:重置手动滚动暂停状态并强制滚动
|
|
10010
|
-
this._userInteracting = false;
|
|
10011
|
-
if (this._userScrollTimer) {
|
|
10012
|
-
clearTimeout(this._userScrollTimer);
|
|
10013
|
-
this._userScrollTimer = null;
|
|
10014
|
-
}
|
|
10015
|
-
this._scrollToActive(true);
|
|
10016
|
-
};
|
|
10017
|
-
/**
|
|
10018
|
-
* 更新录像片段列表并重新渲染。
|
|
10019
|
-
* @param sections 新的录像片段列表
|
|
10020
|
-
*/ _proto.setSections = function setSections(sections) {
|
|
10021
|
-
this.recordOptions.sections = sections || [];
|
|
10022
|
-
this._buildRows();
|
|
10023
|
-
if (this._virtualScroll) {
|
|
10024
|
-
this._virtualScroll.setData(this._rows);
|
|
10025
|
-
} else if (this.isVisible()) {
|
|
10026
|
-
this._ensureVirtualScroll();
|
|
10027
|
-
}
|
|
10028
|
-
this._toggleEmpty();
|
|
10029
|
-
};
|
|
10030
|
-
/**
|
|
10031
|
-
* 设置激活态时间。落在某卡片 [startTime, endTime] 范围内时该卡片高亮;
|
|
10032
|
-
* 传入 undefined 或不在任何范围内则无激活卡片。仅更新已渲染卡片的高亮,不触发列表重建。
|
|
10033
|
-
* @param time 秒时间戳
|
|
10034
|
-
*/ _proto.setActiveTime = function setActiveTime(time) {
|
|
10035
|
-
this._activeTime = typeof time === 'number' ? time : undefined;
|
|
10036
|
-
this._refreshActiveState();
|
|
10037
|
-
this._scrollToActive();
|
|
10038
|
-
};
|
|
10039
|
-
/**
|
|
10040
|
-
* 动态控制「事件」过滤勾选框的展示与隐藏。
|
|
10041
|
-
* @param show 是否展示
|
|
10042
|
-
*/ _proto.showEventFilter = function showEventFilter(show) {
|
|
10043
|
-
var _this = this;
|
|
10044
|
-
this.recordOptions.showEventFilter = show;
|
|
10045
|
-
if (show) {
|
|
10046
|
-
var _this__$titleWrap;
|
|
10047
|
-
// 已存在则跳过
|
|
10048
|
-
if (this._eventCheckbox) return;
|
|
10049
|
-
var checkbox = new Checkbox({
|
|
10050
|
-
label: this.recordOptions.eventFilterText,
|
|
10051
|
-
checked: this._eventOnly,
|
|
10052
|
-
onChange: function onChange(checked) {
|
|
10053
|
-
return _this._onEventFilterChange(checked);
|
|
10054
|
-
}
|
|
10055
|
-
});
|
|
10056
|
-
checkbox.el.addEventListener('mousedown', function(e) {
|
|
10057
|
-
return e.stopPropagation();
|
|
10058
|
-
});
|
|
10059
|
-
checkbox.el.addEventListener('touchstart', function(e) {
|
|
10060
|
-
return e.stopPropagation();
|
|
10061
|
-
});
|
|
10062
|
-
(_this__$titleWrap = this._$titleWrap) == null ? void 0 : _this__$titleWrap.appendChild(checkbox.el);
|
|
10063
|
-
this._eventCheckbox = checkbox;
|
|
10064
|
-
} else {
|
|
10065
|
-
if (!this._eventCheckbox) return;
|
|
10066
|
-
this._eventCheckbox.destroy();
|
|
10067
|
-
this._eventCheckbox = null;
|
|
10068
|
-
}
|
|
10069
|
-
};
|
|
10070
|
-
/**
|
|
10071
|
-
* 销毁,释放 VirtualScroll、懒加载与 DOM 事件。
|
|
10072
|
-
*/ _proto.destroy = function destroy() {
|
|
10073
|
-
var _this__eventCheckbox, _this__virtualScroll, _this__lazyLoader;
|
|
10074
|
-
if (this._recordDestroyed) {
|
|
10075
|
-
Modal.prototype.destroy.call(this);
|
|
10076
|
-
return;
|
|
10077
|
-
}
|
|
10078
|
-
this._recordDestroyed = true;
|
|
10079
|
-
(_this__eventCheckbox = this._eventCheckbox) == null ? void 0 : _this__eventCheckbox.destroy();
|
|
10080
|
-
this._eventCheckbox = null;
|
|
10081
|
-
if (this._userScrollTimer) {
|
|
10082
|
-
clearTimeout(this._userScrollTimer);
|
|
10083
|
-
this._userScrollTimer = null;
|
|
10084
|
-
}
|
|
10085
|
-
this._$listRoot.removeEventListener('click', this._onListClick);
|
|
10086
|
-
this._$listRoot.removeEventListener('wheel', this._onUserScroll);
|
|
10087
|
-
this._$listRoot.removeEventListener('touchmove', this._onUserScroll);
|
|
10088
|
-
(_this__virtualScroll = this._virtualScroll) == null ? void 0 : _this__virtualScroll.destroy();
|
|
10089
|
-
this._virtualScroll = null;
|
|
10090
|
-
(_this__lazyLoader = this._lazyLoader) == null ? void 0 : _this__lazyLoader.destroy();
|
|
10091
|
-
this._lazyLoader = null;
|
|
10092
|
-
Modal.prototype.destroy.call(this);
|
|
10093
|
-
};
|
|
10094
|
-
/** 某一行(虚拟列表项)的已知高度:分组标题为固定值,卡片行为卡片高度 + 行间距 */ _proto._rowHeight = function _rowHeight(row) {
|
|
10095
|
-
return row && row.type === 'header' ? _GROUP_HEADER_HEIGHT_ : this._cardRowHeight;
|
|
10096
|
-
};
|
|
10097
|
-
/** 构建标题栏内容(标题文案 + 可选「事件」过滤复选框) */ _proto._buildHeaderTitle = function _buildHeaderTitle() {
|
|
10098
|
-
var _this = this;
|
|
10099
|
-
var wrap = document.createElement('div');
|
|
10100
|
-
wrap.className = "" + _PREFIX_ + "-title";
|
|
10101
|
-
this._$titleWrap = wrap;
|
|
10102
|
-
var text = document.createElement('span');
|
|
10103
|
-
text.className = "" + _PREFIX_ + "-title-text";
|
|
10104
|
-
text.textContent = this._titleText;
|
|
10105
|
-
wrap.appendChild(text);
|
|
10106
|
-
if (this.recordOptions.showEventFilter) {
|
|
10107
|
-
var checkbox = new Checkbox({
|
|
10108
|
-
label: this.recordOptions.eventFilterText,
|
|
10109
|
-
checked: this._eventOnly,
|
|
10110
|
-
onChange: function onChange(checked) {
|
|
10111
|
-
return _this._onEventFilterChange(checked);
|
|
10112
|
-
}
|
|
10113
|
-
});
|
|
10114
|
-
// 在标题栏(拖动手柄)上交互时阻止触发弹框拖动
|
|
10115
|
-
checkbox.el.addEventListener('mousedown', function(e) {
|
|
10116
|
-
return e.stopPropagation();
|
|
10117
|
-
});
|
|
10118
|
-
checkbox.el.addEventListener('touchstart', function(e) {
|
|
10119
|
-
return e.stopPropagation();
|
|
10120
|
-
});
|
|
10121
|
-
wrap.appendChild(checkbox.el);
|
|
10122
|
-
this._eventCheckbox = checkbox;
|
|
10123
|
-
}
|
|
10124
|
-
return wrap;
|
|
10125
|
-
};
|
|
10126
|
-
/** 「事件」过滤复选框变化:切换过滤并重建列表 */ _proto._onEventFilterChange = function _onEventFilterChange(checked) {
|
|
10127
|
-
var _this__virtualScroll;
|
|
10128
|
-
this._eventOnly = checked;
|
|
10129
|
-
this._buildRows();
|
|
10130
|
-
(_this__virtualScroll = this._virtualScroll) == null ? void 0 : _this__virtualScroll.setData(this._rows);
|
|
10131
|
-
this._toggleEmpty();
|
|
10132
|
-
};
|
|
10133
|
-
/**
|
|
10134
|
-
* 首次可见时初始化 VirtualScroll;已初始化则刷新(隐藏->显示后高度变化)。
|
|
10135
|
-
*/ _proto._ensureVirtualScroll = function _ensureVirtualScroll() {
|
|
10136
|
-
var _this = this;
|
|
10137
|
-
if (this._recordDestroyed) return;
|
|
10138
|
-
this._toggleEmpty();
|
|
10139
|
-
if (!this._vsInited) {
|
|
10140
|
-
this._vsInited = true;
|
|
10141
|
-
this._lazyLoader = new ImageLazyLoader$1({
|
|
10142
|
-
root: this._$listRoot
|
|
10143
|
-
});
|
|
10144
|
-
this._virtualScroll = new VirtualScroll(this._$listRoot, {
|
|
10145
|
-
data: this._rows,
|
|
10146
|
-
// 已知不固定行高:分组标题与卡片行高度不同,但均可预先计算,无需测量
|
|
10147
|
-
itemHeight: function itemHeight(_index, row) {
|
|
10148
|
-
return _this._rowHeight(row);
|
|
10149
|
-
},
|
|
10150
|
-
buffer: this.recordOptions.buffer,
|
|
10151
|
-
renderItem: function renderItem(index, item) {
|
|
10152
|
-
return _this._renderRow(index, item);
|
|
10153
|
-
},
|
|
10154
|
-
onRender: function onRender() {
|
|
10155
|
-
return _this._observeVisibleImages();
|
|
10156
|
-
}
|
|
10157
|
-
});
|
|
10158
|
-
// 初次渲染后补观察可见图片
|
|
10159
|
-
this._observeVisibleImages();
|
|
10160
|
-
// 用户手动滚动(滚轮/触摸)时暂停自动滚动到激活卡片
|
|
10161
|
-
this._$listRoot.addEventListener('wheel', this._onUserScroll, {
|
|
10162
|
-
passive: true
|
|
10163
|
-
});
|
|
10164
|
-
this._$listRoot.addEventListener('touchmove', this._onUserScroll, {
|
|
10165
|
-
passive: true
|
|
10166
|
-
});
|
|
10167
|
-
// 初始强制滚动到激活卡片
|
|
10168
|
-
this._scrollToActive(true);
|
|
10169
|
-
} else {
|
|
10170
|
-
var // 由隐藏切换为显示后,容器高度才有效,刷新以触发重算
|
|
10171
|
-
_this__virtualScroll;
|
|
10172
|
-
(_this__virtualScroll = this._virtualScroll) == null ? void 0 : _this__virtualScroll.refresh();
|
|
10173
|
-
this._observeVisibleImages();
|
|
10174
|
-
}
|
|
10175
|
-
};
|
|
10176
|
-
/** 根据是否有数据切换空占位显隐 */ _proto._toggleEmpty = function _toggleEmpty() {
|
|
10177
|
-
if (!this._$empty) return;
|
|
10178
|
-
this._$empty.style.display = this._rows.length === 0 ? '' : 'none';
|
|
10179
|
-
};
|
|
10180
|
-
/** 判定录像片段是否为「事件」录像 */ _proto._isEvent = function _isEvent(section) {
|
|
10181
|
-
if (typeof this.recordOptions.isEvent === 'function') {
|
|
10182
|
-
return this.recordOptions.isEvent(section);
|
|
10183
|
-
}
|
|
10184
|
-
return !!_REC_EVENT_ICONS_[section.EVENT_TYPE];
|
|
10185
|
-
};
|
|
10186
|
-
/**
|
|
10187
|
-
* 将录像片段过滤、按 startTime 升序排序,并按「小时」分组扁平化为虚拟列表行。
|
|
10188
|
-
*/ _proto._buildRows = function _buildRows() {
|
|
10189
|
-
var _this = this;
|
|
10190
|
-
var columns = _COLUMNS_;
|
|
10191
|
-
// 行数据即将重建,索引映射失效,重置激活索引(下次 setActiveTime 会重新定位)
|
|
10192
|
-
this._activeIndex = -1;
|
|
10193
|
-
var sorted = (this.recordOptions.sections || []).filter(function(s) {
|
|
10194
|
-
return s && typeof s.startTime === 'number' && typeof s.endTime === 'number';
|
|
10195
|
-
}).filter(function(s) {
|
|
10196
|
-
return !_this._eventOnly || _this._isEvent(s);
|
|
10197
|
-
}).slice().reverse();
|
|
10198
|
-
this._sortedSections = sorted;
|
|
10199
|
-
var rows = [];
|
|
10200
|
-
// 按小时桶分组(key 含日期,避免跨天同小时合并)
|
|
10201
|
-
var groups = new Map();
|
|
10202
|
-
for(var i = 0; i < sorted.length; i++){
|
|
10203
|
-
var section = sorted[i];
|
|
10204
|
-
var key = distExports$3.DateTime.format(section.startTime, 'YYYY-MM-DD HH');
|
|
10205
|
-
var bucket = groups.get(key);
|
|
10206
|
-
if (!bucket) {
|
|
10207
|
-
bucket = [];
|
|
10208
|
-
groups.set(key, bucket);
|
|
10209
|
-
}
|
|
10210
|
-
bucket.push({
|
|
10211
|
-
section: section,
|
|
10212
|
-
index: i
|
|
10213
|
-
});
|
|
10214
|
-
}
|
|
10215
|
-
// Map 保持插入顺序,sorted 升序 -> 分组也按时间升序
|
|
10216
|
-
groups.forEach(function(bucket) {
|
|
10217
|
-
rows.push({
|
|
10218
|
-
type: 'header',
|
|
10219
|
-
title: distExports$3.DateTime.format(bucket[0].section.startTime, _this.recordOptions.groupTitleFormat),
|
|
10220
|
-
count: bucket.length
|
|
10221
|
-
});
|
|
10222
|
-
for(var i = 0; i < bucket.length; i += columns){
|
|
10223
|
-
rows.push({
|
|
10224
|
-
type: 'cards',
|
|
10225
|
-
items: bucket.slice(i, i + columns)
|
|
10226
|
-
});
|
|
10227
|
-
}
|
|
10228
|
-
});
|
|
10229
|
-
this._rows = rows;
|
|
10230
|
-
};
|
|
10231
|
-
/**
|
|
10232
|
-
* 渲染单行(小时标题 或 一行卡片),返回 HTML 字符串。
|
|
10233
|
-
* @param _index 行索引
|
|
10234
|
-
* @param row 行数据
|
|
10235
|
-
*/ _proto._renderRow = function _renderRow(_index, row) {
|
|
10236
|
-
var _this = this;
|
|
10237
|
-
if (!row) return '';
|
|
10238
|
-
if (row.type === 'header') {
|
|
10239
|
-
return '<div class="' + _PREFIX_ + '-group">\n <span class="' + _PREFIX_ + '-group-title">' + this._escape(row.title) + "</span>\n </div>";
|
|
10240
|
-
}
|
|
10241
|
-
var cards = row.items.map(function(it) {
|
|
10242
|
-
return _this._renderCard(it.section, it.index);
|
|
10243
|
-
}).join('');
|
|
10244
|
-
// 一行 2 列、列间距 8px、行底距 8px 均由样式控制(行高由 itemHeight 已知给出,内容填满)
|
|
10245
|
-
return '<div class="' + _PREFIX_ + '-row">' + cards + "</div>";
|
|
10246
|
-
};
|
|
10247
|
-
/**
|
|
10248
|
-
* 渲染单张录像卡片。
|
|
10249
|
-
* @param section 录像片段
|
|
10250
|
-
* @param index 在排序后列表中的索引(用于点击回查)
|
|
10251
|
-
*/ _proto._renderCard = function _renderCard(section, index) {
|
|
10252
|
-
var startText = distExports$3.DateTime.format(section.startTime, this.recordOptions.startTimeFormat);
|
|
10253
|
-
var durationText = formatDuration(section.startTime, section.endTime);
|
|
10254
|
-
var cover = section.coverPic ? "" + section.coverPic + this.recordOptions.coverQuery : '';
|
|
10255
|
-
// 有封面则懒加载 img,无封面展示带图片图标的占位
|
|
10256
|
-
var media = cover ? '<img class="' + _PREFIX_ + '-card-img ez-lazy-image" data-src="' + this._setImageScr(this._escape(cover)) + '" alt="" />' : '<div class="' + _PREFIX_ + '-card-placeholder">' + _$REC_EVENT_ICONS$_.picture + "</div>";
|
|
10257
|
-
var icon = this._renderCardIcon(section);
|
|
10258
|
-
var activeCls = this._isActive(section) ? " " + _PREFIX_ + "-card-active" : '';
|
|
10259
|
-
return '<div class="' + _PREFIX_ + "-card" + activeCls + '" data-card-index="' + index + '">\n <div class="' + _PREFIX_ + '-card-thumb">\n ' + media + '\n <span class="' + _PREFIX_ + '-card-start">' + this._escape(startText) + '</span>\n <span class="' + _PREFIX_ + '-card-duration">' + this._escape(durationText) + '</span>\n <span class="' + _PREFIX_ + '-card-playing">' + _$REC_EVENT_ICONS$_.playing + "</span>\n " + icon + "\n </div>\n </div>";
|
|
10260
|
-
};
|
|
10261
|
-
/** 判断某卡片是否处于激活态(激活时间落在其 [startTime, endTime] 范围内) */ _proto._isActive = function _isActive(section) {
|
|
10262
|
-
var t = this._activeTime;
|
|
10263
|
-
return typeof t === 'number' && t >= section.startTime && t <= section.endTime;
|
|
10264
|
-
};
|
|
10265
|
-
/** 根据当前激活时间,切换已渲染卡片的激活态类名(不重建列表,供播放时高频调用) */ _proto._refreshActiveState = function _refreshActiveState() {
|
|
10266
|
-
var _this = this;
|
|
10267
|
-
var cards = this._$listRoot.querySelectorAll("." + _PREFIX_ + "-card");
|
|
10268
|
-
cards.forEach(function(card) {
|
|
10269
|
-
var idx = Number(card.getAttribute('data-card-index'));
|
|
10270
|
-
var section = _this._sortedSections[idx];
|
|
10271
|
-
card.classList.toggle("" + _PREFIX_ + "-card-active", !!section && _this._isActive(section));
|
|
10272
|
-
});
|
|
10273
|
-
};
|
|
10274
|
-
/** 查找当前激活卡片在排序列表中的索引(无则 -1) */ _proto._findActiveIndex = function _findActiveIndex() {
|
|
10275
|
-
if (typeof this._activeTime !== 'number') return -1;
|
|
10276
|
-
for(var i = 0; i < this._sortedSections.length; i++){
|
|
10277
|
-
if (this._isActive(this._sortedSections[i])) return i;
|
|
10278
|
-
}
|
|
10279
|
-
return -1;
|
|
10280
|
-
};
|
|
10281
|
-
/** 查找包含指定卡片的虚拟列表行索引(无则 -1) */ _proto._rowIndexOfSection = function _rowIndexOfSection(sectionIndex) {
|
|
10282
|
-
for(var i = 0; i < this._rows.length; i++){
|
|
10283
|
-
var row = this._rows[i];
|
|
10284
|
-
if (row.type === 'cards' && row.items.some(function(it) {
|
|
10285
|
-
return it.index === sectionIndex;
|
|
10286
|
-
})) return i;
|
|
10287
|
-
}
|
|
10288
|
-
return -1;
|
|
10289
|
-
};
|
|
10290
|
-
/**
|
|
10291
|
-
* 滚动到激活卡片所在行。
|
|
10292
|
-
* @param force 为 true 时强制滚动(用于每次打开):忽略「激活卡片未变化」与「用户正在手动滚动」的限制。
|
|
10293
|
-
*/ _proto._scrollToActive = function _scrollToActive(force) {
|
|
10294
|
-
if (force === void 0) force = false;
|
|
10295
|
-
var idx = this._findActiveIndex();
|
|
10296
|
-
// 非强制时:激活卡片没变 → 不自动滚动
|
|
10297
|
-
if (!force && idx === this._activeIndex) return;
|
|
10298
|
-
this._activeIndex = idx;
|
|
10299
|
-
// 无激活卡片 / 未初始化 → 不滚动;非强制时用户正在手动滚动也不滚动
|
|
10300
|
-
if (idx < 0 || !this._virtualScroll || !force && this._userInteracting) return;
|
|
10301
|
-
var rowIndex = this._rowIndexOfSection(idx);
|
|
10302
|
-
if (rowIndex >= 0) this._virtualScroll.scrollToIndex(rowIndex, true);
|
|
10303
|
-
};
|
|
10304
|
-
/** 用户手动滚动(滚轮/触摸):暂停自动滚动,静默一段时间后恢复 */ _proto._onUserScroll = function _onUserScroll() {
|
|
10305
|
-
var _this = this;
|
|
10306
|
-
this._userInteracting = true;
|
|
10307
|
-
if (this._userScrollTimer) clearTimeout(this._userScrollTimer);
|
|
10308
|
-
this._userScrollTimer = setTimeout(function() {
|
|
10309
|
-
_this._userInteracting = false;
|
|
10310
|
-
_this._userScrollTimer = null;
|
|
10311
|
-
}, _USER_SCROLL_RESUME_MS_);
|
|
10312
|
-
};
|
|
10313
|
-
/** 渲染卡片右下角类型图标 */ _proto._renderCardIcon = function _renderCardIcon(section) {
|
|
10314
|
-
return '';
|
|
10315
|
-
// if (!this.recordOptions.showCardTypeIcon) return '';
|
|
10316
|
-
// const inner = typeof this.recordOptions.renderCardIcon === 'function' ? this.recordOptions.renderCardIcon(section) : _REC_EVENT_ICONS_[section.EVENT_TYPE as 1];
|
|
10317
|
-
// if (!inner) return '';
|
|
10318
|
-
// return `<span class="${_PREFIX_}-card-icon">${inner}</span>`;
|
|
10319
|
-
};
|
|
10320
|
-
/** 观察当前可视区内尚未加载的图片(VirtualScroll 复用 DOM,需每次渲染后补观察) */ _proto._observeVisibleImages = function _observeVisibleImages() {
|
|
10321
|
-
if (!this._lazyLoader) return;
|
|
10322
|
-
var imgs = this._$listRoot.querySelectorAll('img[data-src]');
|
|
10323
|
-
if (imgs.length) this._lazyLoader.addImages(Array.from(imgs));
|
|
10324
|
-
};
|
|
10325
|
-
/** 列表点击委托:命中卡片则回调 onCardClick */ _proto._onListClick = function _onListClick(e) {
|
|
10326
|
-
var onCardClick = this.recordOptions.onCardClick;
|
|
10327
|
-
if (!onCardClick) return;
|
|
10328
|
-
var target = e.target;
|
|
10329
|
-
var card = target == null ? void 0 : target.closest("." + _PREFIX_ + "-card");
|
|
10330
|
-
if (!card) return;
|
|
10331
|
-
var idx = Number(card.getAttribute('data-card-index'));
|
|
10332
|
-
var section = this._sortedSections[idx];
|
|
10333
|
-
if (section) onCardClick(section, idx, this._sortedSections);
|
|
10334
|
-
};
|
|
10335
|
-
/** 转义 HTML 文本,避免注入 */ _proto._escape = function _escape(text) {
|
|
10336
|
-
return String(text).replace(/[&<>"']/g, function(ch) {
|
|
10337
|
-
switch(ch){
|
|
10338
|
-
case '&':
|
|
10339
|
-
return '&';
|
|
10340
|
-
case '<':
|
|
10341
|
-
return '<';
|
|
10342
|
-
case '>':
|
|
10343
|
-
return '>';
|
|
10344
|
-
case '"':
|
|
10345
|
-
return '"';
|
|
10346
|
-
default:
|
|
10347
|
-
return ''';
|
|
10348
|
-
}
|
|
10349
|
-
});
|
|
10350
|
-
};
|
|
10351
|
-
_proto._setImageScr = function _setImageScr(src) {
|
|
10352
|
-
if (src) {
|
|
10353
|
-
var query = 'x=200&' + (this.options.coverQuery || '');
|
|
10354
|
-
return src + (src.includes('?') ? '&' : '?') + query;
|
|
10355
|
-
}
|
|
10356
|
-
return '';
|
|
10357
|
-
};
|
|
10358
|
-
/**
|
|
10359
|
-
* 从配置中抽取并补齐 Modal 相关配置(content / title 由本类内部接管)。
|
|
10360
|
-
* @param options 录像弹框配置
|
|
10361
|
-
* @returns Modal 配置
|
|
10362
|
-
*/ RecListModal._mergeModalOptions = function _mergeModalOptions(options) {
|
|
10363
|
-
var _ref, _ref1;
|
|
10364
|
-
var width = (_ref = options == null ? void 0 : options.width) != null ? _ref : _$REC_LIST_MODAL_DEFAULT_OPTIONS$_.width;
|
|
10365
|
-
// 弹框高度是列表可视区高度的来源(列表高度 = 高度 − 头部高度),缺省给定默认值以保证内容区有确定高度
|
|
10366
|
-
var height = (_ref1 = options == null ? void 0 : options.height) != null ? _ref1 : _$REC_LIST_MODAL_DEFAULT_OPTIONS$_.height;
|
|
10367
|
-
return _extends$e({}, options, {
|
|
10368
|
-
width: width,
|
|
10369
|
-
height: height,
|
|
10370
|
-
// content / title 由本类接管,避免外部覆盖
|
|
10371
|
-
content: '',
|
|
10372
|
-
title: ''
|
|
10373
|
-
});
|
|
10374
|
-
};
|
|
10375
|
-
_create_class$8(RecListModal, [
|
|
10376
|
-
{
|
|
10377
|
-
key: "_cardRowHeight",
|
|
10378
|
-
get: // --------------------------------------------------------------------------
|
|
10379
|
-
// private
|
|
10380
|
-
// --------------------------------------------------------------------------
|
|
10381
|
-
/** 卡片行高度:卡片高度 + 行间距 */ function get() {
|
|
10382
|
-
return _CARD_HEIGHT_ + _ROW_GAP_;
|
|
10383
|
-
}
|
|
10384
|
-
}
|
|
10385
|
-
]);
|
|
10386
|
-
return RecListModal;
|
|
10387
|
-
}(Modal);
|
|
10388
|
-
/** 构建时由 Rollup 注入版本号 */ RecListModal.VERSION = '0.0.1-beta.6';
|
|
9280
|
+
/*
|
|
9281
|
+
* @ezuikit/control-rec-list-modal v0.0.1-beta.7
|
|
9282
|
+
* Copyright (c) 2026-07-28 Ezviz-OpenBiz
|
|
9283
|
+
* Released under the MIT License.
|
|
9284
|
+
*/
|
|
9285
|
+
var __$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__$1={targets:[],root:null,rootMargin:"0px",threshold:.1,loadingClass:"ez-lazy-image-loading",loadedClass:"ez-lazy-image-loaded",loadedErrorClass:"ez-lazy-image-error",dwell:200,onLoadError:function(){}},ImageLazyLoader$1=function(){function ImageLazyLoader(options){ void 0===options&&(options={}),this._pendingTimers=new Map,this.options=Object.assign({},__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__$1,options),this._observer=null,this._init();}var _proto=ImageLazyLoader.prototype;return _proto._init=function(){var _this=this;ImageLazyLoader.isSupported&&(this._observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){var target=entry.target;if(entry.isIntersecting){if(_this._pendingTimers.has(target))return;var timer=setTimeout(function(){var _this__observer;_this._pendingTimers.delete(target),_this._loadImage(target),null==(_this__observer=_this._observer)||_this__observer.unobserve(target);},_this.options.dwell);_this._pendingTimers.set(target,timer);}else {var timer1=_this._pendingTimers.get(target);void 0!==timer1&&(clearTimeout(timer1),_this._pendingTimers.delete(target));}});},this.options)),this.addImages(this.options.targets);},_proto._loadImage=function(img){var _img_classList,_img_classList1,_img_classList2,_this=this;if(img&&!(null==(_img_classList=img.classList)?void 0:_img_classList.contains(this.options.loadingClass))&&!(null==(_img_classList1=img.classList)?void 0:_img_classList1.contains(this.options.loadedClass))&&!(null==(_img_classList2=img.classList)?void 0:_img_classList2.contains(this.options.loadedErrorClass))&&img.hasAttribute("data-src")){var _this1=this;img.classList.add(this.options.loadingClass);var tempImg=new Image;tempImg.onload=function(){img.src=img.dataset.src,img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedClass),img.dispatchEvent(new Event("lazyloaded"));},tempImg.onerror=function(){img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedErrorClass),null==_this1.options.onLoadError||_this1.options.onLoadError.call(_this1.options,img);},tempImg.src=img.dataset.src;}},_proto.addImages=function(targets){var _this=this;(null==targets?void 0:targets.length)&&targets.forEach(function(target){var _this__observer;(null==target?void 0:target.hasAttribute("data-src"))&&(ImageLazyLoader.isSupported&&_this._observer?null==(_this__observer=_this._observer)||_this__observer.observe(target):_this._loadImage(target));});},_proto.destroy=function(){this._pendingTimers.forEach(function(timer){return clearTimeout(timer)}),this._pendingTimers.clear(),this._observer&&(this._observer.disconnect(),this._observer=null);},ImageLazyLoader}();function _create_class$1$2(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}ImageLazyLoader$1.isSupported="IntersectionObserver"in window;var _PREFIX_$1="ez-rec-list-modal-checkbox",Checkbox=function(){function Checkbox(options){var _options_checked,_options_disabled,_options_label,_options_size;void 0===options&&(options={}),this._$label=null,this._destroyed=false,this.options={checked:null!=(_options_checked=options.checked)&&_options_checked,disabled:null!=(_options_disabled=options.disabled)&&_options_disabled,label:null!=(_options_label=options.label)?_options_label:"",size:null!=(_options_size=options.size)?_options_size:16,onChange:options.onChange},this._onChange=this._onChange.bind(this),this._$root=document.createElement("label"),this._$root.className=_PREFIX_$1,this._$root.style.setProperty("--ez-rec-list-modal-checkbox-size",this.options.size+"px"),this._$input=document.createElement("input"),this._$input.type="checkbox",this._$input.className=_PREFIX_$1+"-input",this._$input.checked=this.options.checked,this._$input.disabled=this.options.disabled,this._$input.addEventListener("change",this._onChange),this._$root.appendChild(this._$input),this._$box=document.createElement("span"),this._$box.className=_PREFIX_$1+"-box",this._$box.innerHTML='<span class="'+_PREFIX_$1+'-check"><svg viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M3.5 8.4 6.4 11.3 12.5 4.9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></span>',this._$root.appendChild(this._$box),this.options.label&&(this._$label=document.createElement("span"),this._$label.className=_PREFIX_$1+"-label",this._$label.textContent=this.options.label,this._$root.appendChild(this._$label)),this._syncState();}var _proto=Checkbox.prototype;return _proto.setChecked=function(checked,emit){ void 0===emit&&(emit=false),this._$input.checked!==checked&&(this._$input.checked=checked,this._syncState(),emit&&(null==this.options.onChange||this.options.onChange.call(this.options,checked)));},_proto.setDisabled=function(disabled){this.options.disabled=disabled,this._$input.disabled=disabled,this._syncState();},_proto.setLabel=function(label){this.options.label=label,label?(this._$label||(this._$label=document.createElement("span"),this._$label.className=_PREFIX_$1+"-label",this._$root.appendChild(this._$label)),this._$label.textContent=label):this._$label&&(this._$label.remove(),this._$label=null);},_proto.destroy=function(){this._destroyed||(this._destroyed=true,this._$input.removeEventListener("change",this._onChange),this._$root.remove());},_proto._onChange=function(){this._syncState(),null==this.options.onChange||this.options.onChange.call(this.options,this._$input.checked);},_proto._syncState=function(){this._$root.classList.toggle(_PREFIX_$1+"-checked",this._$input.checked),this._$root.classList.toggle(_PREFIX_$1+"-disabled",this.options.disabled);},_create_class$1$2(Checkbox,[{key:"el",get:function(){return this._$root}},{key:"checked",get:function(){return this._$input.checked}}]),Checkbox}(),_$REC_EVENT_ICONS$__playing='<svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="playing">\n <rect x="1.5" y="7" width="3" height="7.5" rx="1.5"/>\n <rect x="6.5" y="3" width="3" height="11.5" rx="1.5"/>\n <rect x="11" y="5.5" width="3" height="9" rx="1.5"/>\n </svg>',_$REC_EVENT_ICONS$__humanDetection='<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="humanDetection">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.42689 10.122L5.78846 9.81738C5.5102 9.68459 5.33301 9.4037 5.33301 9.09537V6.6667C5.33301 6.22487 5.69118 5.8667 6.13301 5.8667H9.86634C10.3082 5.8667 10.6663 6.22487 10.6663 6.6667V9.10694C10.6663 9.40926 10.4959 9.68576 10.2258 9.82162L9.62858 10.122H6.42689Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.00039 2.1333C8.88405 2.1333 9.60039 2.84965 9.60039 3.7333C9.60039 4.61696 8.88405 5.3333 8.00039 5.3333C7.11674 5.3333 6.40039 4.61696 6.40039 3.7333C6.40039 2.84965 7.11674 2.1333 8.00039 2.1333Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.80039 9.06689C9.24222 9.06689 9.60039 9.42507 9.60039 9.8669V13.0669C9.60039 13.5087 9.24222 13.8669 8.80039 13.8669H7.20039C6.75856 13.8669 6.40039 13.5087 6.40039 13.0669V9.8669C6.40039 9.42507 6.75856 9.06689 7.20039 9.06689H8.80039Z" fill="currentColor"/>\n <path d="M4.26628 2.6665H2.93294C2.19694 2.6665 1.59961 3.26325 1.59961 3.99984V5.33317" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M1.59961 10.6665V11.9998C1.59961 12.7358 2.19694 13.3332 2.93294 13.3332H4.26628" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M11.7334 13.3332H13.0667C13.8033 13.3332 14.4001 12.7358 14.4001 11.9998V10.6665" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M14.4001 5.33317V3.99984C14.4001 3.26325 13.8033 2.6665 13.0667 2.6665H11.7334" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>',_$REC_EVENT_ICONS$__vehicleDetection='<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="vehicleDetection">\n <path d="M14.2522 6.62695L12.6147 7.25195" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M3.39233 7.25L1.74854 6.625" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M12.6116 7.25L12.0872 4.7425C11.9354 4.01875 11.2972 3.5 10.5572 3.5H5.50722C4.7816 3.5 4.15098 4 3.98598 4.70687L3.3916 7.25" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M12.375 7.25098C13.4106 7.25098 14.25 8.09035 14.25 9.12598V12.1523C14.247 12.3407 11.125 11.9375 11.125 11.9375H4.875C4.875 11.9375 1.7522 12.4275 1.75 12.2822V9.12598C1.75 8.09035 2.58938 7.25098 3.625 7.25098H12.375ZM4.09375 9.28125L4.03027 9.28516C3.80148 9.3162 3.625 9.51269 3.625 9.75C3.625 10.0089 3.83487 10.2188 4.09375 10.2188H5.65625L5.71973 10.2148C5.94852 10.1838 6.125 9.98731 6.125 9.75C6.125 9.49112 5.91513 9.28125 5.65625 9.28125H4.09375ZM10.2803 9.28516C10.0515 9.3162 9.875 9.51269 9.875 9.75C9.875 10.0089 10.0849 10.2188 10.3438 10.2188H11.9062L11.9697 10.2148C12.1985 10.1838 12.375 9.98731 12.375 9.75C12.375 9.49112 12.1651 9.28125 11.9062 9.28125H10.3438L10.2803 9.28516Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.25 9.125C14.25 8.08938 13.4106 7.25 12.375 7.25H3.625C2.58938 7.25 1.75 8.08938 1.75 9.125V12.0373H14.25V9.125V9.125Z" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.5625 13.4998C5.08 13.4998 5.5 13.0798 5.5 12.5623V11.9373L2.375 11.875V12.7185C2.375 13.1498 2.725 13.4998 3.15625 13.4998H4.5625Z" fill="currentColor" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M12.6877 13.4998C13.2052 13.4998 13.6252 13.0798 13.6252 12.5623V11.9373L10.5002 11.875V12.7185C10.5002 13.1498 10.8502 13.4998 11.2815 13.4998H12.6877Z" fill="currentColor" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>',_$REC_EVENT_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',_$REC_LIST_MODAL_LOCALES$_={zh:{title:"录像片段",empty:"暂无录像",eventFilter:"事件片段"},en:{title:"Recordings",empty:"No recordings",eventFilter:"Event"}};function _create_class$8(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$e(){return _extends$e=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$e.apply(this,arguments)}function _set_prototype_of$f(o,p){return _set_prototype_of$f=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$f(o,p)}var _PREFIX_="ez-rec-list-modal",_ICON_EVENT_='<svg viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true"><path d="M11.5 1.5H4.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1Zm0 1.1v10.8h-7V2.6h7ZM6 5.2h4v-1H6v1Zm0 2.3h4v-1H6v1Zm0 2.3h2.7v-1H6v1Z"/></svg>',_REC_EVENT_ICONS_={1:_ICON_EVENT_,2:_ICON_EVENT_,3:_$REC_EVENT_ICONS$__humanDetection,4:'<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="faceDetection">\n <path d="M4.26628 2.66602H2.93294C2.19694 2.66602 1.59961 3.26276 1.59961 3.99935V5.33268" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M1.59961 10.666V11.9993C1.59961 12.7353 2.19694 13.3327 2.93294 13.3327H4.26628" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M11.7334 13.3327H13.0667C13.8033 13.3327 14.4001 12.7353 14.4001 11.9993V10.666" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M14.4001 5.33268V3.99935C14.4001 3.26276 13.8033 2.66602 13.0667 2.66602H11.7334" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.26636 8.53273C4.26636 8.53273 3.74805 8.7145 3.74805 9.32262C3.74805 9.93074 4.12968 10.4493 4.62191 10.4493C4.73317 10.9272 5.97651 13.0867 8.08858 13.0867C10.0905 13.0867 11.5552 10.3969 11.5552 10.3969C11.5552 10.3969 12.2716 10.1395 12.2518 9.32262C12.2325 8.69788 11.7965 8.53273 11.7965 8.53273C11.7965 8.53273 12.1055 5.56552 9.99785 4.3185C7.89022 3.07148 6.36571 4.5319 6.36571 4.5319C6.36571 4.5319 4.11766 4.87602 4.2222 7.69628" fill="currentColor"/>\n </svg>',5:_$REC_EVENT_ICONS$__vehicleDetection,6:'<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="petDetection">\n <path d="M10.134 2.66309C11.9012 2.66316 13.3341 4.09615 13.3342 5.86328V10.6641C13.334 12.4311 11.9011 13.8632 10.134 13.8633H5.86743C4.10029 13.8633 2.6675 12.4311 2.66724 10.6641V5.86328C2.66739 4.09611 4.10022 2.66309 5.86743 2.66309H10.134ZM7.97583 7.95312C7.5222 7.95327 7.15454 8.32075 7.15454 8.77441C7.15459 9.07899 7.32174 9.34112 7.56763 9.4834C7.5526 9.52337 7.54321 9.56694 7.54321 9.6123C7.54296 10.2798 6.9996 10.8223 6.33228 10.8223C6.13114 10.8224 5.96802 10.9863 5.96802 11.1875C5.96822 11.3882 6.13127 11.5516 6.33228 11.5518C7.0251 11.5518 7.63284 11.185 7.97583 10.6367C8.31908 11.1851 8.92713 11.5518 9.62036 11.5518C9.82129 11.5516 9.98442 11.3881 9.98462 11.1875C9.98462 10.9864 9.8214 10.8225 9.62036 10.8223C8.95273 10.8223 8.4087 10.2798 8.40845 9.6123C8.40845 9.56694 8.39906 9.52337 8.38403 9.4834C8.63004 9.34115 8.79805 9.07907 8.7981 8.77441C8.7981 8.32066 8.42989 7.95312 7.97583 7.95312ZM5.06665 5.87207C4.62483 5.87226 4.26685 6.23032 4.26685 6.67188C4.26708 7.11353 4.62497 7.47149 5.06665 7.47168C5.50818 7.47168 5.86622 7.11365 5.86646 6.67188C5.86646 6.2302 5.50832 5.87207 5.06665 5.87207ZM10.9338 5.87207C10.492 5.87226 10.134 6.23032 10.134 6.67188C10.1343 7.11353 10.4922 7.47149 10.9338 7.47168C11.3754 7.47168 11.7334 7.11365 11.7336 6.67188C11.7336 6.2302 11.3755 5.87207 10.9338 5.87207Z" fill="currentColor"/>\n <path d="M12.8 4.08984C12.9449 4.28499 13.0671 4.49562 13.1633 4.71777L15.1584 8.09668C15.4833 8.64759 15.5543 9.28148 15.3577 9.88086C15.1613 10.4797 14.7204 10.9735 14.1174 11.2705C13.8537 11.4002 13.4576 11.4741 13.1633 11.5137C13.0759 11.7889 12.9522 12.0484 12.8 12.2891V4.08984Z" fill="currentColor" fill-opacity="0.6"/>\n <path d="M3.19946 12.4372C3.05452 12.242 2.93249 12.0315 2.83618 11.8093L0.841064 8.43039C0.51612 7.87943 0.44519 7.24568 0.641846 6.64621C0.838188 6.04713 1.27893 5.5536 1.88208 5.25656C2.14581 5.12684 2.54188 5.05303 2.83618 5.0134C2.92354 4.73812 3.04729 4.47872 3.19946 4.23801L3.19946 12.4372Z" fill="currentColor" fill-opacity="0.6"/>\n </svg>',ALRAM:_ICON_EVENT_,TIMIING:_ICON_EVENT_,CAR:_$REC_EVENT_ICONS$__vehicleDetection,HD:_$REC_EVENT_ICONS$__humanDetection},_$REC_LIST_MODAL_DEFAULT_OPTIONS$_={width:260,height:490,buffer:5,startTimeFormat:"HH:mm",groupTitleFormat:"HH:00",showEventFilter:false,showCardTypeIcon:false,eventFilterChecked:false},RecListModal=function(Modal){function RecListModal(container,options){var _this,_ref,_ref1,_ref2,_ref3,_ref4,_ref5,_ref6,_ref7,_ref8,_ref9;(_this=Modal.call(this,container,RecListModal._mergeModalOptions(options))||this)._$titleWrap=null,_this._eventCheckbox=null,_this._virtualScroll=null,_this._lazyLoader=null,_this._rows=[],_this._sortedSections=[],_this._eventOnly=false,_this._vsInited=false,_this._recordDestroyed=false,_this._activeIndex=-1,_this._userInteracting=false,_this._userScrollTimer=null;var def=_$REC_LIST_MODAL_DEFAULT_OPTIONS$_;return _this._recI18n=new I18n(deepmerge(_$REC_LIST_MODAL_LOCALES$_,_this.options.locales||{},{clone:false}),{defaultLocale:_this.options.language||"zh"}),_this.recordOptions={sections:null!=(_ref=null==options?void 0:options.sections)?_ref:[],buffer:null!=(_ref1=null==options?void 0:options.buffer)?_ref1:def.buffer,coverQuery:null!=(_ref2=null==options?void 0:options.coverQuery)?_ref2:"",startTimeFormat:null!=(_ref3=null==options?void 0:options.startTimeFormat)?_ref3:def.startTimeFormat,groupTitleFormat:null!=(_ref4=null==options?void 0:options.groupTitleFormat)?_ref4:def.groupTitleFormat,emptyText:null!=(_ref5=null==options?void 0:options.emptyText)?_ref5:String(_this._recI18n.t("empty")),showEventFilter:null!=(_ref6=null==options?void 0:options.showEventFilter)?_ref6:def.showEventFilter,eventFilterText:null!=(_ref7=null==options?void 0:options.eventFilterText)?_ref7:String(_this._recI18n.t("eventFilter")),eventFilterChecked:null!=(_ref8=null==options?void 0:options.eventFilterChecked)?_ref8:def.eventFilterChecked,showCardTypeIcon:null!=(_ref9=null==options?void 0:options.showCardTypeIcon)?_ref9:def.showCardTypeIcon,isEvent:null==options?void 0:options.isEvent,renderCardIcon:null==options?void 0:options.renderCardIcon,onCardClick:null==options?void 0:options.onCardClick},_this._eventOnly=_this.recordOptions.eventFilterChecked,_this._activeTime="number"==typeof(null==options?void 0:options.activeTime)?options.activeTime:void 0,_this._titleText="string"==typeof(null==options?void 0:options.title)?options.title:String(_this._recI18n.t("title")),_this.setTitle(_this._buildHeaderTitle()),_this._$listRoot=document.createElement("div"),_this._$listRoot.className=_PREFIX_+"-list",_this._$empty=document.createElement("div"),_this._$empty.className=_PREFIX_+"-empty",_this._$empty.textContent=_this.recordOptions.emptyText,_this._$empty.style.display="none",_this._$listRoot.appendChild(_this._$empty),_this.setContent(_this._$listRoot),_this._onListClick=_this._onListClick.bind(_this),_this._onUserScroll=_this._onUserScroll.bind(_this),_this._$listRoot.addEventListener("click",_this._onListClick),_this._buildRows(),_this.isVisible()&&_this._ensureVirtualScroll(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$f(subClass,superClass);}(RecListModal,Modal);var _proto=RecListModal.prototype;return _proto.open=function(){Modal.prototype.open.call(this),this._$listRoot&&(this._ensureVirtualScroll(),this._userInteracting=false,this._userScrollTimer&&(clearTimeout(this._userScrollTimer),this._userScrollTimer=null),this._scrollToActive(true));},_proto.setSections=function(sections){this.recordOptions.sections=sections||[],this._buildRows(),this._virtualScroll?this._virtualScroll.setData(this._rows):this.isVisible()&&this._ensureVirtualScroll(),this._toggleEmpty();},_proto.setActiveTime=function(time){this._activeTime="number"==typeof time?time:void 0,this._refreshActiveState(),this._scrollToActive();},_proto.showEventFilter=function(show){var _this=this;if(this.recordOptions.showEventFilter=show,show){var _this__$titleWrap;if(this._eventCheckbox)return;var checkbox=new Checkbox({label:this.recordOptions.eventFilterText,checked:this._eventOnly,onChange:function(checked){return _this._onEventFilterChange(checked)}});checkbox.el.addEventListener("mousedown",function(e){return e.stopPropagation()}),checkbox.el.addEventListener("touchstart",function(e){return e.stopPropagation()}),null==(_this__$titleWrap=this._$titleWrap)||_this__$titleWrap.appendChild(checkbox.el),this._eventCheckbox=checkbox;}else {if(!this._eventCheckbox)return;this._eventCheckbox.destroy(),this._eventCheckbox=null;}},_proto.destroy=function(){var _this__eventCheckbox,_this__virtualScroll,_this__lazyLoader;this._recordDestroyed||(this._recordDestroyed=true,null==(_this__eventCheckbox=this._eventCheckbox)||_this__eventCheckbox.destroy(),this._eventCheckbox=null,this._userScrollTimer&&(clearTimeout(this._userScrollTimer),this._userScrollTimer=null),this._$listRoot.removeEventListener("click",this._onListClick),this._$listRoot.removeEventListener("wheel",this._onUserScroll),this._$listRoot.removeEventListener("touchmove",this._onUserScroll),null==(_this__virtualScroll=this._virtualScroll)||_this__virtualScroll.destroy(),this._virtualScroll=null,null==(_this__lazyLoader=this._lazyLoader)||_this__lazyLoader.destroy(),this._lazyLoader=null),Modal.prototype.destroy.call(this);},_proto._rowHeight=function(row){return row&&"header"===row.type?28:this._cardRowHeight},_proto._buildHeaderTitle=function(){var _this=this,wrap=document.createElement("div");wrap.className=_PREFIX_+"-title",this._$titleWrap=wrap;var text=document.createElement("span");if(text.className=_PREFIX_+"-title-text",text.textContent=this._titleText,wrap.appendChild(text),this.recordOptions.showEventFilter){var checkbox=new Checkbox({label:this.recordOptions.eventFilterText,checked:this._eventOnly,onChange:function(checked){return _this._onEventFilterChange(checked)}});checkbox.el.addEventListener("mousedown",function(e){return e.stopPropagation()}),checkbox.el.addEventListener("touchstart",function(e){return e.stopPropagation()}),wrap.appendChild(checkbox.el),this._eventCheckbox=checkbox;}return wrap},_proto._onEventFilterChange=function(checked){var _this__virtualScroll;this._eventOnly=checked,this._buildRows(),null==(_this__virtualScroll=this._virtualScroll)||_this__virtualScroll.setData(this._rows),this._toggleEmpty();},_proto._ensureVirtualScroll=function(){var _this__virtualScroll,_this=this;this._recordDestroyed||(this._toggleEmpty(),this._vsInited?(null==(_this__virtualScroll=this._virtualScroll)||_this__virtualScroll.refresh(),this._observeVisibleImages()):(this._vsInited=true,this._lazyLoader=new ImageLazyLoader$1({root:this._$listRoot}),this._virtualScroll=new VirtualScroll(this._$listRoot,{data:this._rows,itemHeight:function(_index,row){return _this._rowHeight(row)},buffer:this.recordOptions.buffer,renderItem:function(index,item){return _this._renderRow(index,item)},onRender:function(){return _this._observeVisibleImages()}}),this._observeVisibleImages(),this._$listRoot.addEventListener("wheel",this._onUserScroll,{passive:true}),this._$listRoot.addEventListener("touchmove",this._onUserScroll,{passive:true}),this._scrollToActive(true)));},_proto._toggleEmpty=function(){this._$empty&&(this._$empty.style.display=0===this._rows.length?"":"none");},_proto._isEvent=function(section){return "function"==typeof this.recordOptions.isEvent?this.recordOptions.isEvent(section):!!_REC_EVENT_ICONS_[section.EVENT_TYPE]},_proto._buildRows=function(){var _this=this;this._activeIndex=-1;var sorted=(this.recordOptions.sections||[]).filter(function(s){return s&&"number"==typeof s.startTime&&"number"==typeof s.endTime}).filter(function(s){return !_this._eventOnly||_this._isEvent(s)}).slice().reverse();this._sortedSections=sorted;for(var rows=[],groups=new Map,i=0;i<sorted.length;i++){var section=sorted[i],key=distExports$4.DateTime.format(section.startTime,"YYYY-MM-DD HH"),bucket=groups.get(key);bucket||(bucket=[],groups.set(key,bucket)),bucket.push({section:section,index:i});}groups.forEach(function(bucket){rows.push({type:"header",title:distExports$4.DateTime.format(bucket[0].section.startTime,_this.recordOptions.groupTitleFormat),count:bucket.length});for(var i=0;i<bucket.length;i+=2)rows.push({type:"cards",items:bucket.slice(i,i+2)});}),this._rows=rows;},_proto._renderRow=function(_index,row){var _this=this;if(!row)return "";if("header"===row.type)return '<div class="'+_PREFIX_+'-group">\n <span class="'+_PREFIX_+'-group-title">'+this._escape(row.title)+"</span>\n </div>";var cards=row.items.map(function(it){return _this._renderCard(it.section,it.index)}).join("");return '<div class="'+_PREFIX_+'-row">'+cards+"</div>"},_proto._renderCard=function(section,index){var start,end,_DateTime_toDate,_DateTime_toDate1,secondNum,second,minute,startText=distExports$4.DateTime.format(section.startTime,this.recordOptions.startTimeFormat),durationText=(start=section.startTime,end=section.endTime,secondNum=Math.floor((null==(_DateTime_toDate=distExports$4.DateTime.toDate(end))?void 0:_DateTime_toDate.getTime())-(null==(_DateTime_toDate1=distExports$4.DateTime.toDate(start))?void 0:_DateTime_toDate1.getTime()))/1e3,second=secondNum%60,((minute=Math.floor(secondNum/60))>0?distExports$4.DateTime.fillZero(minute)+"'":"0'")+distExports$4.DateTime.fillZero(second)+"''"),cover=section.coverPic?""+section.coverPic+this.recordOptions.coverQuery:"",media=cover?'<img class="'+_PREFIX_+'-card-img ez-lazy-image" data-src="'+this._setImageScr(this._escape(cover))+'" alt="" />':'<div class="'+_PREFIX_+'-card-placeholder">'+_$REC_EVENT_ICONS$__picture+"</div>",icon=this._renderCardIcon(section),activeCls=this._isActive(section)?" "+_PREFIX_+"-card-active":"";return '<div class="'+_PREFIX_+"-card"+activeCls+'" data-card-index="'+index+'">\n <div class="'+_PREFIX_+'-card-thumb">\n '+media+'\n <span class="'+_PREFIX_+'-card-start">'+this._escape(startText)+'</span>\n <span class="'+_PREFIX_+'-card-duration">'+this._escape(durationText)+'</span>\n <span class="'+_PREFIX_+'-card-playing">'+_$REC_EVENT_ICONS$__playing+"</span>\n "+icon+"\n </div>\n </div>"},_proto._isActive=function(section){var t=this._activeTime;return "number"==typeof t&&t>=section.startTime&&t<=section.endTime},_proto._refreshActiveState=function(){var _this=this;this._$listRoot.querySelectorAll("."+_PREFIX_+"-card").forEach(function(card){var idx=Number(card.getAttribute("data-card-index")),section=_this._sortedSections[idx];card.classList.toggle(_PREFIX_+"-card-active",!!section&&_this._isActive(section));});},_proto._findActiveIndex=function(){if("number"!=typeof this._activeTime)return -1;for(var i=0;i<this._sortedSections.length;i++)if(this._isActive(this._sortedSections[i]))return i;return -1},_proto._rowIndexOfSection=function(sectionIndex){for(var i=0;i<this._rows.length;i++){var row=this._rows[i];if("cards"===row.type&&row.items.some(function(it){return it.index===sectionIndex}))return i}return -1},_proto._scrollToActive=function(force){ void 0===force&&(force=false);var idx=this._findActiveIndex();if((force||idx!==this._activeIndex)&&(this._activeIndex=idx,!(idx<0||!this._virtualScroll||!force&&this._userInteracting))){var rowIndex=this._rowIndexOfSection(idx);rowIndex>=0&&this._virtualScroll.scrollToIndex(rowIndex,true);}},_proto._onUserScroll=function(){var _this=this;this._userInteracting=true,this._userScrollTimer&&clearTimeout(this._userScrollTimer),this._userScrollTimer=setTimeout(function(){_this._userInteracting=false,_this._userScrollTimer=null;},3e3);},_proto._renderCardIcon=function(section){return ""},_proto._observeVisibleImages=function(){if(this._lazyLoader){var imgs=this._$listRoot.querySelectorAll("img[data-src]");imgs.length&&this._lazyLoader.addImages(Array.from(imgs));}},_proto._onListClick=function(e){var onCardClick=this.recordOptions.onCardClick;if(onCardClick){var target=e.target,card=null==target?void 0:target.closest("."+_PREFIX_+"-card");if(card){var idx=Number(card.getAttribute("data-card-index")),section=this._sortedSections[idx];section&&onCardClick(section,idx,this._sortedSections);}}},_proto._escape=function(text){return String(text).replace(/[&<>"']/g,function(ch){switch(ch){case "&":return "&";case "<":return "<";case ">":return ">";case '"':return """;default:return "'"}})},_proto._setImageScr=function(src){if(src){var query="x=200&"+(this.options.coverQuery||"");return src+(src.includes("?")?"&":"?")+query}return ""},RecListModal._mergeModalOptions=function(options){var _ref,_ref1;return _extends$e({},options,{width:null!=(_ref=null==options?void 0:options.width)?_ref:_$REC_LIST_MODAL_DEFAULT_OPTIONS$_.width,height:null!=(_ref1=null==options?void 0:options.height)?_ref1:_$REC_LIST_MODAL_DEFAULT_OPTIONS$_.height,content:"",title:""})},_create_class$8(RecListModal,[{key:"_cardRowHeight",get:function(){return 70}}]),RecListModal}(Modal);RecListModal.VERSION="0.0.1-beta.6";
|
|
10389
9286
|
|
|
10390
9287
|
function _extends$d() {
|
|
10391
9288
|
_extends$d = Object.assign || function(target) {
|
|
@@ -10447,6 +9344,7 @@
|
|
|
10447
9344
|
}, options, {
|
|
10448
9345
|
showEventFilter: false,
|
|
10449
9346
|
showCardTypeIcon: false,
|
|
9347
|
+
sections: [],
|
|
10450
9348
|
onCardClick: function(section, index, sections) {
|
|
10451
9349
|
_this.emit(EVENTS$2.control.recListCardClick, section, index, sections);
|
|
10452
9350
|
},
|
|
@@ -10737,7 +9635,7 @@
|
|
|
10737
9635
|
type: 'button',
|
|
10738
9636
|
controlType: 'button'
|
|
10739
9637
|
}, SELECT_DEFAULT_OPTIONS, options)) || this;
|
|
10740
|
-
_this._options = deepmerge
|
|
9638
|
+
_this._options = deepmerge(SELECT_DEFAULT_OPTIONS, options, {
|
|
10741
9639
|
clone: false
|
|
10742
9640
|
});
|
|
10743
9641
|
_this.list = options.list || [];
|
|
@@ -11215,12 +10113,32 @@
|
|
|
11215
10113
|
return Speed;
|
|
11216
10114
|
}(Select);
|
|
11217
10115
|
|
|
10116
|
+
var dist$1 = {};
|
|
10117
|
+
|
|
10118
|
+
/*
|
|
10119
|
+
* @ezuikit/utils-tools v2.0.2
|
|
10120
|
+
* tools utils
|
|
10121
|
+
* Copyright (c) 2026-01-07 Ezviz-OpenBiz
|
|
10122
|
+
* Released under the MIT License.
|
|
10123
|
+
*/
|
|
10124
|
+
|
|
10125
|
+
var hasRequiredDist$1;
|
|
10126
|
+
|
|
10127
|
+
function requireDist$1 () {
|
|
10128
|
+
if (hasRequiredDist$1) return dist$1;
|
|
10129
|
+
hasRequiredDist$1 = 1;
|
|
10130
|
+
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$1.DateTime=DateTime,dist$1.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$1.getQuery=getQuery,dist$1.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$1.isHttp=function(url){return /^http[s]?:\/\//.test(url)},dist$1.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$1.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$1.parseEzopenUrl=parseEzopenUrl,dist$1.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$1.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};
|
|
10131
|
+
return dist$1;
|
|
10132
|
+
}
|
|
10133
|
+
|
|
10134
|
+
var distExports$1 = requireDist$1();
|
|
10135
|
+
|
|
11218
10136
|
/*
|
|
11219
10137
|
* @ezuikit/control-date-picker v2.1.0-beta.1
|
|
11220
10138
|
* Copyright (c) 2026-06-24 Ezviz-OpenBiz
|
|
11221
10139
|
* Released under the MIT License.
|
|
11222
10140
|
*/
|
|
11223
|
-
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",now:"Now",cancel:"Cancel",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},zh:{year:"年",month:"月",weeks:["日","一","二","三","四","五","六"],today:"今天",ok:"确定",now:"此刻",cancel:"取消",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._delegations=[],this.options=deepmerge$1.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(){for(var i=0;i<this._delegations.length;i++)try{this._delegations[i].destroy();}catch(e){}this._delegations=[],this.$header&&(this.$header.remove(),this.$header=null);},_proto._eventListeners=function(){var _this=this;_this.$header&&(_this._delegations.push(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);})),_this._delegations.push(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);})),_this._delegations.push(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);})),_this._delegations.push(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);})),_this._delegations.push(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());})),_this._delegations.push(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$3$1(){return _extends$3$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$3$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._delegations=[],this.locale=__$CALENDAR_LOCALES$__.zh,this.options=deepmerge$1.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$3$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._delegate=function(el,selector,type,cb,useCapture){var d=delegate(el,selector,type,cb,useCapture);return d&&"function"==typeof d.destroy&&this._delegations.push(d),d},_proto.destroy=function(){for(var _this_$container,i=0;i<this._delegations.length;i++)try{this._delegations[i].destroy();}catch(e){}this._delegations=[],this.header&&"function"==typeof this.header.destroy&&this.header.destroy(),(null==(_this_$container=this.$container)?void 0:_this_$container.parentNode)&&this.$container.parentNode.removeChild(this.$container),this.header=null,this.$container=null,this.$panel=null,this.$body=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$5(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$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)}function _set_prototype_of$5$1(o,p){return _set_prototype_of$5$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$5$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$2$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$5$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$6.DateTime.toDate(date):date,(!this._current||distExports$6.DateTime.format(date,"YYYY-MM-DD")!==distExports$6.DateTime.format(this._current,"YYYY-MM-DD"))&&(this._current=date,change&&(null==this.options.onChange||this.options.onChange.call(this.options,date,distExports$6.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$6.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$6.DateTime.format(date,"YYYY-MM-DD")}),rerender&&this._renderDate());},_proto._setRenderCurrent=function(date){(!this._renderCurrent||date&&distExports$6.DateTime.format(this._renderCurrent,"YYYY-MM")!==distExports$6.DateTime.format(date,"YYYY-MM"))&&(this._renderCurrent=date||new Date,this._renderDate());},_proto._onCell=function(){var _this=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$6.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;this._delegate(this.$panel,".ecalendar-header-month-btn","click",function(){null==_this.options.onMonth||_this.options.onMonth.call(_this.options,_this._current,_this._renderCurrent);}),this._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$6.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$6.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$6.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$5(Calendar,[{key:"current",get:function(){return this._current}}]),Calendar}(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 _set_prototype_of$4$1(o,p){return _set_prototype_of$4$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$4$1(o,p)}Calendar.DateTime=distExports$6.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$1.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$4$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$6.DateTime.toDate(d));var current=d;this._current&&distExports$6.DateTime.format(current,"YYYY-MM-DD")===distExports$6.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$6.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$6.DateTime.format(date,"YYYY")!==distExports$6.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$6.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;this._delegate(this.$body,".emonth-cell","click",function(e){e.stopPropagation(),e.preventDefault();var month=+e.delegateTarget.getAttribute("data-month"),newDate=distExports$6.DateTime.toDate(distExports$6.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$6.DateTime.format(newDate,"YYYY-MM"),disabled);});},_proto._onSuperPrev=function(){var year=this._renderCurrent.getFullYear()-1,date=distExports$6.DateTime.toDate(year+distExports$6.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$6.DateTime.toDate(year+distExports$6.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;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$6.DateTime.toDate(year+"-"+Util.fillZero(i+1)+"-"+distExports$6.DateTime.format(this._renderCurrent,"DDTHH:mm:ss"));"function"==typeof this.options.disabledMonth&&this.options.disabledMonth(date,distExports$6.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$6.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$4(Month,[{key:"current",get:function(){return this._current}}]),Month}(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 _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 _YEAR_DEFAULT_OPTIONS_={showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,language:"zh"},Year=function(Container){function Year(popupContainer,options){var _this;return (_this=Container.call(this,popupContainer,deepmerge$1.all([{},_YEAR_DEFAULT_OPTIONS_,options||{},{prefixCls:"eyear",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$3$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?distExports$6.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$6.DateTime.format(_year,"YYYY-MM-DD")===distExports$6.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;this._delegate(this.$body,".eyear-cell","click",function(e){var yearStr=+e.delegateTarget.getAttribute("title"),newDate=distExports$6.DateTime.toDate(distExports$6.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$6.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$6.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$6.DateTime.toDate(y),y):'<span class="eyear-cell-inner">'+ +y+"</span>")+"\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>\n ");},_create_class$3$1(Year,[{key:"current",get:function(){return this._current}}]),Year}(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 _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$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)}var _DATEPICKER_MODE_ARRAY=["date","month","year"],_DATEPICKER_DEFAULT_OPTIONS_={getPopupContainer:function(){return document.body},language:"zh",isMobile:false,mode:_DATEPICKER_MODE_ARRAY[0],wrapClassName:""},DatePicker=function(Picker){function DatePicker(container,options){var _this;return (_this=Picker.call(this,container,deepmerge$1.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{},{wrapClassName:("edate-picker "+((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$1.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$2$1(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$1$2({},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$6.DateTime.format(_this._current,"YYYY-MM-DD")===distExports$6.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$1$2({},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$6.DateTime.format(_this._current,"YYYY-MM")===distExports$6.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$1$2({},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$6.DateTime.format(_this._current,"YYYY")===distExports$6.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$6.DateTime.format(date,"YYYY-MM-DD")!==distExports$6.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$2$1(DatePicker,[{key:"_minModeIndex",get:function(){return _DATEPICKER_MODE_ARRAY.indexOf(this.options.mode)}}]),DatePicker}(Picker),DEFAULT_FOOTER_OPTIONS_locale={today:"Today",ok:"Ok",now:"Now",cancel:"Cancel"};function Footer(options){var locale=Object.assign({},DEFAULT_FOOTER_OPTIONS_locale,options.locale||{}),$footer=document.createElement("div");$footer.classList.add("edate-footer"),options.className&&$footer.classList.add(options.className);var html="";return "string"!=typeof(html="function"==typeof options.renderContent?options.renderContent():void 0)&&(html="",html+='<div class="edate-footer-left">\n '+(options.showToday?'<span class="edate-today">'+((null==locale?void 0:locale.today)||"Today")+"</span>":"")+"\n "+(options.showNow?'<span class="edate-now">'+((null==locale?void 0:locale.now)||"Now")+"</span>":"")+"\n </div>",html+='<div class="edate-footer-right">\n '+(options.showCancel?function(options){var locale=Object.assign({},DEFAULT_FOOTER_OPTIONS_locale,options.locale||{});return '<button class="edate-btn edate-btn-cancel '+(options.disabledOk?"edate-btn-disabled":"")+'">'+((null==locale?void 0:locale.cancel)||"Cancel")+"</button>"}({locale:options.locale}):"")+(options.showOk?function(options){var locale=Object.assign({},DEFAULT_FOOTER_OPTIONS_locale,options.locale||{});return '<button class="edate-btn edate-btn-primary edate-btn-ok '+(options.disabledOk?"edate-btn-disabled":"")+'">'+((null==locale?void 0:locale.ok)||"Ok")+"</button>"}({disabledOk:options.disabledOk,locale:options.locale}):"")+"\n </div>"),html?($footer.innerHTML=html,delegate($footer,".edate-today","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==options.onToday||options.onToday.call(options),event.stopPropagation(),event.preventDefault());}),delegate($footer,".edate-now","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==options.onNow||options.onNow.call(options),event.stopPropagation(),event.preventDefault());}),delegate($footer,".edate-btn-cancel","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==options.onCancel||options.onCancel.call(options),event.stopPropagation(),event.preventDefault());}),delegate($footer,".edate-btn-ok","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==options.onOk||options.onOk.call(options),event.stopPropagation(),event.preventDefault());}),$footer):null}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 _extends$8(){return _extends$8=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$8.apply(this,arguments)}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 TIME_DEFAULT_OPTIONS={showHeader:true,current:"",cellHeight:30,columnHeight:208,width:160,showCancel:false,showOk:false},Time=function(Container){function Time(container,options){var _this;return (_this=Container.call(this,container,_extends$8({showHeader:TIME_DEFAULT_OPTIONS.showHeader||options.showHeader},options,{prefixCls:"etime"}))||this)._panCleanups=[],_this.options=Object.assign({},TIME_DEFAULT_OPTIONS,options||{}),_this._checkTimeFmt(_this.options.current)?_this._current=_this.options.current:_this._current=TIME_DEFAULT_OPTIONS.current,_this._render(),_this._events(),_this._bindPanEvents(),_this.activeItem("auto"),_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);}(Time,Container);var _proto=Time.prototype;return _proto.setCurrent=function(time){time&&this._checkTimeFmt(time)&&(this._current="string"==typeof time?time:null==time?void 0:time.join(":"),this.activeItem());},_proto.destroy=function(){for(var i=0;i<this._panCleanups.length;i++)try{this._panCleanups[i]();}catch(e){}this._panCleanups=[],Container.prototype.destroy.call(this);},_proto._events=function(){var _this=this;this.$body.querySelector(".etime-cell")&&delegate(this.$body,".etime-cell","click",function(event){var target=event.delegateTarget,type=null==target?void 0:target.getAttribute("data-type"),value=null==target?void 0:target.getAttribute("data-title"),currentTimes=_this._currentTimes;switch(type){case "hour":currentTimes[0]=value;break;case "minute":currentTimes[1]=value;break;case "second":currentTimes[2]=value;}for(var i=0;i<currentTimes.length;i++)""===currentTimes[i]&&(currentTimes[i]="00");null==_this.options.onCell||_this.options.onCell.call(_this.options,type,currentTimes.join(":"),currentTimes),_this._panCellToTop(target,true),(null==target?void 0:target.classList.contains("edate-disabled"))||_this._current!==currentTimes.join(":")&&(_this._current=currentTimes.join(":"),_this.activeItem(),null==_this.options.onChange||_this.options.onChange.call(_this.options,type,_this._current,_this._currentTimes));},false);},_proto._trackOf=function(column){return column.querySelector(".etime-track")},_proto._measureCellHeight=function(track){var first=track.querySelector(".etime-cell"),h=first?first.offsetHeight:0;return h>0?h:this.options.cellHeight||26},_proto._maxIndex=function(track){var cells=track.querySelectorAll(".etime-cell");return Math.max(0,cells.length-1)},_proto._clamp=function(value,min,max){return Math.min(max,Math.max(min,value))},_proto._getTrackOffset=function(track){var v=track._etimeOffset;return "number"==typeof v?v:0},_proto._setTrackOffset=function(track,offset,smooth){var cellH=this._measureCellHeight(track),min=-this._maxIndex(track)*cellH,clamped=this._clamp(offset,min,0);return track._etimeOffset=clamped,track.style.transition=smooth?"transform 0.25s cubic-bezier(0.23, 1, 0.32, 1)":"none",track.style.transform="translateY("+clamped+"px)",clamped},_proto._panCellToTop=function(cell,smooth){var track=cell.parentElement;if(track){var index=Array.prototype.slice.call(track.querySelectorAll(".etime-cell")).indexOf(cell);if(!(index<0)){var cellH=this._measureCellHeight(track);this._setTrackOffset(track,-index*cellH,smooth);}}},_proto._snapColumn=function(track,smooth){var cellH=this._measureCellHeight(track),offset=this._getTrackOffset(track),index=Math.round(-offset/cellH);index=this._clamp(index,0,this._maxIndex(track)),this._setTrackOffset(track,-index*cellH,smooth);},_proto.activeItem=function(behavior){ void 0===behavior&&(behavior="smooth");for(var smooth="auto"!==behavior,times=this._currentTimes,cols=[{idx:0,cls:"etime-hour"},{idx:1,cls:"etime-minute"},{idx:2,cls:"etime-second"}],i=0;i<cols.length;i++){var _this_$body,_cols_i=cols[i],idx=_cols_i.idx,cls=_cols_i.cls;if(times[idx]){var cell=null==(_this_$body=this.$body)?void 0:_this_$body.querySelector("."+cls+'[data-title="'+times[idx]+'"]');if(cell){var track=cell.parentElement,prev=track?track.querySelector(".etime-cell-selected"):null;prev&&prev.classList.remove("etime-cell-selected"),cell.classList.add("etime-cell-selected"),this._panCellToTop(cell,smooth);}}}this.header&&this.header.renderContent(this._current?"<span>"+this._current+"</span>":"");},_proto._supportsPassive=function(){var supported=false;try{if("undefined"==typeof window)return !1;var opts=Object.defineProperty({},"passive",{get:function(){return supported=!0,!0}}),noop=function(){};window.addEventListener("etime-passive-test",noop,opts),window.removeEventListener("etime-passive-test",noop,opts);}catch(e){supported=false;}return supported},_proto._bindPanEvents=function(){for(var columns=this._columns,listenerOpts=!!this._supportsPassive()&&{passive:false},i=0;i<columns.length;i++)this._bindColumnWheel(columns[i],listenerOpts),this._bindColumnTouch(columns[i],listenerOpts);},_proto._bindColumnWheel=function(column,listenerOpts){var _this=this,track=this._trackOf(column);if(track){var snapTimer=null,onWheel=function(e){e.cancelable&&e.preventDefault();var cellH=_this._measureCellHeight(track),unit=1;1===e.deltaMode?unit=cellH:2===e.deltaMode&&(unit=column.clientHeight||cellH);var next=_this._getTrackOffset(track)-e.deltaY*unit*.5;_this._setTrackOffset(track,next,false),snapTimer&&clearTimeout(snapTimer),snapTimer=setTimeout(function(){_this._snapColumn(track,true);},120);};column.addEventListener("wheel",onWheel,listenerOpts),this._panCleanups.push(function(){snapTimer&&clearTimeout(snapTimer),column.removeEventListener("wheel",onWheel,listenerOpts);});}},_proto._bindColumnTouch=function(column,listenerOpts){var _this=this,track=this._trackOf(column);if(track){var startY=0,startOffset=0,lastY=0,lastT=0,velocity=0,dragging=false,onStart=function(e){e.touches&&0!==e.touches.length&&(dragging=true,startY=lastY=e.touches[0].clientY,startOffset=_this._getTrackOffset(track),lastT=Date.now(),velocity=0,track.style.transition="none");},onMove=function(e){if(dragging&&e.touches&&0!==e.touches.length){e.cancelable&&e.preventDefault();var y=e.touches[0].clientY,now=Date.now(),dt=now-lastT;dt>0&&(velocity=(y-lastY)/dt),lastY=y,lastT=now,_this._setTrackOffset(track,startOffset+(y-startY),false);}},onEnd=function(){if(dragging){dragging=false;var cellH=_this._measureCellHeight(track),projected=_this._getTrackOffset(track)+140*velocity,index=Math.round(-projected/cellH);index=_this._clamp(index,0,_this._maxIndex(track)),_this._setTrackOffset(track,-index*cellH,true);}};column.addEventListener("touchstart",onStart,listenerOpts),column.addEventListener("touchmove",onMove,listenerOpts),column.addEventListener("touchend",onEnd),column.addEventListener("touchcancel",onEnd),this._panCleanups.push(function(){column.removeEventListener("touchstart",onStart,listenerOpts),column.removeEventListener("touchmove",onMove,listenerOpts),column.removeEventListener("touchend",onEnd),column.removeEventListener("touchcancel",onEnd);});}},_proto._render=function(){this._renderTimeBody(),this.$panel.appendChild(this.$body),this.options.showFooter&&this._renderFooter();},_proto._renderFooter=function(){var _this=this,showCancel=!!this.options.showCancel,showOk=!!this.options.showOk;if(showCancel||showOk){var locale=this.locale||{},onOk=this.options.onOk,footer=Footer({className:"etime-footer",showCancel:showCancel,showOk:showOk,locale:{ok:locale.ok,cancel:locale.cancel},onCancel:function(){null==_this.options.onCancel||_this.options.onCancel.call(_this.options);},onOk:function(){null==onOk||onOk(_this._current);}});footer&&this.$panel.appendChild(footer);}},_proto._renderTimeBody=function(){this.$body.innerHTML=this._generateList("hour",Util.generateHours())+"\n "+this._generateList("minute",Util.generateMinutesOrSeconds())+"\n "+this._generateList("second",Util.generateMinutesOrSeconds());},_proto._generateList=function(type,times){var _this=this,columnH=this.options.columnHeight+"px",cellH=this.options.cellHeight+"px";return '<div class="etime-column etime-column-'+type+'" data-type="'+type+'" style="height:'+columnH+';">\n <ul class="etime-track" style="padding-bottom: calc('+columnH+" - "+cellH+');">\n '+times.map(function(s){var disabled=false;return "hour"===type?disabled=!!(null==_this.options.disabledHour?void 0:_this.options.disabledHour.call(_this.options,+s)):"minute"===type?disabled=!!(null==_this.options.disabledMinute?void 0:_this.options.disabledMinute.call(_this.options,+s)):"second"===type&&(disabled=!!(null==_this.options.disabledSecond?void 0:_this.options.disabledSecond.call(_this.options,+s))),'<li class="etime-cell etime-'+type+" "+(disabled?"edate-disabled":"")+'" style="height:'+cellH+";line-height: "+cellH+'" data-title="'+s+"\" data-type='"+type+'\'>\n <div class="etime-cell-inner">'+s+"</div>\n </li>"}).join("")+"\n </ul>\n </div>"},_proto._checkTimeFmt=function(time){var times="string"==typeof time?time.split(":"):time;return 3===times.length||+times[0]>=0&&+times[0]<=23&&+times[1]>=0&&+times[1]<=59&&+times[2]>=0&&+times[2]<=59},_create_class$1$1(Time,[{key:"_currentTimes",get:function(){var _this__current;return this._current?null==(_this__current=this._current)?void 0:_this__current.split(":"):["","",""]}},{key:"current",get:function(){return this._current}},{key:"_columns",get:function(){return Array.prototype.slice.call(this.$body.querySelectorAll(".etime-column"))}}]),Time}(Container);function _create_class$6(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$9(o,p){return _set_prototype_of$9=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$9(o,p)}var DEFAULT_TIME_PICKER_OPTIONS={getPopupContainer:function(){return document.body},current:"00:00:00",open:false,showCancel:true,showOk:true,showHeader:true,showFooter:true,wrapClassName:"etime-picker"},TimePicker=function(Picker){function TimePicker(container,options){var _this;return (_this=Picker.call(this,container,Object.assign({},DEFAULT_TIME_PICKER_OPTIONS,options||{},{wrapClassName:options.wrapClassName?(DEFAULT_TIME_PICKER_OPTIONS.wrapClassName+" "+options.wrapClassName).trim():DEFAULT_TIME_PICKER_OPTIONS.wrapClassName}))||this).time=null,_this._current="00:00:00",_this.options=Object.assign({},DEFAULT_TIME_PICKER_OPTIONS,options||{}),_this.options.current&&(_this._current=_this.options.current),_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$9(subClass,superClass);}(TimePicker,Picker);var _proto=TimePicker.prototype;return _proto.setCurrent=function(time){this.time&&time&&(this.time.setCurrent(time),this._current="string"==typeof time?time:null==time?void 0:time.join(":"));},_proto.hide=function(){this.open=false;},_proto.destroy=function(){this.time&&(this.time.destroy(),this.time=null),Picker.prototype.destroy.call(this);},_proto._onOpenChange=function(open){var _this=this;if(Picker.prototype._onOpenChange.call(this,open),open)if(this.time)this.current&&this.current!==this.time.current&&this.time.setCurrent(this.current);else {var timeOptions=Object.assign({},this.options,{wrapClassName:"",onChange:function(type,time,times){_this.options.showFooter&&_this.options.showOk||time===_this.current||null==_this.options.onChange||_this.options.onChange.call(_this.options,time,times);},onOk:function(time){time!==_this.current&&(null==_this.options.onChange||_this.options.onChange.call(_this.options,time,time.split(":"))),_this._current=time,null==_this.options.onOk||_this.options.onOk.call(_this.options,time),_this.hide();},onCancel:function(){null==_this.options.onCancel||_this.options.onCancel.call(_this.options),_this.hide();}});this.time=new Time(function(){return _this.$body},timeOptions);}},_create_class$6(TimePicker,[{key:"current",get:function(){return this._current}}]),TimePicker}(Picker);
|
|
10141
|
+
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",now:"Now",cancel:"Cancel",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},zh:{year:"年",month:"月",weeks:["日","一","二","三","四","五","六"],today:"今天",ok:"确定",now:"此刻",cancel:"取消",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._delegations=[],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(){for(var i=0;i<this._delegations.length;i++)try{this._delegations[i].destroy();}catch(e){}this._delegations=[],this.$header&&(this.$header.remove(),this.$header=null);},_proto._eventListeners=function(){var _this=this;_this.$header&&(_this._delegations.push(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);})),_this._delegations.push(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);})),_this._delegations.push(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);})),_this._delegations.push(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);})),_this._delegations.push(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());})),_this._delegations.push(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$3$1(){return _extends$3$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$3$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._delegations=[],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$3$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._delegate=function(el,selector,type,cb,useCapture){var d=delegate(el,selector,type,cb,useCapture);return d&&"function"==typeof d.destroy&&this._delegations.push(d),d},_proto.destroy=function(){for(var _this_$container,i=0;i<this._delegations.length;i++)try{this._delegations[i].destroy();}catch(e){}this._delegations=[],this.header&&"function"==typeof this.header.destroy&&this.header.destroy(),(null==(_this_$container=this.$container)?void 0:_this_$container.parentNode)&&this.$container.parentNode.removeChild(this.$container),this.header=null,this.$container=null,this.$panel=null,this.$body=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$5(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$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)}function _set_prototype_of$5$1(o,p){return _set_prototype_of$5$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$5$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$2$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$5$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$1.DateTime.toDate(date):date,(!this._current||distExports$1.DateTime.format(date,"YYYY-MM-DD")!==distExports$1.DateTime.format(this._current,"YYYY-MM-DD"))&&(this._current=date,change&&(null==this.options.onChange||this.options.onChange.call(this.options,date,distExports$1.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$1.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$1.DateTime.format(date,"YYYY-MM-DD")}),rerender&&this._renderDate());},_proto._setRenderCurrent=function(date){(!this._renderCurrent||date&&distExports$1.DateTime.format(this._renderCurrent,"YYYY-MM")!==distExports$1.DateTime.format(date,"YYYY-MM"))&&(this._renderCurrent=date||new Date,this._renderDate());},_proto._onCell=function(){var _this=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$1.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;this._delegate(this.$panel,".ecalendar-header-month-btn","click",function(){null==_this.options.onMonth||_this.options.onMonth.call(_this.options,_this._current,_this._renderCurrent);}),this._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$1.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$1.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$1.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$5(Calendar,[{key:"current",get:function(){return this._current}}]),Calendar}(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 _set_prototype_of$4$1(o,p){return _set_prototype_of$4$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$4$1(o,p)}Calendar.DateTime=distExports$1.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$4$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$1.DateTime.toDate(d));var current=d;this._current&&distExports$1.DateTime.format(current,"YYYY-MM-DD")===distExports$1.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$1.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$1.DateTime.format(date,"YYYY")!==distExports$1.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$1.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;this._delegate(this.$body,".emonth-cell","click",function(e){e.stopPropagation(),e.preventDefault();var month=+e.delegateTarget.getAttribute("data-month"),newDate=distExports$1.DateTime.toDate(distExports$1.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$1.DateTime.format(newDate,"YYYY-MM"),disabled);});},_proto._onSuperPrev=function(){var year=this._renderCurrent.getFullYear()-1,date=distExports$1.DateTime.toDate(year+distExports$1.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$1.DateTime.toDate(year+distExports$1.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;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$1.DateTime.toDate(year+"-"+Util.fillZero(i+1)+"-"+distExports$1.DateTime.format(this._renderCurrent,"DDTHH:mm:ss"));"function"==typeof this.options.disabledMonth&&this.options.disabledMonth(date,distExports$1.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$1.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$4(Month,[{key:"current",get:function(){return this._current}}]),Month}(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 _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 _YEAR_DEFAULT_OPTIONS_={showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,language:"zh"},Year=function(Container){function Year(popupContainer,options){var _this;return (_this=Container.call(this,popupContainer,deepmerge.all([{},_YEAR_DEFAULT_OPTIONS_,options||{},{prefixCls:"eyear",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$3$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?distExports$1.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$1.DateTime.format(_year,"YYYY-MM-DD")===distExports$1.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;this._delegate(this.$body,".eyear-cell","click",function(e){var yearStr=+e.delegateTarget.getAttribute("title"),newDate=distExports$1.DateTime.toDate(distExports$1.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$1.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$1.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$1.DateTime.toDate(y),y):'<span class="eyear-cell-inner">'+ +y+"</span>")+"\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>\n ");},_create_class$3$1(Year,[{key:"current",get:function(){return this._current}}]),Year}(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 _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$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)}var _DATEPICKER_MODE_ARRAY=["date","month","year"],_DATEPICKER_DEFAULT_OPTIONS_={getPopupContainer:function(){return document.body},language:"zh",isMobile:false,mode:_DATEPICKER_MODE_ARRAY[0],wrapClassName:""},DatePicker=function(Picker){function DatePicker(container,options){var _this;return (_this=Picker.call(this,container,deepmerge.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{},{wrapClassName:("edate-picker "+((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$2$1(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$1$2({},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$1.DateTime.format(_this._current,"YYYY-MM-DD")===distExports$1.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$1$2({},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$1.DateTime.format(_this._current,"YYYY-MM")===distExports$1.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$1$2({},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$1.DateTime.format(_this._current,"YYYY")===distExports$1.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$1.DateTime.format(date,"YYYY-MM-DD")!==distExports$1.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$2$1(DatePicker,[{key:"_minModeIndex",get:function(){return _DATEPICKER_MODE_ARRAY.indexOf(this.options.mode)}}]),DatePicker}(Picker),DEFAULT_FOOTER_OPTIONS_locale={today:"Today",ok:"Ok",now:"Now",cancel:"Cancel"};function Footer(options){var locale=Object.assign({},DEFAULT_FOOTER_OPTIONS_locale,options.locale||{}),$footer=document.createElement("div");$footer.classList.add("edate-footer"),options.className&&$footer.classList.add(options.className);var html="";return "string"!=typeof(html="function"==typeof options.renderContent?options.renderContent():void 0)&&(html="",html+='<div class="edate-footer-left">\n '+(options.showToday?'<span class="edate-today">'+((null==locale?void 0:locale.today)||"Today")+"</span>":"")+"\n "+(options.showNow?'<span class="edate-now">'+((null==locale?void 0:locale.now)||"Now")+"</span>":"")+"\n </div>",html+='<div class="edate-footer-right">\n '+(options.showCancel?function(options){var locale=Object.assign({},DEFAULT_FOOTER_OPTIONS_locale,options.locale||{});return '<button class="edate-btn edate-btn-cancel '+(options.disabledOk?"edate-btn-disabled":"")+'">'+((null==locale?void 0:locale.cancel)||"Cancel")+"</button>"}({locale:options.locale}):"")+(options.showOk?function(options){var locale=Object.assign({},DEFAULT_FOOTER_OPTIONS_locale,options.locale||{});return '<button class="edate-btn edate-btn-primary edate-btn-ok '+(options.disabledOk?"edate-btn-disabled":"")+'">'+((null==locale?void 0:locale.ok)||"Ok")+"</button>"}({disabledOk:options.disabledOk,locale:options.locale}):"")+"\n </div>"),html?($footer.innerHTML=html,delegate($footer,".edate-today","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==options.onToday||options.onToday.call(options),event.stopPropagation(),event.preventDefault());}),delegate($footer,".edate-now","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==options.onNow||options.onNow.call(options),event.stopPropagation(),event.preventDefault());}),delegate($footer,".edate-btn-cancel","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==options.onCancel||options.onCancel.call(options),event.stopPropagation(),event.preventDefault());}),delegate($footer,".edate-btn-ok","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==options.onOk||options.onOk.call(options),event.stopPropagation(),event.preventDefault());}),$footer):null}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 _extends$8(){return _extends$8=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$8.apply(this,arguments)}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 TIME_DEFAULT_OPTIONS={showHeader:true,current:"",cellHeight:30,columnHeight:208,width:160,showCancel:false,showOk:false},Time=function(Container){function Time(container,options){var _this;return (_this=Container.call(this,container,_extends$8({showHeader:TIME_DEFAULT_OPTIONS.showHeader||options.showHeader},options,{prefixCls:"etime"}))||this)._panCleanups=[],_this.options=Object.assign({},TIME_DEFAULT_OPTIONS,options||{}),_this._checkTimeFmt(_this.options.current)?_this._current=_this.options.current:_this._current=TIME_DEFAULT_OPTIONS.current,_this._render(),_this._events(),_this._bindPanEvents(),_this.activeItem("auto"),_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);}(Time,Container);var _proto=Time.prototype;return _proto.setCurrent=function(time){time&&this._checkTimeFmt(time)&&(this._current="string"==typeof time?time:null==time?void 0:time.join(":"),this.activeItem());},_proto.destroy=function(){for(var i=0;i<this._panCleanups.length;i++)try{this._panCleanups[i]();}catch(e){}this._panCleanups=[],Container.prototype.destroy.call(this);},_proto._events=function(){var _this=this;this.$body.querySelector(".etime-cell")&&delegate(this.$body,".etime-cell","click",function(event){var target=event.delegateTarget,type=null==target?void 0:target.getAttribute("data-type"),value=null==target?void 0:target.getAttribute("data-title"),currentTimes=_this._currentTimes;switch(type){case "hour":currentTimes[0]=value;break;case "minute":currentTimes[1]=value;break;case "second":currentTimes[2]=value;}for(var i=0;i<currentTimes.length;i++)""===currentTimes[i]&&(currentTimes[i]="00");null==_this.options.onCell||_this.options.onCell.call(_this.options,type,currentTimes.join(":"),currentTimes),_this._panCellToTop(target,true),(null==target?void 0:target.classList.contains("edate-disabled"))||_this._current!==currentTimes.join(":")&&(_this._current=currentTimes.join(":"),_this.activeItem(),null==_this.options.onChange||_this.options.onChange.call(_this.options,type,_this._current,_this._currentTimes));},false);},_proto._trackOf=function(column){return column.querySelector(".etime-track")},_proto._measureCellHeight=function(track){var first=track.querySelector(".etime-cell"),h=first?first.offsetHeight:0;return h>0?h:this.options.cellHeight||26},_proto._maxIndex=function(track){var cells=track.querySelectorAll(".etime-cell");return Math.max(0,cells.length-1)},_proto._clamp=function(value,min,max){return Math.min(max,Math.max(min,value))},_proto._getTrackOffset=function(track){var v=track._etimeOffset;return "number"==typeof v?v:0},_proto._setTrackOffset=function(track,offset,smooth){var cellH=this._measureCellHeight(track),min=-this._maxIndex(track)*cellH,clamped=this._clamp(offset,min,0);return track._etimeOffset=clamped,track.style.transition=smooth?"transform 0.25s cubic-bezier(0.23, 1, 0.32, 1)":"none",track.style.transform="translateY("+clamped+"px)",clamped},_proto._panCellToTop=function(cell,smooth){var track=cell.parentElement;if(track){var index=Array.prototype.slice.call(track.querySelectorAll(".etime-cell")).indexOf(cell);if(!(index<0)){var cellH=this._measureCellHeight(track);this._setTrackOffset(track,-index*cellH,smooth);}}},_proto._snapColumn=function(track,smooth){var cellH=this._measureCellHeight(track),offset=this._getTrackOffset(track),index=Math.round(-offset/cellH);index=this._clamp(index,0,this._maxIndex(track)),this._setTrackOffset(track,-index*cellH,smooth);},_proto.activeItem=function(behavior){ void 0===behavior&&(behavior="smooth");for(var smooth="auto"!==behavior,times=this._currentTimes,cols=[{idx:0,cls:"etime-hour"},{idx:1,cls:"etime-minute"},{idx:2,cls:"etime-second"}],i=0;i<cols.length;i++){var _this_$body,_cols_i=cols[i],idx=_cols_i.idx,cls=_cols_i.cls;if(times[idx]){var cell=null==(_this_$body=this.$body)?void 0:_this_$body.querySelector("."+cls+'[data-title="'+times[idx]+'"]');if(cell){var track=cell.parentElement,prev=track?track.querySelector(".etime-cell-selected"):null;prev&&prev.classList.remove("etime-cell-selected"),cell.classList.add("etime-cell-selected"),this._panCellToTop(cell,smooth);}}}this.header&&this.header.renderContent(this._current?"<span>"+this._current+"</span>":"");},_proto._supportsPassive=function(){var supported=false;try{if("undefined"==typeof window)return !1;var opts=Object.defineProperty({},"passive",{get:function(){return supported=!0,!0}}),noop=function(){};window.addEventListener("etime-passive-test",noop,opts),window.removeEventListener("etime-passive-test",noop,opts);}catch(e){supported=false;}return supported},_proto._bindPanEvents=function(){for(var columns=this._columns,listenerOpts=!!this._supportsPassive()&&{passive:false},i=0;i<columns.length;i++)this._bindColumnWheel(columns[i],listenerOpts),this._bindColumnTouch(columns[i],listenerOpts);},_proto._bindColumnWheel=function(column,listenerOpts){var _this=this,track=this._trackOf(column);if(track){var snapTimer=null,onWheel=function(e){e.cancelable&&e.preventDefault();var cellH=_this._measureCellHeight(track),unit=1;1===e.deltaMode?unit=cellH:2===e.deltaMode&&(unit=column.clientHeight||cellH);var next=_this._getTrackOffset(track)-e.deltaY*unit*.5;_this._setTrackOffset(track,next,false),snapTimer&&clearTimeout(snapTimer),snapTimer=setTimeout(function(){_this._snapColumn(track,true);},120);};column.addEventListener("wheel",onWheel,listenerOpts),this._panCleanups.push(function(){snapTimer&&clearTimeout(snapTimer),column.removeEventListener("wheel",onWheel,listenerOpts);});}},_proto._bindColumnTouch=function(column,listenerOpts){var _this=this,track=this._trackOf(column);if(track){var startY=0,startOffset=0,lastY=0,lastT=0,velocity=0,dragging=false,onStart=function(e){e.touches&&0!==e.touches.length&&(dragging=true,startY=lastY=e.touches[0].clientY,startOffset=_this._getTrackOffset(track),lastT=Date.now(),velocity=0,track.style.transition="none");},onMove=function(e){if(dragging&&e.touches&&0!==e.touches.length){e.cancelable&&e.preventDefault();var y=e.touches[0].clientY,now=Date.now(),dt=now-lastT;dt>0&&(velocity=(y-lastY)/dt),lastY=y,lastT=now,_this._setTrackOffset(track,startOffset+(y-startY),false);}},onEnd=function(){if(dragging){dragging=false;var cellH=_this._measureCellHeight(track),projected=_this._getTrackOffset(track)+140*velocity,index=Math.round(-projected/cellH);index=_this._clamp(index,0,_this._maxIndex(track)),_this._setTrackOffset(track,-index*cellH,true);}};column.addEventListener("touchstart",onStart,listenerOpts),column.addEventListener("touchmove",onMove,listenerOpts),column.addEventListener("touchend",onEnd),column.addEventListener("touchcancel",onEnd),this._panCleanups.push(function(){column.removeEventListener("touchstart",onStart,listenerOpts),column.removeEventListener("touchmove",onMove,listenerOpts),column.removeEventListener("touchend",onEnd),column.removeEventListener("touchcancel",onEnd);});}},_proto._render=function(){this._renderTimeBody(),this.$panel.appendChild(this.$body),this.options.showFooter&&this._renderFooter();},_proto._renderFooter=function(){var _this=this,showCancel=!!this.options.showCancel,showOk=!!this.options.showOk;if(showCancel||showOk){var locale=this.locale||{},onOk=this.options.onOk,footer=Footer({className:"etime-footer",showCancel:showCancel,showOk:showOk,locale:{ok:locale.ok,cancel:locale.cancel},onCancel:function(){null==_this.options.onCancel||_this.options.onCancel.call(_this.options);},onOk:function(){null==onOk||onOk(_this._current);}});footer&&this.$panel.appendChild(footer);}},_proto._renderTimeBody=function(){this.$body.innerHTML=this._generateList("hour",Util.generateHours())+"\n "+this._generateList("minute",Util.generateMinutesOrSeconds())+"\n "+this._generateList("second",Util.generateMinutesOrSeconds());},_proto._generateList=function(type,times){var _this=this,columnH=this.options.columnHeight+"px",cellH=this.options.cellHeight+"px";return '<div class="etime-column etime-column-'+type+'" data-type="'+type+'" style="height:'+columnH+';">\n <ul class="etime-track" style="padding-bottom: calc('+columnH+" - "+cellH+');">\n '+times.map(function(s){var disabled=false;return "hour"===type?disabled=!!(null==_this.options.disabledHour?void 0:_this.options.disabledHour.call(_this.options,+s)):"minute"===type?disabled=!!(null==_this.options.disabledMinute?void 0:_this.options.disabledMinute.call(_this.options,+s)):"second"===type&&(disabled=!!(null==_this.options.disabledSecond?void 0:_this.options.disabledSecond.call(_this.options,+s))),'<li class="etime-cell etime-'+type+" "+(disabled?"edate-disabled":"")+'" style="height:'+cellH+";line-height: "+cellH+'" data-title="'+s+"\" data-type='"+type+'\'>\n <div class="etime-cell-inner">'+s+"</div>\n </li>"}).join("")+"\n </ul>\n </div>"},_proto._checkTimeFmt=function(time){var times="string"==typeof time?time.split(":"):time;return 3===times.length||+times[0]>=0&&+times[0]<=23&&+times[1]>=0&&+times[1]<=59&&+times[2]>=0&&+times[2]<=59},_create_class$1$1(Time,[{key:"_currentTimes",get:function(){var _this__current;return this._current?null==(_this__current=this._current)?void 0:_this__current.split(":"):["","",""]}},{key:"current",get:function(){return this._current}},{key:"_columns",get:function(){return Array.prototype.slice.call(this.$body.querySelectorAll(".etime-column"))}}]),Time}(Container);function _create_class$6(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$9(o,p){return _set_prototype_of$9=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$9(o,p)}var DEFAULT_TIME_PICKER_OPTIONS={getPopupContainer:function(){return document.body},current:"00:00:00",open:false,showCancel:true,showOk:true,showHeader:true,showFooter:true,wrapClassName:"etime-picker"},TimePicker=function(Picker){function TimePicker(container,options){var _this;return (_this=Picker.call(this,container,Object.assign({},DEFAULT_TIME_PICKER_OPTIONS,options||{},{wrapClassName:options.wrapClassName?(DEFAULT_TIME_PICKER_OPTIONS.wrapClassName+" "+options.wrapClassName).trim():DEFAULT_TIME_PICKER_OPTIONS.wrapClassName}))||this).time=null,_this._current="00:00:00",_this.options=Object.assign({},DEFAULT_TIME_PICKER_OPTIONS,options||{}),_this.options.current&&(_this._current=_this.options.current),_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$9(subClass,superClass);}(TimePicker,Picker);var _proto=TimePicker.prototype;return _proto.setCurrent=function(time){this.time&&time&&(this.time.setCurrent(time),this._current="string"==typeof time?time:null==time?void 0:time.join(":"));},_proto.hide=function(){this.open=false;},_proto.destroy=function(){this.time&&(this.time.destroy(),this.time=null),Picker.prototype.destroy.call(this);},_proto._onOpenChange=function(open){var _this=this;if(Picker.prototype._onOpenChange.call(this,open),open)if(this.time)this.current&&this.current!==this.time.current&&this.time.setCurrent(this.current);else {var timeOptions=Object.assign({},this.options,{wrapClassName:"",onChange:function(type,time,times){_this.options.showFooter&&_this.options.showOk||time===_this.current||null==_this.options.onChange||_this.options.onChange.call(_this.options,time,times);},onOk:function(time){time!==_this.current&&(null==_this.options.onChange||_this.options.onChange.call(_this.options,time,time.split(":"))),_this._current=time,null==_this.options.onOk||_this.options.onOk.call(_this.options,time),_this.hide();},onCancel:function(){null==_this.options.onCancel||_this.options.onCancel.call(_this.options),_this.hide();}});this.time=new Time(function(){return _this.$body},timeOptions);}},_create_class$6(TimePicker,[{key:"current",get:function(){return this._current}}]),TimePicker}(Picker);
|
|
11224
10142
|
|
|
11225
10143
|
function _extends$7() {
|
|
11226
10144
|
_extends$7 = Object.assign || function(target) {
|
|
@@ -11272,7 +10190,7 @@
|
|
|
11272
10190
|
classNameSuffix: 'date'
|
|
11273
10191
|
})) || this;
|
|
11274
10192
|
_this.options = options;
|
|
11275
|
-
_this._value = distExports$
|
|
10193
|
+
_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');
|
|
11276
10194
|
_this._render();
|
|
11277
10195
|
// 日期上的点
|
|
11278
10196
|
_this.on(EVENTS$2.control.dateMonthChange, function(dates) {
|
|
@@ -11285,7 +10203,7 @@
|
|
|
11285
10203
|
_proto._render = function _render() {
|
|
11286
10204
|
var _this = this;
|
|
11287
10205
|
var _this_options_props;
|
|
11288
|
-
var isMobile1 = distExports$
|
|
10206
|
+
var isMobile1 = distExports$4.isMobile();
|
|
11289
10207
|
if (isMobile1) {
|
|
11290
10208
|
var _this_locale;
|
|
11291
10209
|
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>";
|
|
@@ -11304,7 +10222,7 @@
|
|
|
11304
10222
|
],
|
|
11305
10223
|
badges: ((_this_options_props = this.options.props) == null ? void 0 : _this_options_props.recMonth) || [],
|
|
11306
10224
|
language: this.options.language === 'zh' ? 'zh' : 'en',
|
|
11307
|
-
current: distExports$
|
|
10225
|
+
current: distExports$4.DateTime.toDate(this._value),
|
|
11308
10226
|
placement: 'tr',
|
|
11309
10227
|
triggerClose: true,
|
|
11310
10228
|
disabledDate: function(date) {
|
|
@@ -11317,8 +10235,8 @@
|
|
|
11317
10235
|
},
|
|
11318
10236
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11319
10237
|
onOk: function(date, _mode) {
|
|
11320
|
-
if (date && _this._value !== distExports$
|
|
11321
|
-
_this._value = distExports$
|
|
10238
|
+
if (date && _this._value !== distExports$4.DateTime.format(date, 'YYYY-MM-DD') && isMobile1) {
|
|
10239
|
+
_this._value = distExports$4.DateTime.format(date, 'YYYY-MM-DD');
|
|
11322
10240
|
_this.options.onOk == null ? void 0 : _this.options.onOk.call(_this.options, date);
|
|
11323
10241
|
_this.emit(EVENTS$2.control.dateChange, date);
|
|
11324
10242
|
if (date && _this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
|
|
@@ -11327,8 +10245,8 @@
|
|
|
11327
10245
|
}
|
|
11328
10246
|
},
|
|
11329
10247
|
onChange: function(date, mode) {
|
|
11330
|
-
if (date && _this._value !== distExports$
|
|
11331
|
-
_this._value = distExports$
|
|
10248
|
+
if (date && _this._value !== distExports$4.DateTime.format(date, 'YYYY-MM-DD') && !isMobile1 && mode === 'date') {
|
|
10249
|
+
_this._value = distExports$4.DateTime.format(date, 'YYYY-MM-DD');
|
|
11332
10250
|
_this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, date);
|
|
11333
10251
|
_this.emit(EVENTS$2.control.dateChange, date);
|
|
11334
10252
|
}
|
|
@@ -11347,8 +10265,8 @@
|
|
|
11347
10265
|
if (change === void 0) change = true;
|
|
11348
10266
|
var _this_datePicker;
|
|
11349
10267
|
(_this_datePicker = this.datePicker) == null ? void 0 : _this_datePicker.setCurrent(date, change);
|
|
11350
|
-
if (date && !change && this._value !== distExports$
|
|
11351
|
-
this._value = distExports$
|
|
10268
|
+
if (date && !change && this._value !== distExports$4.DateTime.format(date, 'YYYY-MM-DD')) {
|
|
10269
|
+
this._value = distExports$4.DateTime.format(date, 'YYYY-MM-DD');
|
|
11352
10270
|
if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
|
|
11353
10271
|
this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value").innerHTML = this._getDateStr();
|
|
11354
10272
|
}
|
|
@@ -11431,7 +10349,7 @@
|
|
|
11431
10349
|
classNameSuffix: 'time'
|
|
11432
10350
|
})) || this;
|
|
11433
10351
|
_this.options = options;
|
|
11434
|
-
_this._value = distExports$
|
|
10352
|
+
_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) || _this.options.current || new Date(), TIME_FORMAT);
|
|
11435
10353
|
_this._render();
|
|
11436
10354
|
return _this;
|
|
11437
10355
|
}
|
|
@@ -11439,7 +10357,7 @@
|
|
|
11439
10357
|
_proto._render = function _render() {
|
|
11440
10358
|
var _this = this;
|
|
11441
10359
|
var _this_locale;
|
|
11442
|
-
distExports$
|
|
10360
|
+
distExports$4.isMobile();
|
|
11443
10361
|
// if (isMobile1) {
|
|
11444
10362
|
// this.$container.innerHTML = `
|
|
11445
10363
|
// <span class="${PREFIX_CLASS}-mobile-date-filter" title="${(this.locale?.BTN_TIME || '') as string}">
|
|
@@ -11521,91 +10439,6 @@
|
|
|
11521
10439
|
return TimePickerControl;
|
|
11522
10440
|
}(Control);
|
|
11523
10441
|
|
|
11524
|
-
var dist$1 = {exports: {}};
|
|
11525
|
-
|
|
11526
|
-
var hasRequiredDist$1;
|
|
11527
|
-
|
|
11528
|
-
function requireDist$1 () {
|
|
11529
|
-
if (hasRequiredDist$1) return dist$1.exports;
|
|
11530
|
-
hasRequiredDist$1 = 1;
|
|
11531
|
-
|
|
11532
|
-
var deepmerge = requireCjs$1();
|
|
11533
|
-
|
|
11534
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
11535
|
-
return protoProps && function(target, props) {
|
|
11536
|
-
for (var i = 0; i < props.length; i++) {
|
|
11537
|
-
var descriptor = props[i];
|
|
11538
|
-
descriptor.enumerable = descriptor.enumerable || false, descriptor.configurable = true,
|
|
11539
|
-
"value" in descriptor && (descriptor.writable = true), Object.defineProperty(target, descriptor.key, descriptor);
|
|
11540
|
-
}
|
|
11541
|
-
}(Constructor.prototype, protoProps), Constructor;
|
|
11542
|
-
}
|
|
11543
|
-
|
|
11544
|
-
var I18n = function() {
|
|
11545
|
-
function I18n(translations, options) {
|
|
11546
|
-
this._translations = {}, this._locale = null == options ? void 0 : options.defaultLocale,
|
|
11547
|
-
translations && (this._translations = translations, (null == options ? void 0 : options.defaultLocale) || (this._locale = Object.keys(translations)[0])),
|
|
11548
|
-
this.options = options || {};
|
|
11549
|
-
}
|
|
11550
|
-
var _proto = I18n.prototype;
|
|
11551
|
-
return _proto.t = function(scope, variables) {
|
|
11552
|
-
var value, translation = this._translations[this._locale];
|
|
11553
|
-
if (!translation) return "function" == typeof this.options.customizeMissing ? this.options.customizeMissing(scope, variables) : '[missing "' + this._locale + '" locale]';
|
|
11554
|
-
if ("string" == typeof scope && scope.includes(".") && !(scope in translation)) {
|
|
11555
|
-
var _this__findChainValue = this._findChainValue(translation, scope), v = _this__findChainValue[0];
|
|
11556
|
-
if (_this__findChainValue[1]) value = v; else {
|
|
11557
|
-
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]';
|
|
11558
|
-
value = variables.defaultvalue;
|
|
11559
|
-
}
|
|
11560
|
-
} else if (scope in translation) value = translation[scope]; else {
|
|
11561
|
-
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]';
|
|
11562
|
-
value = variables.defaultvalue;
|
|
11563
|
-
}
|
|
11564
|
-
return "string" == typeof value && variables && /\{\{\s*(\w+)\s*\}\}/.test(value) ? value.replace(/\{\{\s*(\w+)\s*\}\}/g, function(_, varName) {
|
|
11565
|
-
return String(variables[varName]) || "";
|
|
11566
|
-
}) : value;
|
|
11567
|
-
}, _proto.appendTranslations = function(translations) {
|
|
11568
|
-
this._translations = deepmerge(this._translations, translations, {
|
|
11569
|
-
clone: false
|
|
11570
|
-
}), this._locale || (this._locale = Object.keys(this._translations)[0]), this._onChange();
|
|
11571
|
-
}, _proto.switchLocale = function(locale) {
|
|
11572
|
-
locale in this._translations && (this._locale = locale, this._onChange());
|
|
11573
|
-
}, _proto.switchTranslation = function(locale) {
|
|
11574
|
-
this.switchLocale(locale);
|
|
11575
|
-
}, _proto.getCurrentLocale = function() {
|
|
11576
|
-
return this._locale;
|
|
11577
|
-
}, _proto.getCurrentTranslation = function() {
|
|
11578
|
-
return this._translations[this._locale];
|
|
11579
|
-
}, _proto.getVersion = function() {
|
|
11580
|
-
return "2.0.0";
|
|
11581
|
-
}, _proto._onChange = function() {
|
|
11582
|
-
return null == this.options.onChange ? void 0 : this.options.onChange.call(this.options, this);
|
|
11583
|
-
}, _proto._findChainValue = function(obj, path) {
|
|
11584
|
-
for (var paths = path.split("."), translation = obj, i = 0; i < paths.length; i++) {
|
|
11585
|
-
if (!(paths[i] in translation)) return [ void 0, false ];
|
|
11586
|
-
if (translation = translation[paths[i]], i + 1 === paths.length) return [ translation[paths[i]], true ];
|
|
11587
|
-
}
|
|
11588
|
-
return [ void 0, false ];
|
|
11589
|
-
}, _create_class(I18n, [ {
|
|
11590
|
-
key: "locale",
|
|
11591
|
-
get: function() {
|
|
11592
|
-
return this._locale;
|
|
11593
|
-
}
|
|
11594
|
-
}, {
|
|
11595
|
-
key: "translations",
|
|
11596
|
-
get: function() {
|
|
11597
|
-
return this._translations;
|
|
11598
|
-
}
|
|
11599
|
-
} ]), I18n;
|
|
11600
|
-
}();
|
|
11601
|
-
|
|
11602
|
-
I18n.VERSION = "2.0.0", dist$1.exports = I18n;
|
|
11603
|
-
return dist$1.exports;
|
|
11604
|
-
}
|
|
11605
|
-
|
|
11606
|
-
var distExports$1 = requireDist$1();
|
|
11607
|
-
var I18n = /*@__PURE__*/getDefaultExportFromCjs(distExports$1);
|
|
11608
|
-
|
|
11609
10442
|
/**
|
|
11610
10443
|
* drag scroll support move and touch
|
|
11611
10444
|
*
|
|
@@ -12064,11 +10897,11 @@
|
|
|
12064
10897
|
var DragScroll = /*@__PURE__*/getDefaultExportFromCjs(distExports);
|
|
12065
10898
|
|
|
12066
10899
|
/*
|
|
12067
|
-
* @ezuikit/control-time-line v2.1.0-beta.
|
|
12068
|
-
* Copyright (c) 2026-07-
|
|
10900
|
+
* @ezuikit/control-time-line v2.1.0-beta.9
|
|
10901
|
+
* Copyright (c) 2026-07-28 Ezviz-OpenBiz
|
|
12069
10902
|
* Released under the MIT License.
|
|
12070
10903
|
*/
|
|
12071
|
-
var _$TIMELINE_LOCALES$_={zh:{title:"包含{{len}}段录像",foldTitle:"{{len}}个录像"},en:{title:"Includes {{len}} {{unit}}",foldTitle:"{{len}} {{unit}}"}};function _create_class$2(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var _$BASE_TIME_LINE_DEFAULT_OPTIONS$_={current:new Date,language:"zh",timeSections:[],readOnly:false,className:"",timeWidth:0,width:"100%",timePointColor:"#FFF",timeTextColor:"#FFF",timeScaleColor:"#FFF",timeSectionColor:"rgba(24, 144, 255, 0.5)",timeAxisBgColor:"#000",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",hoverTipBgColor:"rgba(0, 0, 0, 0.75)",hoverTipColor:"#FFFFFF",hoverLineColor:"rgba(255, 255, 255, 0.8)",opBtnBorderColor:"rgba(153, 153, 153, 1)",opBtnActiveColor:"rgba(54, 159, 255, 1)",opBtnDisabledBorderColor:"rgba(222, 222, 222, 1)",pickerHeaderColor:"rgba(44, 44, 44, 1)",pickerCloseColor:"#20262c",pickerCloseActiveColor:"rgba(240, 87, 87, 1)",pickerItemTitleColor:"rgba(102, 102, 102, 1)",coverFoldPlaceholderBackColor:"#cccccc",coverFoldPlaceholderFrontColor:"#ededed",coverFoldOverlayColor:"rgba(0, 0, 0, 0.3)",itemCoverPlaceholderStartColor:"rgb(183, 195, 207)",itemCoverPlaceholderEndColor:"rgb(212, 209, 209)",timeTextFontSize:12,timeTextFontFamily:"serif",scaleLineWidth:1,onChange:function(){},onDragStart:function(){},onDragging:function(){},onDragEnd:function(){},onDestroy:function(){}},BaseTimeLine=function(){function BaseTimeLine(container,options){if(this._current=new Date,this._readOnly=false,this._width=0,this._height=0,this._destroyed=false,this._timeWidth=0,this._timeSections=[],this.$container=container,!container)throw new Error("container is required");var left,right;this.options=deepmerge$1(_$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$1(_$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$6.DateTime.toDate(end))?void 0:_DateTime_toDate.getTime())-(null==(_DateTime_toDate1=distExports$6.DateTime.toDate(start))?void 0:_DateTime_toDate1.getTime()))/1e3,second=secondNum%60,minute=Math.floor(secondNum/60);return (minute>0?distExports$6.DateTime.fillZero(minute)+"'":"0'")+distExports$6.DateTime.fillZero(second)+"''"},TimeLineUtil}(),_$TIMELINE_ICONS$__tip='<svg viewBox="0 0 57 24" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="tip">\n <path class="ez-time-line-icon-tip" fill-rule="evenodd" d="m4,0l44,0c2.2091,0 4,1.7909 4,4l0,3.8218l4.9399,3.3572c0.5839,0.3968 0.5839,1.2574 0,1.6542l-4.9399,3.3572l0,3.8096c0,2.2091 -1.7909,4 -4,4l-44,0c-2.2091,0 -4,-1.7909 -4,-4l0,-16c0,-2.2091 1.7909,-4 4,-4z"/>\n </svg>',_$TIMELINE_ICONS$__plus='\n <svg viewBox="0 0 16 16" stroke="currentColor" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="plus">\n <path d="M0 0L10.6667 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0,1,-1,0,8,2.66663)"/>\n <path d="M2.66669 8L13.3334 8" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__minus='\n <svg viewBox="0 0 16 16" stroke="currentColor" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="minus">\n <path d="M2.66669 8L13.3334 8" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__close='\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n ',_$TIMELINE_ICONS$__pause='<svg viewBox="0 0 20 20" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="pause">\n\t\t <path d="M9.43914 2.47881L13.4688 8.4912C14.3594 9.81998 13.4071 11.6047 11.8074 11.6047L3.74811 11.6047C2.14849 11.6047 1.19616 9.81998 2.08675 8.4912L6.11641 2.47881C6.90863 1.2968 8.64693 1.2968 9.43914 2.47881Z" fill-rule="evenodd" transform="matrix(0,1,-1,0,16.5781,2.22229)" />\n </svg>\n ',_$TIMELINE_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',_$TIMELINE_ICONS$__event='\n <svg viewBox="0 0 20 20" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="event">\n <path d="M14.074 2.91669C15.4547 2.91669 16.574 4.03597 16.574 5.41669V15.8334C16.574 17.2141 15.4547 18.3334 14.074 18.3334H5.32968C3.94897 18.3334 2.82968 17.2141 2.82968 15.8334V5.41669C2.82968 4.03597 3.94897 2.91669 5.32968 2.91669H14.074ZM5.32968 4.16669C4.63933 4.16669 4.07968 4.72633 4.07968 5.41669V15.8334C4.07968 16.5237 4.63933 17.0834 5.32968 17.0834H14.074C14.7644 17.0834 15.324 16.5237 15.324 15.8334V5.41669C15.324 4.72633 14.7644 4.16669 14.074 4.16669H5.32968Z"/>\n <path d="M11.7228 8.54169C12.068 8.54169 12.3478 8.82151 12.3478 9.16669C12.3478 9.51186 12.068 9.79169 11.7228 9.79169H6.56897C6.22379 9.79169 5.94397 9.51186 5.94397 9.16669C5.94397 8.82151 6.22379 8.54169 6.56897 8.54169H11.7228Z"/>\n <path d="M9.14659 11.875C9.49165 11.8751 9.77159 12.1549 9.77159 12.5C9.77159 12.8451 9.49165 13.1249 9.14659 13.125H6.56927C6.2241 13.125 5.94427 12.8452 5.94427 12.5C5.94427 12.1548 6.2241 11.875 6.56927 11.875H9.14659Z"/>\n <path d="M7.09341 4.46613C7.09341 4.8113 6.81359 5.09113 6.46841 5.09113C6.12324 5.09113 5.84341 4.8113 5.84341 4.46613V2.47394C5.84341 2.12876 6.12324 1.84894 6.46841 1.84894C6.81359 1.84894 7.09341 2.12876 7.09341 2.47394V4.46613Z"/>\n <path d="M13.5607 4.46613C13.5607 4.8113 13.2809 5.09113 12.9357 5.09113C12.5905 5.09113 12.3107 4.8113 12.3107 4.46613V2.47394C12.3107 2.12876 12.5905 1.84894 12.9357 1.84894C13.2809 1.84894 13.5607 2.12876 13.5607 2.47394V4.46613Z"/>\n </svg>\n ',TIME_WIDTH=[[1,10,10,"单位 1秒"],[60,20,5,"单位 1分钟"],[600,20,6,"单位 10分钟"],[3600,30,6,"单位 1小时"],[14400,40,2,"单位 4小时"],[43200,80,2,"单位 12小时"]],MOBILE_TIME_WIDTH=[[1,10,10,"单位 1分钟"],[10,20,5,"单位 10分钟"],[30,20,6,"单位 30分钟"],[60,30,6,"单位 1小时"],[120,40,2,"单位 2小时"],[240,80,2,"单位 4小时"]],__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__={targets:[],root:null,rootMargin:"0px",threshold:.1,loadingClass:"ez-lazy-image-loading",loadedClass:"ez-lazy-image-loaded",loadedErrorClass:"ez-lazy-image-error",onLoadError:function(){}},ImageLazyLoader=function(){function ImageLazyLoader(options){ void 0===options&&(options={}),this.options=Object.assign({},__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__,options),this._observer=null,this._init();}var _proto=ImageLazyLoader.prototype;return _proto._init=function(){var _this=this;ImageLazyLoader.isSupported&&(this._observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){var _this__observer;entry.isIntersecting&&(_this._loadImage(entry.target),null==(_this__observer=_this._observer)||_this__observer.unobserve(entry.target));});},this.options)),this.addImages(this.options.targets);},_proto._loadImage=function(img){var _img_classList,_img_classList1,_img_classList2,_this=this;if(img&&!(null==(_img_classList=img.classList)?void 0:_img_classList.contains(this.options.loadingClass))&&!(null==(_img_classList1=img.classList)?void 0:_img_classList1.contains(this.options.loadedClass))&&!(null==(_img_classList2=img.classList)?void 0:_img_classList2.contains(this.options.loadedErrorClass))&&img.hasAttribute("data-src")){var _this1=this;img.classList.add(this.options.loadingClass);var tempImg=new Image;tempImg.onload=function(){img.src=img.dataset.src,img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedClass),img.dispatchEvent(new Event("lazyloaded"));},tempImg.onerror=function(e){img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedErrorClass),null==_this1.options.onLoadError||_this1.options.onLoadError.call(_this1.options,img);},tempImg.src=img.dataset.src;}},_proto.addImages=function(targets){var _this=this;(null==targets?void 0:targets.length)&&targets.forEach(function(target){var _this__observer;(null==target?void 0:target.hasAttribute("data-src"))&&(ImageLazyLoader.isSupported&&_this._observer?null==(_this__observer=_this._observer)||_this__observer.observe(target):_this._loadImage(target));});},_proto.destroy=function(){this._observer&&(this._observer.disconnect(),this._observer=null);},ImageLazyLoader}();function _create_class$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1$1(){return _extends$1$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1$1.apply(this,arguments)}function _set_prototype_of$1$1(o,p){return _set_prototype_of$1$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$1(o,p)}ImageLazyLoader.isSupported="IntersectionObserver"in window;var _$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_=Object.assign({},_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,{height:400,width:"100%",timeWidth:0,readOnly:false,timePointColor:"#648FFC",timeTextColor:"#666666",timeScaleColor:"transparent",timeSectionColor:"#369FFF",timeAxisBgColor:"#BDCDFF",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",showTimeWidthBtn:true,showCoverFold:true}),MobileTimeLine=function(BaseTimeLine){function MobileTimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge$1(_$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}))||this)._isTouchStart=false,_this._dragScroll=null,_this._moveStartX=0,_this._moveStartY=0,_this._imageLazyLoader=null,_this._imageLazyLoaderPicker=null,_this.state={start:"00:00:00",end:"24:00:00",current:null,timeArr:[],availTimeLine:[],index:0},_this._onImageError=_this._onImageError.bind(_this),_this._plusClick=_this._plusClick.bind(_this),_this._minusClick=_this._minusClick.bind(_this),_this._onPickerClose=_this._onPickerClose.bind(_this),_this._onClickItem=_this._onClickItem.bind(_this),_this._onClickCoverFold=_this._onClickCoverFold.bind(_this),_this._imageLazyLoader=new ImageLazyLoader({root:_this.$container,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}}),_this._render(),_this.options.timeSections&&Array.isArray(_this.options.timeSections)&&_this.updateTimeSections(_this.options.timeSections),_this._applyCssVars(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$1$1(subClass,superClass);}(MobileTimeLine,BaseTimeLine);var _proto=MobileTimeLine.prototype;return _proto._applyCssVars=function(){var opts,_this=this,vars=(opts=this.options,{"--ez-time-line-axis-border-color":String(opts.timeAxisBgColor),"--ez-time-line-section-color":String(opts.timeSectionColor),"--ez-time-line-text-color":String(opts.timeTextColor),"--ez-time-line-point-color":String(opts.timePointColor),"--ez-time-line-current-bg":String(opts.currentTimeBgColor),"--ez-time-line-current-color":String(opts.currentTimeColor),"--ez-time-line-op-btn-border":String(opts.opBtnBorderColor),"--ez-time-line-op-btn-active":String(opts.opBtnActiveColor),"--ez-time-line-op-btn-disabled-border":String(opts.opBtnDisabledBorderColor),"--ez-time-line-picker-header":String(opts.pickerHeaderColor),"--ez-time-line-picker-close":String(opts.pickerCloseColor),"--ez-time-line-picker-close-active":String(opts.pickerCloseActiveColor),"--ez-time-line-picker-item-title":String(opts.pickerItemTitleColor),"--ez-time-line-cover-fold-placeholder-back":String(opts.coverFoldPlaceholderBackColor),"--ez-time-line-cover-fold-placeholder-front":String(opts.coverFoldPlaceholderFrontColor),"--ez-time-line-cover-fold-overlay":String(opts.coverFoldOverlayColor),"--ez-time-line-item-cover-placeholder-start":String(opts.itemCoverPlaceholderStartColor),"--ez-time-line-item-cover-placeholder-end":String(opts.itemCoverPlaceholderEndColor),"--ez-time-line-hover-tip-bg":String(opts.hoverTipBgColor),"--ez-time-line-hover-tip-color":String(opts.hoverTipColor)});Object.entries(vars).forEach(function(param){var name=param[0],value=param[1];return _this.$container.style.setProperty(name,value)});},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._dragScroll&&(this._dragScroll.readonly=readOnly);},_proto.setTimeWidth=function(timeWidth){MOBILE_TIME_WIDTH[timeWidth]&&(BaseTimeLine.prototype.setTimeWidth.call(this,timeWidth),this._matchTimeDot());},_proto.updateTimeSections=function(timeSections,defaultIndex){BaseTimeLine.prototype.updateTimeSections.call(this,timeSections);var list=timeSections.map(function(record){return _extends$1$1({},record,{startTime:distExports$6.DateTime.format(record.startTime,"HH:mm:ss"),endTime:distExports$6.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$6.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$6.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$6.DateTime.format((null==(_this_timeSections_=_this.timeSections[0])?void 0:_this_timeSections_.endTime)||(new Date).getTime(),"YYYY-MM-DD")+"T"+obj[key]),null==_this.options.onChange||_this.options.onChange.call(_this.options,_this.current))):_this.state[key]=obj[key];});},_proto._setCurrentDOM=function(time){this._$currentTime&&(this._$currentTime.querySelector(".ez-time-line-current-value").innerHTML=time);},_proto._matchTimeDot=function(){for(var scaleWidth=this._scaleWidth,timeArr=[],minute=TimeLineUtil.timeToMinute("24:00:00"),i=minute=Math.floor(minute/scaleWidth)*scaleWidth;i>=0;){var marginTop=0,marginBottom=0;i==minute&&(marginTop=70),0==i&&(marginBottom=this.$container.clientHeight-70);var time=TimeLineUtil.minuteToTime(i);timeArr.push({id:i,current:time,label:"a"+i,marginTop:marginTop,marginBottom:marginBottom,recArr:[],coverArr:this._filterTimeSectionsByTime(time)}),i-=scaleWidth;}this._setState({timeArr:timeArr}),this._matchRecTimeDot();},_proto._matchRecTimeDot=function(){var _this_state=this.state,availTimeLine=_this_state.availTimeLine,timeArr=_this_state.timeArr,scaleWidth=this._scaleWidth,len=availTimeLine.length;if(0===len)for(var j=0;j<timeArr.length;j++)timeArr[j].recArr=[];else {for(var k=0;k<timeArr.length;k++)timeArr[k].recArr=[];for(var i=0;i<len;i++){var stAvailPercent,etAvailPercent,temp=availTimeLine[i],st=TimeLineUtil.timeToSecond(temp.startTime),et=TimeLineUtil.timeToSecond(temp.endTime),stMinute=Math.floor(st/(60*scaleWidth))*scaleWidth;stAvailPercent=(st-60*stMinute)/scaleWidth;var etMinute=Math.floor(et/(60*scaleWidth))*scaleWidth;etAvailPercent=(et-60*etMinute)/scaleWidth;for(var j1=0;j1<timeArr.length;j1++)if(timeArr[j1].id==stMinute&&timeArr[j1].id==etMinute){var height=etAvailPercent-stAvailPercent,top=60-etAvailPercent;timeArr[j1].recArr.push({height:height,top:top});}else timeArr[j1].id==stMinute?timeArr[j1].recArr.push({height:60-stAvailPercent,top:0}):timeArr[j1].id==etMinute?timeArr[j1].recArr.push({height:etAvailPercent,top:60-etAvailPercent}):timeArr[j1].id>stMinute&&timeArr[j1].id<etMinute&&timeArr[j1].recArr.push({height:60,top:0});}}this._setState({timeArr:timeArr}),this._renderDateLine();},_proto._renderDateLine=function(){var _this=this,timeArr=this.state.timeArr,container=this._$itemList;container.innerHTML="",timeArr.forEach(function(item,index){var _this__imageLazyLoader,timeItemDOM=document.createElement("div");timeItemDOM.setAttribute("class","ez-time-line-time-scale-area"),item.marginTop&&(timeItemDOM.style.cssText+="margin-top: "+item.marginTop+"px;"),item.marginBottom&&(timeItemDOM.style.cssText+="margin-bottom: "+item.marginBottom+"px;"),timeItemDOM.style.cssText+="border-right-color: "+String(_this.options.timeAxisBgColor)+";",timeItemDOM.setAttribute("data-time",item.current),timeItemDOM.setAttribute("data-index",index+""),document.createElement("div").setAttribute("class","ez-time-line-scale");var timeItemHtml="";item.coverArr.length&&_this.options.showCoverFold&&(timeItemHtml+='\n <div class="ez-time-line-time-cover-fold '+(item.coverArr.length>1?"ez-time-line-time-cover-fold-multiple":"")+'"\n data-start="'+item.current+'">\n '+(item.coverArr.length>1?'<div class="ez-time-line-cover-fold-placeholder" style="color: #FFF"></div>':"")+'\n <div class="ez-time-line-time-cover-fold-img">\n <img data-src="'+_this._setImageScr(item.coverArr[0].coverPic)+'" class="ez-time-line-img"/>\n <span class="ez-time-line-time-cover-fold-len">\n '+(item.coverArr.length>1?_this.i18n.t("foldTitle",{len:item.coverArr.length,unit:"videos"}):""+distExports$6.DateTime.format(item.coverArr[0].startTime,"HH:mm"))+"\n </span>\n "+(1===item.coverArr.length?'<span class="ez-time-line-time-cover-fold-time">'+TimeLineUtil.tranTimeToString(item.coverArr[0].startTime,item.coverArr[0].endTime)+"</span>":"")+'\n <span class="ez-time-line-time-cover-fold-pause">'+_$TIMELINE_ICONS$__pause+"</span>\n </div>\n </div>"),item.recArr.forEach(function(i){timeItemHtml+='<div class="ez-time-line-time-unavail"\n style="height: '+i.height+"px;background-color:"+String(_this.options.timeSectionColor)+"; top: "+i.top+'px">\n </div>';}),timeItemHtml+="<div id="+item.label+' class="ez-time-line-time-label" style="color: '+String(_this.options.timeTextColor)+'">'+item.current+"</div>",timeItemDOM.innerHTML=timeItemHtml,container.appendChild(timeItemDOM),item.coverArr.length&&_this.options.showCoverFold&&(null==(_this__imageLazyLoader=_this._imageLazyLoader)||_this__imageLazyLoader.addImages(container.querySelectorAll("img.ez-time-line-img")||[]));}),this._currentOffsetH();},_proto._currentOffsetH=function(){var current=this.state.current;if(current){var _this__dragScroll,y=(86400-TimeLineUtil.timeToSecond(current)||0)/this._scaleWidth;null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y+60,false);}},_proto._render=function(){var _this=this;if(this._$currentTime=document.createElement("div"),this._$currentTime.classList.add("ez-time-line-current"),this._$currentTime.innerHTML='<div class="ez-time-line-current-content" style="color: '+String(this.options.currentTimeBgColor)+'">\n <span class="ez-time-line-current-tip">'+_$TIMELINE_ICONS$__tip+'</span>\n <span class="ez-time-line-current-tip-line" style="background-color: '+String(this.options.timePointColor)+';"></span>\n <div class="ez-time-line-current-value" style="color: '+String(this.options.currentTimeColor)+'">00:00:00</div>\n </div>',this.$container.appendChild(this._$currentTime),this._$itemContainer=document.createElement("div"),this._$itemContainer.classList.add("ez-time-line-container"),this.$container.appendChild(this._$itemContainer),this._dragScroll=new DragScroll(this._$itemContainer,{hideScrollbar:true,onChange:function(state){var result=_this._offsetYToTime(state.y);result[1]!==_this.state.current&&_this._setCurrentDOM(result[0]>=86400?"23:59:59":result[1]);},onDragStart:function(e){_this._moveStartX=e.clientX,_this._moveStartY=e.clientY,null==_this.options.onDragStart||_this.options.onDragStart.call(_this.options,_this.state.current);},onDragging:function(){null==_this.options.onDragging||_this.options.onDragging.call(_this.options,_this.state.current);},onDragEnd:function(){var _this__dragScroll,result=_this._offsetYToTime(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.currentY);result[1]!==_this.state.current&&_this._setState({current:result[0]>=86400?"23:59:59":result[1]}),null==_this.options.onDragEnd||_this.options.onDragEnd.call(_this.options,_this.state.current);}}),/\d/.test(this.options.height))this._$itemContainer.style.cssText+="height: "+this.options.height+"px";else if("string"==typeof this.options.height)this._$itemContainer.style.cssText+="height: "+this.options.height;else {var height=this.$container.clientHeight;this._$itemContainer.style.cssText+="height: "+height+"px";}this._$itemList=document.createElement("div"),this._$itemList.classList.add("ez-time-line-item"),this._dragScroll.$content.appendChild(this._$itemList),this.options.showTimeWidthBtn&&(this._$op=document.createElement("div"),this._$op.classList.add("ez-time-line-op"),this._$op.innerHTML='<span class="ez-time-line-op-wrapper"><span class="ez-time-line-icon-plus">'+_$TIMELINE_ICONS$__plus+'</span> <span class="ez-time-line-icon-minus">'+_$TIMELINE_ICONS$__minus+"</span></span>",this.$container.appendChild(this._$op)),this.options.showCoverFold&&(this._picker=new Picker(null,{isMobile:true,wrapClassName:"ez-time-line-picker",onOpenChange:function(isOpen){var _this_options_onPickerOpenChange,_this_options;null==(_this_options=_this.options)||null==(_this_options_onPickerOpenChange=_this_options.onPickerOpenChange)||_this_options_onPickerOpenChange.call(_this_options,isOpen);}}),this._imageLazyLoaderPicker=new ImageLazyLoader({root:this._picker.$body,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}})),this._addEventListener();},_proto._addEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.addEventListener("click",this._plusClick,false),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.addEventListener("click",this._minusClick,false));this._matchTimeDot(),this._picker&&(this._delegatePickerClose=delegate(this._picker.$body,".ez-time-line-picker-close","click",this._onPickerClose,false),this._delegateItemContent=delegate(this._picker.$body,".ez-time-line-picker-item-content","click",this._onClickItem,false),this._delegateCoverFold=delegate(this._$itemList,".ez-time-line-time-cover-fold","click",this._onClickCoverFold,false));},_proto._removeEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1,_this__picker_$body_querySelector,_this__picker_$body;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.removeEventListener("click",this._plusClick),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.removeEventListener("click",this._minusClick));this._picker&&(null==(_this__picker_$body=this._picker.$body)||null==(_this__picker_$body_querySelector=_this__picker_$body.querySelector(".ez-time-line-picker-close"))||_this__picker_$body_querySelector.removeEventListener("click",this._onPickerClose),this._delegateItemContent&&(this._delegateItemContent.forEach(function(delegation){delegation.destroy();}),this._delegateItemContent=null),this._delegatePickerClose&&(this._delegatePickerClose.forEach(function(delegation){delegation.destroy();}),this._delegatePickerClose=null),this._delegateCoverFold&&(this._delegateCoverFold.forEach(function(delegation){delegation.destroy();}),this._delegateCoverFold=null));},_proto._plusClick=function(){var timeWidth=this.timeWidth+1;timeWidth>0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(timeWidth);},_proto._minusClick=function(){var timeWidth=this.timeWidth-1;timeWidth>=0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(Math.floor(timeWidth));},_proto._timeSectionsToGroupsByHour=function(list){var obj={};return list.forEach(function(item,index){var hour=distExports$6.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$6.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$6.DateTime.format(item.startTime,"YYYYMMDDTHHmmssZ")+'"\n data-end="'+distExports$6.DateTime.format(item.endTime,"YYYYMMDDTHHmmssZ")+'"\n data-index="'+item._index+'">\n <span class="ez-time-line-picker-item-time">'+distExports$6.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$6.DateTime.fillZero(Math.floor(second/3600))+":"+distExports$6.DateTime.fillZero(Math.floor(second%3600/60))+":"+distExports$6.DateTime.fillZero(second%60)]},_create_class$1(MobileTimeLine,[{key:"_scaleWidth",get:function(){return (MOBILE_TIME_WIDTH[this.timeWidth]||MOBILE_TIME_WIDTH[0])[0]}}]),MobileTimeLine}(BaseTimeLine);function isOverlap(a_start,a_end,b_start,b_end){return Math.max(a_start,b_start)<=Math.min(a_end,b_end)}function _extends$5(){return _extends$5=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$5.apply(this,arguments)}function getTouchDistance(touches){var touch1=touches[0],touch2=touches[1],dx=touch2.clientX-touch1.clientX,dy=touch2.clientY-touch1.clientY;return Math.sqrt(dx*dx+dy*dy)}function _create_class$3(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$6(o,p){return _set_prototype_of$6=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$6(o,p)}var _REC_EVENT_KEYS_=[1,2,3,4,5,6,"ALRAM","TIMIING","CAR","HD"],_$TIMELINE_DEFAULT_OPTIONS$_={height:36,dpr:window.devicePixelRatio||2,readOnly:false,scaleOffsetTop:4,showYearMonthDay:true,showHoverTip:true,hoverTipPlacement:"follow",enabledClickToSeek:true,enabledWheelZoom:true,showSectionIcon:false,sectionIconColor:"#FFFFFF",sectionIconSize:14,showSectionCount:true,sectionCountColor:"#FFFFFF",sectionCountBgColor:"#FF4D4F"},TimeLine=function(BaseTimeLine){function TimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge$1(_$TIMELINE_DEFAULT_OPTIONS$_,options,{clone:true}))||this)._$canvas=null,_this._ctx=null,_this._timeWidthArray=TIME_WIDTH[0],_this._centerPositionX=0,_this._isMouseDown=false,_this._mousePosition=0,_this._oldTime=null,_this._isOver=false,_this._moved=false,_this._lastTouchDist=0,_this._$hoverTip=null,_this._hoverRafId=null,_this._hoverX=0,_this._hoverY=0,_this._hoverActive=false,_this._hoverLineX=0,_this._dragMoved=false,_this._containerRect=null,_this._drawRafId=null,_this._$sectionIconLayer=null,_this._sectionIconPool=[],_this.$container=container,_this._mousemoveFun=_this._mousemoveFun.bind(_this),_this._mouseoverFun=_this._mouseoverFun.bind(_this),_this._mouseleaveFun=_this._mouseleaveFun.bind(_this),_this._mousedownFun=_this._mousedownFun.bind(_this),_this._mouseUpFun=_this._mouseUpFun.bind(_this),_this._mousewheelFun=_this._mousewheelFun.bind(_this),_this._containerWheelFun=_this._containerWheelFun.bind(_this),_this._touchstartFun=_this._touchstartFun.bind(_this),_this._touchmoveFun=_this._touchmoveFun.bind(_this),_this._touchendFun=_this._touchendFun.bind(_this),_this._clickFun=_this._clickFun.bind(_this),_this._init(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$6(subClass,superClass);}(TimeLine,BaseTimeLine);var _proto=TimeLine.prototype;return _proto._init=function(){this._$canvas=document.createElement("canvas"),this._ctx=this._$canvas.getContext("2d"),this.readOnly||(this._$canvas.style.cursor="pointer"),this.$container.appendChild(this._$canvas),this.resize(this.width,this.height),this._initSectionIconLayer(),this._update({current:this.current,timeWidth:this.timeWidth,timeSections:this.timeSections}),this._initHoverTip(),this._applyHoverTipVars(),this._addEventListener();},_proto.resize=function(width,height){BaseTimeLine.prototype.resize.call(this,width,height),this._$canvas&&width&&(this._$canvas.width=this.width*this.options.dpr,this._$canvas.style.width=this.width+"px"),this._$canvas&&height&&(this._$canvas.height=this.height*this.options.dpr,this._$canvas.style.height=this.height+"px"),this._$sectionIconLayer&&(this._$sectionIconLayer.style.width=this.width+"px",this._$sectionIconLayer.style.height=this.height+"px"),this._containerRect=null,this._draw();},_proto.setTimeWidth=function(timeWidth){this._update({timeWidth:timeWidth});},_proto.updateTimeSections=function(timeSections){this._update({timeSections:timeSections});},_proto.update=function(time){time&&!this._isMouseDown&&this._update({current:distExports$6.DateTime.toDate(time)});},_proto._update=function(options){var left,right,_this__$canvas;(void 0===options&&(options={}),(null==options?void 0:options.current)&&(left=options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)&&(this.current=options.current),(null==options?void 0:options.timeSections)&&BaseTimeLine.prototype.updateTimeSections.call(this,function(timeSections){if(0===timeSections.length)return timeSections;for(var normalized=timeSections.map(function(item){var startTime=item.startTime,endTime=item.endTime;return 10===(startTime+"").length&&(startTime*=1e3),10===(endTime+"").length&&(endTime*=1e3),_extends$5({},item,{startTime:startTime,endTime:endTime})}),merged=[normalized[0]],i=1;i<normalized.length;i++){var prev=merged[merged.length-1],curr=normalized[i];prev.endTime>=curr.startTime?prev.endTime=Math.max(prev.endTime,curr.endTime):merged.push(curr);}return merged}(options.timeSections)),"number"==typeof(null==options?void 0:options.timeWidth)&&(null==options?void 0:options.timeWidth)<TIME_WIDTH.length&&(BaseTimeLine.prototype.setTimeWidth.call(this,options.timeWidth),this._timeWidthArray=TIME_WIDTH[Math.floor(this.timeWidth)]),"number"==typeof(null==options?void 0:options.timeWidth)&&this._timeWidthArray)&&(this._timeWidthArray[3]&&(null==(_this__$canvas=this._$canvas)||_this__$canvas.setAttribute("data-title",this._timeWidthArray[3])));this._draw(),this._hoverActive&&this._$hoverTip&&!this._isMouseDown&&this._showHoverTip(this._hoverX,this._hoverY);},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._$canvas&&(this._$canvas.style.cursor=readOnly?"not-allowed":"pointer");},_proto.destroy=function(){this._removeEventListener(),this._hideHoverTip(),null!=this._drawRafId&&(cancelAnimationFrame(this._drawRafId),this._drawRafId=null),this._$hoverTip&&this._$hoverTip.remove(),this._$hoverTip=null,this._$sectionIconLayer&&this._$sectionIconLayer.remove(),this._$sectionIconLayer=null,this._sectionIconPool=[],this._$canvas&&this._$canvas.remove(),this._$canvas=null,this._ctx=null,this._containerRect=null,BaseTimeLine.prototype.destroy.call(this);},_proto._initSectionIconLayer=function(){var _this=this;if(this.options.showSectionIcon){var layer=document.createElement("div");layer.className="ez-time-line-section-icon-layer",layer.style.width=this.width+"px",layer.style.height=this.height+"px",this.$container.appendChild(layer),this._$sectionIconLayer=layer,delegate(layer,".ez-time-line-section-icon","click",function(event){event.stopImmediatePropagation(),event.stopPropagation(),event.preventDefault();var el=event.delegateTarget,startTime=Number(el.dataset.start),count=Number(el.dataset.count),index=Number(el.dataset.index);Number.isNaN(startTime)||null==_this.options.onSectionIconClick||_this.options.onSectionIconClick.call(_this.options,{startTime:startTime,count:Number.isNaN(count)?0:count,index:Number.isNaN(index)?-1:index});});}},_proto._isEventSection=function(section){var type=section.EVENT_TYPE;return void 0!==type&&_REC_EVENT_KEYS_.includes(type)},_proto._collectSectionIcons=function(offsetTop,sectionHeight){var _this_options_sectionIconSize,_this=this,renders=[];if(!this.options.showSectionIcon)return renders;var timeArr=this.timeSections||[],intervalSec=this._timeWidthArray[0];if(!intervalSec)return renders;for(var intervalMs=1e3*intervalSec,buckets=new Map,i=0;i<timeArr.length;i++){var section=timeArr[i];if(section&&"number"==typeof section.startTime&&this._isEventSection(section)){var idx=Math.floor(section.startTime/intervalMs),bucket=buckets.get(idx);bucket?(bucket.count+=1,section.startTime<bucket.startTime&&(bucket.startTime=section.startTime,bucket.index=i)):buckets.set(idx,{count:1,startTime:section.startTime,index:i});}}var dpr=this.options.dpr,iconSizePx=null!=(_this_options_sectionIconSize=this.options.sectionIconSize)?_this_options_sectionIconSize:14,sectionHeightPx=sectionHeight/dpr,offsetTopCss=offsetTop/dpr,size=Math.min(iconSizePx,sectionHeightPx),canvasWidthDpr=this.width*dpr;return buckets.forEach(function(bucket,idx){var bucketStart=idx*intervalMs,position=_this._findPosition({startTime:bucketStart,endTime:bucketStart+intervalMs});if(isOverlap(0,canvasWidthDpr,position.x1,position.x2)){var bucketWidthPx=(position.x2-position.x1)/dpr;renders.push({left:position.x1/dpr+(bucketWidthPx-size)/2,top:offsetTopCss+(sectionHeightPx-size)/2,size:size,count:bucket.count,startTime:bucket.startTime,index:bucket.index});}}),renders},_proto._createSectionIconEl=function(){var _this_options_sectionIconColor,_this_options_sectionCountColor,_this_options_sectionCountBgColor,span=document.createElement("span");span.className="ez-time-line-section-icon",span.style.color=null!=(_this_options_sectionIconColor=this.options.sectionIconColor)?_this_options_sectionIconColor:"#FFFFFF",span.innerHTML=_$TIMELINE_ICONS$__event;var count=document.createElement("span");return count.className="ez-time-line-section-icon-count",count.style.color=null!=(_this_options_sectionCountColor=this.options.sectionCountColor)?_this_options_sectionCountColor:"#FFFFFF",count.style.backgroundColor=null!=(_this_options_sectionCountBgColor=this.options.sectionCountBgColor)?_this_options_sectionCountBgColor:"#FF4D4F",count.style.display="none",span.appendChild(count),span},_proto._renderSectionIcons=function(renders){var layer=this._$sectionIconLayer;if(layer&&this.options.showSectionIcon){for(var pool=this._sectionIconPool,showCount=this.options.showSectionCount,i=0;i<renders.length;i++){var r=renders[i],el=pool[i];el||(el=this._createSectionIconEl(),layer.appendChild(el),pool.push(el)),el.style.display="",el.style.left=r.left+"px",el.style.bottom="0px",el.dataset.start=String(r.startTime),el.dataset.count=String(r.count),el.dataset.index=String(r.index);var countEl=el.lastElementChild;showCount&&r.count>0?(countEl.textContent=r.count>99?"99+":String(r.count),countEl.style.display=""):countEl.style.display="none";}for(;i<pool.length;i++)pool[i].style.display="none";}},_proto._initHoverTip=function(){if(this.options.showHoverTip){var tip=document.createElement("div");tip.className="ez-time-line-hover-tip",this.$container.appendChild(tip),this._$hoverTip=tip,this._applyHoverTipVars();}},_proto._applyHoverTipVars=function(){this.$container.style.setProperty("--ez-time-line-hover-tip-bg",String(this.options.hoverTipBgColor)),this.$container.style.setProperty("--ez-time-line-hover-tip-color",String(this.options.hoverTipColor));},_proto._hoverTimeAt=function(x){var seconds=(x-this.width/2)/this._curScaleSpacing*this._timeWidthArray[0];return new Date(this.current.getTime()+Math.round(1e3*seconds))},_proto._localDayStartSec=function(sec){var d=new Date(1e3*sec);return d.setHours(0,0,0,0),Math.floor(d.getTime()/1e3)},_proto._getContainerRect=function(){return this._containerRect||(this._containerRect=this.$container.getBoundingClientRect()),this._containerRect},_proto._scheduleDraw=function(){var _this=this;null==this._drawRafId&&(this._drawRafId=requestAnimationFrame(function(){_this._drawRafId=null,_this._draw();}));},_proto._formatHoverTime=function(date){if("function"==typeof this.options.renderHoverTip)return this.options.renderHoverTip(date);var fmt=this.options.hoverTipFormat||"yyyy-MM-dd HH:mm:ss";return distExports$6.DateTime.format(date,fmt)},_proto._showHoverTip=function(x,y){var _this=this;this._$hoverTip&&(this._hoverX=x,this._hoverY=y,null==this._hoverRafId&&(this._hoverRafId=requestAnimationFrame(function(){_this._hoverRafId=null,_this._renderHoverTip();})));},_proto._renderHoverTip=function(){var tip=this._$hoverTip;if(tip){var width=this.width,tx=Math.max(0,Math.min(this._hoverX,width)),date=this._hoverTimeAt(tx),content=this._formatHoverTime(date);"function"==typeof this.options.renderHoverTip?tip.innerHTML=content:tip.textContent=content,tip.style.display="inline-flex",tip.style.opacity="1";var left,top,tipW=tip.offsetWidth;if("top"===this.options.hoverTipPlacement)(left=this._hoverX-tipW/2)+tipW>width&&(left=width-tipW),left<0&&(left=0),top=-tip.offsetHeight-2;else {(left=this._hoverX+14)+tipW>width&&(left=this._hoverX-14-tipW),left<0&&(left=0),top=this._hoverY+16;}tip.style.left=left+"px",tip.style.top=top+"px";}},_proto._hideHoverTip=function(){null!=this._hoverRafId&&(cancelAnimationFrame(this._hoverRafId),this._hoverRafId=null),this._$hoverTip&&(this._$hoverTip.style.display="none",this._$hoverTip.style.opacity="0");},_proto._draw=function(){this._ctx&&(this._ctx.fillStyle=this.options.timeAxisBgColor,this._ctx.fillRect(0,0,this.width*this.options.dpr,this.height*this.options.dpr)),this._drawSections(),this._drawScale(),this._drawHoverLine();},_proto._drawHoverLine=function(){if(this._hoverActive&&!this._isMouseDown&&this._ctx){var dpr=this.options.dpr,x=Math.max(0,Math.min(this._hoverLineX,this.width))*dpr,lineWidth=this.options.scaleLineWidth*dpr;this._drawSolidLine(x,0,x,this.height*dpr,lineWidth,this.options.hoverLineColor);}},_proto._drawScale=function(){var lineWidth=this.options.scaleLineWidth*this.options.dpr;this._centerPositionX=parseInt(this.width*this.options.dpr/2+"");for(var centerPosition={x:this.width*this.options.dpr/2,y:this.height*this.options.dpr},curScaleTime=Math.floor(this.current.getTime()/1e3),offsetSecond=(curScaleTime-this._localDayStartSec(curScaleTime))%this._timeWidthArray[0],padding=this.height*this.options.dpr/20,spacing=this._curScaleSpacing*this.options.dpr,rightLastScaleTimeX=Math.floor(this._centerPositionX+(this._timeWidthArray[0]-offsetSecond)/this._timeWidthArray[0]*spacing),leftLastScaleTime=curScaleTime-offsetSecond,rightLastScaleTime=leftLastScaleTime+this._timeWidthArray[0],x=rightLastScaleTimeX-spacing;x>0;x-=spacing){0===(leftLastScaleTime-this._localDayStartSec(leftLastScaleTime))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x,padding,x,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(distExports$6.DateTime.format(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x,padding,x,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),leftLastScaleTime-=this._timeWidthArray[0];}for(var x1=rightLastScaleTimeX;x1<=this.width*this.options.dpr;x1+=spacing){0===(rightLastScaleTime-this._localDayStartSec(rightLastScaleTime))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x1,padding,x1,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(distExports$6.DateTime.format(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x1,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x1,padding,x1,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),rightLastScaleTime+=this._timeWidthArray[0];}this._drawCenterIndicator(centerPosition.x,centerPosition.y);},_proto._drawCenterIndicator=function(centerX,totalHeight){if(this._ctx){var dpr=this.options.dpr,lineW=2*dpr,triH=3*dpr,baseW=6*dpr,baseH=5*dpr,x=centerX;this._ctx.save(),this._ctx.fillStyle=this.options.timePointColor,this._ctx.fillRect(x-lineW/2,0,lineW,totalHeight),this._ctx.beginPath(),this._ctx.moveTo(x-baseW/2,0),this._ctx.lineTo(x+baseW/2,0),this._ctx.lineTo(x+baseW/2,baseH),this._ctx.lineTo(x,baseH+triH),this._ctx.lineTo(x-baseW/2,baseH),this._ctx.closePath(),this._ctx.fill(),this._ctx.beginPath(),this._ctx.moveTo(x-baseW/2,totalHeight),this._ctx.lineTo(x+baseW/2,totalHeight),this._ctx.lineTo(x+baseW/2,totalHeight-baseH),this._ctx.lineTo(x,totalHeight-baseH-triH),this._ctx.lineTo(x-baseW/2,totalHeight-baseH),this._ctx.closePath(),this._ctx.fill(),this._ctx.restore();}},_proto._drawSolidLine=function(startX,startY,endX,endY,lineWidth,color){this._ctx&&(this._ctx.save(),this._ctx.strokeStyle=null!=color?color:this.options.timeScaleColor,this._ctx.lineWidth=lineWidth,this._ctx.beginPath(),this._ctx.moveTo(startX,startY),this._ctx.lineTo(endX,endY),this._ctx.stroke(),this._ctx.restore());},_proto._drawTextString=function(text,x,y,align){if(this._ctx){var timeTexts=text.split(" ");this._ctx.font=(opts=this.options,dpr=this.options.dpr,(null!=(_opts_timeTextFontSize=opts.timeTextFontSize)?_opts_timeTextFontSize:12)*(dpr||1)+"px "+(null!=(_opts_timeTextFontFamily=opts.timeTextFontFamily)?_opts_timeTextFontFamily:"serif")),this._ctx.fillStyle=this.options.timeTextColor,this._ctx.textAlign=align||"left",this._timeWidthArray[0]%60==0&&(timeTexts[1]=timeTexts[1].replace(/:00$/,"")),this._ctx.fillText(timeTexts[1],x,y+8*this.options.dpr),!this.options.showYearMonthDay||"00:00:00"!==timeTexts[1]&&"00:00"!==timeTexts[1]&&this._timeWidthArray[0]*this._timeWidthArray[2]!==86400||(this._ctx.textAlign=align||"left",this._ctx.fillText(timeTexts[0],x,y+18*this.options.dpr));}var opts,dpr,_opts_timeTextFontSize,_opts_timeTextFontFamily;},_proto._drawSections=function(){for(var timeArr=this.timeSections||[],dpr=this.options.dpr,_ref=this.options.timeSectionOffset||[],tmp=_ref[0],offsetTopPx=void 0===tmp?0:tmp,tmp1=_ref[1],offsetTop=offsetTopPx*dpr,offsetBottom=(void 0===tmp1?0:tmp1)*dpr,sectionHeight=this.height*dpr-offsetTop-offsetBottom,i=0;i<timeArr.length;i++){var position=this._findPosition(timeArr[i]);this._ctx&&isOverlap(0,this.width*this.options.dpr,position.x1,position.x2)&&(this._ctx.fillStyle=this.options.timeSectionColor,this._ctx.fillRect(position.x1,offsetTop,position.x2-position.x1,sectionHeight));}this._renderSectionIcons(this._collectSectionIcons(offsetTop,sectionHeight));},_proto._findPosition=function(item){var x1=(parseInt((item.startTime-this.current.getTime())/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing+this.width/2)*this.options.dpr;return {x1:x1,x2:x1+parseInt((item.endTime-item.startTime)/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing*this.options.dpr}},_proto._addEventListener=function(){this._$canvas&&(this._$canvas.addEventListener("mousemove",this._mousemoveFun),this._$canvas.addEventListener("mouseover",this._mouseoverFun),this._$canvas.addEventListener("mouseleave",this._mouseleaveFun),this._$canvas.addEventListener("mousedown",this._mousedownFun),this._$canvas.addEventListener("mouseup",this._mouseUpFun),this._$canvas.addEventListener("click",this._clickFun),this._$canvas.addEventListener("wheel",this._mousewheelFun),this.$container.addEventListener("wheel",this._containerWheelFun,{passive:false}),this._$canvas.addEventListener("touchstart",this._touchstartFun,{passive:false}),this._$canvas.addEventListener("touchmove",this._touchmoveFun,{passive:false}),this._$canvas.addEventListener("touchend",this._touchendFun,{passive:false}));},_proto._removeEventListener=function(){this._$canvas&&(this._$canvas.removeEventListener("mousemove",this._mousemoveFun),this._$canvas.removeEventListener("mouseover",this._mouseoverFun),this._$canvas.removeEventListener("mouseleave",this._mouseleaveFun),this._$canvas.removeEventListener("mousedown",this._mousedownFun),this._$canvas.removeEventListener("mouseup",this._mouseUpFun),this._$canvas.removeEventListener("click",this._clickFun),this._$canvas.removeEventListener("wheel",this._mousewheelFun),this.$container.removeEventListener("wheel",this._containerWheelFun),this._$canvas.removeEventListener("touchstart",this._touchstartFun),this._$canvas.removeEventListener("touchmove",this._touchmoveFun),this._$canvas.removeEventListener("touchend",this._touchendFun));},_proto._mousedownFun=function(e){this.readOnly||(this._isMouseDown=true,this._mousePosition=e.pageX,this._oldTime=this.current,this._dragMoved=false,this._hideHoverTip(),this._hoverActive=false,null==this.options.onDragStart||this.options.onDragStart.call(this.options,this.current));},_proto._mouseoverFun=function(){this.readOnly||(this._isOver=true,this._containerRect=this.$container.getBoundingClientRect());},_proto._mouseleaveFun=function(e){this.readOnly||(this._isOver=false,this._containerRect=null,this._hideHoverTip(),this._hoverActive=false,this._draw(),this._moveEndOrTouchEndFun(e));},_proto._containerWheelFun=function(e){this.options.enabledWheelZoom&&e.target===this._$canvas&&e.preventDefault();},_proto._mouseUpFun=function(e){this._moveEndOrTouchEndFun(e);},_proto._clickFun=function(e){if(!this.readOnly&&this.options.enabledClickToSeek)if(this._dragMoved)this._dragMoved=false;else {var rect=this._getContainerRect(),x=e.clientX-rect.left,date=this._hoverTimeAt(x);this._update({current:date}),null==this.options.onClickSeek||this.options.onClickSeek.call(this.options,date);}},_proto._mousemoveFun=function(e){if(!this.readOnly)if(this._isMouseDown&&this._isOver)this._moveUpdateFun(e.pageX);else {var left=parseInt(this.$container.offsetLeft+"",10);this._mousePosition=e.pageX-left;var rect=this._getContainerRect();this._hoverActive=true,this._hoverLineX=e.clientX-rect.left,this._scheduleDraw(),this._showHoverTip(e.clientX-rect.left,e.clientY-rect.top);}},_proto._mousewheelFun=function(e){if(this.options.enabledWheelZoom)if(e.preventDefault(),e.deltaY>0){if(this.timeWidth<=0)return;this.setTimeWidth(this.timeWidth-1);}else this.setTimeWidth(this.timeWidth+1);},_proto._touchstartFun=function(e){if(!this.readOnly)if(this._oldTime=this.current,this._isOver=true,1===e.touches.length){var touch=e.touches[0];this._isMouseDown=true,this._mousePosition=touch.clientX;}else 2===e.touches.length&&(this._lastTouchDist=getTouchDistance(e.touches));},_proto._touchmoveFun=function(e){if(e.preventDefault(),e.stopPropagation(),!this.readOnly)if(1===e.touches.length){var touch=e.touches[0];this._moveUpdateFun(touch.clientX);}else 2===e.touches.length&&(this._lastTouchDist=getTouchDistance(e.touches));},_proto._touchendFun=function(e){this.readOnly||this._moveEndOrTouchEndFun(e);},_proto._moveEndOrTouchEndFun=function(e){e.preventDefault(),this.readOnly||this._isMouseDown&&(this._isMouseDown=false,this._moved&&(this._moved=false,this._update({current:this.current}),this._oldTime=this.current,null==this.options.onDragEnd||this.options.onDragEnd.call(this.options,this.current,this._isOver)),this._isOver&&Math.abs(this._mousePosition-(e.pageX||0))>5&&(null==this.options.onChange||this.options.onChange.call(this.options,this.current)),this._mousePosition=0,this._lastTouchDist=0);},_proto._moveUpdateFun=function(x){var mouseOffset=this._mousePosition-x;if(0!==mouseOffset){if(this._oldTime){var currentTime=this._oldTime.getTime()+1e3*parseInt(mouseOffset/this._curScaleSpacing*this._timeWidthArray[0]+"",10);this._update({current:new Date(currentTime)}),null==this.options.onDragging||this.options.onDragging.call(this.options,new Date(currentTime));}this._moved=true,this._dragMoved=true;}},_create_class$3(TimeLine,[{key:"_curScaleSpacing",get:function(){var _this__timeWidthArray,_this__timeWidthArray1;return Math.floor((null==(_this__timeWidthArray=this._timeWidthArray)?void 0:_this__timeWidthArray[1])-(null==(_this__timeWidthArray1=this._timeWidthArray)?void 0:_this__timeWidthArray1[1])*+(this.timeWidth%1/2).toFixed(2))}}]),TimeLine}(BaseTimeLine);TimeLine.TIME_WIDTH=TIME_WIDTH;
|
|
10904
|
+
var _$TIMELINE_LOCALES$_={zh:{title:"包含{{len}}段录像",foldTitle:"{{len}}个录像"},en:{title:"Includes {{len}} {{unit}}",foldTitle:"{{len}} {{unit}}"}};function _create_class$2(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var _$BASE_TIME_LINE_DEFAULT_OPTIONS$_={current:new Date,language:"zh",timeSections:[],readOnly:false,className:"",timeWidth:0,width:"100%",timePointColor:"#FFF",timeTextColor:"#FFF",timeScaleColor:"#FFF",timeSectionColor:"rgba(24, 144, 255, 0.5)",timeAxisBgColor:"#000",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",hoverTipBgColor:"rgba(0, 0, 0, 0.75)",hoverTipColor:"#FFFFFF",hoverLineColor:"rgba(255, 255, 255, 0.8)",opBtnBorderColor:"rgba(153, 153, 153, 1)",opBtnActiveColor:"rgba(54, 159, 255, 1)",opBtnDisabledBorderColor:"rgba(222, 222, 222, 1)",pickerHeaderColor:"rgba(44, 44, 44, 1)",pickerCloseColor:"#20262c",pickerCloseActiveColor:"rgba(240, 87, 87, 1)",pickerItemTitleColor:"rgba(102, 102, 102, 1)",coverFoldPlaceholderBackColor:"#cccccc",coverFoldPlaceholderFrontColor:"#ededed",coverFoldOverlayColor:"rgba(0, 0, 0, 0.3)",itemCoverPlaceholderStartColor:"rgb(183, 195, 207)",itemCoverPlaceholderEndColor:"rgb(212, 209, 209)",timeTextFontSize:12,timeTextFontFamily:"serif",scaleLineWidth:1,onChange:function(){},onDragStart:function(){},onDragging:function(){},onDragEnd:function(){},onDestroy:function(){}},BaseTimeLine=function(){function BaseTimeLine(container,options){if(this._current=new Date,this._readOnly=false,this._width=0,this._height=0,this._destroyed=false,this._timeWidth=0,this._timeSections=[],this.$container=container,!container)throw new Error("container is required");var left,right;this.options=deepmerge(_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}),this.options.timeSections&&Array.isArray(this.options.timeSections)&&(this._timeSections=this.options.timeSections),this.options.readOnly&&(this.readOnly=this.options.readOnly),this.options.className&&this.$container.classList.add(this.options.className),this.$container.style.position="relative",this.options.current&&(left=this.options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?this._current=this.options.current||new Date:this._current=new Date,this.i18n=new I18n(deepmerge(_$TIMELINE_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"}),this._timeWidth=this.options.timeWidth||0,this._resize(this.options.width||"100%",this.options.height);}var _proto=BaseTimeLine.prototype;return _proto.setReadOnly=function(readOnly){this.readOnly=readOnly;},_proto.update=function(current){this._current=current;},_proto.updateTimeSections=function(timeSections){timeSections&&Array.isArray(timeSections)&&(this._timeSections=timeSections);},_proto.resize=function(width,height){this._resize(width,height);},_proto._resize=function(width,height){var cssText="";/^\d+(\.\d+)?$/.test(width+"")?cssText+="width: "+width+"px;":width&&(cssText+="width: "+width+";"),/^\d+(\.\d+)?$/.test(height+"")?cssText+="height: "+height+"px;":height&&(cssText+="height: "+height+";"),this.$container&&(this.$container.style.cssText+=cssText),this._width=Math.floor(this.$container.clientWidth),this._height=Math.floor(this.$container.clientHeight);},_proto.setTimeWidth=function(timeWidth){[0,1,2,3,4,5].includes(timeWidth)&&(this._timeWidth=timeWidth);},_proto.destroy=function(){this._current=null,null==this.options.onDestroy||this.options.onDestroy.call(this.options),this._timeSections=[],this._readOnly=false,this._destroyed=true;},_create_class$2(BaseTimeLine,[{key:"current",get:function(){return this._current},set:function(current){this._current=current;}},{key:"readOnly",get:function(){return this._readOnly},set:function(readOnly){this._readOnly!==readOnly&&(this._readOnly=readOnly,this.$container.style.cursor=readOnly?"not-allowed":"pointer");}},{key:"timeSections",get:function(){return this._timeSections}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"timeWidth",get:function(){return this._timeWidth}}]),BaseTimeLine}();BaseTimeLine.LOCALES=_$TIMELINE_LOCALES$_;var TimeLineUtil=function(){function TimeLineUtil(){}return TimeLineUtil.timeToSecond=function(time){var e=time.split(":");return 60*Number(e[0])*60+60*Number(e[1])+(Number(e[2])||0)},TimeLineUtil.minuteToTime=function(minute){var hour=Math.floor(minute/60),m=minute%60;return (hour>9?hour:"0"+hour)+":"+(m>9?m:"0"+m)},TimeLineUtil.timeToMinute=function(time){var e=time.split(":");return 60*Number(e[0])+Number(e[1])},TimeLineUtil.tranTimeToString=function(start,end){var _DateTime_toDate,_DateTime_toDate1,secondNum=Math.floor((null==(_DateTime_toDate=distExports$4.DateTime.toDate(end))?void 0:_DateTime_toDate.getTime())-(null==(_DateTime_toDate1=distExports$4.DateTime.toDate(start))?void 0:_DateTime_toDate1.getTime()))/1e3,second=secondNum%60,minute=Math.floor(secondNum/60);return (minute>0?distExports$4.DateTime.fillZero(minute)+"'":"0'")+distExports$4.DateTime.fillZero(second)+"''"},TimeLineUtil}(),_$TIMELINE_ICONS$__tip='<svg viewBox="0 0 57 24" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="tip">\n <path class="ez-time-line-icon-tip" fill-rule="evenodd" d="m4,0l44,0c2.2091,0 4,1.7909 4,4l0,3.8218l4.9399,3.3572c0.5839,0.3968 0.5839,1.2574 0,1.6542l-4.9399,3.3572l0,3.8096c0,2.2091 -1.7909,4 -4,4l-44,0c-2.2091,0 -4,-1.7909 -4,-4l0,-16c0,-2.2091 1.7909,-4 4,-4z"/>\n </svg>',_$TIMELINE_ICONS$__plus='\n <svg viewBox="0 0 16 16" stroke="currentColor" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="plus">\n <path d="M0 0L10.6667 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0,1,-1,0,8,2.66663)"/>\n <path d="M2.66669 8L13.3334 8" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__minus='\n <svg viewBox="0 0 16 16" stroke="currentColor" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="minus">\n <path d="M2.66669 8L13.3334 8" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__close='\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n ',_$TIMELINE_ICONS$__pause='<svg viewBox="0 0 20 20" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="pause">\n\t\t <path d="M9.43914 2.47881L13.4688 8.4912C14.3594 9.81998 13.4071 11.6047 11.8074 11.6047L3.74811 11.6047C2.14849 11.6047 1.19616 9.81998 2.08675 8.4912L6.11641 2.47881C6.90863 1.2968 8.64693 1.2968 9.43914 2.47881Z" fill-rule="evenodd" transform="matrix(0,1,-1,0,16.5781,2.22229)" />\n </svg>\n ',_$TIMELINE_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',_$TIMELINE_ICONS$__event='\n <svg viewBox="0 0 20 20" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="event">\n <path d="M14.074 2.91669C15.4547 2.91669 16.574 4.03597 16.574 5.41669V15.8334C16.574 17.2141 15.4547 18.3334 14.074 18.3334H5.32968C3.94897 18.3334 2.82968 17.2141 2.82968 15.8334V5.41669C2.82968 4.03597 3.94897 2.91669 5.32968 2.91669H14.074ZM5.32968 4.16669C4.63933 4.16669 4.07968 4.72633 4.07968 5.41669V15.8334C4.07968 16.5237 4.63933 17.0834 5.32968 17.0834H14.074C14.7644 17.0834 15.324 16.5237 15.324 15.8334V5.41669C15.324 4.72633 14.7644 4.16669 14.074 4.16669H5.32968Z"/>\n <path d="M11.7228 8.54169C12.068 8.54169 12.3478 8.82151 12.3478 9.16669C12.3478 9.51186 12.068 9.79169 11.7228 9.79169H6.56897C6.22379 9.79169 5.94397 9.51186 5.94397 9.16669C5.94397 8.82151 6.22379 8.54169 6.56897 8.54169H11.7228Z"/>\n <path d="M9.14659 11.875C9.49165 11.8751 9.77159 12.1549 9.77159 12.5C9.77159 12.8451 9.49165 13.1249 9.14659 13.125H6.56927C6.2241 13.125 5.94427 12.8452 5.94427 12.5C5.94427 12.1548 6.2241 11.875 6.56927 11.875H9.14659Z"/>\n <path d="M7.09341 4.46613C7.09341 4.8113 6.81359 5.09113 6.46841 5.09113C6.12324 5.09113 5.84341 4.8113 5.84341 4.46613V2.47394C5.84341 2.12876 6.12324 1.84894 6.46841 1.84894C6.81359 1.84894 7.09341 2.12876 7.09341 2.47394V4.46613Z"/>\n <path d="M13.5607 4.46613C13.5607 4.8113 13.2809 5.09113 12.9357 5.09113C12.5905 5.09113 12.3107 4.8113 12.3107 4.46613V2.47394C12.3107 2.12876 12.5905 1.84894 12.9357 1.84894C13.2809 1.84894 13.5607 2.12876 13.5607 2.47394V4.46613Z"/>\n </svg>\n ',TIME_WIDTH=[[1,10,10,"单位 1秒"],[60,20,5,"单位 1分钟"],[600,20,6,"单位 10分钟"],[3600,30,6,"单位 1小时"],[14400,40,2,"单位 4小时"],[43200,80,2,"单位 12小时"]],MOBILE_TIME_WIDTH=[[1,10,10,"单位 1分钟"],[10,20,5,"单位 10分钟"],[30,20,6,"单位 30分钟"],[60,30,6,"单位 1小时"],[120,40,2,"单位 2小时"],[240,80,2,"单位 4小时"]],__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__={targets:[],root:null,rootMargin:"0px",threshold:.1,loadingClass:"ez-lazy-image-loading",loadedClass:"ez-lazy-image-loaded",loadedErrorClass:"ez-lazy-image-error",onLoadError:function(){}},ImageLazyLoader=function(){function ImageLazyLoader(options){ void 0===options&&(options={}),this.options=Object.assign({},__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__,options),this._observer=null,this._init();}var _proto=ImageLazyLoader.prototype;return _proto._init=function(){var _this=this;ImageLazyLoader.isSupported&&(this._observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){var _this__observer;entry.isIntersecting&&(_this._loadImage(entry.target),null==(_this__observer=_this._observer)||_this__observer.unobserve(entry.target));});},this.options)),this.addImages(this.options.targets);},_proto._loadImage=function(img){var _img_classList,_img_classList1,_img_classList2,_this=this;if(img&&!(null==(_img_classList=img.classList)?void 0:_img_classList.contains(this.options.loadingClass))&&!(null==(_img_classList1=img.classList)?void 0:_img_classList1.contains(this.options.loadedClass))&&!(null==(_img_classList2=img.classList)?void 0:_img_classList2.contains(this.options.loadedErrorClass))&&img.hasAttribute("data-src")){var _this1=this;img.classList.add(this.options.loadingClass);var tempImg=new Image;tempImg.onload=function(){img.src=img.dataset.src,img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedClass),img.dispatchEvent(new Event("lazyloaded"));},tempImg.onerror=function(e){img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedErrorClass),null==_this1.options.onLoadError||_this1.options.onLoadError.call(_this1.options,img);},tempImg.src=img.dataset.src;}},_proto.addImages=function(targets){var _this=this;(null==targets?void 0:targets.length)&&targets.forEach(function(target){var _this__observer;(null==target?void 0:target.hasAttribute("data-src"))&&(ImageLazyLoader.isSupported&&_this._observer?null==(_this__observer=_this._observer)||_this__observer.observe(target):_this._loadImage(target));});},_proto.destroy=function(){this._observer&&(this._observer.disconnect(),this._observer=null);},ImageLazyLoader}();function _create_class$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1$1(){return _extends$1$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1$1.apply(this,arguments)}function _set_prototype_of$1$1(o,p){return _set_prototype_of$1$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$1(o,p)}ImageLazyLoader.isSupported="IntersectionObserver"in window;var _$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_=Object.assign({},_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,{height:400,width:"100%",timeWidth:0,readOnly:false,timePointColor:"#648FFC",timeTextColor:"#666666",timeScaleColor:"transparent",timeSectionColor:"#369FFF",timeAxisBgColor:"#BDCDFF",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",showTimeWidthBtn:true,showCoverFold:true}),MobileTimeLine=function(BaseTimeLine){function MobileTimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}))||this)._isTouchStart=false,_this._dragScroll=null,_this._moveStartX=0,_this._moveStartY=0,_this._imageLazyLoader=null,_this._imageLazyLoaderPicker=null,_this.state={start:"00:00:00",end:"24:00:00",current:null,timeArr:[],availTimeLine:[],index:0},_this._onImageError=_this._onImageError.bind(_this),_this._plusClick=_this._plusClick.bind(_this),_this._minusClick=_this._minusClick.bind(_this),_this._onPickerClose=_this._onPickerClose.bind(_this),_this._onClickItem=_this._onClickItem.bind(_this),_this._onClickCoverFold=_this._onClickCoverFold.bind(_this),_this._imageLazyLoader=new ImageLazyLoader({root:_this.$container,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}}),_this._render(),_this.options.timeSections&&Array.isArray(_this.options.timeSections)&&_this.updateTimeSections(_this.options.timeSections),_this._applyCssVars(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$1$1(subClass,superClass);}(MobileTimeLine,BaseTimeLine);var _proto=MobileTimeLine.prototype;return _proto._applyCssVars=function(){var opts,_this=this,vars=(opts=this.options,{"--ez-time-line-axis-border-color":String(opts.timeAxisBgColor),"--ez-time-line-section-color":String(opts.timeSectionColor),"--ez-time-line-text-color":String(opts.timeTextColor),"--ez-time-line-point-color":String(opts.timePointColor),"--ez-time-line-current-bg":String(opts.currentTimeBgColor),"--ez-time-line-current-color":String(opts.currentTimeColor),"--ez-time-line-op-btn-border":String(opts.opBtnBorderColor),"--ez-time-line-op-btn-active":String(opts.opBtnActiveColor),"--ez-time-line-op-btn-disabled-border":String(opts.opBtnDisabledBorderColor),"--ez-time-line-picker-header":String(opts.pickerHeaderColor),"--ez-time-line-picker-close":String(opts.pickerCloseColor),"--ez-time-line-picker-close-active":String(opts.pickerCloseActiveColor),"--ez-time-line-picker-item-title":String(opts.pickerItemTitleColor),"--ez-time-line-cover-fold-placeholder-back":String(opts.coverFoldPlaceholderBackColor),"--ez-time-line-cover-fold-placeholder-front":String(opts.coverFoldPlaceholderFrontColor),"--ez-time-line-cover-fold-overlay":String(opts.coverFoldOverlayColor),"--ez-time-line-item-cover-placeholder-start":String(opts.itemCoverPlaceholderStartColor),"--ez-time-line-item-cover-placeholder-end":String(opts.itemCoverPlaceholderEndColor),"--ez-time-line-hover-tip-bg":String(opts.hoverTipBgColor),"--ez-time-line-hover-tip-color":String(opts.hoverTipColor)});Object.entries(vars).forEach(function(param){var name=param[0],value=param[1];return _this.$container.style.setProperty(name,value)});},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._dragScroll&&(this._dragScroll.readonly=readOnly);},_proto.setTimeWidth=function(timeWidth){MOBILE_TIME_WIDTH[timeWidth]&&(BaseTimeLine.prototype.setTimeWidth.call(this,timeWidth),this._matchTimeDot());},_proto.updateTimeSections=function(timeSections,defaultIndex){BaseTimeLine.prototype.updateTimeSections.call(this,timeSections);var list=timeSections.map(function(record){return _extends$1$1({},record,{startTime:distExports$4.DateTime.format(record.startTime,"HH:mm:ss"),endTime:distExports$4.DateTime.format(record.endTime,"HH:mm:ss")})});if(list.length>0){ void 0===defaultIndex&&(defaultIndex=list.length-1);var current=this.state.current;this._setState({availTimeLine:list,start:list[defaultIndex].startTime,end:list[defaultIndex].endTime,current:null===current?list[defaultIndex].startTime:current}),this._matchTimeDot();}else this._setState({availTimeLine:[],current:distExports$4.DateTime.format(this.current||(new Date).getTime(),"HH:mm:ss")}),this._matchTimeDot();},_proto.update=function(time){var _this__dragScroll;time&&!(null==(_this__dragScroll=this._dragScroll)?void 0:_this__dragScroll.isDragging)&&(this._setState({current:distExports$4.DateTime.format(time,"HH:mm:ss")}),this._currentOffsetH());},_proto.destroy=function(){var _this__dragScroll;if(this._scrollTimer&&(clearInterval(this._scrollTimer),this._scrollTimer=null),this._$currentTime)try{this.$container.removeChild(this._$currentTime),this._$currentTime=null;}catch(error){}if(this._$itemContainer&&this._$itemList)try{this._$itemContainer.removeChild(this._$itemList),this._$itemList=null;}catch(error){}if(this._$itemContainer)try{this.$container.removeChild(this._$itemContainer),this._$itemContainer=null;}catch(error){}if(this._$op)try{this.$container.removeChild(this._$op),this._$op=null;}catch(error){}this._picker&&(this._picker.destroy(),this._picker=null),this._imageLazyLoader&&(this._imageLazyLoader.destroy(),this._imageLazyLoader=null),this._imageLazyLoaderPicker&&(this._imageLazyLoaderPicker.destroy(),this._imageLazyLoaderPicker=null),this._removeEventListener(),null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.destroy(),this._dragScroll=null,BaseTimeLine.prototype.destroy.call(this);},_proto._setState=function(obj){var _this=this;Object.keys(obj).forEach(function(key){var _this__dragScroll,_this_timeSections_;"current"===key&&obj[key]?(_this._setCurrentDOM(obj[key]),_this.state.current===obj[key]||(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.isDragging)||(_this.state[key]=obj[key],_this.current=new Date(distExports$4.DateTime.format((null==(_this_timeSections_=_this.timeSections[0])?void 0:_this_timeSections_.endTime)||(new Date).getTime(),"YYYY-MM-DD")+"T"+obj[key]),null==_this.options.onChange||_this.options.onChange.call(_this.options,_this.current))):_this.state[key]=obj[key];});},_proto._setCurrentDOM=function(time){this._$currentTime&&(this._$currentTime.querySelector(".ez-time-line-current-value").innerHTML=time);},_proto._matchTimeDot=function(){for(var scaleWidth=this._scaleWidth,timeArr=[],minute=TimeLineUtil.timeToMinute("24:00:00"),i=minute=Math.floor(minute/scaleWidth)*scaleWidth;i>=0;){var marginTop=0,marginBottom=0;i==minute&&(marginTop=70),0==i&&(marginBottom=this.$container.clientHeight-70);var time=TimeLineUtil.minuteToTime(i);timeArr.push({id:i,current:time,label:"a"+i,marginTop:marginTop,marginBottom:marginBottom,recArr:[],coverArr:this._filterTimeSectionsByTime(time)}),i-=scaleWidth;}this._setState({timeArr:timeArr}),this._matchRecTimeDot();},_proto._matchRecTimeDot=function(){var _this_state=this.state,availTimeLine=_this_state.availTimeLine,timeArr=_this_state.timeArr,scaleWidth=this._scaleWidth,len=availTimeLine.length;if(0===len)for(var j=0;j<timeArr.length;j++)timeArr[j].recArr=[];else {for(var k=0;k<timeArr.length;k++)timeArr[k].recArr=[];for(var i=0;i<len;i++){var stAvailPercent,etAvailPercent,temp=availTimeLine[i],st=TimeLineUtil.timeToSecond(temp.startTime),et=TimeLineUtil.timeToSecond(temp.endTime),stMinute=Math.floor(st/(60*scaleWidth))*scaleWidth;stAvailPercent=(st-60*stMinute)/scaleWidth;var etMinute=Math.floor(et/(60*scaleWidth))*scaleWidth;etAvailPercent=(et-60*etMinute)/scaleWidth;for(var j1=0;j1<timeArr.length;j1++)if(timeArr[j1].id==stMinute&&timeArr[j1].id==etMinute){var height=etAvailPercent-stAvailPercent,top=60-etAvailPercent;timeArr[j1].recArr.push({height:height,top:top});}else timeArr[j1].id==stMinute?timeArr[j1].recArr.push({height:60-stAvailPercent,top:0}):timeArr[j1].id==etMinute?timeArr[j1].recArr.push({height:etAvailPercent,top:60-etAvailPercent}):timeArr[j1].id>stMinute&&timeArr[j1].id<etMinute&&timeArr[j1].recArr.push({height:60,top:0});}}this._setState({timeArr:timeArr}),this._renderDateLine();},_proto._renderDateLine=function(){var _this=this,timeArr=this.state.timeArr,container=this._$itemList;container.innerHTML="",timeArr.forEach(function(item,index){var _this__imageLazyLoader,timeItemDOM=document.createElement("div");timeItemDOM.setAttribute("class","ez-time-line-time-scale-area"),item.marginTop&&(timeItemDOM.style.cssText+="margin-top: "+item.marginTop+"px;"),item.marginBottom&&(timeItemDOM.style.cssText+="margin-bottom: "+item.marginBottom+"px;"),timeItemDOM.style.cssText+="border-right-color: "+String(_this.options.timeAxisBgColor)+";",timeItemDOM.setAttribute("data-time",item.current),timeItemDOM.setAttribute("data-index",index+""),document.createElement("div").setAttribute("class","ez-time-line-scale");var timeItemHtml="";item.coverArr.length&&_this.options.showCoverFold&&(timeItemHtml+='\n <div class="ez-time-line-time-cover-fold '+(item.coverArr.length>1?"ez-time-line-time-cover-fold-multiple":"")+'"\n data-start="'+item.current+'">\n '+(item.coverArr.length>1?'<div class="ez-time-line-cover-fold-placeholder" style="color: #FFF"></div>':"")+'\n <div class="ez-time-line-time-cover-fold-img">\n <img data-src="'+_this._setImageScr(item.coverArr[0].coverPic)+'" class="ez-time-line-img"/>\n <span class="ez-time-line-time-cover-fold-len">\n '+(item.coverArr.length>1?_this.i18n.t("foldTitle",{len:item.coverArr.length,unit:"videos"}):""+distExports$4.DateTime.format(item.coverArr[0].startTime,"HH:mm"))+"\n </span>\n "+(1===item.coverArr.length?'<span class="ez-time-line-time-cover-fold-time">'+TimeLineUtil.tranTimeToString(item.coverArr[0].startTime,item.coverArr[0].endTime)+"</span>":"")+'\n <span class="ez-time-line-time-cover-fold-pause">'+_$TIMELINE_ICONS$__pause+"</span>\n </div>\n </div>"),item.recArr.forEach(function(i){timeItemHtml+='<div class="ez-time-line-time-unavail"\n style="height: '+i.height+"px;background-color:"+String(_this.options.timeSectionColor)+"; top: "+i.top+'px">\n </div>';}),timeItemHtml+="<div id="+item.label+' class="ez-time-line-time-label" style="color: '+String(_this.options.timeTextColor)+'">'+item.current+"</div>",timeItemDOM.innerHTML=timeItemHtml,container.appendChild(timeItemDOM),item.coverArr.length&&_this.options.showCoverFold&&(null==(_this__imageLazyLoader=_this._imageLazyLoader)||_this__imageLazyLoader.addImages(container.querySelectorAll("img.ez-time-line-img")||[]));}),this._currentOffsetH();},_proto._currentOffsetH=function(){var current=this.state.current;if(current){var _this__dragScroll,y=(86400-TimeLineUtil.timeToSecond(current)||0)/this._scaleWidth;null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y+60,false);}},_proto._render=function(){var _this=this;if(this._$currentTime=document.createElement("div"),this._$currentTime.classList.add("ez-time-line-current"),this._$currentTime.innerHTML='<div class="ez-time-line-current-content" style="color: '+String(this.options.currentTimeBgColor)+'">\n <span class="ez-time-line-current-tip">'+_$TIMELINE_ICONS$__tip+'</span>\n <span class="ez-time-line-current-tip-line" style="background-color: '+String(this.options.timePointColor)+';"></span>\n <div class="ez-time-line-current-value" style="color: '+String(this.options.currentTimeColor)+'">00:00:00</div>\n </div>',this.$container.appendChild(this._$currentTime),this._$itemContainer=document.createElement("div"),this._$itemContainer.classList.add("ez-time-line-container"),this.$container.appendChild(this._$itemContainer),this._dragScroll=new DragScroll(this._$itemContainer,{hideScrollbar:true,onChange:function(state){var result=_this._offsetYToTime(state.y);result[1]!==_this.state.current&&_this._setCurrentDOM(result[0]>=86400?"23:59:59":result[1]);},onDragStart:function(e){_this._moveStartX=e.clientX,_this._moveStartY=e.clientY,null==_this.options.onDragStart||_this.options.onDragStart.call(_this.options,_this.state.current);},onDragging:function(){null==_this.options.onDragging||_this.options.onDragging.call(_this.options,_this.state.current);},onDragEnd:function(){var _this__dragScroll,result=_this._offsetYToTime(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.currentY);result[1]!==_this.state.current&&_this._setState({current:result[0]>=86400?"23:59:59":result[1]}),null==_this.options.onDragEnd||_this.options.onDragEnd.call(_this.options,_this.state.current);}}),/\d/.test(this.options.height))this._$itemContainer.style.cssText+="height: "+this.options.height+"px";else if("string"==typeof this.options.height)this._$itemContainer.style.cssText+="height: "+this.options.height;else {var height=this.$container.clientHeight;this._$itemContainer.style.cssText+="height: "+height+"px";}this._$itemList=document.createElement("div"),this._$itemList.classList.add("ez-time-line-item"),this._dragScroll.$content.appendChild(this._$itemList),this.options.showTimeWidthBtn&&(this._$op=document.createElement("div"),this._$op.classList.add("ez-time-line-op"),this._$op.innerHTML='<span class="ez-time-line-op-wrapper"><span class="ez-time-line-icon-plus">'+_$TIMELINE_ICONS$__plus+'</span> <span class="ez-time-line-icon-minus">'+_$TIMELINE_ICONS$__minus+"</span></span>",this.$container.appendChild(this._$op)),this.options.showCoverFold&&(this._picker=new Picker(null,{isMobile:true,wrapClassName:"ez-time-line-picker",onOpenChange:function(isOpen){var _this_options_onPickerOpenChange,_this_options;null==(_this_options=_this.options)||null==(_this_options_onPickerOpenChange=_this_options.onPickerOpenChange)||_this_options_onPickerOpenChange.call(_this_options,isOpen);}}),this._imageLazyLoaderPicker=new ImageLazyLoader({root:this._picker.$body,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}})),this._addEventListener();},_proto._addEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.addEventListener("click",this._plusClick,false),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.addEventListener("click",this._minusClick,false));this._matchTimeDot(),this._picker&&(this._delegatePickerClose=delegate(this._picker.$body,".ez-time-line-picker-close","click",this._onPickerClose,false),this._delegateItemContent=delegate(this._picker.$body,".ez-time-line-picker-item-content","click",this._onClickItem,false),this._delegateCoverFold=delegate(this._$itemList,".ez-time-line-time-cover-fold","click",this._onClickCoverFold,false));},_proto._removeEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1,_this__picker_$body_querySelector,_this__picker_$body;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.removeEventListener("click",this._plusClick),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.removeEventListener("click",this._minusClick));this._picker&&(null==(_this__picker_$body=this._picker.$body)||null==(_this__picker_$body_querySelector=_this__picker_$body.querySelector(".ez-time-line-picker-close"))||_this__picker_$body_querySelector.removeEventListener("click",this._onPickerClose),this._delegateItemContent&&(this._delegateItemContent.forEach(function(delegation){delegation.destroy();}),this._delegateItemContent=null),this._delegatePickerClose&&(this._delegatePickerClose.forEach(function(delegation){delegation.destroy();}),this._delegatePickerClose=null),this._delegateCoverFold&&(this._delegateCoverFold.forEach(function(delegation){delegation.destroy();}),this._delegateCoverFold=null));},_proto._plusClick=function(){var timeWidth=this.timeWidth+1;timeWidth>0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(timeWidth);},_proto._minusClick=function(){var timeWidth=this.timeWidth-1;timeWidth>=0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(Math.floor(timeWidth));},_proto._timeSectionsToGroupsByHour=function(list){var obj={};return list.forEach(function(item,index){var hour=distExports$4.DateTime.format(item.startTime,"HH");obj[+hour]?obj[+hour].push(_extends$1$1({},item,{_index:index})):obj[+hour]=[_extends$1$1({},item,{_index:index})];}),obj},_proto._filterTimeSectionsByTime=function(start){if(!start)return [];var startSecond=TimeLineUtil.timeToSecond(start+":00"),endSecond=TimeLineUtil.timeToSecond(start+":00")+60*this._scaleWidth;return this.timeSections.filter(function(item){var _$start=TimeLineUtil.timeToSecond(distExports$4.DateTime.format(item.startTime,"HH:mm:ss"));return _$start>=startSecond&&_$start<endSecond})},_proto._renderPickerContent=function(start){var _this__picker_innerHTML,_this__picker,_this__picker1,_this__picker2,_this__imageLazyLoaderPicker,_this=this,list=this._filterTimeSectionsByTime(start),hourGroups=this._timeSectionsToGroupsByHour(list);(null==(_this__picker=this._picker)||null==(_this__picker_innerHTML=_this__picker.innerHTML)||_this__picker_innerHTML.call(_this__picker,'<div class="ez-time-line-picker-container">\n <div class="ez-time-line-picker-header">\n <span class="ez-time-line-picker-close">'+_$TIMELINE_ICONS$__close+"</span>\n "+this.i18n.t("title",{len:list.length,unit:list.length>1?"videos":"video"})+'\n </div>\n <div class="ez-time-line-picker-content">\n <div class="ez-time-line-picker-list">\n '+Object.keys(hourGroups).reverse().map(function(key){return '<div class="ez-time-line-picker-item">\n <div class="ez-time-line-picker-item-title">'+key+':00</div>\n <div class="ez-time-line-picker-item-list">\n '+hourGroups[key].reverse().map(function(item){return '<div class="ez-time-line-picker-item-content"\n data-start="'+distExports$4.DateTime.format(item.startTime,"YYYYMMDDTHHmmssZ")+'"\n data-end="'+distExports$4.DateTime.format(item.endTime,"YYYYMMDDTHHmmssZ")+'"\n data-index="'+item._index+'">\n <span class="ez-time-line-picker-item-time">'+distExports$4.DateTime.format(item.startTime,"HH:mm")+'</span>\n <span class="ez-time-line-picker-item-duration">\n '+TimeLineUtil.tranTimeToString(item.startTime,item.endTime)+'\n </span>\n <img class="ez-time-line-picker-item-cover" data-src="'+_this._setImageScr(item.coverPic)+'"/>\n </div>'}).join("")+"\n </div>\n </div>"}).join("")+"\n </div>\n </div>\n </div>\n </div>"),null==(_this__picker1=this._picker)?void 0:_this__picker1.$body)&&(null==(_this__imageLazyLoaderPicker=this._imageLazyLoaderPicker)||_this__imageLazyLoaderPicker.addImages((null==(_this__picker2=this._picker)?void 0:_this__picker2.$body.querySelectorAll("img"))||[]));},_proto._onImageError=function(img){if(!img.hasAttribute("data-error")){var _img_parentNode,placeholder=document.createElement("div");placeholder.classList.add("ez-time-line-item-cover-placeholder"),placeholder.innerHTML=""+_$TIMELINE_ICONS$__picture,null==(_img_parentNode=img.parentNode)||_img_parentNode.appendChild(placeholder),img.setAttribute("data-error","true"),img.remove();}},_proto._onPickerClose=function(){this._picker&&(this._picker.open=false);},_proto._onClickItem=function(e){var _e_delegateTarget_getAttribute,_e_delegateTarget,index=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_getAttribute=_e_delegateTarget.getAttribute)?void 0:_e_delegateTarget_getAttribute.call(_e_delegateTarget,"data-index");this._picker&&(this._picker.open=false),null==this.options.onPickerSelect||this.options.onPickerSelect.call(this.options,this.timeSections[+index]);},_proto._onClickCoverFold=function(e){var _e_delegateTarget_parentElement_getAttribute,_e_delegateTarget_parentElement,_e_delegateTarget;e.preventDefault();var time=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_parentElement=_e_delegateTarget.parentElement)||null==(_e_delegateTarget_parentElement_getAttribute=_e_delegateTarget_parentElement.getAttribute)?void 0:_e_delegateTarget_parentElement_getAttribute.call(_e_delegateTarget_parentElement,"data-time"),moveX=Math.abs(this._moveStartX-e.clientX),moveY=Math.abs(this._moveStartY-e.clientY);this._picker&&time&&!(moveX>=1||moveY>=1)&&(this._renderPickerContent(time),this._picker.open=true);},_proto._setImageScr=function(src){if(src){var query="x=200&"+(this.options.coverQuery||"");return src+(src.includes("?")?"&":"?")+query}return ""},_proto._offsetYToTime=function(offsetY){var _this__dragScroll,y=offsetY;offsetY<60&&(y=60,null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y));var second=86400-Math.floor((y-60)*this._scaleWidth);return [second,distExports$4.DateTime.fillZero(Math.floor(second/3600))+":"+distExports$4.DateTime.fillZero(Math.floor(second%3600/60))+":"+distExports$4.DateTime.fillZero(second%60)]},_create_class$1(MobileTimeLine,[{key:"_scaleWidth",get:function(){return (MOBILE_TIME_WIDTH[this.timeWidth]||MOBILE_TIME_WIDTH[0])[0]}}]),MobileTimeLine}(BaseTimeLine);function isOverlap(a_start,a_end,b_start,b_end){return Math.max(a_start,b_start)<=Math.min(a_end,b_end)}function _extends$5(){return _extends$5=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$5.apply(this,arguments)}function getTouchDistance(touches){var touch1=touches[0],touch2=touches[1],dx=touch2.clientX-touch1.clientX,dy=touch2.clientY-touch1.clientY;return Math.sqrt(dx*dx+dy*dy)}function _create_class$3(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$6(o,p){return _set_prototype_of$6=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$6(o,p)}var _REC_EVENT_KEYS_=[1,2,3,4,5,6,"ALRAM","TIMIING","CAR","HD"],_$TIMELINE_DEFAULT_OPTIONS$_={height:36,dpr:window.devicePixelRatio||2,readOnly:false,scaleOffsetTop:4,showYearMonthDay:true,showHoverTip:true,hoverTipPlacement:"follow",enabledClickToSeek:true,enabledWheelZoom:true,showSectionIcon:false,sectionIconColor:"#FFFFFF",sectionIconSize:14,showSectionCount:true,sectionCountColor:"#FFFFFF",sectionCountBgColor:"#FF4D4F"},TimeLine=function(BaseTimeLine){function TimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$TIMELINE_DEFAULT_OPTIONS$_,options,{clone:true}))||this)._$canvas=null,_this._ctx=null,_this._timeWidthArray=TIME_WIDTH[0],_this._centerPositionX=0,_this._isMouseDown=false,_this._mousePosition=0,_this._oldTime=null,_this._isOver=false,_this._moved=false,_this._lastTouchDist=0,_this._$hoverTip=null,_this._hoverRafId=null,_this._hoverX=0,_this._hoverY=0,_this._hoverActive=false,_this._hoverLineX=0,_this._dragMoved=false,_this._containerRect=null,_this._drawRafId=null,_this._$sectionIconLayer=null,_this._sectionIconPool=[],_this.$container=container,_this._mousemoveFun=_this._mousemoveFun.bind(_this),_this._mouseoverFun=_this._mouseoverFun.bind(_this),_this._mouseleaveFun=_this._mouseleaveFun.bind(_this),_this._mousedownFun=_this._mousedownFun.bind(_this),_this._mouseUpFun=_this._mouseUpFun.bind(_this),_this._mousewheelFun=_this._mousewheelFun.bind(_this),_this._containerWheelFun=_this._containerWheelFun.bind(_this),_this._touchstartFun=_this._touchstartFun.bind(_this),_this._touchmoveFun=_this._touchmoveFun.bind(_this),_this._touchendFun=_this._touchendFun.bind(_this),_this._clickFun=_this._clickFun.bind(_this),_this._init(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$6(subClass,superClass);}(TimeLine,BaseTimeLine);var _proto=TimeLine.prototype;return _proto._init=function(){this._$canvas=document.createElement("canvas"),this._ctx=this._$canvas.getContext("2d"),this.readOnly||(this._$canvas.style.cursor="pointer"),this.$container.appendChild(this._$canvas),this.resize(this.width,this.height),this._initSectionIconLayer(),this._update({current:this.current,timeWidth:this.timeWidth,timeSections:this.timeSections}),this._initHoverTip(),this._applyHoverTipVars(),this._addEventListener();},_proto.resize=function(width,height){BaseTimeLine.prototype.resize.call(this,width,height),this._$canvas&&width&&(this._$canvas.width=this.width*this.options.dpr,this._$canvas.style.width=this.width+"px"),this._$canvas&&height&&(this._$canvas.height=this.height*this.options.dpr,this._$canvas.style.height=this.height+"px"),this._$sectionIconLayer&&(this._$sectionIconLayer.style.width=this.width+"px",this._$sectionIconLayer.style.height=this.height+"px"),this._containerRect=null,this._draw();},_proto.setTimeWidth=function(timeWidth){this._update({timeWidth:timeWidth});},_proto.updateTimeSections=function(timeSections){this._update({timeSections:timeSections});},_proto.update=function(time){time&&!this._isMouseDown&&this._update({current:distExports$4.DateTime.toDate(time)});},_proto._update=function(options){var left,right,_this__$canvas;(void 0===options&&(options={}),(null==options?void 0:options.current)&&(left=options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)&&(this.current=options.current),(null==options?void 0:options.timeSections)&&BaseTimeLine.prototype.updateTimeSections.call(this,function(timeSections){if(0===timeSections.length)return timeSections;for(var normalized=timeSections.map(function(item){var startTime=item.startTime,endTime=item.endTime;return 10===(startTime+"").length&&(startTime*=1e3),10===(endTime+"").length&&(endTime*=1e3),_extends$5({},item,{startTime:startTime,endTime:endTime})}),merged=[normalized[0]],i=1;i<normalized.length;i++){var prev=merged[merged.length-1],curr=normalized[i];prev.endTime>=curr.startTime?prev.endTime=Math.max(prev.endTime,curr.endTime):merged.push(curr);}return merged}(options.timeSections)),"number"==typeof(null==options?void 0:options.timeWidth)&&(null==options?void 0:options.timeWidth)<TIME_WIDTH.length&&(BaseTimeLine.prototype.setTimeWidth.call(this,options.timeWidth),this._timeWidthArray=TIME_WIDTH[Math.floor(this.timeWidth)]),"number"==typeof(null==options?void 0:options.timeWidth)&&this._timeWidthArray)&&(this._timeWidthArray[3]&&(null==(_this__$canvas=this._$canvas)||_this__$canvas.setAttribute("data-title",this._timeWidthArray[3])));this._draw(),this._hoverActive&&this._$hoverTip&&!this._isMouseDown&&this._showHoverTip(this._hoverX,this._hoverY);},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._$canvas&&(this._$canvas.style.cursor=readOnly?"not-allowed":"pointer");},_proto.destroy=function(){this._removeEventListener(),this._hideHoverTip(),null!=this._drawRafId&&(cancelAnimationFrame(this._drawRafId),this._drawRafId=null),this._$hoverTip&&this._$hoverTip.remove(),this._$hoverTip=null,this._$sectionIconLayer&&this._$sectionIconLayer.remove(),this._$sectionIconLayer=null,this._sectionIconPool=[],this._$canvas&&this._$canvas.remove(),this._$canvas=null,this._ctx=null,this._containerRect=null,BaseTimeLine.prototype.destroy.call(this);},_proto._initSectionIconLayer=function(){var _this=this;if(this.options.showSectionIcon){var layer=document.createElement("div");layer.className="ez-time-line-section-icon-layer",layer.style.width=this.width+"px",layer.style.height=this.height+"px",this.$container.appendChild(layer),this._$sectionIconLayer=layer,delegate(layer,".ez-time-line-section-icon","click",function(event){event.stopImmediatePropagation(),event.stopPropagation(),event.preventDefault();var el=event.delegateTarget,startTime=Number(el.dataset.start),count=Number(el.dataset.count),index=Number(el.dataset.index);Number.isNaN(startTime)||null==_this.options.onSectionIconClick||_this.options.onSectionIconClick.call(_this.options,{startTime:startTime,count:Number.isNaN(count)?0:count,index:Number.isNaN(index)?-1:index});});}},_proto._isEventSection=function(section){var type=section.EVENT_TYPE;return void 0!==type&&_REC_EVENT_KEYS_.includes(type)},_proto._collectSectionIcons=function(offsetTop,sectionHeight){var _this_options_sectionIconSize,_this=this,renders=[];if(!this.options.showSectionIcon)return renders;var timeArr=this.timeSections||[],intervalSec=this._timeWidthArray[0];if(!intervalSec)return renders;for(var intervalMs=1e3*intervalSec,buckets=new Map,i=0;i<timeArr.length;i++){var section=timeArr[i];if(section&&"number"==typeof section.startTime&&this._isEventSection(section)){var idx=Math.floor(section.startTime/intervalMs),bucket=buckets.get(idx);bucket?(bucket.count+=1,section.startTime<bucket.startTime&&(bucket.startTime=section.startTime,bucket.index=i)):buckets.set(idx,{count:1,startTime:section.startTime,index:i});}}var dpr=this.options.dpr,iconSizePx=null!=(_this_options_sectionIconSize=this.options.sectionIconSize)?_this_options_sectionIconSize:14,sectionHeightPx=sectionHeight/dpr,offsetTopCss=offsetTop/dpr,size=Math.min(iconSizePx,sectionHeightPx),canvasWidthDpr=this.width*dpr;return buckets.forEach(function(bucket,idx){var bucketStart=idx*intervalMs,position=_this._findPosition({startTime:bucketStart,endTime:bucketStart+intervalMs});if(isOverlap(0,canvasWidthDpr,position.x1,position.x2)){var bucketWidthPx=(position.x2-position.x1)/dpr;renders.push({left:position.x1/dpr+(bucketWidthPx-size)/2,top:offsetTopCss+(sectionHeightPx-size)/2,size:size,count:bucket.count,startTime:bucket.startTime,index:bucket.index});}}),renders},_proto._createSectionIconEl=function(){var _this_options_sectionIconColor,_this_options_sectionCountColor,_this_options_sectionCountBgColor,span=document.createElement("span");span.className="ez-time-line-section-icon",span.style.color=null!=(_this_options_sectionIconColor=this.options.sectionIconColor)?_this_options_sectionIconColor:"#FFFFFF",span.innerHTML=_$TIMELINE_ICONS$__event;var count=document.createElement("span");return count.className="ez-time-line-section-icon-count",count.style.color=null!=(_this_options_sectionCountColor=this.options.sectionCountColor)?_this_options_sectionCountColor:"#FFFFFF",count.style.backgroundColor=null!=(_this_options_sectionCountBgColor=this.options.sectionCountBgColor)?_this_options_sectionCountBgColor:"#FF4D4F",count.style.display="none",span.appendChild(count),span},_proto._renderSectionIcons=function(renders){var layer=this._$sectionIconLayer;if(layer&&this.options.showSectionIcon){for(var pool=this._sectionIconPool,showCount=this.options.showSectionCount,i=0;i<renders.length;i++){var r=renders[i],el=pool[i];el||(el=this._createSectionIconEl(),layer.appendChild(el),pool.push(el)),el.style.display="",el.style.left=r.left+"px",el.style.bottom="0px",el.dataset.start=String(r.startTime),el.dataset.count=String(r.count),el.dataset.index=String(r.index);var countEl=el.lastElementChild;showCount&&r.count>0?(countEl.textContent=r.count>99?"99+":String(r.count),countEl.style.display=""):countEl.style.display="none";}for(;i<pool.length;i++)pool[i].style.display="none";}},_proto._initHoverTip=function(){if(this.options.showHoverTip){var tip=document.createElement("div");tip.className="ez-time-line-hover-tip",this.$container.appendChild(tip),this._$hoverTip=tip,this._applyHoverTipVars();}},_proto._applyHoverTipVars=function(){this.$container.style.setProperty("--ez-time-line-hover-tip-bg",String(this.options.hoverTipBgColor)),this.$container.style.setProperty("--ez-time-line-hover-tip-color",String(this.options.hoverTipColor));},_proto._hoverTimeAt=function(x){var seconds=(x-this.width/2)/this._curScaleSpacing*this._timeWidthArray[0];return new Date(this.current.getTime()+Math.round(1e3*seconds))},_proto._localDayStartSec=function(sec){var d=new Date(1e3*sec);return d.setHours(0,0,0,0),Math.floor(d.getTime()/1e3)},_proto._getContainerRect=function(){return this._containerRect||(this._containerRect=this.$container.getBoundingClientRect()),this._containerRect},_proto._scheduleDraw=function(){var _this=this;null==this._drawRafId&&(this._drawRafId=requestAnimationFrame(function(){_this._drawRafId=null,_this._draw();}));},_proto._formatHoverTime=function(date){if("function"==typeof this.options.renderHoverTip)return this.options.renderHoverTip(date);var fmt=this.options.hoverTipFormat||"yyyy-MM-dd HH:mm:ss";return distExports$4.DateTime.format(date,fmt)},_proto._showHoverTip=function(x,y){var _this=this;this._$hoverTip&&(this._hoverX=x,this._hoverY=y,null==this._hoverRafId&&(this._hoverRafId=requestAnimationFrame(function(){_this._hoverRafId=null,_this._renderHoverTip();})));},_proto._renderHoverTip=function(){var tip=this._$hoverTip;if(tip){var width=this.width,tx=Math.max(0,Math.min(this._hoverX,width)),date=this._hoverTimeAt(tx),content=this._formatHoverTime(date);"function"==typeof this.options.renderHoverTip?tip.innerHTML=content:tip.textContent=content,tip.style.display="inline-flex",tip.style.opacity="1";var left,top,tipW=tip.offsetWidth;if("top"===this.options.hoverTipPlacement)(left=this._hoverX-tipW/2)+tipW>width&&(left=width-tipW),left<0&&(left=0),top=-tip.offsetHeight-2;else {(left=this._hoverX+14)+tipW>width&&(left=this._hoverX-14-tipW),left<0&&(left=0),top=this._hoverY+16;}tip.style.left=left+"px",tip.style.top=top+"px";}},_proto._hideHoverTip=function(){null!=this._hoverRafId&&(cancelAnimationFrame(this._hoverRafId),this._hoverRafId=null),this._$hoverTip&&(this._$hoverTip.style.display="none",this._$hoverTip.style.opacity="0");},_proto._draw=function(){this._ctx&&(this._ctx.fillStyle=this.options.timeAxisBgColor,this._ctx.fillRect(0,0,this.width*this.options.dpr,this.height*this.options.dpr)),this._drawSections(),this._drawScale(),this._drawHoverLine();},_proto._drawHoverLine=function(){if(this._hoverActive&&!this._isMouseDown&&this._ctx){var dpr=this.options.dpr,x=Math.max(0,Math.min(this._hoverLineX,this.width))*dpr,lineWidth=this.options.scaleLineWidth*dpr;this._drawSolidLine(x,0,x,this.height*dpr,lineWidth,this.options.hoverLineColor);}},_proto._drawScale=function(){var lineWidth=this.options.scaleLineWidth*this.options.dpr;this._centerPositionX=parseInt(this.width*this.options.dpr/2+"");for(var centerPosition={x:this.width*this.options.dpr/2,y:this.height*this.options.dpr},curScaleTime=Math.floor(this.current.getTime()/1e3),offsetSecond=(curScaleTime-this._localDayStartSec(curScaleTime))%this._timeWidthArray[0],padding=this.height*this.options.dpr/20,spacing=this._curScaleSpacing*this.options.dpr,rightLastScaleTimeX=Math.floor(this._centerPositionX+(this._timeWidthArray[0]-offsetSecond)/this._timeWidthArray[0]*spacing),leftLastScaleTime=curScaleTime-offsetSecond,rightLastScaleTime=leftLastScaleTime+this._timeWidthArray[0],x=rightLastScaleTimeX-spacing;x>0;x-=spacing){0===(leftLastScaleTime-this._localDayStartSec(leftLastScaleTime))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x,padding,x,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(distExports$4.DateTime.format(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x,padding,x,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),leftLastScaleTime-=this._timeWidthArray[0];}for(var x1=rightLastScaleTimeX;x1<=this.width*this.options.dpr;x1+=spacing){0===(rightLastScaleTime-this._localDayStartSec(rightLastScaleTime))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x1,padding,x1,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(distExports$4.DateTime.format(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x1,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x1,padding,x1,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),rightLastScaleTime+=this._timeWidthArray[0];}this._drawCenterIndicator(centerPosition.x,centerPosition.y);},_proto._drawCenterIndicator=function(centerX,totalHeight){if(this._ctx){var dpr=this.options.dpr,lineW=2*dpr,triH=3*dpr,baseW=6*dpr,baseH=5*dpr,x=centerX;this._ctx.save(),this._ctx.fillStyle=this.options.timePointColor,this._ctx.fillRect(x-lineW/2,0,lineW,totalHeight),this._ctx.beginPath(),this._ctx.moveTo(x-baseW/2,0),this._ctx.lineTo(x+baseW/2,0),this._ctx.lineTo(x+baseW/2,baseH),this._ctx.lineTo(x,baseH+triH),this._ctx.lineTo(x-baseW/2,baseH),this._ctx.closePath(),this._ctx.fill(),this._ctx.beginPath(),this._ctx.moveTo(x-baseW/2,totalHeight),this._ctx.lineTo(x+baseW/2,totalHeight),this._ctx.lineTo(x+baseW/2,totalHeight-baseH),this._ctx.lineTo(x,totalHeight-baseH-triH),this._ctx.lineTo(x-baseW/2,totalHeight-baseH),this._ctx.closePath(),this._ctx.fill(),this._ctx.restore();}},_proto._drawSolidLine=function(startX,startY,endX,endY,lineWidth,color){this._ctx&&(this._ctx.save(),this._ctx.strokeStyle=null!=color?color:this.options.timeScaleColor,this._ctx.lineWidth=lineWidth,this._ctx.beginPath(),this._ctx.moveTo(startX,startY),this._ctx.lineTo(endX,endY),this._ctx.stroke(),this._ctx.restore());},_proto._drawTextString=function(text,x,y,align){if(this._ctx){var timeTexts=text.split(" ");this._ctx.font=(opts=this.options,dpr=this.options.dpr,(null!=(_opts_timeTextFontSize=opts.timeTextFontSize)?_opts_timeTextFontSize:12)*(dpr||1)+"px "+(null!=(_opts_timeTextFontFamily=opts.timeTextFontFamily)?_opts_timeTextFontFamily:"serif")),this._ctx.fillStyle=this.options.timeTextColor,this._ctx.textAlign=align||"left",this._timeWidthArray[0]%60==0&&(timeTexts[1]=timeTexts[1].replace(/:00$/,"")),this._ctx.fillText(timeTexts[1],x,y+8*this.options.dpr),!this.options.showYearMonthDay||"00:00:00"!==timeTexts[1]&&"00:00"!==timeTexts[1]&&this._timeWidthArray[0]*this._timeWidthArray[2]!==86400||(this._ctx.textAlign=align||"left",this._ctx.fillText(timeTexts[0],x,y+18*this.options.dpr));}var opts,dpr,_opts_timeTextFontSize,_opts_timeTextFontFamily;},_proto._drawSections=function(){for(var timeArr=this.timeSections||[],dpr=this.options.dpr,_ref=this.options.timeSectionOffset||[],tmp=_ref[0],offsetTopPx=void 0===tmp?0:tmp,tmp1=_ref[1],offsetTop=offsetTopPx*dpr,offsetBottom=(void 0===tmp1?0:tmp1)*dpr,sectionHeight=this.height*dpr-offsetTop-offsetBottom,i=0;i<timeArr.length;i++){var position=this._findPosition(timeArr[i]);this._ctx&&isOverlap(0,this.width*this.options.dpr,position.x1,position.x2)&&(this._ctx.fillStyle=this.options.timeSectionColor,this._ctx.fillRect(position.x1,offsetTop,position.x2-position.x1,sectionHeight));}this._renderSectionIcons(this._collectSectionIcons(offsetTop,sectionHeight));},_proto._findPosition=function(item){var x1=(parseInt((item.startTime-this.current.getTime())/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing+this.width/2)*this.options.dpr;return {x1:x1,x2:x1+parseInt((item.endTime-item.startTime)/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing*this.options.dpr}},_proto._addEventListener=function(){this._$canvas&&(this._$canvas.addEventListener("mousemove",this._mousemoveFun),this._$canvas.addEventListener("mouseover",this._mouseoverFun),this._$canvas.addEventListener("mouseleave",this._mouseleaveFun),this._$canvas.addEventListener("mousedown",this._mousedownFun),this._$canvas.addEventListener("mouseup",this._mouseUpFun),this._$canvas.addEventListener("click",this._clickFun),this._$canvas.addEventListener("wheel",this._mousewheelFun),this.$container.addEventListener("wheel",this._containerWheelFun,{passive:false}),this._$canvas.addEventListener("touchstart",this._touchstartFun,{passive:false}),this._$canvas.addEventListener("touchmove",this._touchmoveFun,{passive:false}),this._$canvas.addEventListener("touchend",this._touchendFun,{passive:false}));},_proto._removeEventListener=function(){this._$canvas&&(this._$canvas.removeEventListener("mousemove",this._mousemoveFun),this._$canvas.removeEventListener("mouseover",this._mouseoverFun),this._$canvas.removeEventListener("mouseleave",this._mouseleaveFun),this._$canvas.removeEventListener("mousedown",this._mousedownFun),this._$canvas.removeEventListener("mouseup",this._mouseUpFun),this._$canvas.removeEventListener("click",this._clickFun),this._$canvas.removeEventListener("wheel",this._mousewheelFun),this.$container.removeEventListener("wheel",this._containerWheelFun),this._$canvas.removeEventListener("touchstart",this._touchstartFun),this._$canvas.removeEventListener("touchmove",this._touchmoveFun),this._$canvas.removeEventListener("touchend",this._touchendFun));},_proto._mousedownFun=function(e){this.readOnly||(this._isMouseDown=true,this._mousePosition=e.pageX,this._oldTime=this.current,this._dragMoved=false,this._hideHoverTip(),this._hoverActive=false,null==this.options.onDragStart||this.options.onDragStart.call(this.options,this.current));},_proto._mouseoverFun=function(){this.readOnly||(this._isOver=true,this._containerRect=this.$container.getBoundingClientRect());},_proto._mouseleaveFun=function(e){this.readOnly||(this._isOver=false,this._containerRect=null,this._hideHoverTip(),this._hoverActive=false,this._draw(),this._moveEndOrTouchEndFun(e));},_proto._containerWheelFun=function(e){this.options.enabledWheelZoom&&e.target===this._$canvas&&e.preventDefault();},_proto._mouseUpFun=function(e){this._moveEndOrTouchEndFun(e);},_proto._clickFun=function(e){if(!this.readOnly&&this.options.enabledClickToSeek)if(this._dragMoved)this._dragMoved=false;else {var rect=this._getContainerRect(),x=e.clientX-rect.left,date=this._hoverTimeAt(x);this._update({current:date}),null==this.options.onClickSeek||this.options.onClickSeek.call(this.options,date);}},_proto._mousemoveFun=function(e){if(!this.readOnly)if(this._isMouseDown&&this._isOver)this._moveUpdateFun(e.pageX);else {var left=parseInt(this.$container.offsetLeft+"",10);this._mousePosition=e.pageX-left;var rect=this._getContainerRect();this._hoverActive=true,this._hoverLineX=e.clientX-rect.left,this._scheduleDraw(),this._showHoverTip(e.clientX-rect.left,e.clientY-rect.top);}},_proto._mousewheelFun=function(e){if(this.options.enabledWheelZoom)if(e.preventDefault(),e.deltaY>0){if(this.timeWidth<=0)return;this.setTimeWidth(this.timeWidth-1);}else this.setTimeWidth(this.timeWidth+1);},_proto._touchstartFun=function(e){if(!this.readOnly)if(this._oldTime=this.current,this._isOver=true,1===e.touches.length){var touch=e.touches[0];this._isMouseDown=true,this._mousePosition=touch.clientX;}else 2===e.touches.length&&(this._lastTouchDist=getTouchDistance(e.touches));},_proto._touchmoveFun=function(e){if(e.preventDefault(),e.stopPropagation(),!this.readOnly)if(1===e.touches.length){var touch=e.touches[0];this._moveUpdateFun(touch.clientX);}else 2===e.touches.length&&(this._lastTouchDist=getTouchDistance(e.touches));},_proto._touchendFun=function(e){this.readOnly||this._moveEndOrTouchEndFun(e);},_proto._moveEndOrTouchEndFun=function(e){e.preventDefault(),this.readOnly||this._isMouseDown&&(this._isMouseDown=false,this._moved&&(this._moved=false,this._update({current:this.current}),this._oldTime=this.current,null==this.options.onDragEnd||this.options.onDragEnd.call(this.options,this.current,this._isOver)),this._isOver&&Math.abs(this._mousePosition-(e.pageX||0))>5&&(null==this.options.onChange||this.options.onChange.call(this.options,this.current)),this._mousePosition=0,this._lastTouchDist=0);},_proto._moveUpdateFun=function(x){var mouseOffset=this._mousePosition-x;if(0!==mouseOffset){if(this._oldTime){var currentTime=this._oldTime.getTime()+1e3*parseInt(mouseOffset/this._curScaleSpacing*this._timeWidthArray[0]+"",10);this._update({current:new Date(currentTime)}),null==this.options.onDragging||this.options.onDragging.call(this.options,new Date(currentTime));}this._moved=true,this._dragMoved=true;}},_create_class$3(TimeLine,[{key:"_curScaleSpacing",get:function(){var _this__timeWidthArray,_this__timeWidthArray1;return Math.floor((null==(_this__timeWidthArray=this._timeWidthArray)?void 0:_this__timeWidthArray[1])-(null==(_this__timeWidthArray1=this._timeWidthArray)?void 0:_this__timeWidthArray1[1])*+(this.timeWidth%1/2).toFixed(2))}}]),TimeLine}(BaseTimeLine);TimeLine.TIME_WIDTH=TIME_WIDTH;
|
|
12072
10905
|
|
|
12073
10906
|
function _extends$4() {
|
|
12074
10907
|
_extends$4 = Object.assign || function(target) {
|
|
@@ -12117,7 +10950,7 @@
|
|
|
12117
10950
|
classNameSuffix: 'time-line'
|
|
12118
10951
|
})) || this, _this._$add = null, _this._$reduce = null, _this._$scaleWrapper = null, _this._currentTime = 0, _this.records = [];
|
|
12119
10952
|
_this._currentTime = 0;
|
|
12120
|
-
_this._options = deepmerge
|
|
10953
|
+
_this._options = deepmerge.all([
|
|
12121
10954
|
{
|
|
12122
10955
|
showTimeWidthBtn: true
|
|
12123
10956
|
},
|
|
@@ -12156,6 +10989,7 @@
|
|
|
12156
10989
|
showCoverFold: (_this__options_showCoverFold = this._options.showCoverFold) != null ? _this__options_showCoverFold : true,
|
|
12157
10990
|
hoverTipPlacement: 'top'
|
|
12158
10991
|
}, this._options || {}, {
|
|
10992
|
+
showSectionIcon: false,
|
|
12159
10993
|
onClickSeek: function(date) {
|
|
12160
10994
|
if (date == null ? void 0 : date.getTime()) {
|
|
12161
10995
|
_this._options.onClickSeek == null ? void 0 : _this._options.onClickSeek.call(_this._options, date);
|
|
@@ -12187,7 +11021,7 @@
|
|
|
12187
11021
|
_this.emit('TimeLine.onSectionIconClick', result);
|
|
12188
11022
|
}
|
|
12189
11023
|
});
|
|
12190
|
-
if (distExports$
|
|
11024
|
+
if (distExports$4.isMobile()) {
|
|
12191
11025
|
this.timeLineUtil = new MobileTimeLine(this.$container, _timeLineOptions);
|
|
12192
11026
|
} else {
|
|
12193
11027
|
this.timeLineUtil = new TimeLine(this.$container, _timeLineOptions);
|
|
@@ -12197,7 +11031,7 @@
|
|
|
12197
11031
|
this.timeLineUtil.update(new Date());
|
|
12198
11032
|
};
|
|
12199
11033
|
_proto.setWidth = function setWidth(width) {
|
|
12200
|
-
if (!distExports$
|
|
11034
|
+
if (!distExports$4.isMobile()) this.timeLineUtil.resize(width);
|
|
12201
11035
|
};
|
|
12202
11036
|
_proto._renderAddReduce = function _renderAddReduce() {
|
|
12203
11037
|
var _this = this;
|
|
@@ -13267,6 +12101,97 @@
|
|
|
13267
12101
|
if ((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1['recControl']) ((_theme_controls2 = theme.controls) == null ? void 0 : _theme_controls2['recControl']).addRecType(recType);
|
|
13268
12102
|
};
|
|
13269
12103
|
|
|
12104
|
+
/**
|
|
12105
|
+
* 布局溢出(More 收纳)与响应式尺寸分档的**纯函数**模块。
|
|
12106
|
+
*
|
|
12107
|
+
* @remarks
|
|
12108
|
+
* 这些函数只做「计算 / 判定」,不含任何 DOM 副作用,因此可以在没有布局引擎的环境(如 jsdom)
|
|
12109
|
+
* 中被完整单元测试。`theme.ts` 中的命令式外壳(读取 `clientWidth`、增删 class、创建 More、
|
|
12110
|
+
* 搬移控件)负责副作用,具体的判定逻辑全部下沉到这里。
|
|
12111
|
+
*/ /**
|
|
12112
|
+
* 一次 classList 变更集合:需要添加与需要移除的类名。
|
|
12113
|
+
*/ /**
|
|
12114
|
+
* 根据尺寸计算某一维度(宽或高)需要增删的响应式档位类名。
|
|
12115
|
+
*
|
|
12116
|
+
* 档位规则:
|
|
12117
|
+
* - `(280, 375]` → medium
|
|
12118
|
+
* - `(200, 280]` → small
|
|
12119
|
+
* - `<= 200` → mini
|
|
12120
|
+
* - 其它(> 375)→ 无档位(移除全部)
|
|
12121
|
+
*
|
|
12122
|
+
* @param size 尺寸(px)
|
|
12123
|
+
* @param axis `'width'` 或 `'height'`
|
|
12124
|
+
* @param prefix 类名前缀(如 `ezplayer`)
|
|
12125
|
+
*/ function computeDimensionClasses(size, axis, prefix) {
|
|
12126
|
+
var medium = prefix + "-medium-" + axis;
|
|
12127
|
+
var small = prefix + "-small-" + axis;
|
|
12128
|
+
var mini = prefix + "-mini-" + axis;
|
|
12129
|
+
var add = [];
|
|
12130
|
+
var remove = [];
|
|
12131
|
+
if (size > 280 && size <= 375) {
|
|
12132
|
+
add.push(medium);
|
|
12133
|
+
remove.push(small, mini);
|
|
12134
|
+
} else if (size > 200 && size <= 280) {
|
|
12135
|
+
add.push(small);
|
|
12136
|
+
remove.push(medium, mini);
|
|
12137
|
+
} else {
|
|
12138
|
+
if (size <= 200) {
|
|
12139
|
+
add.push(mini);
|
|
12140
|
+
} else {
|
|
12141
|
+
remove.push(mini);
|
|
12142
|
+
}
|
|
12143
|
+
remove.push(small, medium);
|
|
12144
|
+
}
|
|
12145
|
+
return {
|
|
12146
|
+
add: add,
|
|
12147
|
+
remove: remove
|
|
12148
|
+
};
|
|
12149
|
+
}
|
|
12150
|
+
/**
|
|
12151
|
+
* 计算宽、高两个维度的响应式档位类名增删集合。
|
|
12152
|
+
* @param width 容器宽度(px)
|
|
12153
|
+
* @param height 容器高度(px)
|
|
12154
|
+
* @param prefix 类名前缀
|
|
12155
|
+
*/ function computeSizeClasses(width, height, prefix) {
|
|
12156
|
+
var w = computeDimensionClasses(width, 'width', prefix);
|
|
12157
|
+
var h = computeDimensionClasses(height, 'height', prefix);
|
|
12158
|
+
return {
|
|
12159
|
+
add: [].concat(w.add, h.add),
|
|
12160
|
+
remove: [].concat(w.remove, h.remove)
|
|
12161
|
+
};
|
|
12162
|
+
}
|
|
12163
|
+
/**
|
|
12164
|
+
* header 左右控件宽度之和 + 30 是否超过容器宽度 —— 超过则需要显示 More。
|
|
12165
|
+
*/ function shouldShowHeaderMore(width, leftWidth, rightWidth) {
|
|
12166
|
+
return leftWidth + rightWidth + 30 > width;
|
|
12167
|
+
}
|
|
12168
|
+
/**
|
|
12169
|
+
* header 剩余空间是否 > 100 —— 足够则可以移除 More,把控件放回工具栏。
|
|
12170
|
+
*/ function shouldRemoveHeaderMore(width, leftWidth, rightWidth) {
|
|
12171
|
+
return width - leftWidth - rightWidth > 100;
|
|
12172
|
+
}
|
|
12173
|
+
/**
|
|
12174
|
+
* footer 剩余空间是否 < 16 —— 不足则需要把控件收拢进 More。
|
|
12175
|
+
*/ function shouldCollapseFooter(width, leftWidth, rightWidth) {
|
|
12176
|
+
return width - leftWidth - rightWidth < 16;
|
|
12177
|
+
}
|
|
12178
|
+
/**
|
|
12179
|
+
* footer 从 More 中释放控件时的展开阈值。
|
|
12180
|
+
*
|
|
12181
|
+
* 基准为 50;当 More 中已有控件时,加上首个控件宽度(保持与历史实现一致的运算与兜底:
|
|
12182
|
+
* `50 + firstItemWidth || 0`)。
|
|
12183
|
+
* @param firstItemWidth More 列表中第一个控件的宽度;未提供表示 More 为空。
|
|
12184
|
+
*/ function computeFooterExpandOffset(firstItemWidth) {
|
|
12185
|
+
var base = 50;
|
|
12186
|
+
if (firstItemWidth === undefined) return base;
|
|
12187
|
+
return base + firstItemWidth || 0;
|
|
12188
|
+
}
|
|
12189
|
+
/**
|
|
12190
|
+
* footer 剩余空间是否足够把一个控件从 More 释放回工具栏。
|
|
12191
|
+
*/ function shouldExpandFooter(width, leftWidth, rightWidth, offset) {
|
|
12192
|
+
return width - leftWidth - rightWidth > offset;
|
|
12193
|
+
}
|
|
12194
|
+
|
|
13270
12195
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */ function _array_like_to_array(arr, len) {
|
|
13271
12196
|
if (len == null || len > arr.length) len = arr.length;
|
|
13272
12197
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -13520,7 +12445,7 @@
|
|
|
13520
12445
|
_inherits(Theme, EventEmitter);
|
|
13521
12446
|
function Theme(options) {
|
|
13522
12447
|
var _this;
|
|
13523
|
-
var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_options, _this_options1
|
|
12448
|
+
var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_options, _this_options1;
|
|
13524
12449
|
_this = EventEmitter.call(this) || this, /** 播放器配置项 */ _this.options = THEME_DEFAULT_OPTIONS, _this.staticPath = '', /** 所有控件列表, 所有控件名称规则(`${iconId}Control`), 如音量控件 this.controls["volumeControl"] @since 0.0.1 */ _this.controls = {}, /**
|
|
13525
12450
|
* @since 0.0.1
|
|
13526
12451
|
* @private
|
|
@@ -13555,13 +12480,13 @@
|
|
|
13555
12480
|
_this._initOptions(options);
|
|
13556
12481
|
if (_this.options.type === 'ezopen') {
|
|
13557
12482
|
var _this_urlInfo_searchParams, _this_urlInfo;
|
|
13558
|
-
_this.urlInfo = distExports$
|
|
12483
|
+
_this.urlInfo = distExports$4.parseEzopenUrl(_this.options.url);
|
|
13559
12484
|
if ((_this_urlInfo = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams = _this_urlInfo.searchParams) == null ? void 0 : _this_urlInfo_searchParams.spaceId) {
|
|
13560
12485
|
_this.options.spaceId = _this.urlInfo.searchParams.spaceId;
|
|
13561
12486
|
}
|
|
13562
12487
|
if (_this.urlInfo.type === 'rec') {
|
|
13563
12488
|
var _this_urlInfo_searchParams1, _this_urlInfo1, _this_urlInfo_searchParams2, _this_urlInfo2;
|
|
13564
|
-
_this._seekDate = ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.begin) ? distExports$
|
|
12489
|
+
_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');
|
|
13565
12490
|
}
|
|
13566
12491
|
}
|
|
13567
12492
|
_this._getRecType(_this.options.url);
|
|
@@ -13600,16 +12525,31 @@
|
|
|
13600
12525
|
_this._headerMoreControlShow = debounce(_this._headerMoreControlShow.bind(_this), 200);
|
|
13601
12526
|
_this._footerMoreControlShow = debounce(_this._footerMoreControlShow.bind(_this), 200);
|
|
13602
12527
|
_this.destroyed = false;
|
|
13603
|
-
|
|
13604
|
-
//
|
|
13605
|
-
//
|
|
13606
|
-
|
|
13607
|
-
|
|
13608
|
-
|
|
12528
|
+
// 标准流暂时仅支持 TEMPLATES 中的配置,多余的展示不生效(如电子放大等),待版本更新后才能支持。
|
|
12529
|
+
//
|
|
12530
|
+
// 下面根据播放类型决定初始渲染使用的「主题数据 / 模板」,规则如下:
|
|
12531
|
+
// 关键点:themeData 只要不是 undefined(即便显式传入 null)就以它为准,
|
|
12532
|
+
// 仅当未传(undefined)时才回退到对应的标准模板;
|
|
12533
|
+
// 因此 themeData: null 表示「不展示主题」,而非回退到默认模板。
|
|
12534
|
+
var themeData = (_this_options = _this.options) == null ? void 0 : _this_options.themeData; // IThemeData | null | undefined
|
|
12535
|
+
var template = (_this_options1 = _this.options) == null ? void 0 : _this_options1.template; // ThemeTemplateType | string | undefined
|
|
12536
|
+
var initialThemeData;
|
|
12537
|
+
if (options.type === 'hls' || options.type === 'ezhls') {
|
|
12538
|
+
// hls / ezhls:@3.1.1 起支持自定义 themeData,但不支持标准提供的模板;未传时回退 hlsLiveTemplate
|
|
12539
|
+
// FIXME: 部分控件在 hls 下不生效,开发者需自行斟酌
|
|
12540
|
+
initialThemeData = themeData !== undefined ? themeData : hlsLiveTemplate;
|
|
12541
|
+
} else if ([
|
|
13609
12542
|
'flv',
|
|
13610
12543
|
'mp4'
|
|
13611
|
-
].includes(options.type)
|
|
13612
|
-
|
|
12544
|
+
].includes(options.type)) {
|
|
12545
|
+
// flv / mp4:支持自定义 themeData,未传时回退到标准直播模板 LiveTemplate(2026-01-19 起支持自定义)
|
|
12546
|
+
initialThemeData = themeData !== undefined ? themeData : LiveTemplate;
|
|
12547
|
+
} else {
|
|
12548
|
+
var _ref3;
|
|
12549
|
+
// 其余类型(如 ezopen 私有流):template 优先级高于 themeData,二者都未设置时为 null
|
|
12550
|
+
initialThemeData = (_ref3 = template != null ? template : themeData) != null ? _ref3 : null;
|
|
12551
|
+
}
|
|
12552
|
+
_this._renderTheme(initialThemeData);
|
|
13613
12553
|
_this._addEventListener();
|
|
13614
12554
|
_themeEventemitter(_this);
|
|
13615
12555
|
return _this;
|
|
@@ -13827,7 +12767,7 @@
|
|
|
13827
12767
|
/** 初始化配置项 */ _proto._initOptions = function _initOptions(options) {
|
|
13828
12768
|
if (options === void 0) options = {};
|
|
13829
12769
|
var _this_options_loggerOptions, _this_options_definitionOptions_list, _this_options_definitionOptions, _this_options_videoLevelList;
|
|
13830
|
-
this.options = deepmerge
|
|
12770
|
+
this.options = deepmerge(THEME_DEFAULT_OPTIONS, options, {
|
|
13831
12771
|
clone: false
|
|
13832
12772
|
});
|
|
13833
12773
|
// ⚠警告 (./utils/interactiveHF.ts)
|
|
@@ -13861,14 +12801,14 @@
|
|
|
13861
12801
|
this.logger.log('[options] \n', this.options);
|
|
13862
12802
|
}
|
|
13863
12803
|
var language = this.options.language || 'zh';
|
|
13864
|
-
var locales = deepmerge
|
|
13865
|
-
zh: zh
|
|
13866
|
-
en: en
|
|
12804
|
+
var locales = deepmerge({
|
|
12805
|
+
zh: zh,
|
|
12806
|
+
en: en
|
|
13867
12807
|
}, this.options.locales || {}, {
|
|
13868
12808
|
clone: false
|
|
13869
12809
|
});
|
|
13870
12810
|
// prettier-ignore
|
|
13871
|
-
this.i18n = new I18n
|
|
12811
|
+
this.i18n = new I18n(locales, {
|
|
13872
12812
|
defaultLocale: language
|
|
13873
12813
|
});
|
|
13874
12814
|
// 默认清晰度列表
|
|
@@ -14004,6 +12944,7 @@
|
|
|
14004
12944
|
this._mobileInnerWidthHeight();
|
|
14005
12945
|
window.addEventListener('resize', this._throttleMobileInnerWidthHeight);
|
|
14006
12946
|
// ------------------------------ resize observer ----------------------------
|
|
12947
|
+
// istanbul ignore next -- jsdom has no layout engine; clientWidth/height-driven resize bucketing is not exercisable in unit tests
|
|
14007
12948
|
// prettier-ignore
|
|
14008
12949
|
this._cleanUpResizeObserver = Utils.resizeObserver(this.$container, throttle(function() {
|
|
14009
12950
|
var // 窗口尺寸变化时,设置窗口超出隐藏,防止出现滚动条
|
|
@@ -14012,40 +12953,14 @@
|
|
|
14012
12953
|
// 这里不要使用 $containerWarp.getBoundingClientRect() 获取宽和高 因为会出现小数导致两次(设置后的值和设置后再次获取的值)的宽高不一致 (因为缩放后取整设置,再次获取还有可能是带小数的然后取整 对比两次不一致,一般在屏幕缩放百分比变化和浏览器页面缩放时出现),致使一直触发 resize 事件
|
|
14013
12954
|
var width = Math.floor(_this.$container.clientWidth);
|
|
14014
12955
|
var height = Math.floor(_this.$container.clientHeight);
|
|
14015
|
-
|
|
14016
|
-
|
|
14017
|
-
|
|
14018
|
-
_this.$container.classList.
|
|
14019
|
-
}
|
|
14020
|
-
|
|
14021
|
-
_this.$container.classList.remove(
|
|
14022
|
-
|
|
14023
|
-
} else {
|
|
14024
|
-
if (width <= 200) {
|
|
14025
|
-
_this.$container.classList.add("" + PREFIX_CLASS + "-mini-width");
|
|
14026
|
-
} else {
|
|
14027
|
-
_this.$container.classList.remove("" + PREFIX_CLASS + "-mini-width");
|
|
14028
|
-
}
|
|
14029
|
-
_this.$container.classList.remove("" + PREFIX_CLASS + "-small-width");
|
|
14030
|
-
_this.$container.classList.remove("" + PREFIX_CLASS + "-medium-width");
|
|
14031
|
-
}
|
|
14032
|
-
if (height > 280 && height <= 375) {
|
|
14033
|
-
_this.$container.classList.add("" + PREFIX_CLASS + "-medium-height");
|
|
14034
|
-
_this.$container.classList.remove("" + PREFIX_CLASS + "-small-height");
|
|
14035
|
-
_this.$container.classList.remove("" + PREFIX_CLASS + "-mini-height");
|
|
14036
|
-
} else if (height > 200 && height <= 280) {
|
|
14037
|
-
_this.$container.classList.add("" + PREFIX_CLASS + "-small-height");
|
|
14038
|
-
_this.$container.classList.remove("" + PREFIX_CLASS + "-medium-height");
|
|
14039
|
-
_this.$container.classList.remove("" + PREFIX_CLASS + "-mini-height");
|
|
14040
|
-
} else {
|
|
14041
|
-
if (height <= 200) {
|
|
14042
|
-
_this.$container.classList.add("" + PREFIX_CLASS + "-mini-height");
|
|
14043
|
-
} else {
|
|
14044
|
-
_this.$container.classList.remove("" + PREFIX_CLASS + "-mini-height");
|
|
14045
|
-
}
|
|
14046
|
-
_this.$container.classList.remove("" + PREFIX_CLASS + "-small-height");
|
|
14047
|
-
_this.$container.classList.remove("" + PREFIX_CLASS + "-medium-height");
|
|
14048
|
-
}
|
|
12956
|
+
// 响应式档位类名(纯逻辑见 ./Theme/overflow computeSizeClasses)
|
|
12957
|
+
var sizeClasses = computeSizeClasses(width, height, PREFIX_CLASS);
|
|
12958
|
+
sizeClasses.add.forEach(function(c) {
|
|
12959
|
+
return _this.$container.classList.add(c);
|
|
12960
|
+
});
|
|
12961
|
+
sizeClasses.remove.forEach(function(c) {
|
|
12962
|
+
return _this.$container.classList.remove(c);
|
|
12963
|
+
});
|
|
14049
12964
|
//
|
|
14050
12965
|
if (_this.width !== width || _this.height !== height) {
|
|
14051
12966
|
var _this_controls;
|
|
@@ -14091,7 +13006,7 @@
|
|
|
14091
13006
|
/**
|
|
14092
13007
|
* 窗口尺寸变化判断头部是否需要隐藏控件展示在更多中
|
|
14093
13008
|
* 尺寸变化结束时 进行判断,为了节省开销
|
|
14094
|
-
*/ _proto._headerMoreControlShow = function _headerMoreControlShow() {
|
|
13009
|
+
*/ /* istanbul ignore next -- jsdom has no layout engine; clientWidth-driven header overflow (More) logic is not exercisable in unit tests */ _proto._headerMoreControlShow = function _headerMoreControlShow() {
|
|
14095
13010
|
var _this = this;
|
|
14096
13011
|
if (this._header) {
|
|
14097
13012
|
var _this__header_$left, _this__header, _this__header_$right, _this__header1;
|
|
@@ -14102,7 +13017,7 @@
|
|
|
14102
13017
|
var rightWidth = ((_this__header1 = this._header) == null ? void 0 : (_this__header_$right = _this__header1.$right) == null ? void 0 : _this__header_$right.clientWidth) || 0;
|
|
14103
13018
|
// 当header 中 left 和 right 宽度之和大于 header 宽度,则 header more 显示
|
|
14104
13019
|
// 如果 header more 存在,则偏移量量宽度为 150,否则为 100, 因为隐藏多个控件时 right 会变短
|
|
14105
|
-
var showHeaderMore = leftWidth
|
|
13020
|
+
var showHeaderMore = shouldShowHeaderMore(this._width, leftWidth, rightWidth);
|
|
14106
13021
|
if (showHeaderMore) {
|
|
14107
13022
|
var _this_controls;
|
|
14108
13023
|
if (!this._headerMoreControl && ((_this_controls = this.controls) == null ? void 0 : _this_controls.recControl)) {
|
|
@@ -14130,7 +13045,7 @@
|
|
|
14130
13045
|
(_this_controls1 = this.controls) == null ? void 0 : (_this_controls_recControl = _this_controls1.recControl) == null ? void 0 : _this_controls_recControl.resetPopupContainer(this._headerMoreControl.$panel);
|
|
14131
13046
|
}
|
|
14132
13047
|
this.emit(Theme.EVENTS.control.headerMoreShowControlsChange, showHeaderMore);
|
|
14133
|
-
} else if (this._width
|
|
13048
|
+
} else if (shouldRemoveHeaderMore(this._width, leftWidth, rightWidth)) {
|
|
14134
13049
|
var _this_controls2;
|
|
14135
13050
|
//
|
|
14136
13051
|
if (this._headerMoreControl && ((_this_controls2 = this.controls) == null ? void 0 : _this_controls2.recControl)) {
|
|
@@ -14150,7 +13065,7 @@
|
|
|
14150
13065
|
*/ _proto._footerMoreControlShow = function _footerMoreControlShow() {
|
|
14151
13066
|
this._displayMore();
|
|
14152
13067
|
};
|
|
14153
|
-
_proto._displayMore = function _displayMore() {
|
|
13068
|
+
/* istanbul ignore next -- jsdom has no layout engine; clientWidth-driven footer overflow (More) logic is not exercisable in unit tests */ _proto._displayMore = function _displayMore() {
|
|
14154
13069
|
var _this = this;
|
|
14155
13070
|
if (this._footer) {
|
|
14156
13071
|
var _this__footer_$left, _this__footer_$right;
|
|
@@ -14158,7 +13073,7 @@
|
|
|
14158
13073
|
var leftWidth = ((_this__footer_$left = this._footer.$left) == null ? void 0 : _this__footer_$left.clientWidth) || 0;
|
|
14159
13074
|
var rightWidth = ((_this__footer_$right = this._footer.$right) == null ? void 0 : _this__footer_$right.clientWidth) || 0;
|
|
14160
13075
|
// 当footer 中 left 和 right 宽度之和大于 footer 宽度,则 footer more 显示
|
|
14161
|
-
var collapseControl = this._width
|
|
13076
|
+
var collapseControl = shouldCollapseFooter(this._width, leftWidth, rightWidth); // 收拢控件到 More 中
|
|
14162
13077
|
if (collapseControl) {
|
|
14163
13078
|
var _this__footer, _this__themeData_footer, _this__themeData, _this__footerMoreControl_list, _this__footerMoreControl, _this__footerMoreControl_list1, _this__footerMoreControl1;
|
|
14164
13079
|
if (!this._footerMoreControl && ((_this__footer = this._footer) == null ? void 0 : _this__footer.$right)) {
|
|
@@ -14238,28 +13153,23 @@
|
|
|
14238
13153
|
this._displayMore();
|
|
14239
13154
|
}
|
|
14240
13155
|
} else {
|
|
14241
|
-
var _this__footerMoreControl_list2,
|
|
14242
|
-
|
|
14243
|
-
|
|
14244
|
-
|
|
14245
|
-
|
|
14246
|
-
if ((_this__footerMoreControl5 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list2 = _this__footerMoreControl5.list) == null ? void 0 : _this__footerMoreControl_list2.length) {
|
|
14247
|
-
offset = offset + this._footerMoreControl.list[0].width || 0;
|
|
14248
|
-
}
|
|
14249
|
-
if (((_this__footerMoreControl6 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list3 = _this__footerMoreControl6.list) == null ? void 0 : _this__footerMoreControl_list3.length) && this._width - leftWidth - rightWidth > offset) {
|
|
14250
|
-
var _this__footerMoreControl7, _this__footerMoreControl_list4, _this__footerMoreControl8, _this__footerMoreControl_list5, _this__footerMoreControl9;
|
|
13156
|
+
var _this__footerMoreControl_list2, _this__footerMoreControl4, _this__footerMoreControl_list3, _this__footerMoreControl5;
|
|
13157
|
+
// 展开阈值(纯逻辑见 ./Theme/overflow computeFooterExpandOffset)
|
|
13158
|
+
var offset = computeFooterExpandOffset(((_this__footerMoreControl4 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list2 = _this__footerMoreControl4.list) == null ? void 0 : _this__footerMoreControl_list2.length) ? this._footerMoreControl.list[0].width : undefined);
|
|
13159
|
+
if (((_this__footerMoreControl5 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list3 = _this__footerMoreControl5.list) == null ? void 0 : _this__footerMoreControl_list3.length) && shouldExpandFooter(this._width, leftWidth, rightWidth, offset)) {
|
|
13160
|
+
var _this__footerMoreControl6, _this__footerMoreControl_list4, _this__footerMoreControl7, _this__footerMoreControl_list5, _this__footerMoreControl8;
|
|
14251
13161
|
// 110 是为了保住个别控件的宽度超出已知的值, 如英文下 按钮的宽度
|
|
14252
13162
|
// 从 More 中一次移除一个控件到 header/footer 中
|
|
14253
13163
|
//
|
|
14254
|
-
var item2 = (
|
|
13164
|
+
var item2 = (_this__footerMoreControl6 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl6.list.shift();
|
|
14255
13165
|
if (item2) {
|
|
14256
|
-
var
|
|
13166
|
+
var _this__footerMoreControl9;
|
|
14257
13167
|
if (item2.part === 'left') {
|
|
14258
13168
|
var _item_control_resetPopupContainer, _item_control;
|
|
14259
13169
|
(_item_control = item2.control) == null ? void 0 : (_item_control_resetPopupContainer = _item_control.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer.call(_item_control, this._footer.$left, 'append');
|
|
14260
13170
|
} else if (item2.part === 'right') {
|
|
14261
|
-
var _this__footerMoreControl_list6,
|
|
14262
|
-
if (((
|
|
13171
|
+
var _this__footerMoreControl_list6, _this__footerMoreControl10;
|
|
13172
|
+
if (((_this__footerMoreControl10 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list6 = _this__footerMoreControl10.list) == null ? void 0 : _this__footerMoreControl_list6.length) === 0) {
|
|
14263
13173
|
var _item_control_resetPopupContainer1, _item_control1;
|
|
14264
13174
|
(_item_control1 = item2.control) == null ? void 0 : (_item_control_resetPopupContainer1 = _item_control1.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer1.call(_item_control1, this._footer.$right, 'append');
|
|
14265
13175
|
} else {
|
|
@@ -14267,14 +13177,14 @@
|
|
|
14267
13177
|
(_item_control2 = item2.control) == null ? void 0 : (_item_control_resetPopupContainer2 = _item_control2.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer2.call(_item_control2, this._footer.$right, 'before', this._footerMoreControl.$container);
|
|
14268
13178
|
}
|
|
14269
13179
|
}
|
|
14270
|
-
(
|
|
13180
|
+
(_this__footerMoreControl9 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl9.remove(item2.control);
|
|
14271
13181
|
}
|
|
14272
|
-
if (((
|
|
14273
|
-
var
|
|
13182
|
+
if (((_this__footerMoreControl7 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list4 = _this__footerMoreControl7.list) == null ? void 0 : _this__footerMoreControl_list4.length) === 1) {
|
|
13183
|
+
var _this__footerMoreControl11, _this__footerMoreControl_destroy, _this__footerMoreControl12;
|
|
14274
13184
|
// 最后一个, 移除 More
|
|
14275
|
-
var item11 = (
|
|
13185
|
+
var item11 = (_this__footerMoreControl11 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl11.list.shift();
|
|
14276
13186
|
if (item11) {
|
|
14277
|
-
var
|
|
13187
|
+
var _this__footerMoreControl13;
|
|
14278
13188
|
if (item11.part === 'left') {
|
|
14279
13189
|
var _item1_control_resetPopupContainer, _item1_control;
|
|
14280
13190
|
(_item1_control = item11.control) == null ? void 0 : (_item1_control_resetPopupContainer = _item1_control.resetPopupContainer) == null ? void 0 : _item1_control_resetPopupContainer.call(_item1_control, this._footer.$left, 'append');
|
|
@@ -14282,13 +13192,13 @@
|
|
|
14282
13192
|
var _item1_control_resetPopupContainer1, _item1_control1;
|
|
14283
13193
|
(_item1_control1 = item11.control) == null ? void 0 : (_item1_control_resetPopupContainer1 = _item1_control1.resetPopupContainer) == null ? void 0 : _item1_control_resetPopupContainer1.call(_item1_control1, this._footer.$right, 'append');
|
|
14284
13194
|
}
|
|
14285
|
-
(
|
|
13195
|
+
(_this__footerMoreControl13 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl13.remove(item11.control);
|
|
14286
13196
|
}
|
|
14287
|
-
(
|
|
13197
|
+
(_this__footerMoreControl12 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_destroy = _this__footerMoreControl12.destroy) == null ? void 0 : _this__footerMoreControl_destroy.call(_this__footerMoreControl12);
|
|
14288
13198
|
this._footerMoreControl = null;
|
|
14289
13199
|
}
|
|
14290
13200
|
// prettier-ignore
|
|
14291
|
-
this.emit(Theme.EVENTS.control.footerMoreShowControlsChange, !!this._footerMoreControl, (
|
|
13201
|
+
this.emit(Theme.EVENTS.control.footerMoreShowControlsChange, !!this._footerMoreControl, (_this__footerMoreControl8 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list5 = _this__footerMoreControl8.list) == null ? void 0 : _this__footerMoreControl_list5.map(function(item) {
|
|
14292
13202
|
return item.key;
|
|
14293
13203
|
}));
|
|
14294
13204
|
this._displayMore();
|
|
@@ -14350,7 +13260,7 @@
|
|
|
14350
13260
|
* @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
|
|
14351
13261
|
*/ _proto._getRecType = function _getRecType(url) {
|
|
14352
13262
|
if (this.options.type === 'ezopen' && /^ezopen:\/\//.test(url)) {
|
|
14353
|
-
var urlInfo = distExports$
|
|
13263
|
+
var urlInfo = distExports$4.parseEzopenUrl(url);
|
|
14354
13264
|
if (urlInfo.type === 'rec') {
|
|
14355
13265
|
var _urlInfo_searchParams;
|
|
14356
13266
|
if (urlInfo.recType === 'cloud' && (urlInfo == null ? void 0 : (_urlInfo_searchParams = urlInfo.searchParams) == null ? void 0 : _urlInfo_searchParams.busType) === '7') {
|
|
@@ -14812,10 +13722,10 @@
|
|
|
14812
13722
|
/** 所有私有流的模板 @since 0.0.1 */ Theme.TEMPLATES = TEMPLATES;
|
|
14813
13723
|
/** 事件名称 @since 0.0.1 */ Theme.EVENTS = EVENTS$2;
|
|
14814
13724
|
/** 语言包 @since 0.0.1 */ Theme.LOCALES = {
|
|
14815
|
-
zh: zh
|
|
14816
|
-
en: en
|
|
13725
|
+
zh: zh,
|
|
13726
|
+
en: en
|
|
14817
13727
|
};
|
|
14818
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.
|
|
13728
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.1-beta.1';
|
|
14819
13729
|
|
|
14820
13730
|
// 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
|
|
14821
13731
|
|